diff --git a/3rdparty/bgfx/3rdparty/glsl-optimizer/Changelog.md b/3rdparty/bgfx/3rdparty/glsl-optimizer/Changelog.md index 39ce18b2541..92206386f12 100644 --- a/3rdparty/bgfx/3rdparty/glsl-optimizer/Changelog.md +++ b/3rdparty/bgfx/3rdparty/glsl-optimizer/Changelog.md @@ -1,6 +1,23 @@ GLSL optimizer Change Log ========================= +2016 06 +------- + +Fixed: + +* Fixed Metal translation in some cases having wrong precision on constants or constant arrays. + + +2016 05 +------- + +Fixed: + +* Fixed Metal translation in some cases having wrong precision on struct members. +* Fixed Metal translation in some cases emitting struct declarations vs. constant initializers in wrong order. + + 2016 03 ------- diff --git a/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ast_to_hir.cpp b/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ast_to_hir.cpp index c19ca4321ef..1d0fcb37203 100644 --- a/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ast_to_hir.cpp +++ b/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ast_to_hir.cpp @@ -3042,6 +3042,12 @@ process_initializer(ir_variable *var, ast_declaration *decl, ir_dereference *const lhs = new(state) ir_dereference_variable(var); ir_rvalue *rhs = decl->initializer->hir(initializer_instructions, state); + /* Propagate precision qualifier for constant value */ + if (type->qualifier.flags.q.constant) { + ir_constant *constant_value = rhs->constant_expression_value(); + constant_value->set_precision((glsl_precision)type->qualifier.precision); + } + /* Calculate the constant value if this is a const or uniform * declaration. */ diff --git a/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ir.cpp b/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ir.cpp index 636736e5237..ffb37eed157 100644 --- a/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ir.cpp +++ b/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ir.cpp @@ -647,8 +647,8 @@ ir_constant::ir_constant() } ir_constant::ir_constant(const struct glsl_type *type, - const ir_constant_data *data) - : ir_rvalue(ir_type_constant, glsl_precision_undefined) + const ir_constant_data *data, glsl_precision precision) + : ir_rvalue(ir_type_constant, precision) { assert((type->base_type >= GLSL_TYPE_UINT) && (type->base_type <= GLSL_TYPE_BOOL)); diff --git a/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ir.h b/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ir.h index 6d21d0e2e15..953e85e4e86 100644 --- a/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ir.h +++ b/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ir.h @@ -2161,7 +2161,7 @@ union ir_constant_data { class ir_constant : public ir_rvalue { public: - ir_constant(const struct glsl_type *type, const ir_constant_data *data); + ir_constant(const struct glsl_type *type, const ir_constant_data *data, glsl_precision precision = glsl_precision_undefined); ir_constant(bool b, unsigned vector_elements=1); ir_constant(unsigned int u, unsigned vector_elements=1); ir_constant(int i, unsigned vector_elements=1); diff --git a/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ir_clone.cpp b/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ir_clone.cpp index a32a836458d..140e36ff71e 100644 --- a/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ir_clone.cpp +++ b/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ir_clone.cpp @@ -330,7 +330,7 @@ ir_constant::clone(void *mem_ctx, struct hash_table *ht) const case GLSL_TYPE_INT: case GLSL_TYPE_FLOAT: case GLSL_TYPE_BOOL: - return new(mem_ctx) ir_constant(this->type, &this->value); + return new(mem_ctx) ir_constant(this->type, &this->value, this->precision); case GLSL_TYPE_STRUCT: { ir_constant *c = new(mem_ctx) ir_constant; @@ -351,6 +351,7 @@ ir_constant::clone(void *mem_ctx, struct hash_table *ht) const ir_constant *c = new(mem_ctx) ir_constant; c->type = this->type; + c->set_precision(this->get_precision()); c->array_elements = ralloc_array(c, ir_constant *, this->type->length); for (unsigned i = 0; i < this->type->length; i++) { c->array_elements[i] = this->array_elements[i]->clone(mem_ctx, NULL); diff --git a/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ir_print_metal_visitor.cpp b/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ir_print_metal_visitor.cpp index 9f7071d9564..c7919a4c568 100644 --- a/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ir_print_metal_visitor.cpp +++ b/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/ir_print_metal_visitor.cpp @@ -99,6 +99,7 @@ struct metal_print_context , inoutStr(ralloc_strdup(buffer, "")) , uniformStr(ralloc_strdup(buffer, "")) , paramsStr(ralloc_strdup(buffer, "")) + , typedeclStr(ralloc_strdup(buffer, "")) , writingParams(false) , matrixCastsDone(false) , matrixConstructorsDone(false) @@ -117,6 +118,7 @@ struct metal_print_context string_buffer inoutStr; string_buffer uniformStr; string_buffer paramsStr; + string_buffer typedeclStr; bool writingParams; bool matrixCastsDone; bool matrixConstructorsDone; @@ -267,7 +269,10 @@ _mesa_print_ir_metal(exec_list *instructions, if (var->data.mode == ir_var_shader_inout) strOut = &ctx.inoutStr; } - + + if (ir->ir_type == ir_type_typedecl) { + strOut = &ctx.typedeclStr; + } ir_print_metal_visitor v (ctx, *strOut, >racker, mode, state); v.loopstate = ls; @@ -293,6 +298,8 @@ _mesa_print_ir_metal(exec_list *instructions, ctx.uniformStr.asprintf_append("};\n"); // emit global array/struct constants + + ctx.prefixStr.asprintf_append("%s", ctx.typedeclStr.c_str()); foreach_in_list_safe(gconst_entry_metal, node, >racker.global_constants) { ir_constant* c = node->ir; @@ -1968,7 +1975,7 @@ ir_print_metal_visitor::visit(ir_typedecl_statement *ir) buffer.asprintf_append (" "); //if (state->es_shader) // buffer.asprintf_append ("%s", get_precision_string(s->fields.structure[j].precision)); //@TODO - print_type(buffer, ir, s->fields.structure[j].type, false); + print_type_precision(buffer, s->fields.structure[j].type, s->fields.structure[j].precision, false); buffer.asprintf_append (" %s", s->fields.structure[j].name); print_type_post(buffer, s->fields.structure[j].type, false); buffer.asprintf_append (";\n"); diff --git a/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/const-precision-inES3.txt b/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/const-precision-inES3.txt new file mode 100644 index 00000000000..a1eb058d651 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/const-precision-inES3.txt @@ -0,0 +1,40 @@ +#version 300 es +#define gl_FragData _glesFragData +layout(location = 0) out mediump vec4 _glesFragData[1]; + +struct v2f { + highp vec4 pos; + mediump vec2 uv; +}; + +struct u2v { + highp vec4 vertex; + mediump vec2 texcoord; +}; + +const mediump vec3[3] ha = vec3[3]( vec3( 1.0, 2.0, 3.0), vec3( 4.0, 5.0, 6.0), vec3( 7.0, 8.0, 9.0)); +const highp vec3[3] fa = vec3[3]( vec3( 11.0, 12.0, 13.0), vec3( 14.0, 15.0, 16.0), vec3( 17.0, 18.0, 19.0)); + +mediump vec4 frag( in v2f i ) { + mediump vec3 h = vec3( 0.0); + highp vec3 f = vec3( 0.0); + highp vec3 p = vec3( i.uv.xy, 1.0); + highp int j = 0; + for ( ; (j < int((i.uv.x * 3.0))); (j++)) { + h += ha[j]; + f += fa[j]; + f += (p * ha[0]); + } + return vec4( h.xy, f.xy); +} + +in mediump vec2 xlv_TEXCOORD0; +void main() { + mediump vec4 xl_retval; + v2f xlt_i; + xlt_i.pos = vec4(0.0); + xlt_i.uv = vec2(xlv_TEXCOORD0); + xl_retval = frag( xlt_i); + gl_FragData[0] = vec4(xl_retval); +} + diff --git a/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/const-precision-outES3.txt b/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/const-precision-outES3.txt new file mode 100644 index 00000000000..6676a2e8857 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/const-precision-outES3.txt @@ -0,0 +1,33 @@ +#version 300 es +layout(location=0) out mediump vec4 _glesFragData[1]; +in mediump vec2 xlv_TEXCOORD0; +void main () +{ + mediump vec4 tmpvar_1; + mediump vec2 tmpvar_2; + tmpvar_2 = xlv_TEXCOORD0; + highp vec3 p_4; + highp vec3 f_5; + mediump vec3 h_6; + h_6 = vec3(0.0, 0.0, 0.0); + f_5 = vec3(0.0, 0.0, 0.0); + mediump vec3 tmpvar_7; + tmpvar_7.z = 1.0; + tmpvar_7.xy = xlv_TEXCOORD0; + p_4 = tmpvar_7; + for (highp int j_3 = 0; j_3 < int((tmpvar_2.x * 3.0)); j_3++) { + h_6 = (h_6 + vec3[3](vec3(1.0, 2.0, 3.0), vec3(4.0, 5.0, 6.0), vec3(7.0, 8.0, 9.0))[j_3]); + f_5 = (f_5 + vec3[3](vec3(11.0, 12.0, 13.0), vec3(14.0, 15.0, 16.0), vec3(17.0, 18.0, 19.0))[j_3]); + f_5 = (f_5 + (p_4 * vec3(1.0, 2.0, 3.0))); + }; + highp vec4 tmpvar_8; + tmpvar_8.xy = h_6.xy; + tmpvar_8.zw = f_5.xy; + tmpvar_1 = tmpvar_8; + _glesFragData[0] = tmpvar_1; +} + + +// stats: 12 alu 0 tex 2 flow +// inputs: 1 +// #0: xlv_TEXCOORD0 (medium float) 2x1 [-1] diff --git a/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/const-precision-outES3Metal.txt b/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/const-precision-outES3Metal.txt new file mode 100644 index 00000000000..78a6ad1bf92 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/const-precision-outES3Metal.txt @@ -0,0 +1,45 @@ +#include +#pragma clang diagnostic ignored "-Wparentheses-equality" +using namespace metal; +constant half3 _xlat_mtl_const1[3] = {float3(1.0, 2.0, 3.0), float3(4.0, 5.0, 6.0), float3(7.0, 8.0, 9.0)}; +constant float3 _xlat_mtl_const2[3] = {float3(11.0, 12.0, 13.0), float3(14.0, 15.0, 16.0), float3(17.0, 18.0, 19.0)}; +struct xlatMtlShaderInput { + half2 xlv_TEXCOORD0; +}; +struct xlatMtlShaderOutput { + half4 _glesFragData_0 [[color(0)]]; +}; +struct xlatMtlShaderUniform { +}; +fragment xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]]) +{ + xlatMtlShaderOutput _mtl_o; + half4 tmpvar_1; + half2 tmpvar_2; + tmpvar_2 = _mtl_i.xlv_TEXCOORD0; + float3 p_4; + float3 f_5; + half3 h_6; + h_6 = half3(float3(0.0, 0.0, 0.0)); + f_5 = float3(0.0, 0.0, 0.0); + half3 tmpvar_7; + tmpvar_7.z = half(1.0); + tmpvar_7.xy = _mtl_i.xlv_TEXCOORD0; + p_4 = float3(tmpvar_7); + for (int j_3 = 0; j_3 < short((tmpvar_2.x * (half)3.0)); j_3++) { + h_6 = (h_6 + _xlat_mtl_const1[j_3]); + f_5 = (f_5 + _xlat_mtl_const2[j_3]); + f_5 = (f_5 + (p_4 * float3(1.0, 2.0, 3.0))); + }; + float4 tmpvar_8; + tmpvar_8.xy = float2(h_6.xy); + tmpvar_8.zw = f_5.xy; + tmpvar_1 = half4(tmpvar_8); + _mtl_o._glesFragData_0 = tmpvar_1; + return _mtl_o; +} + + +// stats: 12 alu 0 tex 2 flow +// inputs: 1 +// #0: xlv_TEXCOORD0 (medium float) 2x1 [-1] diff --git a/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/global-struct-constant-init-metal-inES3.txt b/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/global-struct-constant-init-metal-inES3.txt new file mode 100644 index 00000000000..e6ef84c2bca --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/global-struct-constant-init-metal-inES3.txt @@ -0,0 +1,685 @@ +#version 300 es +vec4 xll_texCUBElod(samplerCube s, vec4 coord) { + return textureLod( s, coord.xyz, coord.w); +} +float xll_shadow2D(mediump sampler2DShadow s, vec3 coord) { return texture (s, coord); } +float xll_saturate_f( float x) { + return clamp( x, 0.0, 1.0); +} +vec2 xll_saturate_vf2( vec2 x) { + return clamp( x, 0.0, 1.0); +} +vec3 xll_saturate_vf3( vec3 x) { + return clamp( x, 0.0, 1.0); +} +vec4 xll_saturate_vf4( vec4 x) { + return clamp( x, 0.0, 1.0); +} +mat2 xll_saturate_mf2x2(mat2 m) { + return mat2( clamp(m[0], 0.0, 1.0), clamp(m[1], 0.0, 1.0)); +} +mat3 xll_saturate_mf3x3(mat3 m) { + return mat3( clamp(m[0], 0.0, 1.0), clamp(m[1], 0.0, 1.0), clamp(m[2], 0.0, 1.0)); +} +mat4 xll_saturate_mf4x4(mat4 m) { + return mat4( clamp(m[0], 0.0, 1.0), clamp(m[1], 0.0, 1.0), clamp(m[2], 0.0, 1.0), clamp(m[3], 0.0, 1.0)); +} + +struct v2f_vertex_lit { + highp vec2 uv; + lowp vec4 diff; + lowp vec4 spec; +}; + +struct v2f_img { + highp vec4 pos; + mediump vec2 uv; +}; + +struct appdata_img { + highp vec4 vertex; + mediump vec2 texcoord; +}; + +struct Unity_GlossyEnvironmentData { + mediump float roughness; + mediump vec3 reflUVW; +}; + +struct UnityLight { + mediump vec3 color; + mediump vec3 dir; + mediump float ndotl; +}; + +struct UnityIndirect { + mediump vec3 diffuse; + mediump vec3 specular; +}; + +struct UnityGI { + UnityLight light; + UnityIndirect indirect; +}; + +struct UnityGIInput { + UnityLight light; + highp vec3 worldPos; + mediump vec3 worldViewDir; + mediump float atten; + mediump vec3 ambient; + mediump vec4 lightmapUV; + highp vec4 boxMax[2]; + highp vec4 boxMin[2]; + highp vec4 probePosition[2]; + highp vec4 probeHDR[2]; +}; + +struct SurfaceOutputStandard { + lowp vec3 Albedo; + lowp vec3 Normal; + mediump vec3 Emission; + mediump float Metallic; + mediump float Smoothness; + mediump float Occlusion; + lowp float Alpha; +}; + +struct SurfaceOutputStandardSpecular { + lowp vec3 Albedo; + lowp vec3 Specular; + lowp vec3 Normal; + mediump vec3 Emission; + mediump float Smoothness; + mediump float Occlusion; + lowp float Alpha; +}; + +struct VertexInput { + highp vec4 vertex; + mediump vec3 normal; + highp vec2 uv0; + highp vec2 uv1; +}; + +struct FragmentCommonData { + mediump vec3 diffColor; + mediump vec3 specColor; + mediump float oneMinusReflectivity; + mediump float oneMinusRoughness; + mediump vec3 normalWorld; + mediump vec3 eyeVec; + mediump vec3 posWorld; + mediump float alpha; +}; + +struct VertexOutputForwardBase { + highp vec4 pos; + highp vec4 tex; + mediump vec3 eyeVec; + mediump vec4 tangentToWorldAndParallax[3]; + mediump vec4 ambientOrLightmapUV; + mediump vec4 _ShadowCoord; +}; + +struct VertexOutputForwardAdd { + highp vec4 pos; + highp vec4 tex; + mediump vec3 eyeVec; + mediump vec4 tangentToWorldAndLightDir[3]; + mediump vec4 _ShadowCoord; +}; + +struct VertexOutputDeferred { + highp vec4 pos; + highp vec4 tex; + mediump vec3 eyeVec; + mediump vec4 tangentToWorldAndParallax[3]; + mediump vec4 ambientOrLightmapUV; +}; + +struct VertexInput_VC { + highp vec4 vertex; + lowp vec4 color; + mediump vec3 normal; + highp vec2 uv0; + highp vec2 uv1; +}; + +struct VertexOutputForwardBase_VC { + highp vec4 pos; + highp vec4 tex; + mediump vec3 eyeVec; + mediump vec4 tangentToWorldAndParallax[3]; + mediump vec4 ambientOrLightmapUV; + mediump vec4 _ShadowCoord; + lowp vec4 color; +}; + +struct VertexOutputDeferred_VC { + highp vec4 pos; + lowp vec4 color; + highp vec4 tex; + mediump vec3 eyeVec; + mediump vec4 tangentToWorldAndParallax[3]; + mediump vec4 ambientOrLightmapUV; +}; + +uniform highp vec4 _Time; +uniform highp vec4 _SinTime; +uniform highp vec4 _CosTime; +uniform highp vec4 unity_DeltaTime; + +uniform highp vec3 _WorldSpaceCameraPos; + +uniform highp vec4 _ProjectionParams; + +uniform highp vec4 _ScreenParams; + +uniform highp vec4 _ZBufferParams; + +uniform highp vec4 unity_OrthoParams; + +uniform highp vec4 unity_CameraWorldClipPlanes[6]; + +uniform highp mat4 unity_CameraProjection; +uniform highp mat4 unity_CameraInvProjection; + +uniform mediump vec4 _WorldSpaceLightPos0; + +uniform highp vec4 _LightPositionRange; +uniform highp vec4 unity_4LightPosX0; +uniform highp vec4 unity_4LightPosY0; + +uniform highp vec4 unity_4LightPosZ0; +uniform mediump vec4 unity_4LightAtten0; +uniform mediump vec4 unity_LightColor[8]; + +uniform highp vec4 unity_LightPosition[8]; + +uniform mediump vec4 unity_LightAtten[8]; +uniform highp vec4 unity_SpotDirection[8]; + +uniform mediump vec4 unity_SHAr; +uniform mediump vec4 unity_SHAg; +uniform mediump vec4 unity_SHAb; +uniform mediump vec4 unity_SHBr; + +uniform mediump vec4 unity_SHBg; +uniform mediump vec4 unity_SHBb; +uniform mediump vec4 unity_SHC; + +uniform mediump vec3 unity_LightColor0; +uniform mediump vec3 unity_LightColor1; +uniform mediump vec3 unity_LightColor2; +uniform mediump vec3 unity_LightColor3; + +uniform highp vec4 unity_ShadowSplitSpheres[4]; +uniform highp vec4 unity_ShadowSplitSqRadii; +uniform highp vec4 unity_LightShadowBias; +uniform highp vec4 _LightSplitsNear; + +uniform highp vec4 _LightSplitsFar; +uniform highp mat4 unity_World2Shadow[4]; +uniform mediump vec4 _LightShadowData; +uniform highp vec4 unity_ShadowFadeCenterAndType; + +uniform highp mat4 glstate_matrix_mvp; +uniform highp mat4 glstate_matrix_modelview0; +uniform highp mat4 glstate_matrix_invtrans_modelview0; + +uniform highp mat4 _Object2World; +uniform highp mat4 _World2Object; +uniform highp vec4 unity_LODFade; +uniform highp vec4 unity_WorldTransformParams; + +uniform highp mat4 glstate_matrix_transpose_modelview0; + +uniform highp mat4 glstate_matrix_projection; +uniform lowp vec4 glstate_lightmodel_ambient; + +uniform highp mat4 unity_MatrixV; +uniform highp mat4 unity_MatrixVP; + +uniform lowp vec4 unity_AmbientSky; +uniform lowp vec4 unity_AmbientEquator; +uniform lowp vec4 unity_AmbientGround; + +uniform lowp vec4 unity_FogColor; + +uniform highp vec4 unity_FogParams; + +uniform sampler2D unity_Lightmap; +uniform sampler2D unity_LightmapInd; + +uniform sampler2D unity_DynamicLightmap; +uniform sampler2D unity_DynamicDirectionality; +uniform sampler2D unity_DynamicNormal; + +uniform highp vec4 unity_LightmapST; +uniform highp vec4 unity_DynamicLightmapST; + +uniform samplerCube unity_SpecCube0; +uniform samplerCube unity_SpecCube1; + +uniform highp vec4 unity_SpecCube0_BoxMax; +uniform highp vec4 unity_SpecCube0_BoxMin; +uniform highp vec4 unity_SpecCube0_ProbePosition; +uniform mediump vec4 unity_SpecCube0_HDR; + +uniform highp vec4 unity_SpecCube1_BoxMax; +uniform highp vec4 unity_SpecCube1_BoxMin; +uniform highp vec4 unity_SpecCube1_ProbePosition; +uniform mediump vec4 unity_SpecCube1_HDR; + +uniform lowp vec4 unity_ColorSpaceGrey; +uniform lowp vec4 unity_ColorSpaceDouble; +uniform mediump vec4 unity_ColorSpaceDielectricSpec; +uniform mediump vec4 unity_ColorSpaceLuminance; + +uniform mediump vec4 unity_Lightmap_HDR; + +uniform mediump vec4 unity_DynamicLightmap_HDR; + +uniform lowp vec4 _LightColor0; +uniform lowp vec4 _SpecColor; + +uniform sampler2D unity_NHxRoughness; + +uniform mediump vec4 _Color; +uniform mediump float _Cutoff; +uniform sampler2D _MainTex; + +uniform highp vec4 _MainTex_ST; +uniform sampler2D _DetailAlbedoMap; +uniform highp vec4 _DetailAlbedoMap_ST; + +uniform sampler2D _BumpMap; +uniform mediump float _BumpScale; +uniform sampler2D _DetailMask; + +uniform sampler2D _DetailNormalMap; +uniform mediump float _DetailNormalMapScale; +uniform sampler2D _SpecGlossMap; + +uniform sampler2D _MetallicGlossMap; +uniform mediump float _Metallic; +uniform mediump float _Glossiness; + +uniform sampler2D _OcclusionMap; +uniform mediump float _OcclusionStrength; +uniform sampler2D _ParallaxMap; + +uniform mediump float _Parallax; +uniform mediump float _UVSec; +uniform mediump vec4 _EmissionColor; + +uniform sampler2D _EmissionMap; + +uniform lowp sampler2DShadow _ShadowMapTexture; + +mediump float DotClamped( in mediump vec3 a, in mediump vec3 b ) { + return max( 0.0, dot( a, b)); +} + +mediump float BlinnTerm( in mediump vec3 normal, in mediump vec3 halfDir ) { + return DotClamped( normal, halfDir); +} + +mediump float Pow4( in mediump float x ) { + return (((x * x) * x) * x); +} + +mediump vec3 FresnelLerpFast( in mediump vec3 F0, in mediump vec3 F90, in mediump float cosA ) { + mediump float t = Pow4( (1.0 - cosA)); + return mix( F0, F90, vec3( t)); +} + +bool IsGammaSpace( ) { + return true; +} + +mediump float RoughnessToSpecPower( in mediump float roughness ) { + + mediump float m = max( 0.0001, (roughness * roughness)); + mediump float n = ((2.0 / (m * m)) - 2.0); + n = max( n, 0.0001); + + return n; +} + +mediump vec3 Unity_SafeNormalize( in mediump vec3 inVec ) { + mediump float dp3 = max( 0.001, dot( inVec, inVec)); + return (inVec * inversesqrt(dp3)); +} + +mediump vec4 BRDF2_Unity_PBS( in mediump vec3 diffColor, in mediump vec3 specColor, in mediump float oneMinusReflectivity, in mediump float oneMinusRoughness, in mediump vec3 normal, in mediump vec3 viewDir, in UnityLight light, in UnityIndirect gi ) { + mediump vec3 halfDir = Unity_SafeNormalize( (light.dir + viewDir)); + + mediump float nl = light.ndotl; + mediump float nh = BlinnTerm( normal, halfDir); + mediump float nv = DotClamped( normal, viewDir); + mediump float lh = DotClamped( light.dir, halfDir); + + mediump float roughness = (1.0 - oneMinusRoughness); + mediump float specularPower = RoughnessToSpecPower( roughness); + + mediump float invV = (((lh * lh) * oneMinusRoughness) + (roughness * roughness)); + mediump float invF = lh; + mediump float specular = (((specularPower + 1.0) * pow( nh, specularPower)) / (((8.0 * invV) * invF) + 0.0001)); + if (IsGammaSpace( )){ + specular = sqrt(max( 0.0001, specular)); + } + + mediump float realRoughness = (roughness * roughness); + mediump float surfaceReduction = (( IsGammaSpace( ) ) ? ( 0.28 ) : ( (0.6 - (0.08 * roughness)) )); + + surfaceReduction = (1.0 - ((realRoughness * roughness) * surfaceReduction)); + + mediump float grazingTerm = xll_saturate_f((oneMinusRoughness + (1.0 - oneMinusReflectivity))); + mediump vec3 color = (((((diffColor + (specular * specColor)) * light.color) * nl) + (gi.diffuse * diffColor)) + ((surfaceReduction * gi.specular) * FresnelLerpFast( specColor, vec3( grazingTerm), nv))); + + return vec4( color, 1.0); +} + +mediump vec3 BRDF_Unity_Indirect( in mediump vec3 baseColor, in mediump vec3 specColor, in mediump float oneMinusReflectivity, in mediump float oneMinusRoughness, in mediump vec3 normal, in mediump vec3 viewDir, in mediump float occlusion, in UnityGI gi ) { + mediump vec3 c = vec3( 0.0); + + return c; +} + +mediump vec3 Emission( in highp vec2 uv ) { + return vec3( 0.0); +} + +void ResetUnityLight( out UnityLight outLight ) { + + outLight.color = vec3( 0.0); + outLight.dir = vec3( 0.0); + outLight.ndotl = 0.0; +} + +void ResetUnityGI( out UnityGI outGI ) { + ResetUnityLight( outGI.light); + + outGI.indirect.diffuse = vec3( 0.0); + outGI.indirect.specular = vec3( 0.0); +} + +mediump vec3 LinearToGammaSpace( in mediump vec3 linRGB ) { + linRGB = max( linRGB, vec3( 0.0, 0.0, 0.0)); + + return max( ((1.055 * pow( linRGB, vec3( 0.4166667))) - 0.055), vec3( 0.0)); +} + +mediump vec3 SHEvalLinearL0L1( in mediump vec4 normal ) { + mediump vec3 x; + + x.x = dot( unity_SHAr, normal); + x.y = dot( unity_SHAg, normal); + x.z = dot( unity_SHAb, normal); + + return x; +} + +mediump vec3 ShadeSHPerPixel( in mediump vec3 normal, in mediump vec3 ambient ) { + + mediump vec3 ambient_contrib = vec3( 0.0); + + ambient_contrib = SHEvalLinearL0L1( vec4( normal, 1.0)); + ambient = max( vec3( 0.0, 0.0, 0.0), (ambient + ambient_contrib)); + if (IsGammaSpace( )){ + ambient = LinearToGammaSpace( ambient); + } + + return ambient; +} + +UnityGI UnityGI_Base( in UnityGIInput data, in mediump float occlusion, in mediump vec3 normalWorld ) { + UnityGI o_gi; + ResetUnityGI( o_gi); + + o_gi.light = data.light; + o_gi.light.color *= data.atten; + + o_gi.indirect.diffuse = ShadeSHPerPixel( normalWorld, data.ambient); + + o_gi.indirect.diffuse *= occlusion; + return o_gi; +} + +UnityGI UnityGlobalIllumination( in UnityGIInput data, in mediump float occlusion, in mediump vec3 normalWorld ) { + return UnityGI_Base( data, occlusion, normalWorld); +} + +mediump vec3 DecodeHDR( in mediump vec4 data, in mediump vec4 decodeInstructions ) { + return ((decodeInstructions.x * data.w) * data.xyz); +} + +mediump vec3 DecodeHDR_NoLinearSupportInSM2( in mediump vec4 data, in mediump vec4 decodeInstructions ) { + return DecodeHDR( data, decodeInstructions); +} + +mediump vec3 Unity_GlossyEnvironment( in samplerCube tex, in mediump vec4 hdr, in Unity_GlossyEnvironmentData glossIn ) { + + mediump float roughness = glossIn.roughness; + + roughness = (roughness * (1.7 - (0.7 * roughness))); + + mediump float mip = (roughness * 6.0); + mediump vec4 rgbm = xll_texCUBElod( tex, vec4( glossIn.reflUVW, mip)); + return DecodeHDR_NoLinearSupportInSM2( rgbm, hdr); +} + +mediump vec3 UnityGI_IndirectSpecular( in UnityGIInput data, in mediump float occlusion, in mediump vec3 normalWorld, in Unity_GlossyEnvironmentData glossIn ) { + mediump vec3 specular; + mediump vec3 env0 = Unity_GlossyEnvironment( unity_SpecCube0, data.probeHDR[0], glossIn); + specular = env0; + return (specular * occlusion); +} + +UnityGI UnityGlobalIllumination( in UnityGIInput data, in mediump float occlusion, in mediump vec3 normalWorld, in Unity_GlossyEnvironmentData glossIn ) { + UnityGI o_gi = UnityGI_Base( data, occlusion, normalWorld); + o_gi.indirect.specular = UnityGI_IndirectSpecular( data, occlusion, normalWorld, glossIn); + return o_gi; +} + +UnityGI FragmentGI( in FragmentCommonData s, in mediump float occlusion, in mediump vec4 i_ambientOrLightmapUV, in mediump float atten, in UnityLight light, in bool reflections ) { + UnityGIInput d; + d.light = light; + + d.worldPos = s.posWorld; + d.worldViewDir = (-s.eyeVec); + d.atten = atten; + + d.ambient = i_ambientOrLightmapUV.xyz; + d.lightmapUV = vec4( 0.0); + d.boxMax[0] = unity_SpecCube0_BoxMax; + + d.boxMin[0] = unity_SpecCube0_BoxMin; + d.probePosition[0] = unity_SpecCube0_ProbePosition; + d.probeHDR[0] = unity_SpecCube0_HDR; + + d.boxMax[1] = unity_SpecCube1_BoxMax; + d.boxMin[1] = unity_SpecCube1_BoxMin; + d.probePosition[1] = unity_SpecCube1_ProbePosition; + d.probeHDR[1] = unity_SpecCube1_HDR; + + if (reflections){ + Unity_GlossyEnvironmentData g; + g.roughness = (1.0 - s.oneMinusRoughness); + + g.reflUVW = reflect( s.eyeVec, s.normalWorld); + return UnityGlobalIllumination( d, occlusion, s.normalWorld, g); + } + else{ + return UnityGlobalIllumination( d, occlusion, s.normalWorld); + } +} + +UnityGI FragmentGI( in highp vec3 posWorld, in mediump float occlusion, in mediump vec4 i_ambientOrLightmapUV, in mediump float atten, in mediump float oneMinusRoughness, in mediump vec3 normalWorld, in mediump vec3 eyeVec, in UnityLight light, in bool reflections ) { + FragmentCommonData s = FragmentCommonData(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), 0.0, 0.0, vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), 0.0); + s.oneMinusRoughness = oneMinusRoughness; + s.normalWorld = normalWorld; + s.eyeVec = eyeVec; + s.posWorld = posWorld; + return FragmentGI( s, occlusion, i_ambientOrLightmapUV, atten, light, reflections); +} + +UnityGI FragmentGI( in highp vec3 posWorld, in mediump float occlusion, in mediump vec4 i_ambientOrLightmapUV, in mediump float atten, in mediump float oneMinusRoughness, in mediump vec3 normalWorld, in mediump vec3 eyeVec, in UnityLight light ) { + return FragmentGI( posWorld, occlusion, i_ambientOrLightmapUV, atten, oneMinusRoughness, normalWorld, eyeVec, light, true); +} + +mediump float Alpha( in highp vec2 uv ) { + return (texture( _MainTex, uv).w * _Color.w); +} + +mediump vec3 Albedo( in highp vec4 texcoords ) { + mediump vec3 albedo = (_Color.xyz * texture( _MainTex, texcoords.xy).xyz); + return albedo; +} + +mediump float OneMinusReflectivityFromMetallic( in mediump float metallic ) { + mediump float oneMinusDielectricSpec = unity_ColorSpaceDielectricSpec.w; + return (oneMinusDielectricSpec - (metallic * oneMinusDielectricSpec)); +} + +mediump vec3 DiffuseAndSpecularFromMetallic( in mediump vec3 albedo, in mediump float metallic, out mediump vec3 specColor, out mediump float oneMinusReflectivity ) { + specColor = mix( unity_ColorSpaceDielectricSpec.xyz, albedo, vec3( metallic)); + oneMinusReflectivity = OneMinusReflectivityFromMetallic( metallic); + + return (albedo * oneMinusReflectivity); +} + +mediump vec2 MetallicGloss( in highp vec2 uv ) { + mediump vec2 mg; + + mg = vec2( _Metallic, _Glossiness); + return mg; +} + +FragmentCommonData MetallicSetup( in highp vec4 i_tex ) { + mediump vec2 metallicGloss = MetallicGloss( i_tex.xy); + mediump float metallic = metallicGloss.x; + + mediump float oneMinusRoughness = metallicGloss.y; + mediump float oneMinusReflectivity; + mediump vec3 specColor; + + mediump vec3 diffColor = DiffuseAndSpecularFromMetallic( Albedo( i_tex), metallic, specColor, oneMinusReflectivity); + FragmentCommonData o = FragmentCommonData(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), 0.0, 0.0, vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), 0.0); + o.diffColor = diffColor; + + o.specColor = specColor; + o.oneMinusReflectivity = oneMinusReflectivity; + o.oneMinusRoughness = oneMinusRoughness; + return o; +} + +mediump vec3 NormalizePerPixelNormal( in mediump vec3 n ) { + return normalize(n); +} + +highp vec4 Parallax( in highp vec4 texcoords, in mediump vec3 viewDir ) { + return texcoords; +} + +mediump vec3 PerPixelWorldNormal( in highp vec4 i_tex, in mediump vec4 tangentToWorld[3] ) { + mediump vec3 normalWorld = normalize(tangentToWorld[2].xyz); + return normalWorld; +} + +mediump vec3 PreMultiplyAlpha( in mediump vec3 diffColor, in mediump float alpha, in mediump float oneMinusReflectivity, out mediump float outModifiedAlpha ) { + outModifiedAlpha = alpha; + return diffColor; +} + +FragmentCommonData FragmentSetup( in highp vec4 i_tex, in mediump vec3 i_eyeVec, in mediump vec3 i_viewDirForParallax, in mediump vec4 tangentToWorld[3], in mediump vec3 i_posWorld ) { + i_tex = Parallax( i_tex, i_viewDirForParallax); + + mediump float alpha = Alpha( i_tex.xy); + + FragmentCommonData o = MetallicSetup( i_tex); + o.normalWorld = PerPixelWorldNormal( i_tex, tangentToWorld); + o.eyeVec = NormalizePerPixelNormal( i_eyeVec); + o.posWorld = i_posWorld; + + o.diffColor = PreMultiplyAlpha( o.diffColor, alpha, o.oneMinusReflectivity, o.alpha); + return o; +} + +mediump float LambertTerm( in mediump vec3 normal, in mediump vec3 lightDir ) { + return DotClamped( normal, lightDir); +} + +UnityLight MainLight( in mediump vec3 normalWorld ) { + UnityLight l; + + l.color = _LightColor0.xyz; + l.dir = _WorldSpaceLightPos0.xyz; + l.ndotl = LambertTerm( normalWorld, l.dir); + + return l; +} + +mediump float LerpOneTo( in mediump float b, in mediump float t ) { + mediump float oneMinusT = (1.0 - t); + return (oneMinusT + (b * t)); +} + +mediump float Occlusion( in highp vec2 uv ) { + mediump float occ = texture( _OcclusionMap, uv).y; + return LerpOneTo( occ, _OcclusionStrength); +} + +mediump vec4 OutputForward( in mediump vec4 xlat_varoutput, in mediump float alphaFromSurface ) { + xlat_varoutput.w = 1.0; + return xlat_varoutput; +} + +lowp float unitySampleShadow( in mediump vec4 shadowCoord ) { + lowp float shadow = xll_shadow2D( _ShadowMapTexture, shadowCoord.xyz.xyz); + shadow = (_LightShadowData.x + (shadow * (1.0 - _LightShadowData.x))); + return shadow; +} + +mediump vec4 fragForwardBase_VC( in VertexOutputForwardBase_VC i ) { + FragmentCommonData s = FragmentSetup( i.tex, i.eyeVec, vec3( 0.0, 0.0, 0.0), i.tangentToWorldAndParallax, vec3( 0.0, 0.0, 0.0)); + UnityLight mainLight = MainLight( s.normalWorld); + + mediump float atten = unitySampleShadow( i._ShadowCoord); + mediump float occlusion = Occlusion( i.tex.xy); + UnityGI gi = FragmentGI( s.posWorld, occlusion, i.ambientOrLightmapUV, atten, s.oneMinusRoughness, s.normalWorld, s.eyeVec, mainLight); + + mediump vec4 c = BRDF2_Unity_PBS( s.diffColor, s.specColor, s.oneMinusReflectivity, s.oneMinusRoughness, s.normalWorld, (-s.eyeVec), gi.light, gi.indirect); + c *= i.color; + + c.xyz += BRDF_Unity_Indirect( s.diffColor, s.specColor, s.oneMinusReflectivity, s.oneMinusRoughness, s.normalWorld, (-s.eyeVec), occlusion, gi); + c.xyz += Emission( i.tex.xy); + + return OutputForward( c, (s.alpha * i.color.w)); +} +in highp vec4 xlv_TEXCOORD0; +in mediump vec3 xlv_TEXCOORD1; +in mediump vec4 xlv_TEXCOORD2; +in mediump vec4 xlv_TEXCOORD2_1; +in mediump vec4 xlv_TEXCOORD2_2; +in mediump vec4 xlv_TEXCOORD5; +in mediump vec4 xlv_TEXCOORD6; +in lowp vec4 xlv_COLOR; +out lowp vec4 FragData [1]; +void main() { + mediump vec4 xl_retval; + VertexOutputForwardBase_VC xlt_i; + xlt_i.pos = vec4(0.0); + xlt_i.tex = vec4(xlv_TEXCOORD0); + xlt_i.eyeVec = vec3(xlv_TEXCOORD1); + xlt_i.tangentToWorldAndParallax[0] = vec4(xlv_TEXCOORD2); + xlt_i.tangentToWorldAndParallax[1] = vec4(xlv_TEXCOORD2_1); + xlt_i.tangentToWorldAndParallax[2] = vec4(xlv_TEXCOORD2_2); + xlt_i.ambientOrLightmapUV = vec4(xlv_TEXCOORD5); + xlt_i._ShadowCoord = vec4(xlv_TEXCOORD6); + xlt_i.color = vec4(xlv_COLOR); + xl_retval = fragForwardBase_VC( xlt_i); + FragData[0] = vec4(xl_retval); +} diff --git a/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/global-struct-constant-init-metal-outES3.txt b/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/global-struct-constant-init-metal-outES3.txt new file mode 100644 index 00000000000..3c6034fa529 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/global-struct-constant-init-metal-outES3.txt @@ -0,0 +1,187 @@ +#version 300 es +struct FragmentCommonData { + mediump vec3 diffColor; + mediump vec3 specColor; + mediump float oneMinusReflectivity; + mediump float oneMinusRoughness; + mediump vec3 normalWorld; + mediump vec3 eyeVec; + mediump vec3 posWorld; + mediump float alpha; +}; +uniform mediump vec4 _WorldSpaceLightPos0; +uniform mediump vec4 unity_SHAr; +uniform mediump vec4 unity_SHAg; +uniform mediump vec4 unity_SHAb; +uniform mediump vec4 _LightShadowData; +uniform lowp samplerCube unity_SpecCube0; +uniform mediump vec4 unity_SpecCube0_HDR; +uniform mediump vec4 unity_ColorSpaceDielectricSpec; +uniform lowp vec4 _LightColor0; +uniform mediump vec4 _Color; +uniform sampler2D _MainTex; +uniform mediump float _Metallic; +uniform mediump float _Glossiness; +uniform sampler2D _OcclusionMap; +uniform mediump float _OcclusionStrength; +uniform lowp sampler2DShadow _ShadowMapTexture; +in highp vec4 xlv_TEXCOORD0; +in mediump vec3 xlv_TEXCOORD1; +in mediump vec4 xlv_TEXCOORD2_2; +in mediump vec4 xlv_TEXCOORD5; +in mediump vec4 xlv_TEXCOORD6; +in lowp vec4 xlv_COLOR; +out lowp vec4 FragData[1]; +void main () +{ + mediump vec4 c_1; + mediump float atten_2; + lowp vec4 tmpvar_3; + tmpvar_3 = texture (_MainTex, xlv_TEXCOORD0.xy); + mediump vec2 tmpvar_4; + tmpvar_4.x = _Metallic; + tmpvar_4.y = _Glossiness; + mediump vec3 tmpvar_5; + tmpvar_5 = (_Color.xyz * tmpvar_3.xyz); + mediump vec3 tmpvar_6; + mediump vec3 tmpvar_7; + tmpvar_7 = mix (unity_ColorSpaceDielectricSpec.xyz, tmpvar_5, vec3(_Metallic)); + mediump float tmpvar_8; + tmpvar_8 = (unity_ColorSpaceDielectricSpec.w - (_Metallic * unity_ColorSpaceDielectricSpec.w)); + tmpvar_6 = (tmpvar_5 * tmpvar_8); + mediump vec3 tmpvar_9; + tmpvar_9 = normalize(xlv_TEXCOORD2_2.xyz); + mediump vec3 tmpvar_10; + tmpvar_10 = normalize(xlv_TEXCOORD1); + mediump vec3 tmpvar_11; + tmpvar_11 = _LightColor0.xyz; + lowp float shadow_12; + mediump float tmpvar_13; + tmpvar_13 = texture (_ShadowMapTexture, xlv_TEXCOORD6.xyz); + lowp float tmpvar_14; + tmpvar_14 = tmpvar_13; + shadow_12 = (_LightShadowData.x + (tmpvar_14 * (1.0 - _LightShadowData.x))); + atten_2 = shadow_12; + mediump float occ_15; + lowp float tmpvar_16; + tmpvar_16 = texture (_OcclusionMap, xlv_TEXCOORD0.xy).y; + occ_15 = tmpvar_16; + mediump float tmpvar_17; + tmpvar_17 = ((1.0 - _OcclusionStrength) + (occ_15 * _OcclusionStrength)); + FragmentCommonData s_18; + s_18 = FragmentCommonData(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), 0.0, 0.0, vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), 0.0); + s_18.oneMinusRoughness = tmpvar_4.y; + s_18.normalWorld = tmpvar_9; + s_18.eyeVec = tmpvar_10; + s_18.posWorld = vec3(0.0, 0.0, 0.0); + mediump vec3 tmpvar_19; + mediump vec3 tmpvar_20; + tmpvar_19 = s_18.normalWorld; + tmpvar_20 = s_18.eyeVec; + highp vec4 tmpvar_21; + tmpvar_21 = unity_SpecCube0_HDR; + mediump float tmpvar_22; + tmpvar_22 = (1.0 - s_18.oneMinusRoughness); + mediump vec3 tmpvar_23; + tmpvar_23 = (tmpvar_20 - (2.0 * ( + dot (tmpvar_19, tmpvar_20) + * tmpvar_19))); + mediump vec4 tmpvar_24; + tmpvar_24.w = 1.0; + tmpvar_24.xyz = tmpvar_19; + mediump vec3 x_25; + x_25.x = dot (unity_SHAr, tmpvar_24); + x_25.y = dot (unity_SHAg, tmpvar_24); + x_25.z = dot (unity_SHAb, tmpvar_24); + mediump vec4 hdr_26; + hdr_26 = tmpvar_21; + mediump vec4 tmpvar_27; + tmpvar_27.xyz = tmpvar_23; + tmpvar_27.w = ((tmpvar_22 * (1.7 - + (0.7 * tmpvar_22) + )) * 6.0); + lowp vec4 tmpvar_28; + tmpvar_28 = textureLod (unity_SpecCube0, tmpvar_23, tmpvar_27.w); + mediump vec4 tmpvar_29; + tmpvar_29 = tmpvar_28; + mediump vec3 viewDir_30; + viewDir_30 = -(tmpvar_10); + mediump vec3 tmpvar_31; + mediump vec3 inVec_32; + inVec_32 = (_WorldSpaceLightPos0.xyz + viewDir_30); + tmpvar_31 = (inVec_32 * inversesqrt(max (0.001, + dot (inVec_32, inVec_32) + ))); + mediump float tmpvar_33; + tmpvar_33 = max (0.0, dot (_WorldSpaceLightPos0.xyz, tmpvar_31)); + mediump float tmpvar_34; + tmpvar_34 = (1.0 - _Glossiness); + mediump float tmpvar_35; + tmpvar_35 = max (0.0001, (tmpvar_34 * tmpvar_34)); + mediump float tmpvar_36; + tmpvar_36 = max (((2.0 / + (tmpvar_35 * tmpvar_35) + ) - 2.0), 0.0001); + mediump float x_37; + x_37 = (1.0 - max (0.0, dot (tmpvar_9, viewDir_30))); + mediump vec4 tmpvar_38; + tmpvar_38.w = 1.0; + tmpvar_38.xyz = ((( + ((tmpvar_6 + (sqrt( + max (0.0001, (((tmpvar_36 + 1.0) * pow ( + max (0.0, dot (tmpvar_9, tmpvar_31)) + , tmpvar_36)) / (( + (8.0 * (((tmpvar_33 * tmpvar_33) * _Glossiness) + (tmpvar_34 * tmpvar_34))) + * tmpvar_33) + 0.0001))) + ) * tmpvar_7)) * (tmpvar_11 * atten_2)) + * + max (0.0, dot (tmpvar_9, _WorldSpaceLightPos0.xyz)) + ) + ( + (max (((1.055 * + pow (max (vec3(0.0, 0.0, 0.0), (xlv_TEXCOORD5.xyz + x_25)), vec3(0.4166667, 0.4166667, 0.4166667)) + ) - 0.055), vec3(0.0, 0.0, 0.0)) * tmpvar_17) + * tmpvar_6)) + (( + (1.0 - ((tmpvar_34 * tmpvar_34) * (tmpvar_34 * 0.28))) + * + (((hdr_26.x * tmpvar_29.w) * tmpvar_29.xyz) * tmpvar_17) + ) * mix (tmpvar_7, vec3( + clamp ((_Glossiness + (1.0 - tmpvar_8)), 0.0, 1.0) + ), vec3( + ((x_37 * x_37) * (x_37 * x_37)) + )))); + c_1 = (tmpvar_38 * xlv_COLOR); + c_1.xyz = c_1.xyz; + c_1.xyz = c_1.xyz; + mediump vec4 xlat_varoutput_39; + xlat_varoutput_39.xyz = c_1.xyz; + xlat_varoutput_39.w = 1.0; + FragData[0] = xlat_varoutput_39; +} + + +// stats: 97 alu 4 tex 0 flow +// inputs: 6 +// #0: xlv_TEXCOORD0 (high float) 4x1 [-1] +// #1: xlv_TEXCOORD1 (medium float) 3x1 [-1] +// #2: xlv_TEXCOORD2_2 (medium float) 4x1 [-1] +// #3: xlv_TEXCOORD5 (medium float) 4x1 [-1] +// #4: xlv_TEXCOORD6 (medium float) 4x1 [-1] +// #5: xlv_COLOR (low float) 4x1 [-1] +// uniforms: 12 (total size: 0) +// #0: _WorldSpaceLightPos0 (medium float) 4x1 [-1] +// #1: unity_SHAr (medium float) 4x1 [-1] +// #2: unity_SHAg (medium float) 4x1 [-1] +// #3: unity_SHAb (medium float) 4x1 [-1] +// #4: _LightShadowData (medium float) 4x1 [-1] +// #5: unity_SpecCube0_HDR (medium float) 4x1 [-1] +// #6: unity_ColorSpaceDielectricSpec (medium float) 4x1 [-1] +// #7: _LightColor0 (low float) 4x1 [-1] +// #8: _Color (medium float) 4x1 [-1] +// #9: _Metallic (medium float) 1x1 [-1] +// #10: _Glossiness (medium float) 1x1 [-1] +// #11: _OcclusionStrength (medium float) 1x1 [-1] +// textures: 4 +// #0: unity_SpecCube0 (low cube) 0x0 [-1] +// #1: _MainTex (low 2d) 0x0 [-1] +// #2: _OcclusionMap (low 2d) 0x0 [-1] +// #3: _ShadowMapTexture (low 2dshadow) 0x0 [-1] diff --git a/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/global-struct-constant-init-metal-outES3Metal.txt b/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/global-struct-constant-init-metal-outES3Metal.txt new file mode 100644 index 00000000000..ca71d1d321c --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/global-struct-constant-init-metal-outES3Metal.txt @@ -0,0 +1,199 @@ +#include +#pragma clang diagnostic ignored "-Wparentheses-equality" +using namespace metal; +constexpr sampler _mtl_xl_shadow_sampler(address::clamp_to_edge, filter::linear, compare_func::less); +struct FragmentCommonData { + half3 diffColor; + half3 specColor; + half oneMinusReflectivity; + half oneMinusRoughness; + half3 normalWorld; + half3 eyeVec; + half3 posWorld; + half alpha; +}; +constant FragmentCommonData _xlat_mtl_const1 = {float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), 0.0, 0.0, float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), 0.0}; +struct xlatMtlShaderInput { + float4 xlv_TEXCOORD0; + half3 xlv_TEXCOORD1; + half4 xlv_TEXCOORD2_2; + half4 xlv_TEXCOORD5; + half4 xlv_TEXCOORD6; + half4 xlv_COLOR; +}; +struct xlatMtlShaderOutput { + half4 FragData_0 [[color(0)]]; +}; +struct xlatMtlShaderUniform { + half4 _WorldSpaceLightPos0; + half4 unity_SHAr; + half4 unity_SHAg; + half4 unity_SHAb; + half4 _LightShadowData; + half4 unity_SpecCube0_HDR; + half4 unity_ColorSpaceDielectricSpec; + half4 _LightColor0; + half4 _Color; + half _Metallic; + half _Glossiness; + half _OcclusionStrength; +}; +fragment xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]] + , texturecube unity_SpecCube0 [[texture(0)]], sampler _mtlsmp_unity_SpecCube0 [[sampler(0)]] + , texture2d _MainTex [[texture(1)]], sampler _mtlsmp__MainTex [[sampler(1)]] + , texture2d _OcclusionMap [[texture(2)]], sampler _mtlsmp__OcclusionMap [[sampler(2)]] + , depth2d _ShadowMapTexture [[texture(3)]], sampler _mtlsmp__ShadowMapTexture [[sampler(3)]]) +{ + xlatMtlShaderOutput _mtl_o; + half4 c_1; + half atten_2; + half4 tmpvar_3; + tmpvar_3 = _MainTex.sample(_mtlsmp__MainTex, (float2)(_mtl_i.xlv_TEXCOORD0.xy)); + half2 tmpvar_4; + tmpvar_4.x = _mtl_u._Metallic; + tmpvar_4.y = _mtl_u._Glossiness; + half3 tmpvar_5; + tmpvar_5 = (_mtl_u._Color.xyz * tmpvar_3.xyz); + half3 tmpvar_6; + half3 tmpvar_7; + tmpvar_7 = mix (_mtl_u.unity_ColorSpaceDielectricSpec.xyz, tmpvar_5, half3(_mtl_u._Metallic)); + half tmpvar_8; + tmpvar_8 = (_mtl_u.unity_ColorSpaceDielectricSpec.w - (_mtl_u._Metallic * _mtl_u.unity_ColorSpaceDielectricSpec.w)); + tmpvar_6 = (tmpvar_5 * tmpvar_8); + half3 tmpvar_9; + tmpvar_9 = normalize(_mtl_i.xlv_TEXCOORD2_2.xyz); + half3 tmpvar_10; + tmpvar_10 = normalize(_mtl_i.xlv_TEXCOORD1); + half3 tmpvar_11; + tmpvar_11 = _mtl_u._LightColor0.xyz; + half shadow_12; + half tmpvar_13; + tmpvar_13 = _ShadowMapTexture.sample_compare(_mtl_xl_shadow_sampler, (float2)(_mtl_i.xlv_TEXCOORD6.xyz).xy, (float)(_mtl_i.xlv_TEXCOORD6.xyz).z); + half tmpvar_14; + tmpvar_14 = tmpvar_13; + shadow_12 = (_mtl_u._LightShadowData.x + (tmpvar_14 * ((half)1.0 - _mtl_u._LightShadowData.x))); + atten_2 = shadow_12; + half occ_15; + half tmpvar_16; + tmpvar_16 = _OcclusionMap.sample(_mtlsmp__OcclusionMap, (float2)(_mtl_i.xlv_TEXCOORD0.xy)).y; + occ_15 = tmpvar_16; + half tmpvar_17; + tmpvar_17 = (((half)1.0 - _mtl_u._OcclusionStrength) + (occ_15 * _mtl_u._OcclusionStrength)); + FragmentCommonData s_18; + s_18 = _xlat_mtl_const1; + s_18.oneMinusRoughness = tmpvar_4.y; + s_18.normalWorld = tmpvar_9; + s_18.eyeVec = tmpvar_10; + s_18.posWorld = half3(float3(0.0, 0.0, 0.0)); + half3 tmpvar_19; + half3 tmpvar_20; + tmpvar_19 = s_18.normalWorld; + tmpvar_20 = s_18.eyeVec; + float4 tmpvar_21; + tmpvar_21 = float4(_mtl_u.unity_SpecCube0_HDR); + half tmpvar_22; + tmpvar_22 = ((half)1.0 - s_18.oneMinusRoughness); + half3 tmpvar_23; + tmpvar_23 = (tmpvar_20 - ((half)2.0 * ( + dot (tmpvar_19, tmpvar_20) + * tmpvar_19))); + half4 tmpvar_24; + tmpvar_24.w = half(1.0); + tmpvar_24.xyz = tmpvar_19; + half3 x_25; + x_25.x = dot (_mtl_u.unity_SHAr, tmpvar_24); + x_25.y = dot (_mtl_u.unity_SHAg, tmpvar_24); + x_25.z = dot (_mtl_u.unity_SHAb, tmpvar_24); + half4 hdr_26; + hdr_26 = half4(tmpvar_21); + half4 tmpvar_27; + tmpvar_27.xyz = tmpvar_23; + tmpvar_27.w = ((tmpvar_22 * ((half)1.7 - + ((half)0.7 * tmpvar_22) + )) * (half)6.0); + half4 tmpvar_28; + tmpvar_28 = unity_SpecCube0.sample(_mtlsmp_unity_SpecCube0, (float3)(tmpvar_23), level(tmpvar_27.w)); + half4 tmpvar_29; + tmpvar_29 = tmpvar_28; + half3 viewDir_30; + viewDir_30 = -(tmpvar_10); + half3 tmpvar_31; + half3 inVec_32; + inVec_32 = (_mtl_u._WorldSpaceLightPos0.xyz + viewDir_30); + tmpvar_31 = (inVec_32 * rsqrt(max ((half)0.001, + dot (inVec_32, inVec_32) + ))); + half tmpvar_33; + tmpvar_33 = max ((half)0.0, dot (_mtl_u._WorldSpaceLightPos0.xyz, tmpvar_31)); + half tmpvar_34; + tmpvar_34 = ((half)1.0 - _mtl_u._Glossiness); + half tmpvar_35; + tmpvar_35 = max ((half)0.0001, (tmpvar_34 * tmpvar_34)); + half tmpvar_36; + tmpvar_36 = max ((((half)2.0 / + (tmpvar_35 * tmpvar_35) + ) - (half)2.0), (half)0.0001); + half x_37; + x_37 = ((half)1.0 - max ((half)0.0, dot (tmpvar_9, viewDir_30))); + half4 tmpvar_38; + tmpvar_38.w = half(1.0); + tmpvar_38.xyz = ((( + ((tmpvar_6 + (sqrt( + max ((half)0.0001, (((tmpvar_36 + (half)1.0) * pow ( + max ((half)0.0, dot (tmpvar_9, tmpvar_31)) + , tmpvar_36)) / (( + ((half)8.0 * (((tmpvar_33 * tmpvar_33) * _mtl_u._Glossiness) + (tmpvar_34 * tmpvar_34))) + * tmpvar_33) + (half)0.0001))) + ) * tmpvar_7)) * (tmpvar_11 * atten_2)) + * + max ((half)0.0, dot (tmpvar_9, _mtl_u._WorldSpaceLightPos0.xyz)) + ) + ( + (max ((((half)1.055 * + pow (max ((half3)float3(0.0, 0.0, 0.0), (_mtl_i.xlv_TEXCOORD5.xyz + x_25)), (half3)float3(0.4166667, 0.4166667, 0.4166667)) + ) - (half)0.055), (half3)float3(0.0, 0.0, 0.0)) * tmpvar_17) + * tmpvar_6)) + (( + ((half)1.0 - ((tmpvar_34 * tmpvar_34) * (tmpvar_34 * (half)0.28))) + * + (((hdr_26.x * tmpvar_29.w) * tmpvar_29.xyz) * tmpvar_17) + ) * mix (tmpvar_7, half3( + clamp ((_mtl_u._Glossiness + ((half)1.0 - tmpvar_8)), (half)0.0, (half)1.0) + ), half3( + ((x_37 * x_37) * (x_37 * x_37)) + )))); + c_1 = (tmpvar_38 * _mtl_i.xlv_COLOR); + c_1.xyz = c_1.xyz; + c_1.xyz = c_1.xyz; + half4 xlat_varoutput_39; + xlat_varoutput_39.xyz = c_1.xyz; + xlat_varoutput_39.w = half(1.0); + _mtl_o.FragData_0 = xlat_varoutput_39; + return _mtl_o; +} + + +// stats: 97 alu 4 tex 0 flow +// inputs: 6 +// #0: xlv_TEXCOORD0 (high float) 4x1 [-1] +// #1: xlv_TEXCOORD1 (medium float) 3x1 [-1] +// #2: xlv_TEXCOORD2_2 (medium float) 4x1 [-1] +// #3: xlv_TEXCOORD5 (medium float) 4x1 [-1] +// #4: xlv_TEXCOORD6 (medium float) 4x1 [-1] +// #5: xlv_COLOR (low float) 4x1 [-1] +// uniforms: 12 (total size: 78) +// #0: _WorldSpaceLightPos0 (medium float) 4x1 [-1] loc 0 +// #1: unity_SHAr (medium float) 4x1 [-1] loc 8 +// #2: unity_SHAg (medium float) 4x1 [-1] loc 16 +// #3: unity_SHAb (medium float) 4x1 [-1] loc 24 +// #4: _LightShadowData (medium float) 4x1 [-1] loc 32 +// #5: unity_SpecCube0_HDR (medium float) 4x1 [-1] loc 40 +// #6: unity_ColorSpaceDielectricSpec (medium float) 4x1 [-1] loc 48 +// #7: _LightColor0 (low float) 4x1 [-1] loc 56 +// #8: _Color (medium float) 4x1 [-1] loc 64 +// #9: _Metallic (medium float) 1x1 [-1] loc 72 +// #10: _Glossiness (medium float) 1x1 [-1] loc 74 +// #11: _OcclusionStrength (medium float) 1x1 [-1] loc 76 +// textures: 4 +// #0: unity_SpecCube0 (low cube) 0x0 [-1] loc 0 +// #1: _MainTex (low 2d) 0x0 [-1] loc 1 +// #2: _OcclusionMap (low 2d) 0x0 [-1] loc 2 +// #3: _ShadowMapTexture (low 2dshadow) 0x0 [-1] loc 3 diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp index 6ae5c798648..623ac90a4c9 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp @@ -131,11 +131,8 @@ ImGui::NewFrame(); // 3) most of your application code here - ImGui::Begin("My window"); - ImGui::Text("Hello, world."); - ImGui::End(); - MyGameUpdate(); // may use ImGui functions - MyGameRender(); // may use ImGui functions + MyGameUpdate(); // may use any ImGui functions, e.g. ImGui::Begin("My window"); ImGui::Text("Hello, world!"); ImGui::End(); + MyGameRender(); // may use any ImGui functions // 4) render & swap video buffers ImGui::Render(); @@ -153,6 +150,7 @@ Here is a change-log of API breaking changes, if you are using one of the functions listed, expect to have to fix some code. Also read releases logs https://github.com/ocornut/imgui/releases for more details. + - 2016/07/30 (1.50) - SameLine(x) with x>0.0f is now relative to left of column/group if any, and not always to left of window. This was sort of always the intent and hopefully breakage should be minimal. - 2016/05/12 (1.49) - title bar (using ImGuiCol_TitleBg/ImGuiCol_TitleBgActive colors) isn't rendered over a window background (ImGuiCol_WindowBg color) anymore. If your TitleBg/TitleBgActive alpha was 1.0f or you are using the default theme it will not affect you. However if your TitleBg/TitleBgActive alpha was <1.0f you need to tweak your custom theme to readjust for the fact that we don't draw a WindowBg background behind the title bar. @@ -211,15 +209,15 @@ - 2015/05/27 (1.40) - removed the third 'repeat_if_held' parameter from Button() - sorry! it was rarely used and inconsistent. Use PushButtonRepeat(true) / PopButtonRepeat() to enable repeat on desired buttons. - 2015/05/11 (1.40) - changed BeginPopup() API, takes a string identifier instead of a bool. ImGui needs to manage the open/closed state of popups. Call OpenPopup() to actually set the "open" state of a popup. BeginPopup() returns true if the popup is opened. - 2015/05/03 (1.40) - removed style.AutoFitPadding, using style.WindowPadding makes more sense (the default values were already the same). - - 2015/04/13 (1.38) - renamed IsClipped() to IsRectClipped(). Kept inline redirection function (will obsolete). + - 2015/04/13 (1.38) - renamed IsClipped() to IsRectClipped(). Kept inline redirection function until 1.50. - 2015/04/09 (1.38) - renamed ImDrawList::AddArc() to ImDrawList::AddArcFast() for compatibility with future API - 2015/04/03 (1.38) - removed ImGuiCol_CheckHovered, ImGuiCol_CheckActive, replaced with the more general ImGuiCol_FrameBgHovered, ImGuiCol_FrameBgActive. - 2014/04/03 (1.38) - removed support for passing -FLT_MAX..+FLT_MAX as the range for a SliderFloat(). Use DragFloat() or Inputfloat() instead. - - 2015/03/17 (1.36) - renamed GetItemBoxMin()/GetItemBoxMax()/IsMouseHoveringBox() to GetItemRectMin()/GetItemRectMax()/IsMouseHoveringRect(). Kept inline redirection function (will obsolete). + - 2015/03/17 (1.36) - renamed GetItemBoxMin()/GetItemBoxMax()/IsMouseHoveringBox() to GetItemRectMin()/GetItemRectMax()/IsMouseHoveringRect(). Kept inline redirection function until 1.50. - 2015/03/15 (1.36) - renamed style.TreeNodeSpacing to style.IndentSpacing, ImGuiStyleVar_TreeNodeSpacing to ImGuiStyleVar_IndentSpacing - - 2015/03/13 (1.36) - renamed GetWindowIsFocused() to IsWindowFocused(). Kept inline redirection function (will obsolete). + - 2015/03/13 (1.36) - renamed GetWindowIsFocused() to IsWindowFocused(). Kept inline redirection function until 1.50. - 2015/03/08 (1.35) - renamed style.ScrollBarWidth to style.ScrollbarWidth (casing) - - 2015/02/27 (1.34) - renamed OpenNextNode(bool) to SetNextTreeNodeOpened(bool, ImGuiSetCond). Kept inline redirection function (will obsolete). + - 2015/02/27 (1.34) - renamed OpenNextNode(bool) to SetNextTreeNodeOpened(bool, ImGuiSetCond). Kept inline redirection function until 1.50. - 2015/02/27 (1.34) - renamed ImGuiSetCondition_*** to ImGuiSetCond_***, and _FirstUseThisSession becomes _Once. - 2015/02/11 (1.32) - changed text input callback ImGuiTextEditCallback return type from void-->int. reserved for future use, return 0 for now. - 2015/02/10 (1.32) - renamed GetItemWidth() to CalcItemWidth() to clarify its evolving behavior @@ -391,10 +389,12 @@ e.g. when displaying a list of objects, using indices or pointers as ID will preserve the node open/closed state differently. experiment and see what makes more sense! Q: How can I tell when ImGui wants my mouse/keyboard inputs and when I can pass them to my application? - A: You can read the 'io.WantCaptureXXX' flags in the ImGuiIO structure. Preferably read them after calling ImGui::NewFrame() to avoid those flags lagging by one frame. + A: You can read the 'io.WantCaptureXXX' flags in the ImGuiIO structure. Preferably read them after calling ImGui::NewFrame() to avoid those flags lagging by one frame, but either should be fine. When 'io.WantCaptureMouse' or 'io.WantCaptureKeyboard' flags are set you may want to discard/hide the inputs from the rest of your application. When 'io.WantInputsCharacters' is set to may want to notify your OS to popup an on-screen keyboard, if available. ImGui is tracking dragging and widget activity that may occur outside the boundary of a window, so 'io.WantCaptureMouse' is a more accurate and complete than testing for ImGui::IsMouseHoveringAnyWindow(). + (Advanced note: text input releases focus on Return 'KeyDown', so the following Return 'KeyUp' event that your application receive will typically have 'io.WantcaptureKeyboard=false'. + Depending on your application logic it may or not be inconvenient. You might want to track which key-downs were for ImGui (e.g. with an array of bool) and filter out the corresponding key-ups.) Q: How can I load a different font than the default? (default is an embedded version of ProggyClean.ttf, rendered at size 13) A: Use the font atlas to load the TTF file you want: @@ -460,7 +460,7 @@ - doc: add a proper documentation+regression testing system (#435) - window: add a way for very transient windows (non-saved, temporary overlay over hundreds of objects) to "clean" up from the global window list. perhaps a lightweight explicit cleanup pass. - - window: calling SetNextWindowSize() every frame with <= 0 doesn't do anything, may be useful to allow (particularly when used for a single axis). + - window: calling SetNextWindowSize() every frame with <= 0 doesn't do anything, may be useful to allow (particularly when used for a single axis) (#690) - window: auto-fit feedback loop when user relies on any dynamic layout (window width multiplier, column) appears weird to end-user. clarify. - window: allow resizing of child windows (possibly given min/max for each axis?) - window: background options for child windows, border option (disable rounding) @@ -488,9 +488,11 @@ - input text: flag to disable live update of the user buffer (also applies to float/int text input) - input text: resize behavior - field could stretch when being edited? hover tooltip shows more text? - input text: add ImGuiInputTextFlags_EnterToApply? (off #218) + - input text: add discard flag (e.g. ImGuiInputTextFlags_DiscardActiveBuffer) or make it easier to clear active focus for text replacement during edition (#725) - input text multi-line: don't directly call AddText() which does an unnecessary vertex reserve for character count prior to clipping. and/or more line-based clipping to AddText(). and/or reorganize TextUnformatted/RenderText for more efficiency for large text (e.g TextUnformatted could clip and log separately, etc). - input text multi-line: way to dynamically grow the buffer without forcing the user to initially allocate for worse case (follow up on #200) - input text multi-line: line numbers? status bar? (follow up on #200) + - input text multi-line: behave better when user changes input buffer while editing is active (even though it is illegal behavior). namely, the change of buffer can create a scrollbar glitch (#725) - input text: allow centering/positioning text so that ctrl+clicking Drag or Slider keeps the textual value at the same pixel position. - input number: optional range min/max for Input*() functions - input number: holding [-]/[+] buttons could increase the step speed non-linearly (or user-controlled) @@ -834,10 +836,7 @@ ImGuiIO::ImGuiIO() // Set OS X style defaults based on __APPLE__ compile time flag #ifdef __APPLE__ - WordMovementUsesAltKey = true; // OS X style: Text editing cursor movement using Alt instead of Ctrl - ShortcutsUseSuperKey = true; // OS X style: Shortcuts using Cmd/Super instead of Ctrl - DoubleClickSelectsWord = true; // OS X style: Double click selects by word instead of selecting whole text - MultiSelectUsesSuperKey = true; // OS X style: Multi-selection in lists uses Cmd/Super instead of Ctrl + OSXBehaviors = true; #endif } @@ -868,7 +867,8 @@ void ImGuiIO::AddInputCharactersUTF8(const char* utf8_chars) // HELPERS //----------------------------------------------------------------------------- -#define IM_F32_TO_INT8(_VAL) ((int)((_VAL) * 255.0f + 0.5f)) +#define IM_F32_TO_INT8_UNBOUND(_VAL) ((int)((_VAL) * 255.0f + ((_VAL)>=0 ? 0.5f : -0.5f))) // Unsaturated, for display purpose +#define IM_F32_TO_INT8_SAT(_VAL) ((int)(ImSaturate(_VAL) * 255.0f + 0.5f)) // Saturated, always output 0..255 // Play it nice with Windows users. Notepad in 2015 still doesn't display text data with Unix-style \n. #ifdef _WIN32 @@ -899,6 +899,13 @@ int ImStrnicmp(const char* str1, const char* str2, int count) return d; } +void ImStrncpy(char* dst, const char* src, int count) +{ + if (count < 1) return; + strncpy(dst, src, (size_t)count); + dst[count-1] = 0; +} + char* ImStrdup(const char *str) { size_t len = strlen(str) + 1; @@ -997,7 +1004,6 @@ ImU32 ImHash(const void* data, int data_size, ImU32 seed) // - We don't do 'current += 2; continue;' after handling ### to keep the code smaller. if (c == '#' && current[0] == '#' && current[1] == '#') crc = seed; - crc = (crc >> 8) ^ crc32_lut[(crc & 0xFF) ^ c]; } } @@ -1189,13 +1195,27 @@ ImVec4 ImGui::ColorConvertU32ToFloat4(ImU32 in) ImU32 ImGui::ColorConvertFloat4ToU32(const ImVec4& in) { 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; + out = ((ImU32)IM_F32_TO_INT8_SAT(in.x)); + out |= ((ImU32)IM_F32_TO_INT8_SAT(in.y)) << 8; + out |= ((ImU32)IM_F32_TO_INT8_SAT(in.z)) << 16; + out |= ((ImU32)IM_F32_TO_INT8_SAT(in.w)) << 24; return out; } +ImU32 ImGui::GetColorU32(ImGuiCol idx, float alpha_mul) +{ + ImVec4 c = GImGui->Style.Colors[idx]; + c.w *= GImGui->Style.Alpha * alpha_mul; + return ImGui::ColorConvertFloat4ToU32(c); +} + +ImU32 ImGui::GetColorU32(const ImVec4& col) +{ + ImVec4 c = col; + c.w *= GImGui->Style.Alpha; + return ImGui::ColorConvertFloat4ToU32(c); +} + // Convert rgb floats ([0-1],[0-1],[0-1]) to hsv floats ([0-1],[0-1],[0-1]), from Foley & van Dam p592 // Optimized http://lolengine.net/blog/2013/01/13/fast-rgb-to-hsv void ImGui::ColorConvertRGBtoHSV(float r, float g, float b, float& out_h, float& out_s, float& out_v) @@ -1300,7 +1320,7 @@ void ImGuiStorage::Clear() } // std::lower_bound but without the bullshit -static ImVector::iterator LowerBound(ImVector& data, ImU32 key) +static ImVector::iterator LowerBound(ImVector& data, ImGuiID key) { ImVector::iterator first = data.begin(); ImVector::iterator last = data.end(); @@ -1322,7 +1342,7 @@ static ImVector::iterator LowerBound(ImVector::iterator it = LowerBound(const_cast&>(Data), key); if (it == Data.end() || it->key != key) @@ -1330,12 +1350,12 @@ int ImGuiStorage::GetInt(ImU32 key, int default_val) const return it->val_i; } -bool ImGuiStorage::GetBool(ImU32 key, bool default_val) const +bool ImGuiStorage::GetBool(ImGuiID key, bool default_val) const { return GetInt(key, default_val ? 1 : 0) != 0; } -float ImGuiStorage::GetFloat(ImU32 key, float default_val) const +float ImGuiStorage::GetFloat(ImGuiID key, float default_val) const { ImVector::iterator it = LowerBound(const_cast&>(Data), key); if (it == Data.end() || it->key != key) @@ -1382,7 +1402,7 @@ void** ImGuiStorage::GetVoidPtrRef(ImGuiID key, void* default_val) } // FIXME-OPT: Need a way to reuse the result of lower_bound when doing GetInt()/SetInt() - not too bad because it only happens on explicit interaction (maximum one a frame) -void ImGuiStorage::SetInt(ImU32 key, int val) +void ImGuiStorage::SetInt(ImGuiID key, int val) { ImVector::iterator it = LowerBound(Data, key); if (it == Data.end() || it->key != key) @@ -1393,12 +1413,12 @@ void ImGuiStorage::SetInt(ImU32 key, int val) it->val_i = val; } -void ImGuiStorage::SetBool(ImU32 key, bool val) +void ImGuiStorage::SetBool(ImGuiID key, bool val) { SetInt(key, val ? 1 : 0); } -void ImGuiStorage::SetFloat(ImU32 key, float val) +void ImGuiStorage::SetFloat(ImGuiID key, float val) { ImVector::iterator it = LowerBound(Data, key); if (it == Data.end() || it->key != key) @@ -1409,7 +1429,7 @@ void ImGuiStorage::SetFloat(ImU32 key, float val) it->val_f = val; } -void ImGuiStorage::SetVoidPtr(ImU32 key, void* val) +void ImGuiStorage::SetVoidPtr(ImGuiID key, void* val) { ImVector::iterator it = LowerBound(Data, key); if (it == Data.end() || it->key != key) @@ -1435,7 +1455,7 @@ ImGuiTextFilter::ImGuiTextFilter(const char* default_filter) { if (default_filter) { - ImFormatString(InputBuf, IM_ARRAYSIZE(InputBuf), "%s", default_filter); + ImStrncpy(InputBuf, default_filter, IM_ARRAYSIZE(InputBuf)); Build(); } else @@ -1617,12 +1637,14 @@ float ImGuiSimpleColumns::CalcExtraSpace(float avail_w) static void SetCursorPosYAndSetupDummyPrevLine(float pos_y, float line_height) { - // Setting those fields so that SetScrollHere() can properly function after the end of our clipper usage. - // If we end up needing more accurate data (to e.g. use SameLine) we may as well make the clipper have a fourth step to let user process and display the last item in their list. + // Set cursor position and a few other things so that SetScrollHere() and Columns() can work when seeking cursor. + // FIXME: It is problematic that we have to do that here, because custom/equivalent end-user code would stumble on the same issue. Consider moving within SetCursorXXX functions? ImGui::SetCursorPosY(pos_y); ImGuiWindow* window = ImGui::GetCurrentWindow(); - window->DC.CursorPosPrevLine.y = window->DC.CursorPos.y - line_height; - window->DC.PrevLineHeight = (line_height - GImGui->Style.ItemSpacing.y); + window->DC.CursorPosPrevLine.y = window->DC.CursorPos.y - line_height; // Setting those fields so that SetScrollHere() can properly function after the end of our clipper usage. + window->DC.PrevLineHeight = (line_height - GImGui->Style.ItemSpacing.y); // If we end up needing more accurate data (to e.g. use SameLine) we may as well make the clipper have a fourth step to let user process and display the last item in their list. + if (window->DC.ColumnsCount > 1) + window->DC.ColumnsCellMinY = window->DC.CursorPos.y; // Setting this so that cell Y position are set properly } // Use case A: Begin() called from constructor with items_height<0, then called again from Sync() in StepNo 1 @@ -1675,8 +1697,9 @@ bool ImGuiListClipper::Step() if (ItemsCount == 1) { ItemsCount = -1; return false; } float items_height = ImGui::GetCursorPosY() - StartPosY; IM_ASSERT(items_height > 0.0f); // If this triggers, it means Item 0 hasn't moved the cursor vertically - ImGui::SetCursorPosY(StartPosY); // Rewind cursor so we can Begin() again, this time with a known height. - Begin(ItemsCount, items_height); + Begin(ItemsCount-1, items_height); + DisplayStart++; + DisplayEnd++; StepNo = 3; return true; } @@ -1700,7 +1723,7 @@ ImGuiWindow::ImGuiWindow(const char* name) Name = ImStrdup(name); ID = ImHash(name, 0); IDStack.push_back(ID); - MoveID = GetID("#MOVE"); + MoveId = GetID("#MOVE"); Flags = 0; IndexWithinParent = 0; @@ -1719,7 +1742,7 @@ ImGuiWindow::ImGuiWindow(const char* name) Collapsed = false; SkipItems = false; BeginCount = 0; - PopupID = 0; + PopupId = 0; AutoFitFramesX = AutoFitFramesY = -1; AutoFitOnlyGrows = false; AutoPosLastDirection = -1; @@ -1768,6 +1791,12 @@ ImGuiID ImGuiWindow::GetID(const void* ptr) return id; } +ImGuiID ImGuiWindow::GetIDNoKeepAlive(const char* str, const char* str_end) +{ + ImGuiID seed = IDStack.back(); + return ImHash(str, str_end ? (int)(str_end - str) : 0, seed); +} + //----------------------------------------------------------------------------- // Internal API exposed in imgui_internal.h //----------------------------------------------------------------------------- @@ -1826,7 +1855,7 @@ void ImGui::ItemSize(const ImVec2& size, float text_offset_y) window->DC.CursorMaxPos.x = ImMax(window->DC.CursorMaxPos.x, window->DC.CursorPosPrevLine.x); window->DC.CursorMaxPos.y = ImMax(window->DC.CursorMaxPos.y, window->DC.CursorPos.y); - //window->DrawList->AddCircle(window->DC.CursorMaxPos, 3.0f, 0xFF0000FF, 4); // Debug + //window->DrawList->AddCircle(window->DC.CursorMaxPos, 3.0f, IM_COL32(255,0,0,255), 4); // Debug window->DC.PrevLineHeight = line_height; window->DC.PrevLineTextBaseOffset = text_base_offset; @@ -1844,7 +1873,7 @@ void ImGui::ItemSize(const ImRect& bb, float text_offset_y) bool ImGui::ItemAdd(const ImRect& bb, const ImGuiID* id) { ImGuiWindow* window = GetCurrentWindow(); - window->DC.LastItemID = id ? *id : 0; + window->DC.LastItemId = id ? *id : 0; window->DC.LastItemRect = bb; window->DC.LastItemHoveredAndUsable = window->DC.LastItemHoveredRect = false; if (IsClippedEx(bb, id, false)) @@ -1858,7 +1887,7 @@ bool ImGui::ItemAdd(const ImRect& bb, const ImGuiID* id) // So that clicking on items with no active id such as Text() still returns true with IsItemHovered() window->DC.LastItemHoveredRect = true; if (g.HoveredRootWindow == window->RootWindow) - if (g.ActiveId == 0 || (id && g.ActiveId == *id) || g.ActiveIdAllowOverlap || (g.ActiveId == window->MoveID)) + if (g.ActiveId == 0 || (id && g.ActiveId == *id) || g.ActiveIdAllowOverlap || (g.ActiveId == window->MoveId)) if (IsWindowContentHoverable(window)) window->DC.LastItemHoveredAndUsable = true; } @@ -1950,8 +1979,7 @@ float ImGui::CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x) else if (wrap_pos_x > 0.0f) wrap_pos_x += window->Pos.x - window->Scroll.x; // wrap_pos_x is provided is window local space - const float wrap_width = wrap_pos_x > 0.0f ? ImMax(wrap_pos_x - pos.x, 0.00001f) : 0.0f; - return wrap_width; + return ImMax(wrap_pos_x - pos.x, 1.0f); } //----------------------------------------------------------------------------- @@ -2071,7 +2099,6 @@ void ImGui::NewFrame() g.OverlayDrawList.Clear(); g.OverlayDrawList.PushTextureID(g.IO.Fonts->TexID); g.OverlayDrawList.PushClipRectFullScreen(); - g.OverlayDrawList.AddDrawCmd(); // Mark rendering data as invalid to prevent user who may have a handle on it to use it g.RenderDrawData.Valid = false; @@ -2138,7 +2165,7 @@ void ImGui::NewFrame() { KeepAliveID(g.MovedWindowMoveId); IM_ASSERT(g.MovedWindow && g.MovedWindow->RootWindow); - IM_ASSERT(g.MovedWindow->RootWindow->MoveID == g.MovedWindowMoveId); + IM_ASSERT(g.MovedWindow->RootWindow->MoveId == g.MovedWindowMoveId); if (g.IO.MouseDown[0]) { if (!(g.MovedWindow->Flags & ImGuiWindowFlags_NoMove)) @@ -2239,14 +2266,11 @@ void ImGui::NewFrame() window->SizeFull *= scale; } } - else + else if (!(window->Flags & ImGuiWindowFlags_NoScrollWithMouse)) { // Scroll - if (!(window->Flags & ImGuiWindowFlags_NoScrollWithMouse)) - { - const int scroll_lines = (window->Flags & ImGuiWindowFlags_ComboBox) ? 3 : 5; - SetWindowScrollY(window, window->Scroll.y - g.IO.MouseWheel * window->CalcFontSize() * scroll_lines); - } + const int scroll_lines = (window->Flags & ImGuiWindowFlags_ComboBox) ? 3 : 5; + SetWindowScrollY(window, window->Scroll.y - g.IO.MouseWheel * window->CalcFontSize() * scroll_lines); } } @@ -2264,6 +2288,15 @@ void ImGui::NewFrame() window->Accessed = false; } + // Closing the focused window restore focus to the first active root window in descending z-order + if (g.FocusedWindow && !g.FocusedWindow->WasActive) + for (int i = g.Windows.Size-1; i >= 0; i--) + if (g.Windows[i]->WasActive && !(g.Windows[i]->Flags & ImGuiWindowFlags_ChildWindow)) + { + FocusWindow(g.Windows[i]); + break; + } + // No window should be open at the beginning of the frame. // But in order to allow the user to call NewFrame() multiple times without calling Render(), we are doing an explicit clear. g.CurrentWindowStack.resize(0); @@ -2343,7 +2376,7 @@ static ImGuiIniData* FindWindowSettings(const char* name) for (int i = 0; i != g.Settings.Size; i++) { ImGuiIniData* ini = &g.Settings[i]; - if (ini->ID == id) + if (ini->Id == id) return ini; } return NULL; @@ -2354,7 +2387,7 @@ static ImGuiIniData* AddWindowSettings(const char* name) GImGui->Settings.resize(GImGui->Settings.Size + 1); ImGuiIniData* ini = &GImGui->Settings.back(); ini->Name = ImStrdup(name); - ini->ID = ImHash(name, 0); + ini->Id = ImHash(name, 0); ini->Collapsed = false; ini->Pos = ImVec2(FLT_MAX,FLT_MAX); ini->Size = ImVec2(0,0); @@ -2585,7 +2618,7 @@ void ImGui::EndFrame() if (!(g.HoveredWindow->Flags & ImGuiWindowFlags_NoMove)) { g.MovedWindow = g.HoveredWindow; - g.MovedWindowMoveId = g.HoveredRootWindow->MoveID; + g.MovedWindowMoveId = g.HoveredRootWindow->MoveId; SetActiveID(g.MovedWindowMoveId, g.HoveredRootWindow); } } @@ -2674,10 +2707,10 @@ void ImGui::Render() const ImVec2 size = cursor_data.Size; const ImTextureID tex_id = g.IO.Fonts->TexID; g.OverlayDrawList.PushTextureID(tex_id); - g.OverlayDrawList.AddImage(tex_id, pos+ImVec2(1,0), pos+ImVec2(1,0) + size, cursor_data.TexUvMin[1], cursor_data.TexUvMax[1], 0x30000000); // Shadow - g.OverlayDrawList.AddImage(tex_id, pos+ImVec2(2,0), pos+ImVec2(2,0) + size, cursor_data.TexUvMin[1], cursor_data.TexUvMax[1], 0x30000000); // Shadow - g.OverlayDrawList.AddImage(tex_id, pos, pos + size, cursor_data.TexUvMin[1], cursor_data.TexUvMax[1], 0xFF000000); // Black border - g.OverlayDrawList.AddImage(tex_id, pos, pos + size, cursor_data.TexUvMin[0], cursor_data.TexUvMax[0], 0xFFFFFFFF); // White fill + g.OverlayDrawList.AddImage(tex_id, pos+ImVec2(1,0), pos+ImVec2(1,0) + size, cursor_data.TexUvMin[1], cursor_data.TexUvMax[1], IM_COL32(0,0,0,48)); // Shadow + g.OverlayDrawList.AddImage(tex_id, pos+ImVec2(2,0), pos+ImVec2(2,0) + size, cursor_data.TexUvMin[1], cursor_data.TexUvMax[1], IM_COL32(0,0,0,48)); // Shadow + g.OverlayDrawList.AddImage(tex_id, pos, pos + size, cursor_data.TexUvMin[1], cursor_data.TexUvMax[1], IM_COL32(0,0,0,255)); // Black border + g.OverlayDrawList.AddImage(tex_id, pos, pos + size, cursor_data.TexUvMin[0], cursor_data.TexUvMax[0], IM_COL32(255,255,255,255)); // White fill g.OverlayDrawList.PopTextureID(); } if (!g.OverlayDrawList.VtxBuffer.empty()) @@ -3217,7 +3250,7 @@ bool ImGui::IsItemActive() if (g.ActiveId) { ImGuiWindow* window = GetCurrentWindowRead(); - return g.ActiveId == window->DC.LastItemID; + return g.ActiveId == window->DC.LastItemId; } return false; } @@ -3248,9 +3281,9 @@ bool ImGui::IsItemVisible() void ImGui::SetItemAllowOverlap() { ImGuiContext& g = *GImGui; - if (g.HoveredId == g.CurrentWindow->DC.LastItemID) + if (g.HoveredId == g.CurrentWindow->DC.LastItemId) g.HoveredIdAllowOverlap = true; - if (g.ActiveId == g.CurrentWindow->DC.LastItemID) + if (g.ActiveId == g.CurrentWindow->DC.LastItemId) g.ActiveIdAllowOverlap = true; } @@ -3318,7 +3351,7 @@ void ImGui::EndTooltip() static bool IsPopupOpen(ImGuiID id) { ImGuiContext& g = *GImGui; - const bool is_open = g.OpenPopupStack.Size > g.CurrentPopupStack.Size && g.OpenPopupStack[g.CurrentPopupStack.Size].PopupID == id; + const bool is_open = g.OpenPopupStack.Size > g.CurrentPopupStack.Size && g.OpenPopupStack[g.CurrentPopupStack.Size].PopupId == id; return is_open; } @@ -3335,7 +3368,7 @@ void ImGui::OpenPopupEx(const char* str_id, bool reopen_existing) ImGuiPopupRef popup_ref = ImGuiPopupRef(id, window, window->GetID("##menus"), g.IO.MousePos); // Tagged as new ref because constructor sets Window to NULL (we are passing the ParentWindow info here) if (g.OpenPopupStack.Size < current_stack_size + 1) g.OpenPopupStack.push_back(popup_ref); - else if (reopen_existing || g.OpenPopupStack[current_stack_size].PopupID != id) + else if (reopen_existing || g.OpenPopupStack[current_stack_size].PopupId != id) { g.OpenPopupStack.resize(current_stack_size+1); g.OpenPopupStack[current_stack_size] = popup_ref; @@ -3411,7 +3444,7 @@ void ImGui::CloseCurrentPopup() { ImGuiContext& g = *GImGui; int popup_idx = g.CurrentPopupStack.Size - 1; - if (popup_idx < 0 || popup_idx > g.OpenPopupStack.Size || g.CurrentPopupStack[popup_idx].PopupID != g.OpenPopupStack[popup_idx].PopupID) + if (popup_idx < 0 || popup_idx > g.OpenPopupStack.Size || g.CurrentPopupStack[popup_idx].PopupId != g.OpenPopupStack[popup_idx].PopupId) return; while (popup_idx > 0 && g.OpenPopupStack[popup_idx].Window && (g.OpenPopupStack[popup_idx].Window->Flags & ImGuiWindowFlags_ChildMenu)) popup_idx--; @@ -3814,11 +3847,11 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us if (flags & ImGuiWindowFlags_Popup) { ImGuiPopupRef& popup_ref = g.OpenPopupStack[g.CurrentPopupStack.Size]; - window_was_active &= (window->PopupID == popup_ref.PopupID); + 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; + window->PopupId = popup_ref.PopupId; } const bool window_appearing_after_being_hidden = (window->HiddenFrames == 1); @@ -3901,16 +3934,10 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us else PushClipRect(fullscreen_rect.Min, fullscreen_rect.Max, true); - // New windows appears in front if (!window_was_active) { - window->AutoPosLastDirection = -1; - - if (!(flags & ImGuiWindowFlags_NoFocusOnAppearing)) - if (!(flags & (ImGuiWindowFlags_ChildWindow|ImGuiWindowFlags_Tooltip)) || (flags & ImGuiWindowFlags_Popup)) - FocusWindow(window); - // Popup first latch mouse position, will position itself when it appears next frame + window->AutoPosLastDirection = -1; if ((flags & ImGuiWindowFlags_Popup) != 0 && !window_pos_set_by_api) window->PosFloat = g.IO.MousePos; } @@ -4087,7 +4114,7 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us if (window->ScrollTarget.y < FLT_MAX) { float center_ratio = window->ScrollTargetCenterRatio.y; - window->Scroll.y = window->ScrollTarget.y - ((1.0f - center_ratio) * window->TitleBarHeight()) - (center_ratio * window->SizeFull.y); + window->Scroll.y = window->ScrollTarget.y - ((1.0f - center_ratio) * (window->TitleBarHeight() + window->MenuBarHeight())) - (center_ratio * window->SizeFull.y); window->ScrollTarget.y = FLT_MAX; } window->Scroll = ImMax(window->Scroll, ImVec2(0.0f, 0.0f)); @@ -4213,6 +4240,7 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us // Setup drawing context window->DC.IndentX = 0.0f + window->WindowPadding.x - window->Scroll.x; + window->DC.GroupOffsetX = 0.0f; window->DC.ColumnsOffsetX = 0.0f; window->DC.CursorStartPos = window->Pos + ImVec2(window->DC.IndentX + window->DC.ColumnsOffsetX, window->TitleBarHeight() + window->MenuBarHeight() + window->WindowPadding.y - window->Scroll.y); window->DC.CursorPos = window->DC.CursorStartPos; @@ -4248,6 +4276,11 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us if (window->AutoFitFramesY > 0) window->AutoFitFramesY--; + // New windows appears in front (we need to do that AFTER setting DC.CursorStartPos so our initial navigation reference rectangle can start around there) + if (!window_was_active && !(flags & ImGuiWindowFlags_NoFocusOnAppearing)) + if (!(flags & (ImGuiWindowFlags_ChildWindow|ImGuiWindowFlags_Tooltip)) || (flags & ImGuiWindowFlags_Popup)) + FocusWindow(window); + // Title bar if (!(flags & ImGuiWindowFlags_NoTitleBar)) { @@ -4271,7 +4304,8 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us if (style.WindowTitleAlign & ImGuiAlign_Center) pad_right = pad_left; if (pad_left) text_min.x += g.FontSize + style.ItemInnerSpacing.x; if (pad_right) text_max.x -= g.FontSize + style.ItemInnerSpacing.x; - RenderTextClipped(text_min, text_max, name, NULL, &text_size, style.WindowTitleAlign, NULL, &clip_max); + ImVec2 clip_min = ImVec2(text_min.x, window->Pos.y); + RenderTextClipped(text_min, text_max, name, NULL, &text_size, style.WindowTitleAlign, &clip_min, &clip_max); } // Save clipped aabb so we can access it in constant-time in FindHoveredWindow() @@ -4913,8 +4947,7 @@ void ImGui::SetWindowFocus(const char* name) { if (name) { - ImGuiWindow* window = FindWindowByName(name); - if (window) + if (ImGuiWindow* window = FindWindowByName(name)) FocusWindow(window); } else @@ -5077,13 +5110,13 @@ ImVec2 ImGui::GetCursorPos() float ImGui::GetCursorPosX() { - ImGuiWindow* window = GetCurrentWindow(); + ImGuiWindow* window = GetCurrentWindowRead(); return window->DC.CursorPos.x - window->Pos.x + window->Scroll.x; } float ImGui::GetCursorPosY() { - ImGuiWindow* window = GetCurrentWindow(); + ImGuiWindow* window = GetCurrentWindowRead(); return window->DC.CursorPos.y - window->Pos.y + window->Scroll.y; } @@ -5124,6 +5157,7 @@ void ImGui::SetCursorScreenPos(const ImVec2& screen_pos) { ImGuiWindow* window = GetCurrentWindow(); window->DC.CursorPos = screen_pos; + window->DC.CursorMaxPos = ImMax(window->DC.CursorMaxPos, window->DC.CursorPos); } float ImGui::GetScrollX() @@ -5158,7 +5192,7 @@ void ImGui::SetScrollX(float scroll_x) void ImGui::SetScrollY(float scroll_y) { ImGuiWindow* window = GetCurrentWindow(); - window->ScrollTarget.y = scroll_y + window->TitleBarHeight(); // title bar height canceled out when using ScrollTargetRelY + window->ScrollTarget.y = scroll_y + window->TitleBarHeight() + window->MenuBarHeight(); // title bar height canceled out when using ScrollTargetRelY window->ScrollTargetCenterRatio.y = 0.0f; } @@ -5251,9 +5285,10 @@ void ImGui::TextDisabled(const char* fmt, ...) void ImGui::TextWrappedV(const char* fmt, va_list args) { - PushTextWrapPos(0.0f); + bool need_wrap = (GImGui->CurrentWindow->DC.TextWrapPos < 0.0f); // Keep existing wrap position is one ia already set + if (need_wrap) PushTextWrapPos(0.0f); TextV(fmt, args); - PopTextWrapPos(); + if (need_wrap) PopTextWrapPos(); } void ImGui::TextWrapped(const char* fmt, ...) @@ -5316,7 +5351,7 @@ void ImGui::TextUnformatted(const char* text, const char* text_end) // Lines to render if (line < text_end) { - ImRect line_rect(pos, pos + ImVec2(GetWindowWidth(), line_height)); + ImRect line_rect(pos, pos + ImVec2(FLT_MAX, line_height)); while (line < text_end) { const char* line_end = strchr(line, '\n'); @@ -5360,9 +5395,7 @@ void ImGui::TextUnformatted(const char* text, const char* text_end) const ImVec2 text_size = CalcTextSize(text_begin, text_end, false, wrap_width); // Account of baseline offset - ImVec2 text_pos = window->DC.CursorPos; - text_pos.y += window->DC.CurrentLineTextBaseOffset; - + ImVec2 text_pos(window->DC.CursorPos.x, window->DC.CursorPos.y + window->DC.CurrentLineTextBaseOffset); ImRect bb(text_pos, text_pos + text_size); ItemSize(text_size); if (!ItemAdd(bb, NULL)) @@ -6153,7 +6186,7 @@ void ImGui::BulletTextV(const char* fmt, va_list args) const char* text_begin = g.TempBuffer; const char* text_end = text_begin + ImFormatStringV(g.TempBuffer, IM_ARRAYSIZE(g.TempBuffer), fmt, args); - const ImVec2 label_size = CalcTextSize(text_begin, text_end, true); + const ImVec2 label_size = CalcTextSize(text_begin, text_end, false); const float text_base_offset_y = ImMax(0.0f, window->DC.CurrentLineTextBaseOffset); // Latch before ItemSize changes it const float line_height = ImMax(ImMin(window->DC.CurrentLineHeight, g.FontSize + g.Style.FramePadding.y*2), g.FontSize); const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(g.FontSize + (label_size.x > 0.0f ? (label_size.x + style.FramePadding.x*2) : 0.0f), ImMax(line_height, label_size.y))); // Empty text doesn't add padding @@ -6163,7 +6196,7 @@ void ImGui::BulletTextV(const char* fmt, va_list args) // Render RenderBullet(bb.Min + ImVec2(style.FramePadding.x + g.FontSize*0.5f, line_height*0.5f)); - RenderText(bb.Min+ImVec2(g.FontSize + style.FramePadding.x*2, text_base_offset_y), text_begin, text_end); + RenderText(bb.Min+ImVec2(g.FontSize + style.FramePadding.x*2, text_base_offset_y), text_begin, text_end, false); } void ImGui::BulletText(const char* fmt, ...) @@ -7405,6 +7438,7 @@ static void STB_TEXTEDIT_DELETECHARS(STB_TEXTEDIT_STRING* obj, int pos, int n) static bool STB_TEXTEDIT_INSERTCHARS(STB_TEXTEDIT_STRING* obj, int pos, const ImWchar* new_text, int new_text_len) { const int text_len = obj->CurLenW; + IM_ASSERT(pos <= text_len); if (new_text_len + text_len + 1 > obj->Text.Size) return false; @@ -7612,10 +7646,6 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 // NB: we are only allowed to access 'edit_state' if we are the active widget. ImGuiTextEditState& edit_state = g.InputTextState; - const bool is_ctrl_down = io.KeyCtrl; - const bool is_shift_down = io.KeyShift; - const bool is_alt_down = io.KeyAlt; - const bool is_super_down = io.KeySuper; const bool focus_requested = FocusableItemRegister(window, g.ActiveId == id, (flags & (ImGuiInputTextFlags_CallbackCompletion|ImGuiInputTextFlags_AllowTabInput)) == 0); // Using completion callback disable keyboard tabbing const bool focus_requested_by_code = focus_requested && (window->FocusIdxAllCounter == window->FocusIdxAllRequestCurrent); const bool focus_requested_by_tab = focus_requested && !focus_requested_by_code; @@ -7627,7 +7657,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 g.MouseCursor = ImGuiMouseCursor_TextInput; } const bool user_clicked = hovered && io.MouseClicked[0]; - const bool user_scrolled = is_multiline && g.ActiveId == 0 && edit_state.Id == id && g.ActiveIdPreviousFrame == draw_window->GetID("#SCROLLY"); + const bool user_scrolled = is_multiline && g.ActiveId == 0 && edit_state.Id == id && g.ActiveIdPreviousFrame == draw_window->GetIDNoKeepAlive("#SCROLLY"); bool select_all = (g.ActiveId != id) && (flags & ImGuiInputTextFlags_AutoSelectAll) != 0; if (focus_requested || user_clicked || user_scrolled) @@ -7638,9 +7668,9 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 // Take a copy of the initial buffer value (both in original UTF-8 format and converted to wchar) // From the moment we focused we are ignoring the content of 'buf' (unless we are in read-only mode) const int prev_len_w = edit_state.CurLenW; - edit_state.Text.resize(buf_size+1); // wchar count <= utf-8 count. we use +1 to make sure that .Data isn't NULL so it doesn't crash. - edit_state.InitialText.resize(buf_size+1); // utf-8. we use +1 to make sure that .Data isn't NULL so it doesn't crash. - ImFormatString(edit_state.InitialText.Data, edit_state.InitialText.Size, "%s", buf); + edit_state.Text.resize(buf_size+1); // wchar count <= UTF-8 count. we use +1 to make sure that .Data isn't NULL so it doesn't crash. + edit_state.InitialText.resize(buf_size+1); // UTF-8. we use +1 to make sure that .Data isn't NULL so it doesn't crash. + ImStrncpy(edit_state.InitialText.Data, buf, edit_state.InitialText.Size); 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); // We can't get the result from ImFormatString() above because it is not UTF-8 aware. Here we'll cut off malformed UTF-8. @@ -7665,7 +7695,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 } if (flags & ImGuiInputTextFlags_AlwaysInsertMode) edit_state.StbState.insert_mode = true; - if (!is_multiline && (focus_requested_by_tab || (user_clicked && is_ctrl_down))) + if (!is_multiline && (focus_requested_by_tab || (user_clicked && io.KeyCtrl))) select_all = true; } SetActiveID(id, window); @@ -7700,15 +7730,16 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 g.ActiveIdAllowOverlap = !io.MouseDown[0]; // Edit in progress - const float mouse_x = (g.IO.MousePos.x - frame_bb.Min.x - style.FramePadding.x) + edit_state.ScrollX; - const float mouse_y = (is_multiline ? (g.IO.MousePos.y - draw_window->DC.CursorPos.y - style.FramePadding.y) : (g.FontSize*0.5f)); + const float mouse_x = (io.MousePos.x - frame_bb.Min.x - style.FramePadding.x) + edit_state.ScrollX; + const float mouse_y = (is_multiline ? (io.MousePos.y - draw_window->DC.CursorPos.y - style.FramePadding.y) : (g.FontSize*0.5f)); - if (select_all || (hovered && !io.DoubleClickSelectsWord && io.MouseDoubleClicked[0])) + const bool osx_double_click_selects_words = io.OSXBehaviors; // OS X style: Double click selects by word instead of selecting whole text + if (select_all || (hovered && !osx_double_click_selects_words && io.MouseDoubleClicked[0])) { edit_state.SelectAll(); edit_state.SelectedAllMouseLock = true; } - else if (hovered && io.DoubleClickSelectsWord && io.MouseDoubleClicked[0]) + else if (hovered && osx_double_click_selects_words && io.MouseDoubleClicked[0]) { // Select a word only, OS X style (by simulating keystrokes) edit_state.OnKeyPressed(STB_TEXTEDIT_K_WORDLEFT); @@ -7728,14 +7759,14 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 if (edit_state.SelectedAllMouseLock && !io.MouseDown[0]) edit_state.SelectedAllMouseLock = false; - if (g.IO.InputCharacters[0]) + if (io.InputCharacters[0]) { // Process text input (before we check for Return because using some IME will effectively send a Return?) // We ignore CTRL inputs, but need to allow CTRL+ALT as some keyboards (e.g. German) use AltGR - which is Alt+Ctrl - to input certain characters. - if (!(is_ctrl_down && !is_alt_down) && is_editable) + if (!(io.KeyCtrl && !io.KeyAlt) && is_editable) { - for (int n = 0; n < IM_ARRAYSIZE(g.IO.InputCharacters) && g.IO.InputCharacters[n]; n++) - if (unsigned int c = (unsigned int)g.IO.InputCharacters[n]) + for (int n = 0; n < IM_ARRAYSIZE(io.InputCharacters) && io.InputCharacters[n]; n++) + if (unsigned int c = (unsigned int)io.InputCharacters[n]) { // Insert character if they pass filtering if (!InputTextFilterCharacter(&c, flags, callback, user_data)) @@ -7750,22 +7781,31 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 // Handle various key-presses bool cancel_edit = false; - const int k_mask = (is_shift_down ? STB_TEXTEDIT_K_SHIFT : 0); - const bool is_shortcutkey_only = (io.ShortcutsUseSuperKey ? (is_super_down && !is_alt_down && !is_shift_down && !is_ctrl_down) : (is_ctrl_down && !is_alt_down && !is_shift_down && !is_super_down)); - const bool is_wordmove_key_down = (io.WordMovementUsesAltKey ? io.KeyAlt : io.KeyCtrl); + const int k_mask = (io.KeyShift ? STB_TEXTEDIT_K_SHIFT : 0); + const bool is_shortcut_key_only = (io.OSXBehaviors ? (io.KeySuper && !io.KeyCtrl) : (io.KeyCtrl && !io.KeySuper)) && !io.KeyAlt && !io.KeyShift; // OS X style: Shortcuts using Cmd/Super instead of Ctrl + const bool is_wordmove_key_down = io.OSXBehaviors ? io.KeyAlt : io.KeyCtrl; // OS X style: Text editing cursor movement using Alt instead of Ctrl + const bool is_startend_key_down = io.OSXBehaviors && io.KeySuper && !io.KeyCtrl && !io.KeyAlt; // OS X style: Line/Text Start and End using Cmd+Arrows instead of Home/End - if (IsKeyPressedMap(ImGuiKey_LeftArrow)) { edit_state.OnKeyPressed(is_wordmove_key_down ? STB_TEXTEDIT_K_WORDLEFT | k_mask : STB_TEXTEDIT_K_LEFT | k_mask); } - else if (IsKeyPressedMap(ImGuiKey_RightArrow)) { edit_state.OnKeyPressed(is_wordmove_key_down ? STB_TEXTEDIT_K_WORDRIGHT | k_mask : STB_TEXTEDIT_K_RIGHT | k_mask); } - else if (is_multiline && IsKeyPressedMap(ImGuiKey_UpArrow)) { if (is_ctrl_down) SetWindowScrollY(draw_window, draw_window->Scroll.y - g.FontSize); else edit_state.OnKeyPressed(STB_TEXTEDIT_K_UP | k_mask); } - 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); } + if (IsKeyPressedMap(ImGuiKey_LeftArrow)) { edit_state.OnKeyPressed((is_startend_key_down ? STB_TEXTEDIT_K_LINESTART : is_wordmove_key_down ? STB_TEXTEDIT_K_WORDLEFT : STB_TEXTEDIT_K_LEFT) | k_mask); } + else if (IsKeyPressedMap(ImGuiKey_RightArrow)) { edit_state.OnKeyPressed((is_startend_key_down ? STB_TEXTEDIT_K_LINEEND : is_wordmove_key_down ? STB_TEXTEDIT_K_WORDRIGHT : STB_TEXTEDIT_K_RIGHT) | k_mask); } + else if (IsKeyPressedMap(ImGuiKey_UpArrow) && is_multiline) { if (io.KeyCtrl) SetWindowScrollY(draw_window, ImMax(draw_window->Scroll.y - g.FontSize, 0.0f)); else edit_state.OnKeyPressed((is_startend_key_down ? STB_TEXTEDIT_K_TEXTSTART : STB_TEXTEDIT_K_UP) | k_mask); } + else if (IsKeyPressedMap(ImGuiKey_DownArrow) && is_multiline) { if (io.KeyCtrl) SetWindowScrollY(draw_window, ImMin(draw_window->Scroll.y + g.FontSize, GetScrollMaxY())); else edit_state.OnKeyPressed((is_startend_key_down ? STB_TEXTEDIT_K_TEXTEND : STB_TEXTEDIT_K_DOWN) | k_mask); } + else if (IsKeyPressedMap(ImGuiKey_Home)) { edit_state.OnKeyPressed(io.KeyCtrl ? STB_TEXTEDIT_K_TEXTSTART | k_mask : STB_TEXTEDIT_K_LINESTART | k_mask); } + else if (IsKeyPressedMap(ImGuiKey_End)) { edit_state.OnKeyPressed(io.KeyCtrl ? 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) { if (is_ctrl_down && !edit_state.HasSelection()) edit_state.OnKeyPressed(STB_TEXTEDIT_K_WORDLEFT|STB_TEXTEDIT_K_SHIFT); edit_state.OnKeyPressed(STB_TEXTEDIT_K_BACKSPACE | k_mask); } + else if (IsKeyPressedMap(ImGuiKey_Backspace) && is_editable) + { + if (!edit_state.HasSelection()) + { + if (is_wordmove_key_down) edit_state.OnKeyPressed(STB_TEXTEDIT_K_WORDLEFT|STB_TEXTEDIT_K_SHIFT); + else if (io.OSXBehaviors && io.KeySuper && !io.KeyAlt && !io.KeyCtrl) edit_state.OnKeyPressed(STB_TEXTEDIT_K_LINESTART|STB_TEXTEDIT_K_SHIFT); + } + edit_state.OnKeyPressed(STB_TEXTEDIT_K_BACKSPACE | k_mask); + } else if (IsKeyPressedMap(ImGuiKey_Enter)) { bool ctrl_enter_for_new_line = (flags & ImGuiInputTextFlags_CtrlEnterForNewLine) != 0; - if (!is_multiline || (ctrl_enter_for_new_line && !is_ctrl_down) || (!ctrl_enter_for_new_line && is_ctrl_down)) + if (!is_multiline || (ctrl_enter_for_new_line && !io.KeyCtrl) || (!ctrl_enter_for_new_line && io.KeyCtrl)) { SetActiveID(0); enter_pressed = true; @@ -7777,30 +7817,30 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 edit_state.OnKeyPressed((int)c); } } - else if ((flags & ImGuiInputTextFlags_AllowTabInput) && IsKeyPressedMap(ImGuiKey_Tab) && !is_ctrl_down && !is_shift_down && !is_alt_down && is_editable) + else if ((flags & ImGuiInputTextFlags_AllowTabInput) && IsKeyPressedMap(ImGuiKey_Tab) && !io.KeyCtrl && !io.KeyShift && !io.KeyAlt && is_editable) { unsigned int c = '\t'; // Insert TAB if (InputTextFilterCharacter(&c, flags, callback, user_data)) edit_state.OnKeyPressed((int)c); } else if (IsKeyPressedMap(ImGuiKey_Escape)) { SetActiveID(0); cancel_edit = true; } - else if (is_shortcutkey_only && IsKeyPressedMap(ImGuiKey_Z) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_UNDO); edit_state.ClearSelection(); } - else if (is_shortcutkey_only && IsKeyPressedMap(ImGuiKey_Y) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_REDO); edit_state.ClearSelection(); } - else if (is_shortcutkey_only && IsKeyPressedMap(ImGuiKey_A)) { edit_state.SelectAll(); edit_state.CursorFollow = true; } - else if (is_shortcutkey_only && !is_password && ((IsKeyPressedMap(ImGuiKey_X) && is_editable) || IsKeyPressedMap(ImGuiKey_C)) && (!is_multiline || edit_state.HasSelection())) + else if (is_shortcut_key_only && IsKeyPressedMap(ImGuiKey_Z) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_UNDO); edit_state.ClearSelection(); } + else if (is_shortcut_key_only && IsKeyPressedMap(ImGuiKey_Y) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_REDO); edit_state.ClearSelection(); } + else if (is_shortcut_key_only && IsKeyPressedMap(ImGuiKey_A)) { edit_state.SelectAll(); edit_state.CursorFollow = true; } + else if (is_shortcut_key_only && !is_password && ((IsKeyPressedMap(ImGuiKey_X) && is_editable) || IsKeyPressedMap(ImGuiKey_C)) && (!is_multiline || edit_state.HasSelection())) { // Cut, Copy const bool cut = IsKeyPressedMap(ImGuiKey_X); if (cut && !edit_state.HasSelection()) edit_state.SelectAll(); - if (g.IO.SetClipboardTextFn) + if (io.SetClipboardTextFn) { const int ib = edit_state.HasSelection() ? ImMin(edit_state.StbState.select_start, edit_state.StbState.select_end) : 0; const int ie = edit_state.HasSelection() ? ImMax(edit_state.StbState.select_start, edit_state.StbState.select_end) : edit_state.CurLenW; edit_state.TempTextBuffer.resize((ie-ib) * 4 + 1); ImTextStrToUtf8(edit_state.TempTextBuffer.Data, edit_state.TempTextBuffer.Size, edit_state.Text.Data+ib, edit_state.Text.Data+ie); - g.IO.SetClipboardTextFn(edit_state.TempTextBuffer.Data); + io.SetClipboardTextFn(edit_state.TempTextBuffer.Data); } if (cut) @@ -7809,35 +7849,32 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 stb_textedit_cut(&edit_state, &edit_state.StbState); } } - else if (is_shortcutkey_only && IsKeyPressedMap(ImGuiKey_V) && is_editable) + else if (is_shortcut_key_only && IsKeyPressedMap(ImGuiKey_V) && is_editable) { // Paste - if (g.IO.GetClipboardTextFn) + if (const char* clipboard = io.GetClipboardTextFn ? io.GetClipboardTextFn() : NULL) { - if (const char* clipboard = g.IO.GetClipboardTextFn()) + // Filter pasted buffer + const int clipboard_len = (int)strlen(clipboard); + ImWchar* clipboard_filtered = (ImWchar*)ImGui::MemAlloc((clipboard_len+1) * sizeof(ImWchar)); + int clipboard_filtered_len = 0; + for (const char* s = clipboard; *s; ) { - // Remove new-line from pasted buffer - const int clipboard_len = (int)strlen(clipboard); - ImWchar* clipboard_filtered = (ImWchar*)ImGui::MemAlloc((clipboard_len+1) * sizeof(ImWchar)); - int clipboard_filtered_len = 0; - for (const char* s = clipboard; *s; ) - { - unsigned int c; - s += ImTextCharFromUtf8(&c, s, NULL); - if (c == 0) - break; - if (c >= 0x10000 || !InputTextFilterCharacter(&c, flags, callback, user_data)) - continue; - clipboard_filtered[clipboard_filtered_len++] = (ImWchar)c; - } - clipboard_filtered[clipboard_filtered_len] = 0; - if (clipboard_filtered_len > 0) // If everything was filtered, ignore the pasting operation - { - stb_textedit_paste(&edit_state, &edit_state.StbState, clipboard_filtered, clipboard_filtered_len); - edit_state.CursorFollow = true; - } - ImGui::MemFree(clipboard_filtered); + unsigned int c; + s += ImTextCharFromUtf8(&c, s, NULL); + if (c == 0) + break; + if (c >= 0x10000 || !InputTextFilterCharacter(&c, flags, callback, user_data)) + continue; + clipboard_filtered[clipboard_filtered_len++] = (ImWchar)c; } + clipboard_filtered[clipboard_filtered_len] = 0; + if (clipboard_filtered_len > 0) // If everything was filtered, ignore the pasting operation + { + stb_textedit_paste(&edit_state, &edit_state.StbState, clipboard_filtered, clipboard_filtered_len); + edit_state.CursorFollow = true; + } + ImGui::MemFree(clipboard_filtered); } } @@ -7846,7 +7883,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 // Restore initial value if (is_editable) { - ImFormatString(buf, buf_size, "%s", edit_state.InitialText.Data); + ImStrncpy(buf, edit_state.InitialText.Data, buf_size); value_changed = true; } } @@ -7932,28 +7969,33 @@ 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); + ImStrncpy(buf, edit_state.TempTextBuffer.Data, buf_size); value_changed = true; } } } + // Render + // Select which buffer we are going to display. When ImGuiInputTextFlags_NoLiveEdit is set 'buf' might still be the old value. We set buf to NULL to prevent accidental usage from now on. + const char* buf_display = (g.ActiveId == id && is_editable) ? edit_state.TempTextBuffer.Data : buf; buf = NULL; + if (!is_multiline) RenderFrame(frame_bb.Min, frame_bb.Max, GetColorU32(ImGuiCol_FrameBg), true, style.FrameRounding); - // Render const ImVec4 clip_rect(frame_bb.Min.x, frame_bb.Min.y, frame_bb.Min.x + size.x, frame_bb.Min.y + size.y); // Not using frame_bb.Max because we have adjusted size ImVec2 render_pos = is_multiline ? draw_window->DC.CursorPos : frame_bb.Min + style.FramePadding; ImVec2 text_size(0.f, 0.f); - if (g.ActiveId == id || (edit_state.Id == id && is_multiline && g.ActiveId == draw_window->GetID("#SCROLLY"))) + const bool is_currently_scrolling = (edit_state.Id == id && is_multiline && g.ActiveId == draw_window->GetIDNoKeepAlive("#SCROLLY")); + if (g.ActiveId == id || is_currently_scrolling) { - edit_state.CursorAnim += g.IO.DeltaTime; + edit_state.CursorAnim += io.DeltaTime; - // We need to: - // - Display the text (this can be more easily clipped) + // This is going to be messy. We need to: + // - Display the text (this alone can be more easily clipped) // - Handle scrolling, highlight selection, display cursor (those all requires some form of 1d->2d cursor position calculation) // - 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) + // FIXME: This should occur on buf_display but we'd need to maintain cursor/select_start/select_end for UTF-8. const ImWchar* text_begin = edit_state.Text.Data; ImVec2 cursor_offset, select_start_offset; @@ -8067,7 +8109,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 } } - draw_window->DrawList->AddText(g.Font, g.FontSize, render_pos - render_scroll, GetColorU32(ImGuiCol_Text), buf, buf+edit_state.CurLenA, 0.0f, is_multiline ? NULL : &clip_rect); + draw_window->DrawList->AddText(g.Font, g.FontSize, render_pos - render_scroll, GetColorU32(ImGuiCol_Text), buf_display, buf_display + edit_state.CurLenA, 0.0f, is_multiline ? NULL : &clip_rect); // Draw blinking cursor bool cursor_is_visible = (g.InputTextState.CursorAnim <= 0.0f) || fmodf(g.InputTextState.CursorAnim, 1.20f) <= 0.80f; @@ -8085,8 +8127,8 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 // Render text only const char* buf_end = NULL; if (is_multiline) - text_size = ImVec2(size.x, InputTextCalcTextLenAndLineCount(buf, &buf_end) * g.FontSize); // We don't need width - draw_window->DrawList->AddText(g.Font, g.FontSize, render_pos, GetColorU32(ImGuiCol_Text), buf, buf_end, 0.0f, is_multiline ? NULL : &clip_rect); + text_size = ImVec2(size.x, InputTextCalcTextLenAndLineCount(buf_display, &buf_end) * g.FontSize); // We don't need width + draw_window->DrawList->AddText(g.Font, g.FontSize, render_pos, GetColorU32(ImGuiCol_Text), buf_display, buf_end, 0.0f, is_multiline ? NULL : &clip_rect); } if (is_multiline) @@ -8094,6 +8136,8 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 Dummy(text_size + ImVec2(0.0f, g.FontSize)); // Always add room to scroll an extra line EndChildFrame(); EndGroup(); + if (g.ActiveId == id || is_currently_scrolling) // Set LastItemId which was lost by EndChild/EndGroup, so user can use IsItemActive() + window->DC.LastItemId = g.ActiveId; } if (is_password) @@ -8101,7 +8145,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 // Log as text if (g.LogEnabled && !is_password) - LogRenderedText(render_pos, buf, NULL); + LogRenderedText(render_pos, buf_display, NULL); if (label_size.x > 0) RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label); @@ -8115,14 +8159,12 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 bool ImGui::InputText(const char* label, char* buf, size_t buf_size, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback, void* user_data) { IM_ASSERT(!(flags & ImGuiInputTextFlags_Multiline)); // call InputTextMultiline() - bool ret = InputTextEx(label, buf, (int)buf_size, ImVec2(0,0), flags, callback, user_data); - return ret; + return InputTextEx(label, buf, (int)buf_size, ImVec2(0,0), flags, callback, user_data); } bool ImGui::InputTextMultiline(const char* label, char* buf, size_t buf_size, const ImVec2& size, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback, void* user_data) { - bool ret = InputTextEx(label, buf, (int)buf_size, size, flags | ImGuiInputTextFlags_Multiline, callback, user_data); - return ret; + return InputTextEx(label, buf, (int)buf_size, size, flags | ImGuiInputTextFlags_Multiline, callback, user_data); } // NB: scalar_format here must be a simple "%xx" format string with no prefix/suffix (unlike the Drag/Slider functions "display_format" argument) @@ -8856,7 +8898,7 @@ bool ImGui::ColorButton(const ImVec4& col, bool small_height, bool outline_borde RenderFrame(bb.Min, bb.Max, GetColorU32(col), outline_border, style.FrameRounding); if (hovered) - 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)); + SetTooltip("Color:\n(%.2f,%.2f,%.2f,%.2f)\n#%02X%02X%02X%02X", col.x, col.y, col.z, col.w, IM_F32_TO_INT8_SAT(col.x), IM_F32_TO_INT8_SAT(col.y), IM_F32_TO_INT8_SAT(col.z), IM_F32_TO_INT8_SAT(col.z)); return pressed; } @@ -8897,7 +8939,7 @@ bool ImGui::ColorEdit4(const char* label, float col[4], bool alpha) if (edit_mode == ImGuiColorEditMode_HSV) ColorConvertRGBtoHSV(f[0], f[1], f[2], f[0], f[1], f[2]); - 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 i[4] = { IM_F32_TO_INT8_UNBOUND(f[0]), IM_F32_TO_INT8_UNBOUND(f[1]), IM_F32_TO_INT8_UNBOUND(f[2]), IM_F32_TO_INT8_UNBOUND(f[3]) }; int components = alpha ? 4 : 3; bool value_changed = false; @@ -8974,7 +9016,7 @@ bool ImGui::ColorEdit4(const char* label, float col[4], bool alpha) // Recreate our own tooltip over's ColorButton() one because we want to display correct alpha here if (IsItemHovered()) - 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])); + SetTooltip("Color:\n(%.2f,%.2f,%.2f,%.2f)\n#%02X%02X%02X%02X", col[0], col[1], col[2], col[3], IM_F32_TO_INT8_SAT(col[0]), IM_F32_TO_INT8_SAT(col[1]), IM_F32_TO_INT8_SAT(col[2]), IM_F32_TO_INT8_SAT(col[3])); if (window->DC.ColorEditMode == ImGuiColorEditMode_UserSelectShowButton) { @@ -9080,6 +9122,12 @@ bool ImGui::IsRectVisible(const ImVec2& size) return window->ClipRect.Overlaps(ImRect(window->DC.CursorPos, window->DC.CursorPos + size)); } +bool ImGui::IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max) +{ + ImGuiWindow* window = GetCurrentWindowRead(); + return window->ClipRect.Overlaps(ImRect(rect_min, rect_max)); +} + // Lock horizontal starting position + capture group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.) void ImGui::BeginGroup() { @@ -9095,7 +9143,8 @@ void ImGui::BeginGroup() group_data.BackupLogLinePosY = window->DC.LogLinePosY; group_data.AdvanceCursor = true; - window->DC.IndentX = window->DC.CursorPos.x - window->Pos.x - window->DC.ColumnsOffsetX; + window->DC.GroupOffsetX = window->DC.CursorPos.x - window->Pos.x - window->DC.ColumnsOffsetX; + window->DC.IndentX = window->DC.GroupOffsetX; window->DC.CursorMaxPos = window->DC.CursorPos; window->DC.CurrentLineHeight = 0.0f; window->DC.LogLinePosY = window->DC.CursorPos.y - 9999.0f; @@ -9119,6 +9168,7 @@ void ImGui::EndGroup() window->DC.CurrentLineHeight = group_data.BackupCurrentLineHeight; window->DC.CurrentLineTextBaseOffset = group_data.BackupCurrentLineTextBaseOffset; window->DC.IndentX = group_data.BackupIndentX; + window->DC.GroupOffsetX = window->DC.IndentX; window->DC.LogLinePosY = window->DC.CursorPos.y - 9999.0f; if (group_data.AdvanceCursor) @@ -9135,7 +9185,7 @@ void ImGui::EndGroup() // Gets back to previous line and continue with horizontal layout // pos_x == 0 : follow right after previous item -// pos_x != 0 : align to specified x position +// pos_x != 0 : align to specified x position (relative to window/group left) // spacing_w < 0 : use default spacing if pos_x == 0, no spacing if pos_x != 0 // spacing_w >= 0 : enforce spacing amount void ImGui::SameLine(float pos_x, float spacing_w) @@ -9148,7 +9198,7 @@ void ImGui::SameLine(float pos_x, float spacing_w) if (pos_x != 0.0f) { if (spacing_w < 0.0f) spacing_w = 0.0f; - window->DC.CursorPos.x = window->Pos.x - window->Scroll.x + pos_x + spacing_w; + window->DC.CursorPos.x = window->Pos.x - window->Scroll.x + pos_x + spacing_w + window->DC.GroupOffsetX + window->DC.ColumnsOffsetX; window->DC.CursorPos.y = window->DC.CursorPosPrevLine.y; } else @@ -9175,37 +9225,34 @@ void ImGui::NewLine() void ImGui::NextColumn() { ImGuiWindow* window = GetCurrentWindow(); - if (window->SkipItems) + if (window->SkipItems || window->DC.ColumnsCount <= 1) return; ImGuiContext& g = *GImGui; - if (window->DC.ColumnsCount > 1) + PopItemWidth(); + PopClipRect(); + + window->DC.ColumnsCellMaxY = ImMax(window->DC.ColumnsCellMaxY, window->DC.CursorPos.y); + if (++window->DC.ColumnsCurrent < window->DC.ColumnsCount) { - PopItemWidth(); - PopClipRect(); - - window->DC.ColumnsCellMaxY = ImMax(window->DC.ColumnsCellMaxY, window->DC.CursorPos.y); - if (++window->DC.ColumnsCurrent < window->DC.ColumnsCount) - { - // Columns 1+ cancel out IndentX - window->DC.ColumnsOffsetX = GetColumnOffset(window->DC.ColumnsCurrent) - window->DC.IndentX + g.Style.ItemSpacing.x; - window->DrawList->ChannelsSetCurrent(window->DC.ColumnsCurrent); - } - else - { - window->DC.ColumnsCurrent = 0; - window->DC.ColumnsOffsetX = 0.0f; - window->DC.ColumnsCellMinY = window->DC.ColumnsCellMaxY; - window->DrawList->ChannelsSetCurrent(0); - } - window->DC.CursorPos.x = (float)(int)(window->Pos.x + window->DC.IndentX + window->DC.ColumnsOffsetX); - window->DC.CursorPos.y = window->DC.ColumnsCellMinY; - window->DC.CurrentLineHeight = 0.0f; - window->DC.CurrentLineTextBaseOffset = 0.0f; - - PushColumnClipRect(); - PushItemWidth(GetColumnWidth() * 0.65f); // FIXME: Move on columns setup + // Columns 1+ cancel out IndentX + window->DC.ColumnsOffsetX = GetColumnOffset(window->DC.ColumnsCurrent) - window->DC.IndentX + g.Style.ItemSpacing.x; + window->DrawList->ChannelsSetCurrent(window->DC.ColumnsCurrent); } + else + { + window->DC.ColumnsCurrent = 0; + window->DC.ColumnsOffsetX = 0.0f; + window->DC.ColumnsCellMinY = window->DC.ColumnsCellMaxY; + window->DrawList->ChannelsSetCurrent(0); + } + window->DC.CursorPos.x = (float)(int)(window->Pos.x + window->DC.IndentX + window->DC.ColumnsOffsetX); + window->DC.CursorPos.y = window->DC.ColumnsCellMinY; + window->DC.CurrentLineHeight = 0.0f; + window->DC.CurrentLineTextBaseOffset = 0.0f; + + PushColumnClipRect(); + PushItemWidth(GetColumnWidth() * 0.65f); // FIXME: Move on columns setup } int ImGui::GetColumnIndex() @@ -9227,7 +9274,7 @@ static float GetDraggedColumnOffset(int column_index) ImGuiContext& g = *GImGui; ImGuiWindow* window = ImGui::GetCurrentWindowRead(); IM_ASSERT(column_index > 0); // We cannot drag column 0. If you get this assert you may have a conflict between the ID of your columns and another widgets. - IM_ASSERT(g.ActiveId == window->DC.ColumnsSetID + ImGuiID(column_index)); + IM_ASSERT(g.ActiveId == window->DC.ColumnsSetId + ImGuiID(column_index)); float x = g.IO.MousePos.x - g.ActiveIdClickOffset.x - window->Pos.x; x = ImClamp(x, ImGui::GetColumnOffset(column_index-1)+g.Style.ColumnsMinSpacing, ImGui::GetColumnOffset(column_index+1)-g.Style.ColumnsMinSpacing); @@ -9244,7 +9291,7 @@ float ImGui::GetColumnOffset(int column_index) if (g.ActiveId) { - const ImGuiID column_id = window->DC.ColumnsSetID + ImGuiID(column_index); + const ImGuiID column_id = window->DC.ColumnsSetId + ImGuiID(column_index); if (g.ActiveId == column_id) return GetDraggedColumnOffset(column_index); } @@ -9265,7 +9312,7 @@ void ImGui::SetColumnOffset(int column_index, float offset) const float t = (offset - window->DC.ColumnsMinX) / (window->DC.ColumnsMaxX - window->DC.ColumnsMinX); window->DC.ColumnsData[column_index].OffsetNorm = t; - const ImGuiID column_id = window->DC.ColumnsSetID + ImGuiID(column_index); + const ImGuiID column_id = window->DC.ColumnsSetId + ImGuiID(column_index); window->DC.StateStorage->SetFloat(column_id, t); } @@ -9316,7 +9363,7 @@ void ImGui::Columns(int columns_count, const char* id, bool border) for (int i = 1; i < window->DC.ColumnsCount; i++) { float x = window->Pos.x + GetColumnOffset(i); - const ImGuiID column_id = window->DC.ColumnsSetID + ImGuiID(i); + const ImGuiID column_id = window->DC.ColumnsSetId + ImGuiID(i); const ImRect column_rect(ImVec2(x-4,y1),ImVec2(x+4,y2)); if (IsClippedEx(column_rect, &column_id, false)) continue; @@ -9334,7 +9381,7 @@ void ImGui::Columns(int columns_count, const char* id, bool border) if (held) { if (g.ActiveIdIsJustActivated) - g.ActiveIdClickOffset.x -= 4; // Store from center of column line + g.ActiveIdClickOffset.x -= 4; // Store from center of column line (we used a 8 wide rect for columns clicking) x = GetDraggedColumnOffset(i); SetColumnOffset(i, x); } @@ -9344,7 +9391,7 @@ void ImGui::Columns(int columns_count, const char* id, bool border) // Differentiate column ID with an arbitrary prefix for cases where users name their columns set the same as another widget. // In addition, when an identifier isn't explicitly provided we include the number of columns in the hash to make it uniquer. PushID(0x11223347 + (id ? 0 : columns_count)); - window->DC.ColumnsSetID = window->GetID(id ? id : "columns"); + window->DC.ColumnsSetId = window->GetID(id ? id : "columns"); PopID(); // Set state for first column @@ -9366,7 +9413,7 @@ void ImGui::Columns(int columns_count, const char* id, bool border) window->DC.ColumnsData.resize(columns_count + 1); for (int column_index = 0; column_index < columns_count + 1; column_index++) { - const ImGuiID column_id = window->DC.ColumnsSetID + ImGuiID(column_index); + const ImGuiID column_id = window->DC.ColumnsSetId + ImGuiID(column_index); KeepAliveID(column_id); const float default_t = column_index / (float)window->DC.ColumnsCount; const float t = window->DC.StateStorage->GetFloat(column_id, default_t); // Cheaply store our floating point value inside the integer (could store an union into the map?) @@ -9467,7 +9514,7 @@ void ImGui::ValueColor(const char* prefix, const ImVec4& v) ColorButton(v, true); } -void ImGui::ValueColor(const char* prefix, unsigned int v) +void ImGui::ValueColor(const char* prefix, ImU32 v) { Text("%s: %08X", prefix, v); SameLine(); @@ -9499,12 +9546,8 @@ void ImGui::ValueColor(const char* prefix, unsigned int v) static const char* GetClipboardTextFn_DefaultImpl() { - static char* buf_local = NULL; - if (buf_local) - { - ImGui::MemFree(buf_local); - buf_local = NULL; - } + static ImVector buf_local; + buf_local.clear(); if (!OpenClipboard(NULL)) return NULL; HANDLE wbuf_handle = GetClipboardData(CF_UNICODETEXT); @@ -9513,19 +9556,18 @@ static const char* GetClipboardTextFn_DefaultImpl() if (ImWchar* wbuf_global = (ImWchar*)GlobalLock(wbuf_handle)) { int buf_len = ImTextCountUtf8BytesFromStr(wbuf_global, NULL) + 1; - buf_local = (char*)ImGui::MemAlloc(buf_len * sizeof(char)); - ImTextStrToUtf8(buf_local, buf_len, wbuf_global, NULL); + buf_local.resize(buf_len); + ImTextStrToUtf8(buf_local.Data, buf_len, wbuf_global, NULL); } GlobalUnlock(wbuf_handle); CloseClipboard(); - return buf_local; + return buf_local.Data; } static void SetClipboardTextFn_DefaultImpl(const char* text) { if (!OpenClipboard(NULL)) return; - const int wbuf_length = ImTextCountCharsFromUtf8(text, NULL) + 1; HGLOBAL wbuf_handle = GlobalAlloc(GMEM_MOVEABLE, (SIZE_T)wbuf_length * sizeof(ImWchar)); if (wbuf_handle == NULL) @@ -9564,7 +9606,7 @@ static void SetClipboardTextFn_DefaultImpl(const char* text) #endif // Win32 API IME support (for Asian languages, etc.) -#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS) +#if defined(_WIN32) && !defined(__GNUC__) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS) #include #ifdef _MSC_VER @@ -9681,6 +9723,8 @@ void ImGui::ShowMetricsWindow(bool* p_open) if (!ImGui::TreeNode(window, "%s '%s', %d @ 0x%p", label, window->Name, window->Active || window->WasActive, window)) return; NodeDrawList(window->DrawList, "DrawList"); + ImGui::BulletText("Size: (%.1f,%.1f), SizeContents (%.1f,%.1f)", window->Size.x, window->Size.y, window->SizeContents.x, window->SizeContents.y); + ImGui::BulletText("Scroll: (%.2f,%.2f)", window->Scroll.x, window->Scroll.y); if (window->RootWindow != window) NodeWindow(window->RootWindow, "RootWindow"); if (window->DC.ChildWindows.Size > 0) NodeWindows(window->DC.ChildWindows, "ChildWindows"); ImGui::BulletText("Storage: %d bytes", window->StateStorage.Data.Size * (int)sizeof(ImGuiStorage::Pair)); @@ -9701,7 +9745,7 @@ void ImGui::ShowMetricsWindow(bool* p_open) for (int i = 0; i < g.OpenPopupStack.Size; i++) { ImGuiWindow* window = g.OpenPopupStack[i].Window; - ImGui::BulletText("PopupID: %08x, Window: '%s'%s%s", g.OpenPopupStack[i].PopupID, window ? window->Name : "NULL", window && (window->Flags & ImGuiWindowFlags_ChildWindow) ? " ChildWindow" : "", window && (window->Flags & ImGuiWindowFlags_ChildMenu) ? " ChildMenu" : ""); + ImGui::BulletText("PopupID: %08x, Window: '%s'%s%s", g.OpenPopupStack[i].PopupId, window ? window->Name : "NULL", window && (window->Flags & ImGuiWindowFlags_ChildWindow) ? " ChildWindow" : "", window && (window->Flags & ImGuiWindowFlags_ChildMenu) ? " ChildMenu" : ""); } ImGui::TreePop(); } diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h index 97411beb216..24cb7715449 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h @@ -62,11 +62,11 @@ struct ImGuiSizeConstraintCallbackData;// Structure used to constraint window si struct ImGuiListClipper; // Helper to manually clip large list of items struct ImGuiContext; // ImGui context (opaque) -// Enumerations (declared as int for compatibility and to not pollute the top of this file) -typedef unsigned int ImU32; +// Typedefs and Enumerations (declared as int for compatibility and to not pollute the top of this file) +typedef unsigned int ImU32; // 32-bit unsigned integer (typically used to store packed colors) +typedef unsigned int ImGuiID; // unique ID used by widgets (typically hashed from a stack of string) typedef unsigned short ImWchar; // character for keyboard input/display typedef void* ImTextureID; // user data to identify a texture (this is whatever to you want it to be! read the FAQ about ImTextureID in imgui.cpp) -typedef ImU32 ImGuiID; // unique ID used by widgets (typically hashed from a stack of string) typedef int ImGuiCol; // a color identifier for styling // enum ImGuiCol_ typedef int ImGuiStyleVar; // a variable identifier for styling // enum ImGuiStyleVar_ typedef int ImGuiKey; // a key identifier (ImGui-side enum) // enum ImGuiKey_ @@ -352,7 +352,7 @@ namespace ImGui IMGUI_API void Value(const char* prefix, unsigned int v); IMGUI_API void Value(const char* prefix, float v, const char* float_format = NULL); IMGUI_API void ValueColor(const char* prefix, const ImVec4& v); - IMGUI_API void ValueColor(const char* prefix, unsigned int v); + IMGUI_API void ValueColor(const char* prefix, ImU32 v); // Tooltips IMGUI_API void SetTooltip(const char* fmt, ...) IM_PRINTFARGS(1); // set tooltip under mouse-cursor, typically use with ImGui::IsHovered(). last call wins @@ -409,7 +409,8 @@ namespace ImGui IMGUI_API bool IsRootWindowFocused(); // is current root window focused (root = top-most parent of a child, otherwise self) IMGUI_API bool IsRootWindowOrAnyChildFocused(); // is current root window or any of its child (including current window) focused IMGUI_API bool IsRootWindowOrAnyChildHovered(); // is current root window or any of its child (including current window) hovered and hoverable (not blocked by a popup) - IMGUI_API bool IsRectVisible(const ImVec2& size); // test if rectangle of given size starting from cursor pos is visible (not clipped). to perform coarse clipping on user's side (as an optimization) + IMGUI_API bool IsRectVisible(const ImVec2& size); // test if rectangle (of given size, starting from cursor position) is visible / not clipped. + IMGUI_API bool IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max); // test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side. IMGUI_API bool IsPosHoveringAnyWindow(const ImVec2& pos); // is given position hovering any active imgui window IMGUI_API float GetTime(); IMGUI_API int GetFrameCount(); @@ -467,15 +468,9 @@ namespace ImGui static inline bool CollapsingHeader(const char* label, const char* str_id, bool framed = true, bool default_open = false) { (void)str_id; (void)framed; ImGuiTreeNodeFlags default_open_flags = 1<<5; return CollapsingHeader(label, (default_open ? default_open_flags : 0)); } // OBSOLETE 1.49+ static inline ImFont* GetWindowFont() { return GetFont(); } // OBSOLETE 1.48+ static inline float GetWindowFontSize() { return GetFontSize(); } // OBSOLETE 1.48+ - static inline void OpenNextNode(bool open) { ImGui::SetNextTreeNodeOpen(open, 0); } // OBSOLETE 1.34+ - static inline bool GetWindowIsFocused() { return ImGui::IsWindowFocused(); } // OBSOLETE 1.36+ - static inline bool GetWindowCollapsed() { return ImGui::IsWindowCollapsed(); } // OBSOLETE 1.39+ - static inline ImVec2 GetItemBoxMin() { return GetItemRectMin(); } // OBSOLETE 1.36+ - static inline ImVec2 GetItemBoxMax() { return GetItemRectMax(); } // OBSOLETE 1.36+ - static inline bool IsClipped(const ImVec2& size) { return !IsRectVisible(size); } // OBSOLETE 1.38+ - static inline bool IsRectClipped(const ImVec2& size) { return !IsRectVisible(size); } // OBSOLETE 1.39+ - static inline bool IsMouseHoveringBox(const ImVec2& rect_min, const ImVec2& rect_max) { return IsMouseHoveringRect(rect_min, rect_max); } // OBSOLETE 1.36+ static inline void SetScrollPosHere() { SetScrollHere(); } // OBSOLETE 1.42+ + static inline bool GetWindowCollapsed() { return ImGui::IsWindowCollapsed(); } // OBSOLETE 1.39+ + static inline bool IsRectClipped(const ImVec2& size) { return !IsRectVisible(size); } // OBSOLETE 1.39+ #endif } // namespace ImGui @@ -694,9 +689,9 @@ enum ImGuiMouseCursor_ enum ImGuiSetCond_ { ImGuiSetCond_Always = 1 << 0, // Set the variable - ImGuiSetCond_Once = 1 << 1, // Only set the variable on the first call per runtime session - ImGuiSetCond_FirstUseEver = 1 << 2, // Only set the variable if the window doesn't exist in the .ini file - ImGuiSetCond_Appearing = 1 << 3 // Only set the variable if the window is appearing after being inactive (or the first time) + ImGuiSetCond_Once = 1 << 1, // Set the variable once per runtime session (only the first call with succeed) + ImGuiSetCond_FirstUseEver = 1 << 2, // Set the variable if the window has no saved data (if doesn't exist in the .ini file) + ImGuiSetCond_Appearing = 1 << 3 // Set the variable if the window is appearing after being hidden/inactive (or the first time) }; struct ImGuiStyle @@ -758,10 +753,7 @@ struct ImGuiIO ImVec2 DisplayVisibleMax; // (0.0f,0.0f) // If the values are the same, we defaults to Min=(0.0f) and Max=DisplaySize // Advanced/subtle behaviors - bool WordMovementUsesAltKey; // = defined(__APPLE__) // OS X style: Text editing cursor movement using Alt instead of Ctrl - bool ShortcutsUseSuperKey; // = defined(__APPLE__) // OS X style: Shortcuts using Cmd/Super instead of Ctrl - bool DoubleClickSelectsWord; // = defined(__APPLE__) // OS X style: Double click selects by word instead of selecting whole text - bool MultiSelectUsesSuperKey; // = defined(__APPLE__) // OS X style: Multi-selection in lists uses Cmd/Super instead of Ctrl [unused yet] + bool OSXBehaviors; // = defined(__APPLE__) // OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl //------------------------------------------------------------------ // User Functions @@ -888,7 +880,8 @@ public: if (new_capacity <= Capacity) return; T* new_data = (value_type*)ImGui::MemAlloc((size_t)new_capacity * sizeof(value_type)); memset(&new_data[Size], 0, (size_t)(new_capacity - Size) * sizeof(value_type)); // BK - clear garbage so that 0 initialized ImString works properly. - memcpy(new_data, Data, (size_t)Size * sizeof(value_type)); + if (Data) + memcpy(new_data, Data, (size_t)Size * sizeof(value_type)); ImGui::MemFree(Data); Data = new_data; Capacity = new_capacity; @@ -1272,7 +1265,7 @@ struct ImFontConfig int FontNo; // 0 // Index of font within TTF file float SizePixels; // // Size in pixels for rasterizer int OversampleH, OversampleV; // 3, 1 // Rasterize at higher quality for sub-pixel positioning. We don't use sub-pixel positions on the Y axis. - bool PixelSnapH; // false // Align every character to pixel boundary (if enabled, set OversampleH/V to 1) + bool PixelSnapH; // false // Align every glyph to pixel boundary. Useful e.g. if you are merging a non-pixel aligned font with the default font. If enabled, you can set OversampleH/V to 1. ImVec2 GlyphExtraSpacing; // 0, 0 // Extra spacing (in pixels) between glyphs const ImWchar* GlyphRanges; // // Pointer to a user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list). THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE. bool MergeMode; // false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs). @@ -1325,6 +1318,7 @@ struct ImFontAtlas IMGUI_API const ImWchar* GetGlyphRangesJapanese(); // Default + Hiragana, Katakana, Half-Width, Selection of 1946 Ideographs IMGUI_API const ImWchar* GetGlyphRangesChinese(); // Japanese + full set of about 21000 CJK Unified Ideographs IMGUI_API const ImWchar* GetGlyphRangesCyrillic(); // Default + about 400 Cyrillic characters + IMGUI_API const ImWchar* GetGlyphRangesThai(); // Default + Thai characters // Members // (Access texture data via GetTexData*() calls which will setup a default font for you.) diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp index 62bbd8c3bc5..b6582a88a69 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp @@ -1020,24 +1020,24 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::Text("Hello\nWorld"); ImGui::SameLine(); ImGui::Text("One\nTwo\nThree"); - ImGui::Button("HOP"); ImGui::SameLine(); + ImGui::Button("HOP##1"); ImGui::SameLine(); ImGui::Text("Banana"); ImGui::SameLine(); ImGui::Text("Hello\nWorld"); ImGui::SameLine(); ImGui::Text("Banana"); - ImGui::Button("HOP"); ImGui::SameLine(); + ImGui::Button("HOP##2"); ImGui::SameLine(); ImGui::Text("Hello\nWorld"); ImGui::SameLine(); ImGui::Text("Banana"); - ImGui::Button("TEST"); ImGui::SameLine(); + ImGui::Button("TEST##1"); ImGui::SameLine(); ImGui::Text("TEST"); ImGui::SameLine(); - ImGui::SmallButton("TEST"); + ImGui::SmallButton("TEST##2"); ImGui::AlignFirstTextHeightToWidgets(); // If your line starts with text, call this to align it to upcoming widgets. ImGui::Text("Text aligned to Widget"); ImGui::SameLine(); - ImGui::Button("Widget"); ImGui::SameLine(); + ImGui::Button("Widget##1"); ImGui::SameLine(); ImGui::Text("Widget"); ImGui::SameLine(); - ImGui::SmallButton("Widget"); + ImGui::SmallButton("Widget##2"); // Tree const float spacing = ImGui::GetStyle().ItemInnerSpacing.x; @@ -1415,9 +1415,9 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::InputFloat("blue", &bar, 0.05f, 0, 3); ImGui::NextColumn(); - if (ImGui::CollapsingHeader("Category A")) { ImGui::Text("Blah blah blah"); } ImGui::NextColumn(); - if (ImGui::CollapsingHeader("Category B")) { ImGui::Text("Blah blah blah"); } ImGui::NextColumn(); - if (ImGui::CollapsingHeader("Category C")) { ImGui::Text("Blah blah blah"); } ImGui::NextColumn(); + if (ImGui::CollapsingHeader("Category A")) ImGui::Text("Blah blah blah"); ImGui::NextColumn(); + if (ImGui::CollapsingHeader("Category B")) ImGui::Text("Blah blah blah"); ImGui::NextColumn(); + if (ImGui::CollapsingHeader("Category C")) ImGui::Text("Blah blah blah"); ImGui::NextColumn(); ImGui::Columns(1); ImGui::Separator(); ImGui::TreePop(); @@ -1873,9 +1873,9 @@ static void ShowExampleAppConstrainedResize(bool* p_open) "Custom: Fixed Steps (100)", }; ImGui::Combo("Constraint", &type, desc, IM_ARRAYSIZE(desc)); - if (ImGui::Button("200x200")) { ImGui::SetWindowSize(ImVec2(200,200)); } ImGui::SameLine(); - if (ImGui::Button("500x500")) { ImGui::SetWindowSize(ImVec2(500,500)); } ImGui::SameLine(); - if (ImGui::Button("800x200")) { ImGui::SetWindowSize(ImVec2(800,200)); } + if (ImGui::Button("200x200")) ImGui::SetWindowSize(ImVec2(200,200)); ImGui::SameLine(); + if (ImGui::Button("500x500")) ImGui::SetWindowSize(ImVec2(500,500)); ImGui::SameLine(); + if (ImGui::Button("800x200")) ImGui::SetWindowSize(ImVec2(800,200)); for (int i = 0; i < 10; i++) ImGui::Text("Hello, sailor! Making this line long enough for the example."); } @@ -2088,8 +2088,8 @@ struct ExampleAppConsole // TODO: display items starting from the bottom if (ImGui::SmallButton("Add Dummy Text")) { AddLog("%d some text", Items.Size); AddLog("some more text"); AddLog("display very important message here!"); } ImGui::SameLine(); - if (ImGui::SmallButton("Add Dummy Error")) { AddLog("[error] something went wrong"); } ImGui::SameLine(); - if (ImGui::SmallButton("Clear")) { ClearLog(); } ImGui::SameLine(); + if (ImGui::SmallButton("Add Dummy Error")) AddLog("[error] something went wrong"); ImGui::SameLine(); + if (ImGui::SmallButton("Clear")) ClearLog(); ImGui::SameLine(); if (ImGui::SmallButton("Scroll to bottom")) ScrollToBottom = true; //static float t = 0.0f; if (ImGui::GetTime() - t > 0.02f) { t = ImGui::GetTime(); AddLog("Spam %f", t); } @@ -2143,7 +2143,7 @@ struct ExampleAppConsole if (ImGui::InputText("Input", InputBuf, IM_ARRAYSIZE(InputBuf), ImGuiInputTextFlags_EnterReturnsTrue|ImGuiInputTextFlags_CallbackCompletion|ImGuiInputTextFlags_CallbackHistory, &TextEditCallbackStub, (void*)this)) { char* input_end = InputBuf+strlen(InputBuf); - while (input_end > InputBuf && input_end[-1] == ' ') { input_end--; } *input_end = 0; + while (input_end > InputBuf && input_end[-1] == ' ') input_end--; *input_end = 0; if (InputBuf[0]) ExecCommand(InputBuf); strcpy(InputBuf, ""); @@ -2184,7 +2184,8 @@ struct ExampleAppConsole } else if (Stricmp(command_line, "HISTORY") == 0) { - for (int i = History.Size >= 10 ? History.Size - 10 : 0; i < History.Size; i++) + int first = History.Size - 10; + for (int i = first > 0 ? first : 0; i < History.Size; i++) AddLog("%3d: %s\n", i, History[i]); } else diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp index 026f7f7e101..5721873aed3 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp @@ -19,10 +19,10 @@ #include // vsnprintf, sscanf, printf #if !defined(alloca) -#if defined(_WIN32) +#ifdef _WIN32 #include // alloca -#elif defined(__FreeBSD__) || defined(__DragonFly__) -#include // alloca +#elif (defined(__FreeBSD__) || defined(FreeBSD_kernel) || defined(__DragonFly__)) && !defined(__GLIBC__) +#include // alloca. FreeBSD uses stdlib.h unless GLIBC #else #include // alloca #endif @@ -199,7 +199,7 @@ void ImDrawList::UpdateClipRect() // Try to merge with previous command if it matches, else use current command ImDrawCmd* prev_cmd = CmdBuffer.Size > 1 ? curr_cmd - 1 : NULL; - if (prev_cmd && memcmp(&prev_cmd->ClipRect, &curr_clip_rect, sizeof(ImVec4)) == 0 && prev_cmd->TextureId == GetCurrentTextureId() && prev_cmd->UserCallback == NULL) + if (curr_cmd->ElemCount == 0 && prev_cmd && memcmp(&prev_cmd->ClipRect, &curr_clip_rect, sizeof(ImVec4)) == 0 && prev_cmd->TextureId == GetCurrentTextureId() && prev_cmd->UserCallback == NULL) CmdBuffer.pop_back(); else curr_cmd->ClipRect = curr_clip_rect; @@ -1654,6 +1654,17 @@ const ImWchar* ImFontAtlas::GetGlyphRangesCyrillic() return &ranges[0]; } +const ImWchar* ImFontAtlas::GetGlyphRangesThai() +{ + static const ImWchar ranges[] = + { + 0x0020, 0x00FF, // Basic Latin + 0x0E00, 0x0E7F, // Thai + 0, + }; + return &ranges[0]; +} + //----------------------------------------------------------------------------- // ImFont //----------------------------------------------------------------------------- diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h index 28fb93e98d2..dc02f719a63 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h @@ -312,7 +312,7 @@ struct IMGUI_API ImGuiTextEditState struct ImGuiIniData { char* Name; - ImGuiID ID; + ImGuiID Id; ImVec2 Pos; ImVec2 Size; bool Collapsed; @@ -331,13 +331,13 @@ struct ImGuiMouseCursorData // Storage for current popup stack struct ImGuiPopupRef { - ImGuiID PopupID; // Set on OpenPopup() + ImGuiID PopupId; // Set on OpenPopup() ImGuiWindow* Window; // Resolved on BeginPopup() - may stay unresolved if user never calls OpenPopup() ImGuiWindow* ParentWindow; // Set on OpenPopup() ImGuiID ParentMenuSet; // Set on OpenPopup() ImVec2 MousePosOnOpen; // Copy of mouse position at the time of opening popup - ImGuiPopupRef(ImGuiID id, ImGuiWindow* parent_window, ImGuiID parent_menu_set, const ImVec2& mouse_pos) { PopupID = id; Window = NULL; ParentWindow = parent_window; ParentMenuSet = parent_menu_set; MousePosOnOpen = mouse_pos; } + ImGuiPopupRef(ImGuiID id, ImGuiWindow* parent_window, ImGuiID parent_menu_set, const ImVec2& mouse_pos) { PopupId = id; Window = NULL; ParentWindow = parent_window; ParentMenuSet = parent_menu_set; MousePosOnOpen = mouse_pos; } }; // Main state for ImGui @@ -481,7 +481,7 @@ struct ImGuiContext ScalarAsInputTextId = 0; DragCurrentValue = 0.0f; DragLastMouseDelta = ImVec2(0.0f, 0.0f); - DragSpeedDefaultRatio = 0.01f; + DragSpeedDefaultRatio = 1.0f / 100.0f; DragSpeedScaleSlow = 0.01f; DragSpeedScaleFast = 10.0f; ScrollbarClickDeltaToGrabCenter = ImVec2(0.0f, 0.0f); @@ -522,7 +522,7 @@ struct IMGUI_API ImGuiDrawContext float PrevLineTextBaseOffset; float LogLinePosY; int TreeDepth; - ImGuiID LastItemID; + ImGuiID LastItemId; ImRect LastItemRect; bool LastItemHoveredAndUsable; // Item rectangle is hovered, and its window is currently interactable with (not blocked by a popup preventing access to the window) bool LastItemHoveredRect; // Item rectangle is hovered, but its window may or not be currently interactable with (might be blocked by a popup preventing access to the window) @@ -546,6 +546,7 @@ struct IMGUI_API ImGuiDrawContext int StackSizesBackup[6]; // Store size of various stacks for asserting float IndentX; // Indentation / start position from left of window (increased by TreePush/TreePop, etc.) + float GroupOffsetX; float ColumnsOffsetX; // Offset to the current column (if ColumnsCurrent > 0). FIXME: This and the above should be a stack to allow use cases like Tree->Column->Tree. Need revamp columns API. int ColumnsCurrent; int ColumnsCount; @@ -555,7 +556,7 @@ struct IMGUI_API ImGuiDrawContext float ColumnsCellMinY; float ColumnsCellMaxY; bool ColumnsShowBorders; - ImGuiID ColumnsSetID; + ImGuiID ColumnsSetId; ImVector ColumnsData; ImGuiDrawContext() @@ -565,7 +566,7 @@ struct IMGUI_API ImGuiDrawContext CurrentLineTextBaseOffset = PrevLineTextBaseOffset = 0.0f; LogLinePosY = -1.0f; TreeDepth = 0; - LastItemID = 0; + LastItemId = 0; LastItemRect = ImRect(0.0f,0.0f,0.0f,0.0f); LastItemHoveredAndUsable = LastItemHoveredRect = false; MenuBarAppending = false; @@ -587,7 +588,7 @@ struct IMGUI_API ImGuiDrawContext ColumnsStartPosY = 0.0f; ColumnsCellMinY = ColumnsCellMaxY = 0.0f; ColumnsShowBorders = true; - ColumnsSetID = 0; + ColumnsSetId = 0; } }; @@ -606,7 +607,7 @@ struct IMGUI_API ImGuiWindow ImVec2 SizeContentsExplicit; // Size of contents explicitly set by the user via SetNextWindowContentSize() ImRect ContentsRegionRect; // Maximum visible content position in window coordinates. ~~ (SizeContentsExplicit ? SizeContentsExplicit : Size - ScrollbarSizes) - CursorStartPos, per axis ImVec2 WindowPadding; // Window padding at the time of begin. We need to lock it, in particular manipulation of the ShowBorder would have an effect - ImGuiID MoveID; // == window->GetID("#MOVE") + ImGuiID MoveId; // == window->GetID("#MOVE") ImVec2 Scroll; ImVec2 ScrollTarget; // target scroll position. stored as cursor position with scrolling canceled out, so the highest point is always 0.0f. (FLT_MAX for no change) ImVec2 ScrollTargetCenterRatio; // 0.0f = scroll so that target position is at top, 0.5f = scroll so that target position is centered @@ -619,7 +620,7 @@ struct IMGUI_API ImGuiWindow bool Collapsed; // Set when collapsing window to become only title-bar bool SkipItems; // == Visible && !Collapsed int BeginCount; // Number of Begin() during the current frame (generally 0 or 1, 1+ if appending via multiple Begin/End pairs) - ImGuiID PopupID; // ID in the popup stack when this window is used as a popup/menu (because we use generic Name/ID for recycling) + ImGuiID PopupId; // ID in the popup stack when this window is used as a popup/menu (because we use generic Name/ID for recycling) int AutoFitFramesX, AutoFitFramesY; bool AutoFitOnlyGrows; int AutoPosLastDirection; @@ -643,7 +644,7 @@ struct IMGUI_API ImGuiWindow ImGuiWindow* RootNonPopupWindow; // If we are a child window, this is pointing to the first non-child non-popup parent window. Else point to ourself. ImGuiWindow* ParentWindow; // If we are a child window, this is pointing to our parent window. Else point to NULL. - // Focus + // Navigation / Focus int FocusIdxAllCounter; // Start at -1 and increase as assigned via FocusItemRegister() int FocusIdxTabCounter; // (same, but only count widgets which you can Tab through) int FocusIdxAllRequestCurrent; // Item being requested for focus @@ -657,6 +658,7 @@ public: ImGuiID GetID(const char* str, const char* str_end = NULL); ImGuiID GetID(const void* ptr); + ImGuiID GetIDNoKeepAlive(const char* str, const char* str_end = NULL); ImRect Rect() const { return ImRect(Pos.x, Pos.y, Pos.x+Size.x, Pos.y+Size.y); } float CalcFontSize() const { return GImGui->FontBaseSize * FontWindowScale; } @@ -701,9 +703,6 @@ namespace ImGui IMGUI_API void OpenPopupEx(const char* str_id, bool reopen_existing); - inline IMGUI_API ImU32 GetColorU32(ImGuiCol idx, float alpha_mul) { ImVec4 c = GImGui->Style.Colors[idx]; c.w *= GImGui->Style.Alpha * alpha_mul; return ImGui::ColorConvertFloat4ToU32(c); } - inline IMGUI_API ImU32 GetColorU32(const ImVec4& col) { ImVec4 c = col; c.w *= GImGui->Style.Alpha; return ImGui::ColorConvertFloat4ToU32(c); } - // NB: All position are in absolute pixels coordinates (not window coordinates) // FIXME: All those functions are a mess and needs to be refactored into something decent. Avoid use outside of imgui.cpp! // We need: a sort of symbol library, preferably baked into font atlas when possible + decent text rendering helpers. diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_wm.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_wm.cpp index ac584ce110c..83a7e40d376 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_wm.cpp +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_wm.cpp @@ -575,8 +575,8 @@ namespace ImGuiWM ImColor oSelectedTab(37, 37, 37, 255); // selected ImColor oBorderColor(72, 72, 72, 255); // border - ImVec2 oRectMin = ImGui::GetItemBoxMin(); - ImVec2 oRectMax = ImGui::GetItemBoxMax(); + ImVec2 oRectMin = ImGui::GetItemRectMin(); + ImVec2 oRectMax = ImGui::GetItemRectMax(); const float fOverlap = 10.f; const float fSlopWidth = 30.f; diff --git a/3rdparty/bgfx/3rdparty/remotery/lib/Remotery.c b/3rdparty/bgfx/3rdparty/remotery/lib/Remotery.c index 6b3a35695f2..3acc72fa336 100644 --- a/3rdparty/bgfx/3rdparty/remotery/lib/Remotery.c +++ b/3rdparty/bgfx/3rdparty/remotery/lib/Remotery.c @@ -1,5 +1,5 @@ // -// Copyright 2014 Celtoys Ltd +// Copyright 2014-2016 Celtoys Ltd // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -128,8 +128,11 @@ static rmtBool g_SettingsInitialized = RMT_FALSE; #endif - -#define RMT_UNREFERENCED_PARAMETER(i) (void)(1 ? (void)0 : ((void)i)) +#if 0 //def _MSC_VER + #define RMT_UNREFERENCED_PARAMETER(i) assert(i == 0 || i != 0); // To fool warning C4100 on warning level 4 +#else + #define RMT_UNREFERENCED_PARAMETER(i) (void)(1 ? (void)0 : ((void)i)) +#endif #if RMT_USE_CUDA @@ -173,9 +176,9 @@ static void rmtFree( void* ptr ) g_Settings.free( g_Settings.mm_context, ptr ); } - +#if RMT_USE_OPENGL // DLL/Shared Library functions -void* rmtLoadLibrary(const char* path) +static void* rmtLoadLibrary(const char* path) { #if defined(RMT_PLATFORM_WINDOWS) return (void*)LoadLibraryA(path); @@ -198,14 +201,21 @@ static void rmtFreeLibrary(void* handle) static void* rmtGetProcAddress(void* handle, const char* symbol) { #if defined(RMT_PLATFORM_WINDOWS) + #ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable:4152) // C4152: nonstandard extension, function/data pointer conversion in expression + #endif return GetProcAddress((HMODULE)handle, (LPCSTR)symbol); + #ifdef _MSC_VER + #pragma warning(pop) + #endif #elif defined(RMT_PLATFORM_POSIX) return dlsym(handle, symbol); #else return NULL; #endif } - +#endif /* ------------------------------------------------------------------------------------------------------------------------ @@ -856,8 +866,9 @@ static void VirtualMirrorBuffer_Destructor(VirtualMirrorBuffer* buffer) */ -typedef struct Thread Thread; -typedef rmtError(*ThreadProc)(Thread* thread); +struct Thread; +typedef rmtError(*ThreadProc)(struct Thread* thread); + typedef struct Thread { @@ -883,9 +894,6 @@ typedef struct Thread } Thread; -typedef rmtError (*ThreadProc)(Thread* thread); - - #if defined(RMT_PLATFORM_WINDOWS) static DWORD WINAPI ThreadProcWindows(LPVOID lpParameter) @@ -1046,6 +1054,7 @@ static void Thread_Destructor(Thread* thread) // NOTE: Microsoft also has its own version of these functions so I'm do some hacky PP to remove them #define strnlen_s strnlen_s_safe_c #define strncat_s strncat_s_safe_c +#define strcpy_s strcpy_s_safe_c #define RSIZE_MAX_STR (4UL << 10) /* 4KB */ @@ -1066,7 +1075,7 @@ static void Thread_Destructor(Thread* thread) typedef int errno_t; #endif -#if !defined(_WIN64) && !defined(__APPLE__) || defined(__MINGW32__) +#if (!defined(_WIN64) && !defined(__APPLE__)) || (defined(__MINGW32__) && !defined(RSIZE_T_DEFINED)) typedef unsigned int rsize_t; #endif @@ -1299,6 +1308,79 @@ strncat_s (char *dest, rsize_t dmax, const char *src, rsize_t slen) } +errno_t +strcpy_s(char *dest, rsize_t dmax, const char *src) +{ + const char *overlap_bumper; + + if (dest == NULL) { + return RCNEGATE(ESNULLP); + } + + if (dmax == 0) { + return RCNEGATE(ESZEROL); + } + + if (dmax > RSIZE_MAX_STR) { + return RCNEGATE(ESLEMAX); + } + + if (src == NULL) { + *dest = '\0'; + return RCNEGATE(ESNULLP); + } + + if (dest == src) { + return RCNEGATE(EOK); + } + + /* hold base of dest in case src was not copied */ + if (dest < src) { + overlap_bumper = src; + + while (dmax > 0) { + if (dest == overlap_bumper) { + return RCNEGATE(ESOVRLP); + } + + *dest = *src; + if (*dest == '\0') { + return RCNEGATE(EOK); + } + + dmax--; + dest++; + src++; + } + + } + else { + overlap_bumper = dest; + + while (dmax > 0) { + if (src == overlap_bumper) { + return RCNEGATE(ESOVRLP); + } + + *dest = *src; + if (*dest == '\0') { + return RCNEGATE(EOK); + } + + dmax--; + dest++; + src++; + } + } + + /* + * the entire src must have been copied, if not reset dest + * to null the string. + */ + return RCNEGATE(ESNOSPC); +} + + /* very simple integer to hex */ static const char* hex_encoding_table = "0123456789ABCDEF"; @@ -1681,10 +1763,11 @@ static void TCPSocket_Destructor(TCPSocket* tcp_socket) } -static rmtError TCPSocket_RunServer(TCPSocket* tcp_socket, rmtU16 port) +static rmtError TCPSocket_RunServer(TCPSocket* tcp_socket, rmtU16 port, rmtBool limit_connections_to_localhost) { SOCKET s = INVALID_SOCKET; struct sockaddr_in sin; + int enable = 1; #ifdef RMT_PLATFORM_WINDOWS u_long nonblock = 1; #endif @@ -1697,9 +1780,23 @@ static rmtError TCPSocket_RunServer(TCPSocket* tcp_socket, rmtU16 port) if (s == SOCKET_ERROR) return RMT_ERROR_SOCKET_CREATE_FAIL; + // set SO_REUSEADDR so binding doesn't fail when restarting the application + // (otherwise the same port can't be reused within TIME_WAIT) + // I'm not checking for errors because if this fails (unlikely) we might still + // be able to bind to the socket anyway + #ifdef RMT_PLATFORM_POSIX + setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable)); + #elif defined(RMT_PLATFORM_WINDOWS) + // windows also needs SO_EXCLUSEIVEADDRUSE, + // see http://www.andy-pearce.com/blog/posts/2013/Feb/so_reuseaddr-on-windows/ + setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&enable, sizeof(enable)); + enable = 1; + setsockopt(s, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (char *)&enable, sizeof(enable)); + #endif + // Bind the socket to the incoming port sin.sin_family = AF_INET; - sin.sin_addr.s_addr = INADDR_ANY; + sin.sin_addr.s_addr = htonl(limit_connections_to_localhost ? INADDR_LOOPBACK : INADDR_ANY); sin.sin_port = htons(port); if (bind(s, (struct sockaddr*)&sin, sizeof(sin)) == SOCKET_ERROR) return RMT_ERROR_SOCKET_BIND_FAIL; @@ -1816,6 +1913,18 @@ static rmtError TCPSocket_AcceptConnection(TCPSocket* tcp_socket, TCPSocket** cl if (s == SOCKET_ERROR) return RMT_ERROR_SOCKET_ACCEPT_FAIL; +#ifdef SO_NOSIGPIPE + // On POSIX systems, send() may send a SIGPIPE signal when writing to an + // already closed connection. By setting this option, we prevent the + // signal from being emitted and send will instead return an error and set + // errno to EPIPE. + // + // This is supported on BSD platforms and not on Linux. + { + int flag = 1; + setsockopt(s, SOL_SOCKET, SO_NOSIGPIPE, &flag, sizeof(flag)); + } +#endif // Create a client socket for the new connection assert(client_socket != NULL); New_0(TCPSocket, *client_socket); @@ -1871,7 +1980,14 @@ static rmtError TCPSocket_Send(TCPSocket* tcp_socket, const void* data, rmtU32 l while (cur_data < end_data) { // Attempt to send the remaining chunk of data - int bytes_sent = (int)send(tcp_socket->socket, cur_data, (int)(end_data - cur_data), 0); + int bytes_sent; + int send_flags = 0; +#ifdef MSG_NOSIGNAL + // On Linux this prevents send from emitting a SIGPIPE signal + // Equivalent on BSD to the SO_NOSIGPIPE option. + send_flags = MSG_NOSIGNAL; +#endif + bytes_sent = (int)send(tcp_socket->socket, cur_data, (int)(end_data - cur_data), send_flags); if (bytes_sent == SOCKET_ERROR || bytes_sent == 0) { @@ -2371,9 +2487,10 @@ typedef struct union { - rmtU8 data_mask[4]; - rmtU32 data_mask_u32; - }; + rmtU8 mask[4]; + rmtU32 mask_u32; + } data; + } WebSocket; @@ -2536,10 +2653,10 @@ static rmtError WebSocket_Constructor(WebSocket* web_socket, TCPSocket* tcp_sock web_socket->mode = WEBSOCKET_NONE; web_socket->frame_bytes_remaining = 0; web_socket->mask_offset = 0; - web_socket->data_mask[0] = 0; - web_socket->data_mask[1] = 0; - web_socket->data_mask[2] = 0; - web_socket->data_mask[3] = 0; + web_socket->data.mask[0] = 0; + web_socket->data.mask[1] = 0; + web_socket->data.mask[2] = 0; + web_socket->data.mask[3] = 0; // Caller can optionally specify which TCP socket to use if (web_socket->tcp_socket == NULL) @@ -2555,12 +2672,12 @@ static void WebSocket_Destructor(WebSocket* web_socket) } -static rmtError WebSocket_RunServer(WebSocket* web_socket, rmtU32 port, enum WebSocketMode mode) +static rmtError WebSocket_RunServer(WebSocket* web_socket, rmtU16 port, rmtBool limit_connections_to_localhost, enum WebSocketMode mode) { // Create the server's listening socket assert(web_socket != NULL); web_socket->mode = mode; - return TCPSocket_RunServer(web_socket->tcp_socket, (rmtU16)port); + return TCPSocket_RunServer(web_socket->tcp_socket, port, limit_connections_to_localhost); } @@ -2728,7 +2845,7 @@ static rmtError ReceiveFrameHeader(WebSocket* web_socket) mask_present = (msg_header[1] & 0x80) != 0 ? RMT_TRUE : RMT_FALSE; if (mask_present) { - error = TCPSocket_Receive(web_socket->tcp_socket, web_socket->data_mask, 4, 20); + error = TCPSocket_Receive(web_socket->tcp_socket, web_socket->data.mask, 4, 20); if (error != RMT_ERROR_NONE) return error; } @@ -2790,12 +2907,12 @@ static rmtError WebSocket_Receive(WebSocket* web_socket, void* data, rmtU32* msg } // Apply data mask - if (web_socket->data_mask_u32 != 0) + if (web_socket->data.mask_u32 != 0) { rmtU32 i; for (i = 0; i < bytes_to_read; i++) { - *((rmtU8*)cur_data + i) ^= web_socket->data_mask[web_socket->mask_offset & 3]; + *((rmtU8*)cur_data + i) ^= web_socket->data.mask[web_socket->mask_offset & 3]; web_socket->mask_offset++; } } @@ -2892,11 +3009,20 @@ static void MessageQueue_Destructor(MessageQueue* queue) } +static rmtU32 MessageQueue_SizeForPayload(rmtU32 payload_size) +{ + // Add message header and align for ARM platforms + rmtU32 size = sizeof(Message) + payload_size; + size = (size + 3) & ~3U; + return size; +} + + static Message* MessageQueue_AllocMessage(MessageQueue* queue, rmtU32 payload_size, struct ThreadSampler* thread_sampler) { Message* msg; - rmtU32 write_size = sizeof(Message) + payload_size; + rmtU32 write_size = MessageQueue_SizeForPayload(payload_size); assert(queue != NULL); @@ -2926,9 +3052,8 @@ static Message* MessageQueue_AllocMessage(MessageQueue* queue, rmtU32 payload_si } -static void MessageQueue_CommitMessage(MessageQueue* queue, Message* message, MessageID id) +static void MessageQueue_CommitMessage(Message* message, MessageID id) { - assert(queue != NULL); assert(message != NULL); // Ensure message writes complete before commit @@ -2937,8 +3062,6 @@ static void MessageQueue_CommitMessage(MessageQueue* queue, Message* message, Me // Setting the message ID signals to the consumer that the message is ready assert(message->id == MsgID_NotReady); message->id = id; - - RMT_UNREFERENCED_PARAMETER(queue); } @@ -2981,7 +3104,7 @@ static void MessageQueue_ConsumeNextMessage(MessageQueue* queue, Message* messag // the read position so that a winning thread's allocation will inherit the "not ready" state. // // This costs some write bandwidth and has the potential to flush cache to other cores. - message_size = sizeof(Message) + message->payload_size; + message_size = MessageQueue_SizeForPayload(message->payload_size); memset(message, MsgID_NotReady, message_size); // Ensure clear completes before advancing the read position @@ -3009,31 +3132,33 @@ typedef struct rmtU32 last_ping_time; rmtU16 port; + rmtBool limit_connections_to_localhost; } Server; -static rmtError Server_CreateListenSocket(Server* server, rmtU16 port) +static rmtError Server_CreateListenSocket(Server* server, rmtU16 port, rmtBool limit_connections_to_localhost) { rmtError error = RMT_ERROR_NONE; New_1(WebSocket, server->listen_socket, NULL); if (error == RMT_ERROR_NONE) - error = WebSocket_RunServer(server->listen_socket, port, WEBSOCKET_TEXT); + error = WebSocket_RunServer(server->listen_socket, port, limit_connections_to_localhost, WEBSOCKET_TEXT); return error; } -static rmtError Server_Constructor(Server* server, rmtU16 port) +static rmtError Server_Constructor(Server* server, rmtU16 port, rmtBool limit_connections_to_localhost) { assert(server != NULL); server->listen_socket = NULL; server->client_socket = NULL; server->last_ping_time = 0; server->port = port; + server->limit_connections_to_localhost = limit_connections_to_localhost; // Create the listening WebSocket - return Server_CreateListenSocket(server, port); + return Server_CreateListenSocket(server, port, limit_connections_to_localhost); } @@ -3129,7 +3254,7 @@ static void Server_Update(Server* server) // Recreate the listening socket if it's been destroyed earlier if (server->listen_socket == NULL) - Server_CreateListenSocket(server, server->port); + Server_CreateListenSocket(server, server->port, server->limit_connections_to_localhost); if (server->listen_socket != NULL && server->client_socket == NULL) { @@ -3303,6 +3428,9 @@ static rmtError json_CloseArray(Buffer* buffer) +#define SAMPLE_NAME_LEN 128 + + enum SampleType { SampleType_CPU, @@ -3324,7 +3452,7 @@ typedef struct Sample rmtU32 size_bytes; // Sample name and unique hash - rmtPStr name; + char name[SAMPLE_NAME_LEN]; rmtU32 name_hash; // Unique, persistent ID among all samples @@ -3343,9 +3471,10 @@ typedef struct Sample // This is also mixed with the callstack hash to allow consistent addressing of any point in the tree rmtU32 nb_children; - // Start and end of the sample in microseconds + // Sample end points and length in microseconds rmtU64 us_start; rmtU64 us_end; + rmtU64 us_length; } Sample; @@ -3358,7 +3487,7 @@ static rmtError Sample_Constructor(Sample* sample) sample->type = SampleType_CPU; sample->size_bytes = sizeof(Sample); - sample->name = NULL; + sample->name[0] = 0; sample->name_hash = 0; sample->unique_id = 0; sample->unique_id_html_colour[0] = '#'; @@ -3371,6 +3500,7 @@ static rmtError Sample_Constructor(Sample* sample) sample->nb_children = 0; sample->us_start = 0; sample->us_end = 0; + sample->us_length = 0; return RMT_ERROR_NONE; } @@ -3384,7 +3514,10 @@ static void Sample_Destructor(Sample* sample) static void Sample_Prepare(Sample* sample, rmtPStr name, rmtU32 name_hash, Sample* parent) { - sample->name = name; + // Copy sample name away for two reasons: + // 1. It allows dynamic sprintf-style strings to be transient + // 2. The Remotery thread can still inspect the sample even when the source module has been unloaded + strcpy_s(sample->name, sizeof(sample->name), name); sample->name_hash = name_hash; sample->unique_id = 0; sample->parent = parent; @@ -3394,6 +3527,7 @@ static void Sample_Prepare(Sample* sample, rmtPStr name, rmtU32 name_hash, Sampl sample->nb_children = 0; sample->us_start = 0; sample->us_end = 0; + sample->us_length = 0; } @@ -3416,7 +3550,7 @@ static rmtError json_Sample(Buffer* buffer, Sample* sample) JSON_ERROR_CHECK(json_Comma(buffer)); JSON_ERROR_CHECK(json_FieldU64(buffer, "us_start", sample->us_start)); JSON_ERROR_CHECK(json_Comma(buffer)); - JSON_ERROR_CHECK(json_FieldU64(buffer, "us_length", maxS64(sample->us_end - sample->us_start, 0))); + JSON_ERROR_CHECK(json_FieldU64(buffer, "us_length", maxS64(sample->us_length, 0))); if (sample->first_child != NULL) { @@ -3524,7 +3658,7 @@ static rmtU32 HashCombine(rmtU32 hash_a, rmtU32 hash_b) } -static rmtError SampleTree_Push(SampleTree* tree, rmtPStr name, rmtU32 name_hash, Sample** sample) +static rmtError SampleTree_Push(SampleTree* tree, rmtPStr name, rmtU32 name_hash, rmtU32 flags, Sample** sample) { Sample* parent; rmtError error; @@ -3535,11 +3669,21 @@ static rmtError SampleTree_Push(SampleTree* tree, rmtPStr name, rmtU32 name_hash assert(tree->current_parent != NULL); parent = tree->current_parent; - if (parent->last_child != NULL && parent->last_child->name_hash == name_hash) + if ((flags & RMTSF_Aggregate) != 0) { - // TODO: Collapse siblings with flag exception? - // Note that above check is not enough - requires a linear search + // Linear search for previous instance of this sample name + Sample* sibling; + for (sibling = parent->first_child; sibling != NULL; sibling = sibling->next_sibling) + { + if (sibling->name_hash == name_hash) + { + tree->current_parent = sibling; + *sample = sibling; + return RMT_ERROR_NONE; + } + } } + if (parent->name_hash == name_hash) { // TODO: Collapse recursion on flag? @@ -3657,7 +3801,7 @@ static void AddSampleTreeMessage(MessageQueue* queue, Sample* sample, ObjectAllo payload->root_sample = sample; payload->allocator = allocator; payload->thread_name = thread_name; - MessageQueue_CommitMessage(queue, message, MsgID_SampleTree); + MessageQueue_CommitMessage(message, MsgID_SampleTree); } @@ -3686,8 +3830,6 @@ typedef struct ThreadSampler } ThreadSampler; -static rmtS32 countThreads = 0; - static rmtError ThreadSampler_Constructor(ThreadSampler* thread_sampler) { rmtError error; @@ -3705,8 +3847,11 @@ static rmtError ThreadSampler_Constructor(ThreadSampler* thread_sampler) #if defined(RMT_PLATFORM_LINUX) && RMT_USE_POSIX_THREADNAMES prctl(PR_GET_NAME,thread_sampler->name,0,0,0); #else - strncat_s(thread_sampler->name, sizeof(thread_sampler->name), "Thread", 6); - itoahex_s(thread_sampler->name + 6, sizeof(thread_sampler->name) - 6, AtomicAdd(&countThreads, 1)); + { + static rmtS32 countThreads = 0; + strncat_s(thread_sampler->name, sizeof(thread_sampler->name), "Thread", 6); + itoahex_s(thread_sampler->name + 6, sizeof(thread_sampler->name) - 6, AtomicAdd(&countThreads, 1)); + } #endif // Create the CPU sample tree only - the rest are created on-demand as they need @@ -3729,10 +3874,9 @@ static void ThreadSampler_Destructor(ThreadSampler* ts) } -static rmtError ThreadSampler_Push(ThreadSampler* ts, SampleTree* tree, rmtPStr name, rmtU32 name_hash, Sample** sample) +static rmtError ThreadSampler_Push(SampleTree* tree, rmtPStr name, rmtU32 name_hash, rmtU32 flags, Sample** sample) { - RMT_UNREFERENCED_PARAMETER(ts); - return SampleTree_Push(tree, name, name_hash, sample); + return SampleTree_Push(tree, name, name_hash, flags, sample); } @@ -3967,7 +4111,7 @@ static rmtError Remotery_SendSampleTreeMessage(Remotery* rmt, Message* message) { // If these CUDA samples aren't ready yet, stick them to the back of the queue and continue rmtBool are_samples_ready; - rmt_BeginCPUSample(AreCUDASamplesReady); + rmt_BeginCPUSample(AreCUDASamplesReady, 0); are_samples_ready = AreCUDASamplesReady(sample); rmt_EndCPUSample(); if (!are_samples_ready) @@ -3977,7 +4121,7 @@ static rmtError Remotery_SendSampleTreeMessage(Remotery* rmt, Message* message) } // Retrieve timing of all CUDA samples - rmt_BeginCPUSample(GetCUDASampleTimes); + rmt_BeginCPUSample(GetCUDASampleTimes, 0); GetCUDASampleTimes(sample->parent, sample); rmt_EndCPUSample(); } @@ -4082,13 +4226,13 @@ static rmtError Remotery_ThreadMain(Thread* thread) while (thread->request_exit == RMT_FALSE) { - rmt_BeginCPUSample(Wakeup); + rmt_BeginCPUSample(Wakeup, 0); - rmt_BeginCPUSample(ServerUpdate); + rmt_BeginCPUSample(ServerUpdate, 0); Server_Update(rmt->server); rmt_EndCPUSample(); - rmt_BeginCPUSample(ConsumeMessageQueue); + rmt_BeginCPUSample(ConsumeMessageQueue, 0); Remotery_ConsumeMessageQueue(rmt); rmt_EndCPUSample(); @@ -4129,6 +4273,23 @@ static rmtError Remotery_Constructor(Remotery* rmt) rmt->json_buf = NULL; rmt->thread = NULL; + #if RMT_USE_CUDA + rmt->cuda.CtxSetCurrent = NULL; + rmt->cuda.EventCreate = NULL; + rmt->cuda.EventDestroy = NULL; + rmt->cuda.EventElapsedTime = NULL; + rmt->cuda.EventQuery = NULL; + rmt->cuda.EventRecord = NULL; + #endif + + #if RMT_USE_D3D11 + rmt->d3d11 = NULL; + #endif + + #if RMT_USE_OPENGL + rmt->opengl = NULL; + #endif + // Kick-off the timer usTimer_Init(&rmt->timer); @@ -4138,7 +4299,7 @@ static rmtError Remotery_Constructor(Remotery* rmt) return error; // Create the server - New_1( Server, rmt->server, g_Settings.port ); + New_2(Server, rmt->server, g_Settings.port, g_Settings.limit_connections_to_localhost); if (error != RMT_ERROR_NONE) return error; @@ -4152,26 +4313,13 @@ static rmtError Remotery_Constructor(Remotery* rmt) if (error != RMT_ERROR_NONE) return error; - #if RMT_USE_CUDA - - rmt->cuda.CtxSetCurrent = NULL; - rmt->cuda.EventCreate = NULL; - rmt->cuda.EventDestroy = NULL; - rmt->cuda.EventElapsedTime = NULL; - rmt->cuda.EventQuery = NULL; - rmt->cuda.EventRecord = NULL; - - #endif - #if RMT_USE_D3D11 - rmt->d3d11 = NULL; error = D3D11_Create(&rmt->d3d11); if (error != RMT_ERROR_NONE) return error; #endif #if RMT_USE_OPENGL - rmt->opengl = NULL; error = OpenGL_Create(&rmt->opengl); if (error != RMT_ERROR_NONE) return error; @@ -4198,11 +4346,11 @@ static void Remotery_Destructor(Remotery* rmt) // Join the remotery thread before clearing the global object as the thread is profiling itself Delete(Thread, rmt->thread); - // Ensure this is the module that created it - assert(g_RemoteryCreated == RMT_TRUE); - assert(g_Remotery == rmt); - g_Remotery = NULL; - g_RemoteryCreated = RMT_FALSE; + if (g_RemoteryCreated) + { + g_Remotery = NULL; + g_RemoteryCreated = RMT_FALSE; + } #if RMT_USE_D3D11 Delete(D3D11, rmt->d3d11); @@ -4324,6 +4472,7 @@ RMT_API rmtSettings* _rmt_Settings(void) if( g_SettingsInitialized == RMT_FALSE ) { g_Settings.port = 0x4597; + g_Settings.limit_connections_to_localhost = RMT_FALSE; g_Settings.msSleepBetweenServerUpdates = 10; g_Settings.messageQueueSizeInBytes = 64 * 1024; g_Settings.maxNbMessagesPerUpdate = 100; @@ -4357,6 +4506,9 @@ RMT_API rmtError _rmt_CreateGlobalInstance(Remotery** remotery) RMT_API void _rmt_DestroyGlobalInstance(Remotery* remotery) { + // Ensure this is the module that created it + assert(g_RemoteryCreated == RMT_TRUE); + assert(g_Remotery == remotery); Delete(Remotery, remotery); } @@ -4460,7 +4612,7 @@ static rmtBool QueueLine(MessageQueue* queue, char* text, rmtU32 size, struct Th // Copy the text and commit the message memcpy(message->payload, text, size); - MessageQueue_CommitMessage(queue, message, MsgID_LogText); + MessageQueue_CommitMessage(message, MsgID_LogText); return RMT_TRUE; } @@ -4554,7 +4706,7 @@ static rmtU32 GetNameHash(rmtPStr name, rmtU32* hash_cache) } -RMT_API void _rmt_BeginCPUSample(rmtPStr name, rmtU32* hash_cache) +RMT_API void _rmt_BeginCPUSample(rmtPStr name, rmtU32 flags, rmtU32* hash_cache) { // 'hash_cache' stores a pointer to a sample name's hash value. Internally this is used to identify unique callstacks and it // would be ideal that it's not recalculated each time the sample is used. This can be statically cached at the point @@ -4573,8 +4725,14 @@ RMT_API void _rmt_BeginCPUSample(rmtPStr name, rmtU32* hash_cache) { Sample* sample; rmtU32 name_hash = GetNameHash(name, hash_cache); - if (ThreadSampler_Push(ts, ts->sample_trees[SampleType_CPU], name, name_hash, &sample) == RMT_ERROR_NONE) - sample->us_start = usTimer_Get(&g_Remotery->timer); + if (ThreadSampler_Push(ts->sample_trees[SampleType_CPU], name, name_hash, flags, &sample) == RMT_ERROR_NONE) + { + // If this is an aggregate sample, store the time in 'end' as we want to preserve 'start' + if (sample->us_length != 0) + sample->us_end = usTimer_Get(&g_Remotery->timer); + else + sample->us_start = usTimer_Get(&g_Remotery->timer); + } } } @@ -4589,6 +4747,21 @@ RMT_API void _rmt_EndCPUSample(void) if (Remotery_GetThreadSampler(g_Remotery, &ts) == RMT_ERROR_NONE) { Sample* sample = ts->sample_trees[SampleType_CPU]->current_parent; + + rmtU64 us_end = usTimer_Get(&g_Remotery->timer); + + // Is this an aggregate sample? + if (sample->us_length != 0) + { + sample->us_length += (us_end - sample->us_end); + sample->us_end = us_end; + } + else + { + sample->us_end = us_end; + sample->us_length = (us_end - sample->us_start); + } + sample->us_end = usTimer_Get(&g_Remotery->timer); ThreadSampler_Pop(ts, g_Remotery->mq_to_rmt_thread, sample); } @@ -4794,6 +4967,7 @@ static rmtBool GetCUDASampleTimes(Sample* root_sample, Sample* sample) // Convert to microseconds and add to the sample sample->us_start = (rmtU64)(ms_start * 1000); sample->us_end = (rmtU64)(ms_end * 1000); + sample->us_length = sample->us_end - sample->us_start; // Get child sample times for (child = sample->first_child; child != NULL; child = child->next_sibling) @@ -4847,7 +5021,7 @@ RMT_API void _rmt_BeginCUDASample(rmtPStr name, rmtU32* hash_cache, void* stream } // Push the same and record its event - if (ThreadSampler_Push(ts, *cuda_tree, name, name_hash, &sample) == RMT_ERROR_NONE) + if (ThreadSampler_Push(*cuda_tree, name, name_hash, 0, &sample) == RMT_ERROR_NONE) { CUDASample* cuda_sample = (CUDASample*)sample; CUDAEventRecord(cuda_sample->event_start, stream); @@ -5233,7 +5407,7 @@ RMT_API void _rmt_BeginD3D11Sample(rmtPStr name, rmtU32* hash_cache) New_3(ObjectAllocator, d3d11->timestamp_allocator, sizeof(D3D11Timestamp), (ObjConstructor)D3D11Timestamp_Constructor, (ObjDestructor)D3D11Timestamp_Destructor); // Push the sample - if (ThreadSampler_Push(ts, *d3d_tree, name, name_hash, &sample) == RMT_ERROR_NONE) + if (ThreadSampler_Push(*d3d_tree, name, name_hash, 0, &sample) == RMT_ERROR_NONE) { D3D11Sample* d3d_sample = (D3D11Sample*)sample; @@ -5273,6 +5447,8 @@ static rmtBool GetD3D11SampleTimes(Sample* sample, rmtU64* out_first_timestamp) d3d11->last_error = result; return RMT_FALSE; } + + sample->us_length = sample->us_end - sample->us_start; } // Get child sample times @@ -5296,7 +5472,7 @@ static void UpdateD3D11Frame(void) d3d11 = g_Remotery->d3d11; assert(d3d11 != NULL); - rmt_BeginCPUSample(rmt_UpdateD3D11Frame); + rmt_BeginCPUSample(rmt_UpdateD3D11Frame, 0); // Process all messages in the D3D queue for (;;) @@ -5506,8 +5682,7 @@ static void* rmtglGetProcAddress(OpenGL* opengl, const char* symbol) #elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX) - extern void* nsglGetProcAddress(const GLubyte* _name); - return nsglGetProcAddress((const GLubyte*)symbol); + return NSGLGetProcAddress((const GLubyte*)symbol); #elif defined(RMT_PLATFORM_LINUX) @@ -5820,7 +5995,7 @@ RMT_API void _rmt_BeginOpenGLSample(rmtPStr name, rmtU32* hash_cache) New_3(ObjectAllocator, opengl->timestamp_allocator, sizeof(OpenGLTimestamp), (ObjConstructor)OpenGLTimestamp_Constructor, (ObjDestructor)OpenGLTimestamp_Destructor); // Push the sample - if (ThreadSampler_Push(ts, *ogl_tree, name, name_hash, &sample) == RMT_ERROR_NONE) + if (ThreadSampler_Push(*ogl_tree, name, name_hash, 0, &sample) == RMT_ERROR_NONE) { OpenGLSample* ogl_sample = (OpenGLSample*)sample; @@ -5845,6 +6020,8 @@ static rmtBool GetOpenGLSampleTimes(Sample* sample, rmtU64* out_first_timestamp) { if (!OpenGLTimestamp_GetData(ogl_sample->timestamp, &sample->us_start, &sample->us_end, out_first_timestamp)) return RMT_FALSE; + + sample->us_length = sample->us_end - sample->us_start; } // Get child sample times @@ -5868,7 +6045,7 @@ static void UpdateOpenGLFrame(void) opengl = g_Remotery->opengl; assert(opengl != NULL); - rmt_BeginCPUSample(rmt_UpdateOpenGLFrame); + rmt_BeginCPUSample(rmt_UpdateOpenGLFrame, 0); // Process all messages in the OpenGL queue while (1) diff --git a/3rdparty/bgfx/3rdparty/remotery/lib/Remotery.h b/3rdparty/bgfx/3rdparty/remotery/lib/Remotery.h index 20836f68610..141aeb9315f 100644 --- a/3rdparty/bgfx/3rdparty/remotery/lib/Remotery.h +++ b/3rdparty/bgfx/3rdparty/remotery/lib/Remotery.h @@ -82,17 +82,6 @@ documented just below this comment. */ - -// Compiler identification -#if defined(_MSC_VER) - #define RMT_COMPILER_MSVC -#elif defined(__GNUC__) - #define RMT_COMPILER_GNUC -#elif defined(__clang__) - #define RMT_COMPILER_CLANG -#endif - - // Platform identification #if defined(_WINDOWS) || defined(_WIN32) #define RMT_PLATFORM_WINDOWS @@ -254,6 +243,15 @@ typedef enum rmtError } rmtError; +typedef enum rmtSampleFlags +{ + // Default behaviour + RMTSF_None = 0, + + // Search parent for same-named samples and merge timing instead of adding a new sample + RMTSF_Aggregate = 1, +} rmtSampleFlags; + /* ------------------------------------------------------------------------------------------------------------------------ @@ -289,14 +287,14 @@ typedef enum rmtError #define rmt_LogText(text) \ RMT_OPTIONAL(RMT_ENABLED, _rmt_LogText(text)) -#define rmt_BeginCPUSample(name) \ +#define rmt_BeginCPUSample(name, flags) \ RMT_OPTIONAL(RMT_ENABLED, { \ static rmtU32 rmt_sample_hash_##name = 0; \ - _rmt_BeginCPUSample(#name, &rmt_sample_hash_##name); \ + _rmt_BeginCPUSample(#name, flags, &rmt_sample_hash_##name); \ }) -#define rmt_BeginCPUSampleDynamic(namestr) \ - RMT_OPTIONAL(RMT_ENABLED, _rmt_BeginCPUSample(namestr, NULL)) +#define rmt_BeginCPUSampleDynamic(namestr, flags) \ + RMT_OPTIONAL(RMT_ENABLED, _rmt_BeginCPUSample(namestr, flags, NULL)) #define rmt_EndCPUSample() \ RMT_OPTIONAL(RMT_ENABLED, _rmt_EndCPUSample()) @@ -312,8 +310,15 @@ typedef void (*rmtInputHandlerPtr)(const char* text, void* context); // Struture to fill in to modify Remotery default settings typedef struct rmtSettings { + // Which port to listen for incoming connections on rmtU16 port; + // Only allow connections on localhost? + // For dev builds you may want to access your game from other devices but if + // you distribute a game to your players with Remotery active, probably best + // to limit connections to localhost. + rmtBool limit_connections_to_localhost; + // How long to sleep between server updates, hopefully trying to give // a little CPU back to other threads. rmtU32 msSleepBetweenServerUpdates; @@ -485,8 +490,8 @@ struct rmt_EndOpenGLSampleOnScopeExit // Pairs a call to rmt_BeginSample with its call to rmt_EndSample when leaving scope -#define rmt_ScopedCPUSample(name) \ - RMT_OPTIONAL(RMT_ENABLED, rmt_BeginCPUSample(name)); \ +#define rmt_ScopedCPUSample(name, flags) \ + RMT_OPTIONAL(RMT_ENABLED, rmt_BeginCPUSample(name, flags)); \ RMT_OPTIONAL(RMT_ENABLED, rmt_EndCPUSampleOnScopeExit rmt_ScopedCPUSample##name); #define rmt_ScopedCUDASample(name, stream) \ RMT_OPTIONAL(RMT_USE_CUDA, rmt_BeginCUDASample(name, stream)); \ @@ -525,7 +530,7 @@ RMT_API void _rmt_SetGlobalInstance(Remotery* remotery); RMT_API Remotery* _rmt_GetGlobalInstance(void); RMT_API void _rmt_SetCurrentThreadName(rmtPStr thread_name); RMT_API void _rmt_LogText(rmtPStr text); -RMT_API void _rmt_BeginCPUSample(rmtPStr name, rmtU32* hash_cache); +RMT_API void _rmt_BeginCPUSample(rmtPStr name, rmtU32 flags, rmtU32* hash_cache); RMT_API void _rmt_EndCPUSample(void); #if RMT_USE_CUDA diff --git a/3rdparty/bgfx/3rdparty/remotery/readme.md b/3rdparty/bgfx/3rdparty/remotery/readme.md index 99cbdf9ad7f..143f58247b7 100644 --- a/3rdparty/bgfx/3rdparty/remotery/readme.md +++ b/3rdparty/bgfx/3rdparty/remotery/readme.md @@ -54,14 +54,14 @@ See the sample directory for further examples. A quick example: // Explicit begin/end for C { - rmt_BeginCPUSample(LogText); + rmt_BeginCPUSample(LogText, 0); rmt_LogText("Time me, please!"); rmt_EndCPUSample(); } // Scoped begin/end for C++ { - rmt_ScopedCPUSample(LogText); + rmt_ScopedCPUSample(LogText, 0); rmt_LogText("Time me, too!"); } diff --git a/3rdparty/bgfx/3rdparty/remotery/sample/sample.c b/3rdparty/bgfx/3rdparty/remotery/sample/sample.c index 3339fa35f60..f579e1c1f99 100644 --- a/3rdparty/bgfx/3rdparty/remotery/sample/sample.c +++ b/3rdparty/bgfx/3rdparty/remotery/sample/sample.c @@ -1,12 +1,14 @@ #include #include +#include +#include #include "Remotery.h" double delay() { int i, end; double j = 0; - rmt_BeginCPUSample(delay); + rmt_BeginCPUSample(delay, 0); for( i = 0, end = rand()/100; i < end; ++i ) { j += sin(i); } @@ -14,20 +16,30 @@ double delay() { return j; } +int sig = 0; + +/// Allow to close cleanly with ctrl + c +void sigintHandler(int sig_num) { + sig = sig_num; + printf("Interrupted\n"); +} + +int main( ) { + signal(SIGINT, sigintHandler); -int main( int argc, const char **argv ) { Remotery *rmt; if( RMT_ERROR_NONE != rmt_CreateGlobalInstance(&rmt) ) { return -1; } - for(;;) { + while (sig == 0) { rmt_LogText("start profiling"); delay(); rmt_LogText("end profiling"); } rmt_DestroyGlobalInstance(rmt); + printf("Cleaned up and quit\n"); return 0; } diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/Code/Console.js b/3rdparty/bgfx/3rdparty/remotery/vis/Code/Console.js index 06f5e55a8cc..a18f3dce49e 100644 --- a/3rdparty/bgfx/3rdparty/remotery/vis/Code/Console.js +++ b/3rdparty/bgfx/3rdparty/remotery/vis/Code/Console.js @@ -19,7 +19,16 @@ Console = (function() // This accumulates log text as fast as is required this.PageTextBuffer = ""; + this.LastPageTextBufferLen = 0; this.AppTextBuffer = ""; + this.LastAppTextBufferLen = 0; + + // Setup command history control + this.CommandHistory = LocalStore.Get("App", "Global", "CommandHistory", [ ]); + this.CommandIndex = 0; + this.MaxNbCommands = 200; + DOM.Event.AddHandler(this.UserInput.EditNode, "keydown", Bind(OnKeyPress, this)); + DOM.Event.AddHandler(this.UserInput.EditNode, "focus", Bind(OnFocus, this)); // At a much lower frequency this will update the console window window.setInterval(Bind(UpdateHTML, this), 500); @@ -91,13 +100,21 @@ Console = (function() { // Reset the current text buffer as html - var page_node = self.PageContainer.Node; - page_node.innerHTML = self.PageTextBuffer; - page_node.scrollTop = page_node.scrollHeight; + if (self.LastPageTextBufferLen != self.PageTextBuffer.length) + { + var page_node = self.PageContainer.Node; + page_node.innerHTML = self.PageTextBuffer; + page_node.scrollTop = page_node.scrollHeight; + self.LastPageTextBufferLen = self.PageTextBuffer.length; + } - var app_node = self.AppContainer.Node; - app_node.innerHTML = self.AppTextBuffer; - app_node.scrollTop = app_node.scrollHeight; + if (self.LastAppTextBufferLen != self.AppTextBuffer.length) + { + var app_node = self.AppContainer.Node; + app_node.innerHTML = self.AppTextBuffer; + app_node.scrollTop = app_node.scrollHeight; + self.LastAppTextBufferLen = self.AppTextBuffer.length; + } } @@ -110,6 +127,64 @@ Console = (function() // Emit to console and clear self.Log("> " + msg); self.UserInput.SetValue(""); + + // Keep track of recently issued commands, with an upper bound + self.CommandHistory.push(msg); + var extra_commands = self.CommandHistory.length - self.MaxNbCommands; + if (extra_commands > 0) + self.CommandHistory.splice(0, extra_commands); + + // Set command history index to the most recent command + self.CommandIndex = self.CommandHistory.length; + + // Backup to local store + LocalStore.Set("App", "Global", "CommandHistory", self.CommandHistory); + + // Keep focus with the edit box + return true; + } + + + function OnKeyPress(self, evt) + { + evt = DOM.Event.Get(evt); + + if (evt.keyCode == Keyboard.Codes.UP) + { + if (self.CommandHistory.length > 0) + { + // Cycle backwards through the command history + self.CommandIndex--; + if (self.CommandIndex < 0) + self.CommandIndex = self.CommandHistory.length - 1; + var command = self.CommandHistory[self.CommandIndex]; + self.UserInput.SetValue(command); + } + + // Stops default behaviour of moving cursor to the beginning + DOM.Event.StopDefaultAction(evt); + } + + else if (evt.keyCode == Keyboard.Codes.DOWN) + { + if (self.CommandHistory.length > 0) + { + // Cycle fowards through the command history + self.CommandIndex = (self.CommandIndex + 1) % self.CommandHistory.length; + var command = self.CommandHistory[self.CommandIndex]; + self.UserInput.SetValue(command); + } + + // Stops default behaviour of moving cursor to the end + DOM.Event.StopDefaultAction(evt); + } + } + + + function OnFocus(self) + { + // Reset command index on focus + self.CommandIndex = self.CommandHistory.length; } diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/Code/Remotery.js b/3rdparty/bgfx/3rdparty/remotery/vis/Code/Remotery.js index 31fe09dc239..5030f8802bb 100644 --- a/3rdparty/bgfx/3rdparty/remotery/vis/Code/Remotery.js +++ b/3rdparty/bgfx/3rdparty/remotery/vis/Code/Remotery.js @@ -92,6 +92,9 @@ Remotery = (function() // Update and disconnect, relying on auto-connect to reconnect self.ConnectionAddress = node.value; self.Server.Disconnect(); + + // Give input focus away + return false; } diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/Styles/Remotery.css b/3rdparty/bgfx/3rdparty/remotery/vis/Styles/Remotery.css index 836dd68d734..995095f417e 100644 --- a/3rdparty/bgfx/3rdparty/remotery/vis/Styles/Remotery.css +++ b/3rdparty/bgfx/3rdparty/remotery/vis/Styles/Remotery.css @@ -67,6 +67,7 @@ body color: #BBB; font: 9px Verdana; margin: 2px; + white-space: pre; } diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/EditBox.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/EditBox.js index b78c9725d53..fd0a039450c 100644 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/EditBox.js +++ b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/EditBox.js @@ -27,11 +27,12 @@ WM.EditBox = (function() this.SetPosition(x, y); this.SetSize(w, h); + this.PreviousValue = ""; + // Hook up the event handlers DOM.Event.AddHandler(this.EditNode, "focus", Bind(OnFocus, this)); DOM.Event.AddHandler(this.EditNode, "keypress", Bind(OnKeyPress, this)); DOM.Event.AddHandler(this.EditNode, "keydown", Bind(OnKeyDown, this)); - DOM.Event.AddHandler(this.EditNode, "change", Bind(OnChange, this)); } @@ -88,9 +89,12 @@ WM.EditBox = (function() function OnKeyPress(self, evt) { // Allow enter to confirm the text only when there's data - if (evt.keyCode == 13 && self.EditNode.value != "") + if (evt.keyCode == 13 && self.EditNode.value != "" && self.ChangeHandler) { - self.EditNode.blur(); + var focus = self.ChangeHandler(self.EditNode); + if (!focus) + self.EditNode.blur(); + self.PreviousValue = ""; } } @@ -100,18 +104,16 @@ WM.EditBox = (function() // Allow escape to cancel any text changes if (evt.keyCode == 27) { - self.EditNode.value = self.PreviousValue; + // On initial edit of the input, escape should NOT replace with the empty string + if (self.PreviousValue != "") + { + self.EditNode.value = self.PreviousValue; + } + self.EditNode.blur(); } } - function OnChange(self, evt) - { - if (self.ChangeHandler) - self.ChangeHandler(self.EditNode); - } - - return EditBox; })(); diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/index.html b/3rdparty/bgfx/3rdparty/remotery/vis/index.html index 7d1620d5aca..b761290559a 100644 --- a/3rdparty/bgfx/3rdparty/remotery/vis/index.html +++ b/3rdparty/bgfx/3rdparty/remotery/vis/index.html @@ -17,6 +17,7 @@ + diff --git a/3rdparty/bgfx/3rdparty/renderdoc/renderdoc_app.h b/3rdparty/bgfx/3rdparty/renderdoc/renderdoc_app.h index 67c179ad0a9..a392cecbbd7 100644 --- a/3rdparty/bgfx/3rdparty/renderdoc/renderdoc_app.h +++ b/3rdparty/bgfx/3rdparty/renderdoc/renderdoc_app.h @@ -1,18 +1,18 @@ /****************************************************************************** * The MIT License (MIT) - * + * * Copyright (c) 2015-2016 Baldur Karlsson - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -29,11 +29,13 @@ #endif #if defined(WIN32) - #define RENDERDOC_CC __cdecl +#define RENDERDOC_CC __cdecl #elif defined(__linux__) - #define RENDERDOC_CC +#define RENDERDOC_CC +#elif defined(__APPLE__) +#define RENDERDOC_CC #else - #error "Unknown platform" +#error "Unknown platform" #endif #ifdef __cplusplus @@ -45,137 +47,144 @@ extern "C" { // This is a GUID/magic value used for when applications pass a path where shader debug // information can be found to match up with a stripped shader. -// the define can be used like so: const GUID RENDERDOC_ShaderDebugMagicValue = RENDERDOC_ShaderDebugMagicValue_value -#define RENDERDOC_ShaderDebugMagicValue_struct { 0xeab25520, 0x6670, 0x4865, 0x84, 0x29, 0x6c, 0x8, 0x51, 0x54, 0x00, 0xff } +// the define can be used like so: const GUID RENDERDOC_ShaderDebugMagicValue = +// RENDERDOC_ShaderDebugMagicValue_value +#define RENDERDOC_ShaderDebugMagicValue_struct \ + { \ + 0xeab25520, 0x6670, 0x4865, 0x84, 0x29, 0x6c, 0x8, 0x51, 0x54, 0x00, 0xff \ + } // as an alternative when you want a byte array (assuming x86 endianness): -#define RENDERDOC_ShaderDebugMagicValue_bytearray { 0x20, 0x55, 0xb2, 0xea, 0x70, 0x66, 0x65, 0x48, 0x84, 0x29, 0x6c, 0x8, 0x51, 0x54, 0x00, 0xff } - +#define RENDERDOC_ShaderDebugMagicValue_bytearray \ + { \ + 0x20, 0x55, 0xb2, 0xea, 0x70, 0x66, 0x65, 0x48, 0x84, 0x29, 0x6c, 0x8, 0x51, 0x54, 0x00, 0xff \ + } + // truncated version when only a uint64_t is available (e.g. Vulkan tags): #define RENDERDOC_ShaderDebugMagicValue_truncated 0x48656670eab25520ULL ////////////////////////////////////////////////////////////////////////////////////////////////// // RenderDoc capture options -// +// -typedef enum -{ - // Allow the application to enable vsync - // - // Default - enabled - // - // 1 - The application can enable or disable vsync at will - // 0 - vsync is force disabled - eRENDERDOC_Option_AllowVSync = 0, - - // Allow the application to enable fullscreen - // - // Default - enabled - // - // 1 - The application can enable or disable fullscreen at will - // 0 - fullscreen is force disabled - eRENDERDOC_Option_AllowFullscreen = 1, +typedef enum { + // Allow the application to enable vsync + // + // Default - enabled + // + // 1 - The application can enable or disable vsync at will + // 0 - vsync is force disabled + eRENDERDOC_Option_AllowVSync = 0, - // Record API debugging events and messages - // - // Default - disabled - // - // 1 - Enable built-in API debugging features and records the results into - // the capture logfile, which is matched up with events on replay - // 0 - no API debugging is forcibly enabled - eRENDERDOC_Option_DebugDeviceMode = 2, - - // Capture CPU callstacks for API events - // - // Default - disabled - // - // 1 - Enables capturing of callstacks - // 0 - no callstacks are captured - eRENDERDOC_Option_CaptureCallstacks = 3, - - // When capturing CPU callstacks, only capture them from drawcalls. - // This option does nothing without the above option being enabled - // - // Default - disabled - // - // 1 - Only captures callstacks for drawcall type API events. - // Ignored if CaptureCallstacks is disabled - // 0 - Callstacks, if enabled, are captured for every event. - eRENDERDOC_Option_CaptureCallstacksOnlyDraws = 4, + // Allow the application to enable fullscreen + // + // Default - enabled + // + // 1 - The application can enable or disable fullscreen at will + // 0 - fullscreen is force disabled + eRENDERDOC_Option_AllowFullscreen = 1, - // Specify a delay in seconds to wait for a debugger to attach, after - // creating or injecting into a process, before continuing to allow it to run. - // - // 0 indicates no delay, and the process will run immediately after injection - // - // Default - 0 seconds - // - eRENDERDOC_Option_DelayForDebugger = 5, - - // Verify any writes to mapped buffers, by checking the memory after the - // bounds of the returned pointer to detect any modification. - // - // Default - disabled - // - // 1 - Verify any writes to mapped buffers - // 0 - No verification is performed, and overwriting bounds may cause - // crashes or corruption in RenderDoc - eRENDERDOC_Option_VerifyMapWrites = 6, - - // Hooks any system API calls that create child processes, and injects - // RenderDoc into them recursively with the same options. - // - // Default - disabled - // - // 1 - Hooks into spawned child processes - // 0 - Child processes are not hooked by RenderDoc - eRENDERDOC_Option_HookIntoChildren = 7, + // Record API debugging events and messages + // + // Default - disabled + // + // 1 - Enable built-in API debugging features and records the results into + // the capture logfile, which is matched up with events on replay + // 0 - no API debugging is forcibly enabled + eRENDERDOC_Option_APIValidation = 2, + eRENDERDOC_Option_DebugDeviceMode = 2, // deprecated name of this enum - // By default RenderDoc only includes resources in the final logfile necessary - // for that frame, this allows you to override that behaviour. - // - // Default - disabled - // - // 1 - all live resources at the time of capture are included in the log - // and available for inspection - // 0 - only the resources referenced by the captured frame are included - eRENDERDOC_Option_RefAllResources = 8, + // Capture CPU callstacks for API events + // + // Default - disabled + // + // 1 - Enables capturing of callstacks + // 0 - no callstacks are captured + eRENDERDOC_Option_CaptureCallstacks = 3, - // By default RenderDoc skips saving initial states for resources where the - // previous contents don't appear to be used, assuming that writes before - // reads indicate previous contents aren't used. - // - // Default - disabled - // - // 1 - initial contents at the start of each captured frame are saved, even if - // they are later overwritten or cleared before being used. - // 0 - unless a read is detected, initial contents will not be saved and will - // appear as black or empty data. - eRENDERDOC_Option_SaveAllInitials = 9, + // When capturing CPU callstacks, only capture them from drawcalls. + // This option does nothing without the above option being enabled + // + // Default - disabled + // + // 1 - Only captures callstacks for drawcall type API events. + // Ignored if CaptureCallstacks is disabled + // 0 - Callstacks, if enabled, are captured for every event. + eRENDERDOC_Option_CaptureCallstacksOnlyDraws = 4, - // In APIs that allow for the recording of command lists to be replayed later, - // RenderDoc may choose to not capture command lists before a frame capture is - // triggered, to reduce overheads. This means any command lists recorded once - // and replayed many times will not be available and may cause a failure to - // capture. - // - // Note this is only true for APIs where multithreading is difficult or - // discouraged. Newer APIs like Vulkan and D3D12 will ignore this option - // and always capture all command lists since the API is heavily oriented - // around it and the overheads have been reduced by API design. - // - // 1 - All command lists are captured from the start of the application - // 0 - Command lists are only captured if their recording begins during - // the period when a frame capture is in progress. - eRENDERDOC_Option_CaptureAllCmdLists = 10, + // Specify a delay in seconds to wait for a debugger to attach, after + // creating or injecting into a process, before continuing to allow it to run. + // + // 0 indicates no delay, and the process will run immediately after injection + // + // Default - 0 seconds + // + eRENDERDOC_Option_DelayForDebugger = 5, - // Mute API debugging output when the debug device mode option is enabled - // - // Default - enabled - // - // 1 - Mute any API debug messages from being displayed or passed through - // 0 - API debugging is displayed as normal - eRENDERDOC_Option_DebugOutputMute = 11, + // Verify any writes to mapped buffers, by checking the memory after the + // bounds of the returned pointer to detect any modification. + // + // Default - disabled + // + // 1 - Verify any writes to mapped buffers + // 0 - No verification is performed, and overwriting bounds may cause + // crashes or corruption in RenderDoc + eRENDERDOC_Option_VerifyMapWrites = 6, + + // Hooks any system API calls that create child processes, and injects + // RenderDoc into them recursively with the same options. + // + // Default - disabled + // + // 1 - Hooks into spawned child processes + // 0 - Child processes are not hooked by RenderDoc + eRENDERDOC_Option_HookIntoChildren = 7, + + // By default RenderDoc only includes resources in the final logfile necessary + // for that frame, this allows you to override that behaviour. + // + // Default - disabled + // + // 1 - all live resources at the time of capture are included in the log + // and available for inspection + // 0 - only the resources referenced by the captured frame are included + eRENDERDOC_Option_RefAllResources = 8, + + // By default RenderDoc skips saving initial states for resources where the + // previous contents don't appear to be used, assuming that writes before + // reads indicate previous contents aren't used. + // + // Default - disabled + // + // 1 - initial contents at the start of each captured frame are saved, even if + // they are later overwritten or cleared before being used. + // 0 - unless a read is detected, initial contents will not be saved and will + // appear as black or empty data. + eRENDERDOC_Option_SaveAllInitials = 9, + + // In APIs that allow for the recording of command lists to be replayed later, + // RenderDoc may choose to not capture command lists before a frame capture is + // triggered, to reduce overheads. This means any command lists recorded once + // and replayed many times will not be available and may cause a failure to + // capture. + // + // Note this is only true for APIs where multithreading is difficult or + // discouraged. Newer APIs like Vulkan and D3D12 will ignore this option + // and always capture all command lists since the API is heavily oriented + // around it and the overheads have been reduced by API design. + // + // 1 - All command lists are captured from the start of the application + // 0 - Command lists are only captured if their recording begins during + // the period when a frame capture is in progress. + eRENDERDOC_Option_CaptureAllCmdLists = 10, + + // Mute API debugging output when the API validation mode option is enabled + // + // Default - enabled + // + // 1 - Mute any API debug messages from being displayed or passed through + // 0 - API debugging is displayed as normal + eRENDERDOC_Option_DebugOutputMute = 11, } RENDERDOC_CaptureOption; @@ -183,140 +192,135 @@ typedef enum // // Returns 1 if the option and value are valid // Returns 0 if either is invalid and the option is unchanged -typedef int (RENDERDOC_CC *pRENDERDOC_SetCaptureOptionU32)(RENDERDOC_CaptureOption opt, uint32_t val); -typedef int (RENDERDOC_CC *pRENDERDOC_SetCaptureOptionF32)(RENDERDOC_CaptureOption opt, float val); +typedef int(RENDERDOC_CC *pRENDERDOC_SetCaptureOptionU32)(RENDERDOC_CaptureOption opt, uint32_t val); +typedef int(RENDERDOC_CC *pRENDERDOC_SetCaptureOptionF32)(RENDERDOC_CaptureOption opt, float val); // Gets the current value of an option as a uint32_t // // If the option is invalid, 0xffffffff is returned -typedef uint32_t (RENDERDOC_CC *pRENDERDOC_GetCaptureOptionU32)(RENDERDOC_CaptureOption opt); +typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetCaptureOptionU32)(RENDERDOC_CaptureOption opt); // Gets the current value of an option as a float // // If the option is invalid, -FLT_MAX is returned -typedef float (RENDERDOC_CC *pRENDERDOC_GetCaptureOptionF32)(RENDERDOC_CaptureOption opt); +typedef float(RENDERDOC_CC *pRENDERDOC_GetCaptureOptionF32)(RENDERDOC_CaptureOption opt); -typedef enum -{ - // '0' - '9' matches ASCII values - eRENDERDOC_Key_0 = 0x30, - eRENDERDOC_Key_1 = 0x31, - eRENDERDOC_Key_2 = 0x32, - eRENDERDOC_Key_3 = 0x33, - eRENDERDOC_Key_4 = 0x34, - eRENDERDOC_Key_5 = 0x35, - eRENDERDOC_Key_6 = 0x36, - eRENDERDOC_Key_7 = 0x37, - eRENDERDOC_Key_8 = 0x38, - eRENDERDOC_Key_9 = 0x39, +typedef enum { + // '0' - '9' matches ASCII values + eRENDERDOC_Key_0 = 0x30, + eRENDERDOC_Key_1 = 0x31, + eRENDERDOC_Key_2 = 0x32, + eRENDERDOC_Key_3 = 0x33, + eRENDERDOC_Key_4 = 0x34, + eRENDERDOC_Key_5 = 0x35, + eRENDERDOC_Key_6 = 0x36, + eRENDERDOC_Key_7 = 0x37, + eRENDERDOC_Key_8 = 0x38, + eRENDERDOC_Key_9 = 0x39, - // 'A' - 'Z' matches ASCII values - eRENDERDOC_Key_A = 0x41, - eRENDERDOC_Key_B = 0x42, - eRENDERDOC_Key_C = 0x43, - eRENDERDOC_Key_D = 0x44, - eRENDERDOC_Key_E = 0x45, - eRENDERDOC_Key_F = 0x46, - eRENDERDOC_Key_G = 0x47, - eRENDERDOC_Key_H = 0x48, - eRENDERDOC_Key_I = 0x49, - eRENDERDOC_Key_J = 0x4A, - eRENDERDOC_Key_K = 0x4B, - eRENDERDOC_Key_L = 0x4C, - eRENDERDOC_Key_M = 0x4D, - eRENDERDOC_Key_N = 0x4E, - eRENDERDOC_Key_O = 0x4F, - eRENDERDOC_Key_P = 0x50, - eRENDERDOC_Key_Q = 0x51, - eRENDERDOC_Key_R = 0x52, - eRENDERDOC_Key_S = 0x53, - eRENDERDOC_Key_T = 0x54, - eRENDERDOC_Key_U = 0x55, - eRENDERDOC_Key_V = 0x56, - eRENDERDOC_Key_W = 0x57, - eRENDERDOC_Key_X = 0x58, - eRENDERDOC_Key_Y = 0x59, - eRENDERDOC_Key_Z = 0x5A, + // 'A' - 'Z' matches ASCII values + eRENDERDOC_Key_A = 0x41, + eRENDERDOC_Key_B = 0x42, + eRENDERDOC_Key_C = 0x43, + eRENDERDOC_Key_D = 0x44, + eRENDERDOC_Key_E = 0x45, + eRENDERDOC_Key_F = 0x46, + eRENDERDOC_Key_G = 0x47, + eRENDERDOC_Key_H = 0x48, + eRENDERDOC_Key_I = 0x49, + eRENDERDOC_Key_J = 0x4A, + eRENDERDOC_Key_K = 0x4B, + eRENDERDOC_Key_L = 0x4C, + eRENDERDOC_Key_M = 0x4D, + eRENDERDOC_Key_N = 0x4E, + eRENDERDOC_Key_O = 0x4F, + eRENDERDOC_Key_P = 0x50, + eRENDERDOC_Key_Q = 0x51, + eRENDERDOC_Key_R = 0x52, + eRENDERDOC_Key_S = 0x53, + eRENDERDOC_Key_T = 0x54, + eRENDERDOC_Key_U = 0x55, + eRENDERDOC_Key_V = 0x56, + eRENDERDOC_Key_W = 0x57, + eRENDERDOC_Key_X = 0x58, + eRENDERDOC_Key_Y = 0x59, + eRENDERDOC_Key_Z = 0x5A, - // leave the rest of the ASCII range free - // in case we want to use it later - eRENDERDOC_Key_NonPrintable = 0x100, + // leave the rest of the ASCII range free + // in case we want to use it later + eRENDERDOC_Key_NonPrintable = 0x100, - eRENDERDOC_Key_Divide, - eRENDERDOC_Key_Multiply, - eRENDERDOC_Key_Subtract, - eRENDERDOC_Key_Plus, + eRENDERDOC_Key_Divide, + eRENDERDOC_Key_Multiply, + eRENDERDOC_Key_Subtract, + eRENDERDOC_Key_Plus, - eRENDERDOC_Key_F1, - eRENDERDOC_Key_F2, - eRENDERDOC_Key_F3, - eRENDERDOC_Key_F4, - eRENDERDOC_Key_F5, - eRENDERDOC_Key_F6, - eRENDERDOC_Key_F7, - eRENDERDOC_Key_F8, - eRENDERDOC_Key_F9, - eRENDERDOC_Key_F10, - eRENDERDOC_Key_F11, - eRENDERDOC_Key_F12, + eRENDERDOC_Key_F1, + eRENDERDOC_Key_F2, + eRENDERDOC_Key_F3, + eRENDERDOC_Key_F4, + eRENDERDOC_Key_F5, + eRENDERDOC_Key_F6, + eRENDERDOC_Key_F7, + eRENDERDOC_Key_F8, + eRENDERDOC_Key_F9, + eRENDERDOC_Key_F10, + eRENDERDOC_Key_F11, + eRENDERDOC_Key_F12, - eRENDERDOC_Key_Home, - eRENDERDOC_Key_End, - eRENDERDOC_Key_Insert, - eRENDERDOC_Key_Delete, - eRENDERDOC_Key_PageUp, - eRENDERDOC_Key_PageDn, + eRENDERDOC_Key_Home, + eRENDERDOC_Key_End, + eRENDERDOC_Key_Insert, + eRENDERDOC_Key_Delete, + eRENDERDOC_Key_PageUp, + eRENDERDOC_Key_PageDn, - eRENDERDOC_Key_Backspace, - eRENDERDOC_Key_Tab, - eRENDERDOC_Key_PrtScrn, - eRENDERDOC_Key_Pause, + eRENDERDOC_Key_Backspace, + eRENDERDOC_Key_Tab, + eRENDERDOC_Key_PrtScrn, + eRENDERDOC_Key_Pause, - eRENDERDOC_Key_Max, + eRENDERDOC_Key_Max, } RENDERDOC_InputButton; // Sets which key or keys can be used to toggle focus between multiple windows // // If keys is NULL or num is 0, toggle keys will be disabled -typedef void (RENDERDOC_CC *pRENDERDOC_SetFocusToggleKeys)(RENDERDOC_InputButton *keys, int num); +typedef void(RENDERDOC_CC *pRENDERDOC_SetFocusToggleKeys)(RENDERDOC_InputButton *keys, int num); // Sets which key or keys can be used to capture the next frame // // If keys is NULL or num is 0, captures keys will be disabled -typedef void (RENDERDOC_CC *pRENDERDOC_SetCaptureKeys)(RENDERDOC_InputButton *keys, int num); +typedef void(RENDERDOC_CC *pRENDERDOC_SetCaptureKeys)(RENDERDOC_InputButton *keys, int num); -typedef enum -{ - // This single bit controls whether the overlay is enabled or disabled globally - eRENDERDOC_Overlay_Enabled = 0x1, +typedef enum { + // This single bit controls whether the overlay is enabled or disabled globally + eRENDERDOC_Overlay_Enabled = 0x1, - // Show the average framerate over several seconds as well as min/max - eRENDERDOC_Overlay_FrameRate = 0x2, + // Show the average framerate over several seconds as well as min/max + eRENDERDOC_Overlay_FrameRate = 0x2, - // Show the current frame number - eRENDERDOC_Overlay_FrameNumber = 0x4, + // Show the current frame number + eRENDERDOC_Overlay_FrameNumber = 0x4, - // Show a list of recent captures, and how many captures have been made - eRENDERDOC_Overlay_CaptureList = 0x8, + // Show a list of recent captures, and how many captures have been made + eRENDERDOC_Overlay_CaptureList = 0x8, - // Default values for the overlay mask - eRENDERDOC_Overlay_Default = - (eRENDERDOC_Overlay_Enabled| - eRENDERDOC_Overlay_FrameRate| - eRENDERDOC_Overlay_FrameNumber| - eRENDERDOC_Overlay_CaptureList), + // Default values for the overlay mask + eRENDERDOC_Overlay_Default = (eRENDERDOC_Overlay_Enabled | eRENDERDOC_Overlay_FrameRate | + eRENDERDOC_Overlay_FrameNumber | eRENDERDOC_Overlay_CaptureList), - // Enable all bits - eRENDERDOC_Overlay_All = ~0U, + // Enable all bits + eRENDERDOC_Overlay_All = ~0U, - // Disable all bits - eRENDERDOC_Overlay_None = 0, + // Disable all bits + eRENDERDOC_Overlay_None = 0, } RENDERDOC_OverlayBits; // returns the overlay bits that have been set -typedef uint32_t (RENDERDOC_CC *pRENDERDOC_GetOverlayBits)(); +typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetOverlayBits)(); // sets the overlay bits with an and & or mask -typedef void (RENDERDOC_CC *pRENDERDOC_MaskOverlayBits)(uint32_t And, uint32_t Or); +typedef void(RENDERDOC_CC *pRENDERDOC_MaskOverlayBits)(uint32_t And, uint32_t Or); // this function will attempt to shut down RenderDoc. // @@ -324,14 +328,14 @@ typedef void (RENDERDOC_CC *pRENDERDOC_MaskOverlayBits)(uint32_t And, uint32_t O // the dll is loaded, before any API work happens. RenderDoc will remove its // injected hooks and shut down. Behaviour is undefined if this is called // after any API functions have been called. -typedef void (RENDERDOC_CC *pRENDERDOC_Shutdown)(); +typedef void(RENDERDOC_CC *pRENDERDOC_Shutdown)(); // This function will unload RenderDoc's crash handler. // // If you use your own crash handler and don't want RenderDoc's handler to // intercede, you can call this function to unload it and any unhandled // exceptions will pass to the next handler. -typedef void (RENDERDOC_CC *pRENDERDOC_UnloadCrashHandler)(); +typedef void(RENDERDOC_CC *pRENDERDOC_UnloadCrashHandler)(); // Sets the logfile path template // @@ -350,13 +354,13 @@ typedef void (RENDERDOC_CC *pRENDERDOC_UnloadCrashHandler)(); // // Capture #1 -> my_captures/example_frame123.rdc // Capture #2 -> my_captures/example_frame456.rdc -typedef void (RENDERDOC_CC *pRENDERDOC_SetLogFilePathTemplate)(const char *pathtemplate); +typedef void(RENDERDOC_CC *pRENDERDOC_SetLogFilePathTemplate)(const char *pathtemplate); // returns the current logfile template, see SetLogFileTemplate above, as a UTF-8 string -typedef const char* (RENDERDOC_CC *pRENDERDOC_GetLogFilePathTemplate)(); +typedef const char *(RENDERDOC_CC *pRENDERDOC_GetLogFilePathTemplate)(); // returns the number of captures that have been made -typedef uint32_t (RENDERDOC_CC *pRENDERDOC_GetNumCaptures)(); +typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetNumCaptures)(); // This function returns the details of a capture, by index. New captures are added // to the end of the list. @@ -372,13 +376,11 @@ typedef uint32_t (RENDERDOC_CC *pRENDERDOC_GetNumCaptures)(); // // Note: when captures are deleted in the UI they will remain in this list, so the // logfile path may not exist anymore. -typedef uint32_t (RENDERDOC_CC *pRENDERDOC_GetCapture)(uint32_t idx, char *logfile, uint32_t *pathlength, uint64_t *timestamp); - -// capture the next frame on whichever window and API is currently considered active -typedef void (RENDERDOC_CC *pRENDERDOC_TriggerCapture)(); +typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetCapture)(uint32_t idx, char *logfile, + uint32_t *pathlength, uint64_t *timestamp); // returns 1 if the RenderDoc UI is connected to this application, 0 otherwise -typedef uint32_t (RENDERDOC_CC *pRENDERDOC_IsRemoteAccessConnected)(); +typedef uint32_t(RENDERDOC_CC *pRENDERDOC_IsRemoteAccessConnected)(); // This function will launch the Replay UI associated with the RenderDoc library injected // into the running application. @@ -389,12 +391,13 @@ typedef uint32_t (RENDERDOC_CC *pRENDERDOC_IsRemoteAccessConnected)(); // if cmdline is NULL, the command line will be empty. // // returns the PID of the replay UI if successful, 0 if not successful. -typedef uint32_t (RENDERDOC_CC *pRENDERDOC_LaunchReplayUI)(uint32_t connectRemoteAccess, const char *cmdline); +typedef uint32_t(RENDERDOC_CC *pRENDERDOC_LaunchReplayUI)(uint32_t connectRemoteAccess, + const char *cmdline); // RenderDoc can return a higher version than requested if it's backwards compatible, // this function returns the actual version returned. If a parameter is NULL, it will be // ignored and the others will be filled out. -typedef void (RENDERDOC_CC *pRENDERDOC_GetAPIVersion)(int *major, int *minor, int *patch); +typedef void(RENDERDOC_CC *pRENDERDOC_GetAPIVersion)(int *major, int *minor, int *patch); ////////////////////////////////////////////////////////////////////////// // Capturing functions @@ -403,16 +406,23 @@ typedef void (RENDERDOC_CC *pRENDERDOC_GetAPIVersion)(int *major, int *minor, in // A device pointer is a pointer to the API's root handle. // // This would be an ID3D11Device, HGLRC/GLXContext, ID3D12Device, etc -typedef void* RENDERDOC_DevicePointer; +typedef void *RENDERDOC_DevicePointer; // A window handle is the OS's native window handle // // This would be an HWND, GLXDrawable, etc -typedef void* RENDERDOC_WindowHandle; +typedef void *RENDERDOC_WindowHandle; // This sets the RenderDoc in-app overlay in the API/window pair as 'active' and it will // respond to keypresses. Neither parameter can be NULL -typedef void (RENDERDOC_CC *pRENDERDOC_SetActiveWindow)(RENDERDOC_DevicePointer device, RENDERDOC_WindowHandle wndHandle); +typedef void(RENDERDOC_CC *pRENDERDOC_SetActiveWindow)(RENDERDOC_DevicePointer device, + RENDERDOC_WindowHandle wndHandle); + +// capture the next frame on whichever window and API is currently considered active +typedef void(RENDERDOC_CC *pRENDERDOC_TriggerCapture)(); + +// capture the next N frames on whichever window and API is currently considered active +typedef void(RENDERDOC_CC *pRENDERDOC_TriggerMultiFrameCapture)(uint32_t numFrames); // When choosing either a device pointer or a window handle to capture, you can pass NULL. // Passing NULL specifies a 'wildcard' match against anything. This allows you to specify @@ -432,24 +442,26 @@ typedef void (RENDERDOC_CC *pRENDERDOC_SetActiveWindow)(RENDERDOC_DevicePointer // // The results are undefined (including crashes) if two captures are started overlapping, // even on separate devices and/oror windows. -typedef void (RENDERDOC_CC *pRENDERDOC_StartFrameCapture)(RENDERDOC_DevicePointer device, RENDERDOC_WindowHandle wndHandle); +typedef void(RENDERDOC_CC *pRENDERDOC_StartFrameCapture)(RENDERDOC_DevicePointer device, + RENDERDOC_WindowHandle wndHandle); // Returns whether or not a frame capture is currently ongoing anywhere. // // This will return 1 if a capture is ongoing, and 0 if there is no capture running -typedef uint32_t (RENDERDOC_CC *pRENDERDOC_IsFrameCapturing)(); +typedef uint32_t(RENDERDOC_CC *pRENDERDOC_IsFrameCapturing)(); // Ends capturing immediately. // // This will return 1 if the capture succeeded, and 0 if there was an error capturing. -typedef uint32_t (RENDERDOC_CC *pRENDERDOC_EndFrameCapture)(RENDERDOC_DevicePointer device, RENDERDOC_WindowHandle wndHandle); +typedef uint32_t(RENDERDOC_CC *pRENDERDOC_EndFrameCapture)(RENDERDOC_DevicePointer device, + RENDERDOC_WindowHandle wndHandle); ////////////////////////////////////////////////////////////////////////////////////////////////// // RenderDoc API versions -// +// // RenderDoc uses semantic versioning (http://semver.org/). -// +// // MAJOR version is incremented when incompatible API changes happen. // MINOR version is incremented when functionality is added in a backwards-compatible manner. // PATCH version is incremented when backwards-compatible bug fixes happen. @@ -457,10 +469,11 @@ typedef uint32_t (RENDERDOC_CC *pRENDERDOC_EndFrameCapture)(RENDERDOC_DevicePoin // Note that this means the API returned can be higher than the one you might have requested. // e.g. if you are running against a newer RenderDoc that supports 1.0.1, it will be returned // instead of 1.0.0. You can check this with the GetAPIVersion entry point -typedef enum -{ - eRENDERDOC_API_Version_1_0_0 = 10000, // RENDERDOC_API_1_0_0 = 1 00 00 - eRENDERDOC_API_Version_1_0_1 = 10001, // RENDERDOC_API_1_0_1 = 1 00 01 +typedef enum { + eRENDERDOC_API_Version_1_0_0 = 10000, // RENDERDOC_API_1_0_0 = 1 00 00 + eRENDERDOC_API_Version_1_0_1 = 10001, // RENDERDOC_API_1_0_1 = 1 00 01 + eRENDERDOC_API_Version_1_0_2 = 10002, // RENDERDOC_API_1_0_2 = 1 00 02 + eRENDERDOC_API_Version_1_1_0 = 10100, // RENDERDOC_API_1_1_0 = 1 01 00 } RENDERDOC_Version; // API version changelog: @@ -468,52 +481,59 @@ typedef enum // 1.0.0 - initial release // 1.0.1 - Bugfix: IsFrameCapturing() was returning false for captures that were triggered // by keypress or TriggerCapture, instead of Start/EndFrameCapture. +// 1.0.2 - Refactor: Renamed eRENDERDOC_Option_DebugDeviceMode to eRENDERDOC_Option_APIValidation +// 1.1.0 - Add feature: TriggerMultiFrameCapture(). Backwards compatible with 1.0.x since the new +// function pointer is added to the end of the struct, the original layout is identical -// eRENDERDOC_API_Version_1_0_1 +// eRENDERDOC_API_Version_1_1_0 typedef struct { - pRENDERDOC_GetAPIVersion GetAPIVersion; + pRENDERDOC_GetAPIVersion GetAPIVersion; - pRENDERDOC_SetCaptureOptionU32 SetCaptureOptionU32; - pRENDERDOC_SetCaptureOptionF32 SetCaptureOptionF32; + pRENDERDOC_SetCaptureOptionU32 SetCaptureOptionU32; + pRENDERDOC_SetCaptureOptionF32 SetCaptureOptionF32; - pRENDERDOC_GetCaptureOptionU32 GetCaptureOptionU32; - pRENDERDOC_GetCaptureOptionF32 GetCaptureOptionF32; + pRENDERDOC_GetCaptureOptionU32 GetCaptureOptionU32; + pRENDERDOC_GetCaptureOptionF32 GetCaptureOptionF32; - pRENDERDOC_SetFocusToggleKeys SetFocusToggleKeys; - pRENDERDOC_SetCaptureKeys SetCaptureKeys; + pRENDERDOC_SetFocusToggleKeys SetFocusToggleKeys; + pRENDERDOC_SetCaptureKeys SetCaptureKeys; - pRENDERDOC_GetOverlayBits GetOverlayBits; - pRENDERDOC_MaskOverlayBits MaskOverlayBits; + pRENDERDOC_GetOverlayBits GetOverlayBits; + pRENDERDOC_MaskOverlayBits MaskOverlayBits; - pRENDERDOC_Shutdown Shutdown; - pRENDERDOC_UnloadCrashHandler UnloadCrashHandler; + pRENDERDOC_Shutdown Shutdown; + pRENDERDOC_UnloadCrashHandler UnloadCrashHandler; - pRENDERDOC_SetLogFilePathTemplate SetLogFilePathTemplate; - pRENDERDOC_GetLogFilePathTemplate GetLogFilePathTemplate; + pRENDERDOC_SetLogFilePathTemplate SetLogFilePathTemplate; + pRENDERDOC_GetLogFilePathTemplate GetLogFilePathTemplate; - pRENDERDOC_GetNumCaptures GetNumCaptures; - pRENDERDOC_GetCapture GetCapture; + pRENDERDOC_GetNumCaptures GetNumCaptures; + pRENDERDOC_GetCapture GetCapture; - pRENDERDOC_TriggerCapture TriggerCapture; + pRENDERDOC_TriggerCapture TriggerCapture; - pRENDERDOC_IsRemoteAccessConnected IsRemoteAccessConnected; - pRENDERDOC_LaunchReplayUI LaunchReplayUI; + pRENDERDOC_IsRemoteAccessConnected IsRemoteAccessConnected; + pRENDERDOC_LaunchReplayUI LaunchReplayUI; - pRENDERDOC_SetActiveWindow SetActiveWindow; + pRENDERDOC_SetActiveWindow SetActiveWindow; - pRENDERDOC_StartFrameCapture StartFrameCapture; - pRENDERDOC_IsFrameCapturing IsFrameCapturing; - pRENDERDOC_EndFrameCapture EndFrameCapture; -} RENDERDOC_API_1_0_1; + pRENDERDOC_StartFrameCapture StartFrameCapture; + pRENDERDOC_IsFrameCapturing IsFrameCapturing; + pRENDERDOC_EndFrameCapture EndFrameCapture; -typedef RENDERDOC_API_1_0_1 RENDERDOC_API_1_0_0; + pRENDERDOC_TriggerMultiFrameCapture TriggerMultiFrameCapture; +} RENDERDOC_API_1_1_0; + +typedef RENDERDOC_API_1_1_0 RENDERDOC_API_1_0_0; +typedef RENDERDOC_API_1_1_0 RENDERDOC_API_1_0_1; +typedef RENDERDOC_API_1_1_0 RENDERDOC_API_1_0_2; ////////////////////////////////////////////////////////////////////////////////////////////////// // RenderDoc API entry point -// +// // This entry point can be obtained via GetProcAddress/dlsym if RenderDoc is available. -// +// // The name is the same as the typedef - "RENDERDOC_GetAPI" // // This function is not thread safe, and should not be called on multiple threads at once. @@ -531,8 +551,8 @@ typedef RENDERDOC_API_1_0_1 RENDERDOC_API_1_0_0; // 1 - if the outAPIPointers has been filled with a pointer to the API struct requested // 0 - if the requested version is not supported or the arguments are invalid. // -typedef int (RENDERDOC_CC *pRENDERDOC_GetAPI)(RENDERDOC_Version version, void **outAPIPointers); +typedef int(RENDERDOC_CC *pRENDERDOC_GetAPI)(RENDERDOC_Version version, void **outAPIPointers); #ifdef __cplusplus -} // extern "C" +} // extern "C" #endif diff --git a/3rdparty/bgfx/3rdparty/stb/stb_image.c b/3rdparty/bgfx/3rdparty/stb/stb_image.c index 16e04103441..ad26b74f55d 100644 --- a/3rdparty/bgfx/3rdparty/stb/stb_image.c +++ b/3rdparty/bgfx/3rdparty/stb/stb_image.c @@ -1375,18 +1375,18 @@ static unsigned char *stbi__convert_format(unsigned char *data, int img_n, int r // convert source image with img_n components to one with req_comp components; // avoid switch per pixel, so use switch per scanline and massive macros switch (COMBO(img_n, req_comp)) { - CASE(1,2) { dest[0]=src[0]; dest[1]=255; } break; - CASE(1,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; - CASE(1,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=255; } break; - CASE(2,1) { dest[0]=src[0]; } break; - CASE(2,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; - CASE(2,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=src[1]; } break; - CASE(3,4) { dest[0]=src[0]; dest[1]=src[1]; dest[2]=src[2]; dest[3]=255; } break; - CASE(3,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); } break; - CASE(3,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = 255; } break; - CASE(4,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); } break; - CASE(4,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = src[3]; } break; - CASE(4,3) { dest[0]=src[0]; dest[1]=src[1]; dest[2]=src[2]; } break; + CASE(1,2) dest[0]=src[0], dest[1]=255; break; + CASE(1,3) dest[0]=dest[1]=dest[2]=src[0]; break; + CASE(1,4) dest[0]=dest[1]=dest[2]=src[0], dest[3]=255; break; + CASE(2,1) dest[0]=src[0]; break; + CASE(2,3) dest[0]=dest[1]=dest[2]=src[0]; break; + CASE(2,4) dest[0]=dest[1]=dest[2]=src[0], dest[3]=src[1]; break; + CASE(3,4) dest[0]=src[0],dest[1]=src[1],dest[2]=src[2],dest[3]=255; break; + CASE(3,1) dest[0]=stbi__compute_y(src[0],src[1],src[2]); break; + CASE(3,2) dest[0]=stbi__compute_y(src[0],src[1],src[2]), dest[1] = 255; break; + CASE(4,1) dest[0]=stbi__compute_y(src[0],src[1],src[2]); break; + CASE(4,2) dest[0]=stbi__compute_y(src[0],src[1],src[2]), dest[1] = src[3]; break; + CASE(4,3) dest[0]=src[0],dest[1]=src[1],dest[2]=src[2]; break; default: STBI_ASSERT(0); } #undef CASE @@ -4101,12 +4101,12 @@ static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 r switch (filter) { // "none" filter turns into a memcpy here; make that explicit. case STBI__F_none: memcpy(cur, raw, nk); break; - CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k-filter_bytes]); } break; - CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; - CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-filter_bytes])>>1)); } break; - CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],prior[k],prior[k-filter_bytes])); } break; - CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k-filter_bytes] >> 1)); } break; - CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],0,0)); } break; + CASE(STBI__F_sub) cur[k] = STBI__BYTECAST(raw[k] + cur[k-filter_bytes]); break; + CASE(STBI__F_up) cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; + CASE(STBI__F_avg) cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-filter_bytes])>>1)); break; + CASE(STBI__F_paeth) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],prior[k],prior[k-filter_bytes])); break; + CASE(STBI__F_avg_first) cur[k] = STBI__BYTECAST(raw[k] + (cur[k-filter_bytes] >> 1)); break; + CASE(STBI__F_paeth_first) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],0,0)); break; } #undef CASE raw += nk; @@ -4117,13 +4117,13 @@ static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 r for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \ for (k=0; k < filter_bytes; ++k) switch (filter) { - CASE(STBI__F_none) { cur[k] = raw[k]; } break; - CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k- output_bytes]); } break; - CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; - CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k- output_bytes])>>1)); } break; - CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],prior[k],prior[k- output_bytes])); } break; - CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k- output_bytes] >> 1)); } break; - CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],0,0)); } break; + CASE(STBI__F_none) cur[k] = raw[k]; break; + CASE(STBI__F_sub) cur[k] = STBI__BYTECAST(raw[k] + cur[k- output_bytes]); break; + CASE(STBI__F_up) cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; + CASE(STBI__F_avg) cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k- output_bytes])>>1)); break; + CASE(STBI__F_paeth) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],prior[k],prior[k- output_bytes])); break; + CASE(STBI__F_avg_first) cur[k] = STBI__BYTECAST(raw[k] + (cur[k- output_bytes] >> 1)); break; + CASE(STBI__F_paeth_first) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],0,0)); break; } #undef CASE diff --git a/3rdparty/bgfx/README.md b/3rdparty/bgfx/README.md index 5e45925d013..9f5c27d2059 100644 --- a/3rdparty/bgfx/README.md +++ b/3rdparty/bgfx/README.md @@ -139,7 +139,6 @@ https://github.com/mamedev/mame MAME - Multiple Arcade Machine Emulator https://blackshift.itch.io/blackshift - Blackshift is a grid-based, space-themed action puzzle game which isn't afraid of complexity — think Chip's Challenge on crack. -https://www.youtube.com/watch?v=PUl8612Y-ds Blackshift Trailer, May 2016 + +http://www.dogbytegames.com/dead_venture.html - Dead Venture is a new Drive 'N +Gun game where you help a handful of survivals reach the safe haven: a military +base on a far island. + [License (BSD 2-clause)](https://bkaradzic.github.io/bgfx/license.html) diff --git a/3rdparty/bgfx/examples/14-shadowvolumes/shadowvolumes.cpp b/3rdparty/bgfx/examples/14-shadowvolumes/shadowvolumes.cpp index 8b08dec93cb..3ebe122d776 100644 --- a/3rdparty/bgfx/examples/14-shadowvolumes/shadowvolumes.cpp +++ b/3rdparty/bgfx/examples/14-shadowvolumes/shadowvolumes.cpp @@ -23,7 +23,7 @@ using namespace std::tr1; #include #include #include -#include +#include #include #include #include "entry/entry.h" @@ -1513,9 +1513,9 @@ void shadowVolumeCreate(ShadowVolume& _shadowVolume using namespace bx; - const float4_t lx = float4_splat(_light[0]); - const float4_t ly = float4_splat(_light[1]); - const float4_t lz = float4_splat(_light[2]); + const simd128_t lx = simd_splat(_light[0]); + const simd128_t ly = simd_splat(_light[1]); + const simd128_t lz = simd_splat(_light[2]); for (; ii < numEdgesRounded; ii+=2) { @@ -1524,47 +1524,47 @@ void shadowVolumeCreate(ShadowVolume& _shadowVolume const Plane* edgePlane0 = &edgePlanes[ii*2]; const Plane* edgePlane1 = &edgePlanes[ii*2 + 2]; - const float4_t reverse = - float4_ild(edge0.m_faceReverseOrder[0] + const simd128_t reverse = + simd_ild(edge0.m_faceReverseOrder[0] , edge1.m_faceReverseOrder[0] , edge0.m_faceReverseOrder[1] , edge1.m_faceReverseOrder[1] ); - const float4_t p00 = float4_ld(edgePlane0[0].m_plane); - const float4_t p10 = float4_ld(edgePlane1[0].m_plane); - const float4_t p01 = float4_ld(edgePlane0[1].m_plane); - const float4_t p11 = float4_ld(edgePlane1[1].m_plane); + const simd128_t p00 = simd_ld(edgePlane0[0].m_plane); + const simd128_t p10 = simd_ld(edgePlane1[0].m_plane); + const simd128_t p01 = simd_ld(edgePlane0[1].m_plane); + const simd128_t p11 = simd_ld(edgePlane1[1].m_plane); - const float4_t xxyy0 = float4_shuf_xAyB(p00, p01); - const float4_t zzww0 = float4_shuf_zCwD(p00, p01); - const float4_t xxyy1 = float4_shuf_xAyB(p10, p11); - const float4_t zzww1 = float4_shuf_zCwD(p10, p11); + const simd128_t xxyy0 = simd_shuf_xAyB(p00, p01); + const simd128_t zzww0 = simd_shuf_zCwD(p00, p01); + const simd128_t xxyy1 = simd_shuf_xAyB(p10, p11); + const simd128_t zzww1 = simd_shuf_zCwD(p10, p11); - const float4_t vX = float4_shuf_xAyB(xxyy0, xxyy1); - const float4_t vY = float4_shuf_zCwD(xxyy0, xxyy1); - const float4_t vZ = float4_shuf_xAyB(zzww0, zzww1); - const float4_t vW = float4_shuf_zCwD(zzww0, zzww1); + const simd128_t vX = simd_shuf_xAyB(xxyy0, xxyy1); + const simd128_t vY = simd_shuf_zCwD(xxyy0, xxyy1); + const simd128_t vZ = simd_shuf_xAyB(zzww0, zzww1); + const simd128_t vW = simd_shuf_zCwD(zzww0, zzww1); - const float4_t r0 = float4_mul(vX, lx); - const float4_t r1 = float4_mul(vY, ly); - const float4_t r2 = float4_mul(vZ, lz); + const simd128_t r0 = simd_mul(vX, lx); + const simd128_t r1 = simd_mul(vY, ly); + const simd128_t r2 = simd_mul(vZ, lz); - const float4_t dot = float4_add(r0, float4_add(r1, r2) ); - const float4_t f = float4_add(dot, vW); + const simd128_t dot = simd_add(r0, simd_add(r1, r2) ); + const simd128_t f = simd_add(dot, vW); - const float4_t zero = float4_zero(); - const float4_t mask = float4_cmpgt(f, zero); - const float4_t onef = float4_splat(1.0f); - const float4_t tmp0 = float4_and(mask, onef); - const float4_t tmp1 = float4_ftoi(tmp0); - const float4_t tmp2 = float4_xor(tmp1, reverse); - const float4_t tmp3 = float4_sll(tmp2, 1); - const float4_t onei = float4_isplat(1); - const float4_t tmp4 = float4_isub(tmp3, onei); + const simd128_t zero = simd_zero(); + const simd128_t mask = simd_cmpgt(f, zero); + const simd128_t onef = simd_splat(1.0f); + const simd128_t tmp0 = simd_and(mask, onef); + const simd128_t tmp1 = simd_ftoi(tmp0); + const simd128_t tmp2 = simd_xor(tmp1, reverse); + const simd128_t tmp3 = simd_sll(tmp2, 1); + const simd128_t onei = simd_isplat(1); + const simd128_t tmp4 = simd_isub(tmp3, onei); BX_ALIGN_DECL_16(int32_t res[4]); - float4_st(&res, tmp4); + simd_st(&res, tmp4); for (uint16_t jj = 0; jj < 2; ++jj) { diff --git a/3rdparty/bgfx/examples/15-shadowmaps-simple/fs_sms_shadow.sc b/3rdparty/bgfx/examples/15-shadowmaps-simple/fs_sms_shadow.sc index 3cdf1973f2e..cfaf3412c17 100644 --- a/3rdparty/bgfx/examples/15-shadowmaps-simple/fs_sms_shadow.sc +++ b/3rdparty/bgfx/examples/15-shadowmaps-simple/fs_sms_shadow.sc @@ -7,5 +7,4 @@ void main() { - gl_FragColor = vec4_splat(0.0); } diff --git a/3rdparty/bgfx/examples/18-ibl/fs_ibl_mesh.sc b/3rdparty/bgfx/examples/18-ibl/fs_ibl_mesh.sc index 28aa831331f..836400b9ed0 100644 --- a/3rdparty/bgfx/examples/18-ibl/fs_ibl_mesh.sc +++ b/3rdparty/bgfx/examples/18-ibl/fs_ibl_mesh.sc @@ -11,9 +11,9 @@ $input v_view, v_normal SAMPLERCUBE(s_texCube, 0); SAMPLERCUBE(s_texCubeIrr, 1); -vec3 calcFresnel(vec3 _cspec, float _dot) +vec3 calcFresnel(vec3 _cspec, float _dot, float _strength) { - return _cspec + (1.0 - _cspec)*pow(1.0 - _dot, 5.0); + return _cspec + (1.0 - _cspec)*pow(1.0 - _dot, 5.0) * _strength; } vec3 calcLambert(vec3 _cdiff, float _ndotl) @@ -50,35 +50,28 @@ void main() float hdotv = clamp(dot(hh, vv), 0.0, 1.0); // Material params. - vec3 albedo = u_rgbDiff.xyz; - float reflectivity = u_reflectivity; - float gloss = u_glossiness; + vec3 inAlbedo = u_rgbDiff.xyz; + float inReflectivity = u_reflectivity; + float inGloss = u_glossiness; // Reflection. vec3 refl; if (0.0 == u_metalOrSpec) // Metalness workflow. { - refl = mix(vec3_splat(0.04), albedo, reflectivity); + refl = mix(vec3_splat(0.04), inAlbedo, inReflectivity); } else // Specular workflow. { - refl = u_rgbSpec.xyz * vec3_splat(reflectivity); + refl = u_rgbSpec.xyz * vec3_splat(inReflectivity); } - vec3 dirF0 = calcFresnel(refl, hdotv); - vec3 envF0 = calcFresnel(refl, ndotv); + vec3 albedo = inAlbedo * (1.0 - inReflectivity); + vec3 dirFresnel = calcFresnel(refl, hdotv, inGloss); + vec3 envFresnel = calcFresnel(refl, ndotv, inGloss); - // Direct lighting. - vec3 dirSpec = dirF0; - vec3 dirDiff = albedo * 1.0-dirF0; - - vec3 lambert = u_doDiffuse * calcLambert(dirDiff, ndotl); - vec3 blinn = u_doSpecular * calcBlinn(dirSpec, ndoth, ndotl, specPwr(gloss)); + vec3 lambert = u_doDiffuse * calcLambert(albedo * (1.0 - dirFresnel), ndotl); + vec3 blinn = u_doSpecular * calcBlinn(dirFresnel, ndoth, ndotl, specPwr(inGloss)); vec3 direct = (lambert + blinn)*clight; - // Indirect lighting. - vec3 envSpec = envF0; - vec3 envDiff = albedo * 1.0-envF0; - // Note: Environment textures are filtered with cmft: https://github.com/dariomanesku/cmft // Params used: // --excludeBase true //!< First level mip is not filtered. @@ -86,7 +79,7 @@ void main() // --glossScale 10 //!< Spec power scale. See: specPwr(). // --glossBias 2 //!< Spec power bias. See: specPwr(). // --edgeFixup warp //!< This must be used on DirectX9. When fileted with 'warp', fixCubeLookup() should be used. - float mip = 1.0 + 5.0*(1.0 - gloss); // Use mip levels [1..6] for radiance. + float mip = 1.0 + 5.0*(1.0 - inGloss); // Use mip levels [1..6] for radiance. mat4 mtx; mtx[0] = u_mtx0; @@ -98,9 +91,11 @@ void main() vec3 cubeN = normalize(instMul(mtx, vec4(nn, 0.0)).xyz); cubeR = fixCubeLookup(cubeR, mip, 256.0); - vec3 radiance = u_doDiffuseIbl * envSpec * toLinear(textureCubeLod(s_texCube, cubeR, mip).xyz); - vec3 irradiance = u_doSpecularIbl * envDiff * toLinear(textureCube(s_texCubeIrr, cubeN).xyz); - vec3 indirect = radiance + irradiance; + vec3 radiance = toLinear(textureCubeLod(s_texCube, cubeR, mip).xyz); + vec3 irradiance = toLinear(textureCube(s_texCubeIrr, cubeN).xyz); + vec3 envDiffuse = albedo * irradiance * u_doDiffuseIbl; + vec3 envSpecular = envFresnel * radiance * u_doSpecularIbl; + vec3 indirect = envDiffuse + envSpecular; // Color. vec3 color = direct + indirect; diff --git a/3rdparty/bgfx/examples/18-ibl/ibl.cpp b/3rdparty/bgfx/examples/18-ibl/ibl.cpp index c21b729ae46..06f280f1c64 100644 --- a/3rdparty/bgfx/examples/18-ibl/ibl.cpp +++ b/3rdparty/bgfx/examples/18-ibl/ibl.cpp @@ -731,7 +731,7 @@ int _main_(int _argc, char** _argv) camera.envViewMtx(mtxEnvView); float mtxEnvRot[16]; bx::mtxRotateY(mtxEnvRot, settings.m_envRotCurr); - bx::mtxMul(uniforms.m_mtx, mtxEnvView, mtxEnvRot); + bx::mtxMul(uniforms.m_mtx, mtxEnvView, mtxEnvRot); // Used for Skybox. // Submit view 0. bgfx::setTexture(0, s_texCube, lightProbes[currentLightProbe].m_tex); @@ -742,6 +742,7 @@ int _main_(int _argc, char** _argv) bgfx::submit(0, programSky); // Submit view 1. + memcpy(uniforms.m_mtx, mtxEnvRot, 16*sizeof(float)); // Used for IBL. if (0 == settings.m_meshSelection) { // Submit bunny. @@ -749,6 +750,7 @@ int _main_(int _argc, char** _argv) bx::mtxSRT(mtx, 1.0f, 1.0f, 1.0f, 0.0f, bx::pi, 0.0f, 0.0f, -0.80f, 0.0f); bgfx::setTexture(0, s_texCube, lightProbes[currentLightProbe].m_tex); bgfx::setTexture(1, s_texCubeIrr, lightProbes[currentLightProbe].m_texIrr); + uniforms.submit(); meshSubmit(meshBunny, 1, programMesh, mtx); } else diff --git a/3rdparty/bgfx/examples/18-ibl/vs_ibl_skybox.sc b/3rdparty/bgfx/examples/18-ibl/vs_ibl_skybox.sc index b83fdd19e25..f3a15e0c73f 100644 --- a/3rdparty/bgfx/examples/18-ibl/vs_ibl_skybox.sc +++ b/3rdparty/bgfx/examples/18-ibl/vs_ibl_skybox.sc @@ -15,9 +15,9 @@ void main() { gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0) ); - float fov = 45.0; + float fov = radians(45.0); float height = tan(fov*0.5); - float aspect = height*(4.0/3.0); + float aspect = height*(u_viewRect.z / u_viewRect.w); vec2 tex = (2.0*a_texcoord0-1.0) * vec2(aspect, height); mat4 mtx; diff --git a/3rdparty/bgfx/examples/19-oit/oit.cpp b/3rdparty/bgfx/examples/19-oit/oit.cpp index b9bbd041934..78c600331dd 100644 --- a/3rdparty/bgfx/examples/19-oit/oit.cpp +++ b/3rdparty/bgfx/examples/19-oit/oit.cpp @@ -410,6 +410,14 @@ class ExampleOIT : public entry::AppI | BGFX_STATE_MSAA ; + const uint64_t stateNoDepth = 0 + | BGFX_STATE_CULL_CW + | BGFX_STATE_RGB_WRITE + | BGFX_STATE_ALPHA_WRITE + | BGFX_STATE_DEPTH_TEST_ALWAYS + | BGFX_STATE_MSAA + ; + bgfx::ProgramHandle program = BGFX_INVALID_HANDLE; switch (m_mode) { @@ -428,7 +436,7 @@ class ExampleOIT : public entry::AppI program = m_wbSeparatePass; // Set render states. - bgfx::setState(state + bgfx::setState(stateNoDepth | BGFX_STATE_BLEND_FUNC_SEPARATE(BGFX_STATE_BLEND_ONE, BGFX_STATE_BLEND_ONE, BGFX_STATE_BLEND_ZERO, BGFX_STATE_BLEND_INV_SRC_ALPHA) ); break; @@ -438,7 +446,7 @@ class ExampleOIT : public entry::AppI program = m_wbPass; // Set render states. - bgfx::setState(state + bgfx::setState(stateNoDepth | BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_ONE, BGFX_STATE_BLEND_ONE) | BGFX_STATE_BLEND_INDEPENDENT , 0 diff --git a/3rdparty/bgfx/examples/21-deferred/fs_deferred_light.sc b/3rdparty/bgfx/examples/21-deferred/fs_deferred_light.sc index 81f9ad25984..42571157767 100644 --- a/3rdparty/bgfx/examples/21-deferred/fs_deferred_light.sc +++ b/3rdparty/bgfx/examples/21-deferred/fs_deferred_light.sc @@ -56,11 +56,11 @@ vec3 calcLight(int _idx, vec3 _wpos, vec3 _normal, vec3 _view) float toClipSpaceDepth(float _depthTextureZ) { -#if BGFX_SHADER_LANGUAGE_HLSL +#if BGFX_SHADER_LANGUAGE_HLSL || BGFX_SHADER_LANGUAGE_METAL return _depthTextureZ; #else return _depthTextureZ * 2.0 - 1.0; -#endif // BGFX_SHADER_LANGUAGE_HLSL +#endif // BGFX_SHADER_LANGUAGE_HLSL || BGFX_SHADER_LANGUAGE_METAL } vec3 clipToWorld(mat4 _invViewProj, vec3 _clipPos) @@ -76,9 +76,9 @@ void main() float depth = toClipSpaceDepth(deviceDepth); vec3 clip = vec3(v_texcoord0 * 2.0 - 1.0, depth); -#if BGFX_SHADER_LANGUAGE_HLSL +#if BGFX_SHADER_LANGUAGE_HLSL || BGFX_SHADER_LANGUAGE_METAL clip.y = -clip.y; -#endif // BGFX_SHADER_LANGUAGE_HLSL +#endif // BGFX_SHADER_LANGUAGE_HLSL || BGFX_SHADER_LANGUAGE_METAL vec3 wpos = clipToWorld(u_mtx, clip); vec3 view = mul(u_view, vec4(wpos, 0.0) ).xyz; diff --git a/3rdparty/bgfx/examples/29-debugdraw/debugdraw.cpp b/3rdparty/bgfx/examples/29-debugdraw/debugdraw.cpp index 4efcd80b882..a1ffa395bed 100644 --- a/3rdparty/bgfx/examples/29-debugdraw/debugdraw.cpp +++ b/3rdparty/bgfx/examples/29-debugdraw/debugdraw.cpp @@ -152,12 +152,12 @@ class DebugDrawApp : public entry::AppI ddDraw(sphere); ddSetWireframe(false); - ddSetColor(0xf0ffc0ff); + ddSetColor(0xc0ffc0ff); sphere.m_center[0] = -2.0f; ddSetLod(2); ddDraw(sphere); - ddSetColor(0xc0f0ffff); + ddSetColor(0xa0f0ffff); sphere.m_center[0] = -4.0f; ddSetLod(1); ddDraw(sphere); @@ -198,6 +198,12 @@ class DebugDrawApp : public entry::AppI float to[3] = { -11.0f, 4.0f, 0.0f }; ddDrawCylinder(from, to, 0.5f ); } + + { + float from[3] = { 0.0f, 7.0f, 0.0f }; + float to[3] = { -6.0f, 7.0f, 0.0f }; + ddDrawCylinder(from, to, 0.5f, true); + } ddPop(); ddDrawOrb(-11.0f, 0.0f, 0.0f, 1.0f); diff --git a/3rdparty/bgfx/examples/29-debugdraw/screenshot.png b/3rdparty/bgfx/examples/29-debugdraw/screenshot.png new file mode 100644 index 00000000000..f00864eda50 Binary files /dev/null and b/3rdparty/bgfx/examples/29-debugdraw/screenshot.png differ diff --git a/3rdparty/bgfx/examples/30-picking/fs_picking_id.sc b/3rdparty/bgfx/examples/30-picking/fs_picking_id.sc new file mode 100644 index 00000000000..899371379db --- /dev/null +++ b/3rdparty/bgfx/examples/30-picking/fs_picking_id.sc @@ -0,0 +1,16 @@ +$input v_pos, v_view, v_normal, v_color0 + +/* + * Copyright 2011-2016 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include "../common/common.sh" + +uniform vec4 u_id; + +void main() +{ + gl_FragColor.xyz = u_id.xyz; // This is dumb, should use u8 texture + gl_FragColor.w = 1.0; +} diff --git a/3rdparty/bgfx/examples/30-picking/fs_picking_shaded.sc b/3rdparty/bgfx/examples/30-picking/fs_picking_shaded.sc new file mode 100644 index 00000000000..668b8014251 --- /dev/null +++ b/3rdparty/bgfx/examples/30-picking/fs_picking_shaded.sc @@ -0,0 +1,44 @@ +$input v_pos, v_view, v_normal, v_color0 + +/* + * Copyright 2011-2016 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include "../common/common.sh" + +vec2 blinn(vec3 _lightDir, vec3 _normal, vec3 _viewDir) +{ + float ndotl = dot(_normal, _lightDir); + vec3 reflected = _lightDir - 2.0*ndotl*_normal; // reflect(_lightDir, _normal); + float rdotv = dot(reflected, _viewDir); + return vec2(ndotl, rdotv); +} + +float fresnel(float _ndotl, float _bias, float _pow) +{ + float facing = (1.0 - _ndotl); + return max(_bias + (1.0 - _bias) * pow(facing, _pow), 0.0); +} + +vec4 lit(float _ndotl, float _rdotv, float _m) +{ + float diff = max(0.0, _ndotl); + float spec = step(0.0, _ndotl) * max(0.0, _rdotv * _m); + return vec4(1.0, diff, spec, 1.0); +} + +void main() +{ + vec3 lightDir = vec3(0.0, 0.0, -1.0); + vec3 normal = normalize(v_normal); + vec3 view = normalize(v_view); + vec2 bln = blinn(lightDir, normal, view); + vec4 lc = lit(bln.x, bln.y, 1.0); + float fres = fresnel(bln.x, 0.2, 5.0); + + vec3 color = v_color0.xyz; + + gl_FragColor.xyz = pow(vec3(0.07, 0.06, 0.08) + color*lc.y + fres*pow(lc.z, 128.0), vec3_splat(1.0/2.2) ); + gl_FragColor.w = 1.0; +} diff --git a/3rdparty/bgfx/examples/30-picking/makefile b/3rdparty/bgfx/examples/30-picking/makefile new file mode 100644 index 00000000000..e6278cb66dc --- /dev/null +++ b/3rdparty/bgfx/examples/30-picking/makefile @@ -0,0 +1,18 @@ +# +# Copyright 2011-2016 Branimir Karadzic. All rights reserved. +# License: http://www.opensource.org/licenses/BSD-2-Clause +# + +BGFX_DIR=../.. +RUNTIME_DIR=$(BGFX_DIR)/examples/runtime +BUILD_DIR=../../.build + +include $(BGFX_DIR)/scripts/shader.mk + +rebuild: + @make -s --no-print-directory TARGET=0 clean all + @make -s --no-print-directory TARGET=1 clean all + @make -s --no-print-directory TARGET=2 clean all + @make -s --no-print-directory TARGET=3 clean all + @make -s --no-print-directory TARGET=4 clean all + @make -s --no-print-directory TARGET=5 clean all diff --git a/3rdparty/bgfx/examples/30-picking/picking.cpp b/3rdparty/bgfx/examples/30-picking/picking.cpp new file mode 100644 index 00000000000..b6419a884bc --- /dev/null +++ b/3rdparty/bgfx/examples/30-picking/picking.cpp @@ -0,0 +1,423 @@ +/* + * Copyright 2016 Joseph Cherlin. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include "common.h" +#include "bgfx_utils.h" +#include "imgui/imgui.h" +#include +#include + +#define RENDER_PASS_SHADING 0 // Default forward rendered geo with simple shading +#define RENDER_PASS_ID 1 // ID buffer for picking +#define RENDER_PASS_BLIT 2 // Blit GPU render target to CPU texture + +#define ID_DIM 8 // Size of the ID buffer + +class ExamplePicking : public entry::AppI +{ + 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(args.m_type, args.m_pciId); + + bgfx::reset(m_width, m_height, m_reset); + + // Enable debug text. + bgfx::setDebug(m_debug); + + // Set up screen clears + bgfx::setViewClear(RENDER_PASS_SHADING + , BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH + , 0x303030ff + , 1.0f + , 0 + ); + + // ID buffer clears to black, which represnts clicking on nothing (background) + bgfx::setViewClear(RENDER_PASS_ID + , BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH + , 0x000000ff + , 1.0f + , 0 + ); + + // Create uniforms + u_tint = bgfx::createUniform("u_tint", bgfx::UniformType::Vec4); // Tint for when you click on items + u_id = bgfx::createUniform("u_id", bgfx::UniformType::Vec4); // ID for drawing into ID buffer + + // Create program from shaders. + m_shadingProgram = loadProgram("vs_picking_shaded", "fs_picking_shaded"); // Blinn shading + m_idProgram = loadProgram("vs_picking_shaded", "fs_picking_id"); // Shader for drawing into ID buffer + + static const char* meshPaths[] = + { + "meshes/orb.bin", + "meshes/column.bin", + "meshes/bunny.bin", + "meshes/cube.bin", + "meshes/tree.bin", + "meshes/hollowcube.bin", + }; + + static const float meshScale[] = + { + 0.5f, + 0.05f, + 0.5f, + 0.25f, + 0.05f, + 0.05f, + }; + + m_highlighted = UINT32_MAX; + m_reading = 0; + m_currFrame = UINT32_MAX; + m_fov = 3.0f; + m_cameraSpin = false; + + bx::RngMwc mwc; // Random number generator + for (uint32_t ii = 0; ii < 12; ++ii) + { + m_meshes[ii] = meshLoad(meshPaths[ii % BX_COUNTOF(meshPaths)]); + m_meshScale[ii] = meshScale[ii % BX_COUNTOF(meshPaths)]; + // For the sake of this example, we'll give each mesh a random color, so the debug output looks colorful. + // In an actual app, you'd probably just want to count starting from 1 + uint32_t rr = mwc.gen() % 256; + uint32_t gg = mwc.gen() % 256; + uint32_t bb = mwc.gen() % 256; + m_idsF[ii][0] = rr / 255.0f; + m_idsF[ii][1] = gg / 255.0f; + m_idsF[ii][2] = bb / 255.0f; + m_idsF[ii][3] = 1.0f; + m_idsU[ii] = rr + (gg << 8) + (bb << 16) + (255u << 24); + } + + m_timeOffset = bx::getHPCounter(); + + // Set up ID buffer, which has a color target and depth buffer + m_pickingRT = bgfx::createTexture2D(ID_DIM, ID_DIM, 1, bgfx::TextureFormat::RGBA8, 0 + | BGFX_TEXTURE_RT + | BGFX_TEXTURE_MIN_POINT + | BGFX_TEXTURE_MAG_POINT + | BGFX_TEXTURE_MIP_POINT + | BGFX_TEXTURE_U_CLAMP + | BGFX_TEXTURE_V_CLAMP + ); + m_pickingRTDepth = bgfx::createTexture2D(ID_DIM, ID_DIM, 1, bgfx::TextureFormat::D24S8, 0 + | BGFX_TEXTURE_RT + | BGFX_TEXTURE_MIN_POINT + | BGFX_TEXTURE_MAG_POINT + | BGFX_TEXTURE_MIP_POINT + | BGFX_TEXTURE_U_CLAMP + | BGFX_TEXTURE_V_CLAMP + ); + + // CPU texture for blitting to and reading ID buffer so we can see what was clicked on. + // Impossible to read directly from a render target, you *must* blit to a CPU texture + // first. Algorithm Overview: Render on GPU -> Blit to CPU texture -> Read from CPU + // texture. + m_blitTex = bgfx::createTexture2D(ID_DIM, ID_DIM, 1, bgfx::TextureFormat::RGBA8, 0 + | BGFX_TEXTURE_BLIT_DST + | BGFX_TEXTURE_READ_BACK + | BGFX_TEXTURE_MIN_POINT + | BGFX_TEXTURE_MAG_POINT + | BGFX_TEXTURE_MIP_POINT + | BGFX_TEXTURE_U_CLAMP + | BGFX_TEXTURE_V_CLAMP + ); + + bgfx::TextureHandle rt[2] = + { + m_pickingRT, + m_pickingRTDepth + }; + m_pickingFB = bgfx::createFrameBuffer(BX_COUNTOF(rt), rt, true); + + imguiCreate(); + } + + int shutdown() BX_OVERRIDE + { + for (uint32_t ii = 0; ii < 12; ++ii) + { + meshUnload(m_meshes[ii]); + } + + // Cleanup. + bgfx::destroyProgram(m_shadingProgram); + bgfx::destroyProgram(m_idProgram); + + bgfx::destroyUniform(u_tint); + bgfx::destroyUniform(u_id); + + bgfx::destroyFrameBuffer(m_pickingFB); + bgfx::destroyTexture(m_pickingRT); + bgfx::destroyTexture(m_pickingRTDepth); + bgfx::destroyTexture(m_blitTex); + + imguiDestroy(); + + // Shutdown bgfx. + bgfx::shutdown(); + + return 0; + } + + bool update() BX_OVERRIDE + { + if (!entry::processEvents(m_width, m_height, m_debug, m_reset, &m_mouseState) ) + { + bgfx::setViewFrameBuffer(RENDER_PASS_ID, m_pickingFB); + + 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; + float time = (float)( (bx::getHPCounter() - m_timeOffset) / double(bx::getHPFrequency() ) ); + + // Use debug font to print information about this example. + bgfx::dbgTextClear(); + bgfx::dbgTextPrintf(0, 1, 0x4f, "bgfx/examples/30-picking"); + bgfx::dbgTextPrintf(0, 2, 0x6f, "Description: Mouse picking via GPU texture readback."); + bgfx::dbgTextPrintf(0, 3, 0x0f, "Frame: % 7.3f[ms]", double(frameTime)*toMs); + + // Set up matrices for basic forward renderer + const float camSpeed = 0.25; + float cameraSpin = (float)m_cameraSpin; + float eyeDist = 2.5f; + float eye[3] = + { + -eyeDist * bx::fsin(time*cameraSpin*camSpeed), + 0.0f, + -eyeDist * bx::fcos(time*cameraSpin*camSpeed), + }; + float at[3] = { 0.0f, 0.0f, 0.0f }; + + float view[16]; + bx::mtxLookAt(view, eye, at); + + float proj[16]; + bx::mtxProj(proj, 60.0f, float(m_width) / float(m_height), 0.1f, 100.0f); + + // Set up view rect and transform for the shaded pass + bgfx::setViewRect(RENDER_PASS_SHADING, 0, 0, uint16_t(m_width), uint16_t(m_height) ); + bgfx::setViewTransform(RENDER_PASS_SHADING, view, proj); + + // Set up picking pass + float pickView[16]; + float pickAt[4]; // Need to inversly project the mouse pointer to determin what we're looking at + float pickEye[3] = { eye[0], eye[1], eye[2] }; // Eye is same location as before + float viewProj[16]; + bx::mtxMul(viewProj, view, proj); + float invViewProj[16]; + bx::mtxInverse(invViewProj, viewProj); + // Mouse coord in NDC + float mouseXNDC = (m_mouseState.m_mx / (float)m_width) * 2.0f - 1.0f; + float mouseYNDC = ((m_height - m_mouseState.m_my) / (float)m_height) * 2.0f - 1.0f; + float mousePosNDC[4] = { mouseXNDC, mouseYNDC, 0, 1.0f }; + // Unproject and perspective divide + bx::vec4MulMtx(pickAt, mousePosNDC, invViewProj); + pickAt[3] = 1.0f / pickAt[3]; + pickAt[0] *= pickAt[3]; + pickAt[1] *= pickAt[3]; + pickAt[2] *= pickAt[3]; + + // Look at our unprojected point + bx::mtxLookAt(pickView, pickEye, pickAt); + float pickProj[16]; + + // Tight FOV is best for picking + bx::mtxProj(pickProj, m_fov, 1, 0.1f, 100.0f); + // View rect and transforms for picking pass + bgfx::setViewRect(RENDER_PASS_ID, 0, 0, ID_DIM, ID_DIM); + bgfx::setViewTransform(RENDER_PASS_ID, pickView, pickProj); + + // Now that our passes are set up, we can finally draw each mesh + + // Picking highlights a mesh so we'll set up this tint color + const float tintBasic[4] = { 1.0f, 1.0f, 1.0f, 1.0f }; + const float tintHighlighted[4] = { 0.3f, 0.3f, 2.0f, 1.0f }; + + for (uint32_t mesh = 0; mesh < 12; ++mesh) + { + const float scale = m_meshScale[mesh]; + + // Set up transform matrix for each mesh + float mtx[16]; + bx::mtxSRT(mtx + , scale, scale, scale + , 0.0f + , time*0.37f*(mesh % 2 ? 1.0f : -1.0f) + , 0.0f + , (mesh % 4) - 1.5f + , (mesh / 4) - 1.25f + , 0.0f + ); + + // Submit mesh to both of our render passes + // Set uniform based on if this is the highlighted mesh + bgfx::setUniform(u_tint + , mesh == m_highlighted + ? tintHighlighted + : tintBasic + ); + meshSubmit(m_meshes[mesh], RENDER_PASS_SHADING, m_shadingProgram, mtx); + + // Submit ID pass based on mesh ID + bgfx::setUniform(u_id, m_idsF[mesh]); + meshSubmit(m_meshes[mesh], RENDER_PASS_ID, m_idProgram, mtx); + } + + // If the user previously clicked, and we're done reading data from GPU, look at ID buffer on CPU + // Whatever mesh has the most pixels in the ID buffer is the one the user clicked on. + if (m_reading == m_currFrame) + { + m_reading = 0; + std::map ids; // This contains all the IDs found in the buffer + uint32_t maxAmount = 0; + for (uint8_t *x = m_blitData; x < m_blitData + ID_DIM * ID_DIM * 4;) + { + uint8_t rr = *x++; + uint8_t gg = *x++; + uint8_t bb = *x++; + uint8_t aa = *x++; + + const bgfx::Caps* caps = bgfx::getCaps(); + if (bgfx::RendererType::Direct3D9 == caps->rendererType) + { + // Comes back as BGRA + uint8_t temp = rr; + rr = bb; + bb = temp; + } + + if (0 == (rr|gg|bb) ) // Skip background + { + continue; + } + + uint32_t hashKey = rr + (gg << 8) + (bb << 16) + (aa << 24); + std::map::iterator mapIter = ids.find(hashKey); + uint32_t amount = 1; + if (mapIter != ids.end() ) + { + amount = mapIter->second + 1; + } + + ids[hashKey] = amount; // Amount of times this ID (color) has been clicked on in buffer + maxAmount = maxAmount > amount + ? maxAmount + : amount + ; + } + + uint32_t idKey = 0; + m_highlighted = UINT32_MAX; + if (maxAmount) + { + for (std::map::iterator mapIter = ids.begin(); mapIter != ids.end(); mapIter++) + { + if (mapIter->second == maxAmount) + { + idKey = mapIter->first; + break; + } + } + + for (uint32_t ii = 0; ii < 12; ++ii) + { + if (m_idsU[ii] == idKey) + { + m_highlighted = ii; + break; + } + } + } + } + + // Start a new readback? + if (!m_reading + && m_mouseState.m_buttons[entry::MouseButton::Left]) + { + // Blit and read + bgfx::blit(RENDER_PASS_BLIT, m_blitTex, 0, 0, m_pickingRT); + m_reading = bgfx::readTexture(m_blitTex, m_blitData); + } + + // Draw UI + 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 + ); + + imguiBeginArea("Picking Render Target:", 10, 100, 300, 400); + imguiImage(m_pickingRT, 1.0f, 1.0f, 1.0f); + imguiSlider("FOV", m_fov, 1.0f, 60.0f, 1.0f); + + if (imguiCheck("Spin Camera", m_cameraSpin)) + { + m_cameraSpin = !m_cameraSpin; + } + + imguiEndArea(); + imguiEndFrame(); + + // Advance to next frame. Rendering thread will be kicked to + // process submitted rendering primitives. + m_currFrame = bgfx::frame(); + + return true; + } + + return false; + } + + uint32_t m_width; + uint32_t m_height; + uint32_t m_debug; + uint32_t m_reset; + int64_t m_timeOffset; + + entry::MouseState m_mouseState; + + Mesh* m_meshes[12]; + float m_meshScale[12]; + float m_idsF[12][4]; + uint32_t m_idsU[12]; + uint32_t m_highlighted; + + // Resource handles + bgfx::ProgramHandle m_shadingProgram; + bgfx::ProgramHandle m_idProgram; + bgfx::UniformHandle u_tint; + bgfx::UniformHandle u_id; + bgfx::TextureHandle m_pickingRT; + bgfx::TextureHandle m_pickingRTDepth; + bgfx::TextureHandle m_blitTex; + bgfx::FrameBufferHandle m_pickingFB; + + uint8_t m_blitData[ID_DIM*ID_DIM * 4]; // Read blit into this + + uint32_t m_reading; + uint32_t m_currFrame; + + float m_fov; + bool m_cameraSpin; +}; + +ENTRY_IMPLEMENT_MAIN(ExamplePicking); diff --git a/3rdparty/bgfx/examples/30-picking/screenshot.png b/3rdparty/bgfx/examples/30-picking/screenshot.png new file mode 100644 index 00000000000..e51fcee2a43 Binary files /dev/null and b/3rdparty/bgfx/examples/30-picking/screenshot.png differ diff --git a/3rdparty/bgfx/examples/30-picking/varying.def.sc b/3rdparty/bgfx/examples/30-picking/varying.def.sc new file mode 100644 index 00000000000..a6670786528 --- /dev/null +++ b/3rdparty/bgfx/examples/30-picking/varying.def.sc @@ -0,0 +1,10 @@ +vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); +vec3 v_normal : NORMAL = vec3(0.0, 0.0, 1.0); +vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); +vec3 v_pos : TEXCOORD1 = vec3(0.0, 0.0, 0.0); +vec3 v_view : TEXCOORD2 = vec3(0.0, 0.0, 0.0); + +vec3 a_position : POSITION; +vec4 a_color0 : COLOR0; +vec2 a_texcoord0 : TEXCOORD0; +vec3 a_normal : NORMAL; diff --git a/3rdparty/bgfx/examples/30-picking/vs_picking_shaded.sc b/3rdparty/bgfx/examples/30-picking/vs_picking_shaded.sc new file mode 100644 index 00000000000..441419040bb --- /dev/null +++ b/3rdparty/bgfx/examples/30-picking/vs_picking_shaded.sc @@ -0,0 +1,25 @@ +$input a_position, a_normal +$output v_pos, v_view, v_normal, v_color0 + +/* + * Copyright 2011-2016 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include "../common/common.sh" + +uniform vec4 u_tint; + +void main() +{ + vec3 pos = a_position; + vec3 normal = a_normal.xyz*2.0 - 1.0; + + gl_Position = mul(u_modelViewProj, vec4(pos, 1.0) ); + v_pos = gl_Position.xyz; + v_view = mul(u_modelView, vec4(pos, 1.0) ).xyz; + + v_normal = mul(u_modelView, vec4(normal, 0.0) ).xyz; + + v_color0 = u_tint*vec4(0.8, 0.8, 0.8, 1.0); +} diff --git a/3rdparty/bgfx/examples/31-rsm/fs_rsm_combine.sc b/3rdparty/bgfx/examples/31-rsm/fs_rsm_combine.sc new file mode 100644 index 00000000000..af4f5fc23f7 --- /dev/null +++ b/3rdparty/bgfx/examples/31-rsm/fs_rsm_combine.sc @@ -0,0 +1,131 @@ +$input v_texcoord0 + +/* + * Copyright 2016 Joseph Cherlin. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include "../common/common.sh" + +SAMPLER2D(s_normal, 0); +SAMPLER2D(s_color, 1); +SAMPLER2D(s_light, 2); +SAMPLER2D(s_depth, 3); +SAMPLER2DSHADOW(s_shadowMap, 4); + +// Single directional light for entire scene +uniform vec4 u_lightDir; +uniform mat4 u_invMvp; +uniform mat4 u_lightMtx; +uniform vec4 u_shadowDimsInv; +uniform vec4 u_rsmAmount; + +float hardShadow(sampler2DShadow _sampler, vec4 _shadowCoord, float _bias) +{ + vec2 texCoord = _shadowCoord.xy; + return shadow2D(_sampler, vec3(texCoord.xy, _shadowCoord.z-_bias) ); +} + +float PCF(sampler2DShadow _sampler, vec4 _shadowCoord, float _bias, vec2 _texelSize) +{ + vec2 texCoord = _shadowCoord.xy; + + bool outside = any(greaterThan(texCoord, vec2_splat(1.0))) + || any(lessThan (texCoord, vec2_splat(0.0))) + ; + + if (outside) + { + return 1.0; + } + + float result = 0.0; + vec2 offset = _texelSize * _shadowCoord.w; + + result += hardShadow(_sampler, _shadowCoord + vec4(vec2(-1.5, -1.5) * offset, 0.0, 0.0), _bias); + result += hardShadow(_sampler, _shadowCoord + vec4(vec2(-1.5, -0.5) * offset, 0.0, 0.0), _bias); + result += hardShadow(_sampler, _shadowCoord + vec4(vec2(-1.5, 0.5) * offset, 0.0, 0.0), _bias); + result += hardShadow(_sampler, _shadowCoord + vec4(vec2(-1.5, 1.5) * offset, 0.0, 0.0), _bias); + + result += hardShadow(_sampler, _shadowCoord + vec4(vec2(-0.5, -1.5) * offset, 0.0, 0.0), _bias); + result += hardShadow(_sampler, _shadowCoord + vec4(vec2(-0.5, -0.5) * offset, 0.0, 0.0), _bias); + result += hardShadow(_sampler, _shadowCoord + vec4(vec2(-0.5, 0.5) * offset, 0.0, 0.0), _bias); + result += hardShadow(_sampler, _shadowCoord + vec4(vec2(-0.5, 1.5) * offset, 0.0, 0.0), _bias); + + result += hardShadow(_sampler, _shadowCoord + vec4(vec2(0.5, -1.5) * offset, 0.0, 0.0), _bias); + result += hardShadow(_sampler, _shadowCoord + vec4(vec2(0.5, -0.5) * offset, 0.0, 0.0), _bias); + result += hardShadow(_sampler, _shadowCoord + vec4(vec2(0.5, 0.5) * offset, 0.0, 0.0), _bias); + result += hardShadow(_sampler, _shadowCoord + vec4(vec2(0.5, 1.5) * offset, 0.0, 0.0), _bias); + + result += hardShadow(_sampler, _shadowCoord + vec4(vec2(1.5, -1.5) * offset, 0.0, 0.0), _bias); + result += hardShadow(_sampler, _shadowCoord + vec4(vec2(1.5, -0.5) * offset, 0.0, 0.0), _bias); + result += hardShadow(_sampler, _shadowCoord + vec4(vec2(1.5, 0.5) * offset, 0.0, 0.0), _bias); + result += hardShadow(_sampler, _shadowCoord + vec4(vec2(1.5, 1.5) * offset, 0.0, 0.0), _bias); + + return result / 16.0; +} + + +float toClipSpaceDepth(float _depthTextureZ) +{ +#if BGFX_SHADER_LANGUAGE_HLSL || BGFX_SHADER_LANGUAGE_METAL + return _depthTextureZ; +#else + return _depthTextureZ * 2.0 - 1.0; +#endif // BGFX_SHADER_LANGUAGE_HLSL || BGFX_SHADER_LANGUAGE_METAL +} + +vec3 clipToWorld(mat4 _invViewProj, vec3 _clipPos) +{ + vec4 wpos = mul(_invViewProj, vec4(_clipPos, 1.0) ); + return wpos.xyz / wpos.w; +} + + +void main() +{ + vec3 n = texture2D(s_normal, v_texcoord0).xyz; + // Expand out normal + n = n*2.0+-1.0; + vec3 l = u_lightDir.xyz;//normalize(vec3(-0.8,0.75,-1.0)); + float dirLightIntensity = 1.0; + float dirLight = max(0.0,dot(n,l)) * dirLightIntensity; + + // Apply shadow map + + // Get world position so we can transform it into light space, to look into shadow map + vec2 texCoord = v_texcoord0.xy; + float deviceDepth = texture2D(s_depth, texCoord).x; + float depth = toClipSpaceDepth(deviceDepth); + vec3 clip = vec3(texCoord * 2.0 - 1.0, depth); +#if BGFX_SHADER_LANGUAGE_HLSL || BGFX_SHADER_LANGUAGE_METAL + clip.y = -clip.y; +#endif // BGFX_SHADER_LANGUAGE_HLSL || BGFX_SHADER_LANGUAGE_METAL + vec3 wpos = clipToWorld(u_invMvp, clip); + + const float shadowMapOffset = 0.003; + vec3 posOffset = wpos + n.xyz * shadowMapOffset; + vec4 shadowCoord = mul(u_lightMtx, vec4(posOffset, 1.0) ); + +#if BGFX_SHADER_LANGUAGE_HLSL || BGFX_SHADER_LANGUAGE_METAL + shadowCoord.y *= -1.0; +#endif // BGFX_SHADER_LANGUAGE_HLSL || BGFX_SHADER_LANGUAGE_METAL + + float shadowMapBias = 0.001; + vec2 texelSize = vec2_splat(u_shadowDimsInv.x); + + shadowCoord.xy /= shadowCoord.w; + shadowCoord.xy = shadowCoord.xy*0.5+0.5; + + float visibility = PCF(s_shadowMap, shadowCoord, shadowMapBias, texelSize); + + dirLight *= visibility; + + // Light from light buffer + vec3 albedo = texture2D(s_color, v_texcoord0).xyz; + vec3 lightBuffer = texture2D(s_light, v_texcoord0).xyz; + + gl_FragColor.xyz = mix(dirLight * albedo, lightBuffer * albedo, u_rsmAmount.x); + + gl_FragColor.w = 1.0; +} diff --git a/3rdparty/bgfx/examples/31-rsm/fs_rsm_gbuffer.sc b/3rdparty/bgfx/examples/31-rsm/fs_rsm_gbuffer.sc new file mode 100644 index 00000000000..a220ecf9dc3 --- /dev/null +++ b/3rdparty/bgfx/examples/31-rsm/fs_rsm_gbuffer.sc @@ -0,0 +1,22 @@ +$input v_normal + +/* + * Copyright 2016 Joseph Cherlin. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include "../common/common.sh" + +uniform vec4 u_tint; + +void main() +{ + vec3 normalWorldSpace = v_normal; + + // Write normal + gl_FragData[0].xyz = normalWorldSpace.xyz; // Normal is already compressed to [0,1] so can fit in gbuffer + gl_FragData[0].w = 0.0; + + // Write color + gl_FragData[1] = u_tint; +} diff --git a/3rdparty/bgfx/examples/31-rsm/fs_rsm_lbuffer.sc b/3rdparty/bgfx/examples/31-rsm/fs_rsm_lbuffer.sc new file mode 100644 index 00000000000..259c850a3e5 --- /dev/null +++ b/3rdparty/bgfx/examples/31-rsm/fs_rsm_lbuffer.sc @@ -0,0 +1,67 @@ +$input v_lightCenterScale, v_color0 + +/* + * Copyright 2016 Joseph Cherlin. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include "../common/common.sh" + +SAMPLER2D(s_normal, 0); // Normal output from gbuffer +SAMPLER2D(s_depth, 1); // Depth output from gbuffer + +uniform mat4 u_invMvp; + +float toClipSpaceDepth(float _depthTextureZ) +{ +#if BGFX_SHADER_LANGUAGE_HLSL || BGFX_SHADER_LANGUAGE_METAL + return _depthTextureZ; +#else + return _depthTextureZ * 2.0 - 1.0; +#endif // BGFX_SHADER_LANGUAGE_HLSL || BGFX_SHADER_LANGUAGE_METAL +} + +vec3 clipToWorld(mat4 _invViewProj, vec3 _clipPos) +{ + vec4 wpos = mul(_invViewProj, vec4(_clipPos, 1.0) ); + return wpos.xyz / wpos.w; +} + +void main() +{ +#if BGFX_SHADER_LANGUAGE_HLSL && (BGFX_SHADER_LANGUAGE_HLSL < 4) + vec2 texCoord = gl_FragCoord.xy * u_viewTexel.xy + u_viewTexel.xy * vec2_splat(0.5); +#else + vec2 texCoord = gl_FragCoord.xy * u_viewTexel.xy; +#endif + + // Get world position + float deviceDepth = texture2D(s_depth, texCoord).x; + float depth = toClipSpaceDepth(deviceDepth); + + vec3 clip = vec3(texCoord * 2.0 - 1.0, depth); +#if BGFX_SHADER_LANGUAGE_HLSL || BGFX_SHADER_LANGUAGE_METAL + clip.y = -clip.y; +#endif // BGFX_SHADER_LANGUAGE_HLSL || BGFX_SHADER_LANGUAGE_METAL + vec3 wpos = clipToWorld(u_invMvp, clip); + + // Get normal from its map, and decompress + vec3 n = texture2D(s_normal, texCoord).xyz*2.0-1.0; + + // Do lighting + vec3 pointToLight = v_lightCenterScale.xyz-wpos; + float lightLen = sqrt(dot(pointToLight, pointToLight)); + + float lightFalloff; + + if (lightLen > v_lightCenterScale.w) + lightFalloff = 0.0; + else + lightFalloff = 1.0-(lightLen/v_lightCenterScale.w); // Linear falloff for light (could use dist sq if you want) + + vec3 l = normalize(pointToLight)*lightFalloff; + + gl_FragColor.xyz = v_color0.xyz * max(0.0, dot(n,l)); + + gl_FragColor.w = 1.0; +} diff --git a/3rdparty/bgfx/examples/31-rsm/fs_rsm_shadow.sc b/3rdparty/bgfx/examples/31-rsm/fs_rsm_shadow.sc new file mode 100644 index 00000000000..56026da168a --- /dev/null +++ b/3rdparty/bgfx/examples/31-rsm/fs_rsm_shadow.sc @@ -0,0 +1,22 @@ +$input v_normal + +/* + * Copyright 2016 Joseph Cherlin. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include "../common/common.sh" + +uniform vec4 u_tint; + +void main() +{ +#if BGFX_SHADER_LANGUAGE_HLSL && (BGFX_SHADER_LANGUAGE_HLSL < 4) + vec2 texCoord = gl_FragCoord.xy * u_viewTexel.xy + u_viewTexel.xy * vec2_splat(0.5); +#else + vec2 texCoord = gl_FragCoord.xy * u_viewTexel.xy; +#endif + + gl_FragData[0].xyz = u_tint.xyz; // Color of light sphere + gl_FragData[0].w = -v_normal.z; // Radius of light sphere +} diff --git a/3rdparty/bgfx/examples/31-rsm/makefile b/3rdparty/bgfx/examples/31-rsm/makefile new file mode 100644 index 00000000000..e6278cb66dc --- /dev/null +++ b/3rdparty/bgfx/examples/31-rsm/makefile @@ -0,0 +1,18 @@ +# +# Copyright 2011-2016 Branimir Karadzic. All rights reserved. +# License: http://www.opensource.org/licenses/BSD-2-Clause +# + +BGFX_DIR=../.. +RUNTIME_DIR=$(BGFX_DIR)/examples/runtime +BUILD_DIR=../../.build + +include $(BGFX_DIR)/scripts/shader.mk + +rebuild: + @make -s --no-print-directory TARGET=0 clean all + @make -s --no-print-directory TARGET=1 clean all + @make -s --no-print-directory TARGET=2 clean all + @make -s --no-print-directory TARGET=3 clean all + @make -s --no-print-directory TARGET=4 clean all + @make -s --no-print-directory TARGET=5 clean all diff --git a/3rdparty/bgfx/examples/31-rsm/reflectiveshadowmap.cpp b/3rdparty/bgfx/examples/31-rsm/reflectiveshadowmap.cpp new file mode 100644 index 00000000000..a7bbb6078db --- /dev/null +++ b/3rdparty/bgfx/examples/31-rsm/reflectiveshadowmap.cpp @@ -0,0 +1,745 @@ +/* + * Copyright 2016 Joseph Cherlin. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include "common.h" +#include "camera.h" +#include "bgfx_utils.h" +#include "imgui/imgui.h" +#include + +/* + * Intro + * ===== + * + * RSM (reflective shadow map) is a technique for global illumination. + * It is similar to shadow map. It piggybacks on the shadow map, in fact. + * + * RSM is compatible with any type of lighting which can handle handle + * a lot of point lights. This sample happens to use a deferred renderer, + * but other types would work. + * + * Overview: + * + * - Draw into G-Buffer + * - Draw Shadow Map (with RSM piggybacked on) + * - Populate light buffer + * - Deferred "combine" pass. + * + * Details + * ======= + * + * ## G-Buffer + * + * Typical G-Buffer with normals, color, depth. + * + * ## RSM + * + * A typical shadow map, except it also outputs to a "RSM" buffer. + * The RSM contains the color of the item drawn, as well as a scalar value which represents + * how much light would bounce off of the surface if it were hit with light from the origin + * of the shadow map. + * + * ## Light Buffer + * + * We draw a lot of spheres into the light buffer. These spheres are called VPL (virtual + * point lights). VPLs represent bounced light, and let us eliminate the classic "ambient" + * term. Instead of us supplying their world space position in a transform matrix, + * VPLs gain their position from the shadow map from step 2, using an unprojection. They gain + * their color from the RSM. You could also store their position in a buffer while drawing shadows, + * I'm just using depth to keep the sample smaller. + * + * ## Deferred combine + * + * Typical combine used in almost any sort of deferred renderer. + * + * References + * ========== + * + * http: *www.bpeers.com/blog/?itemid=517 + * + */ + +// Render passes +#define RENDER_PASS_GBUFFER 0 // GBuffer for normals and albedo +#define RENDER_PASS_SHADOW_MAP 1 // Draw into the shadow map (RSM and regular shadow map at same time) +#define RENDER_PASS_LIGHT_BUFFER 2 // Light buffer for point lights +#define RENDER_PASS_COMBINE 3 // Directional light and final result + +// Gbuffer has multiple render targets +#define GBUFFER_RT_NORMAL 0 +#define GBUFFER_RT_COLOR 1 +#define GBUFFER_RT_DEPTH 2 + +// Shadow map has multiple render targets +#define SHADOW_RT_RSM 0 // In this algorithm, shadows write lighting info as well. +#define SHADOW_RT_DEPTH 1 // Shadow maps always write a depth + +// Random meshes we draw +#define MODEL_COUNT 222 // In this demo, a model is a mesh plus a transform and a color + +#define SHADOW_MAP_DIM 512 +#define LIGHT_DIST 10.0f + +static const char * s_meshPaths[] = +{ + "meshes/cube.bin", + "meshes/orb.bin", + "meshes/column.bin", + "meshes/bunny.bin", + "meshes/tree.bin", + "meshes/hollowcube.bin" +}; + +static const float s_meshScale[] = +{ + 0.25f, + 0.5f, + 0.05f, + 0.5f, + 0.05f, + 0.05f +}; + +// Vertex decl for our screen space quad (used in deferred rendering) +struct PosTexCoord0Vertex +{ + float m_x; + float m_y; + float m_z; + float m_u; + float m_v; + + static void init() + { + ms_decl + .begin() + .add(bgfx::Attrib::Position, 3, bgfx::AttribType::Float) + .add(bgfx::Attrib::TexCoord0, 2, bgfx::AttribType::Float) + .end(); + } + + static bgfx::VertexDecl ms_decl; +}; +bgfx::VertexDecl PosTexCoord0Vertex::ms_decl; + +// Utility function to draw a screen space quad for deferred rendering +void screenSpaceQuad(float _textureWidth, float _textureHeight, float _texelHalf, bool _originBottomLeft, float _width = 1.0f, float _height = 1.0f) +{ + if (bgfx::checkAvailTransientVertexBuffer(3, PosTexCoord0Vertex::ms_decl) ) + { + bgfx::TransientVertexBuffer vb; + bgfx::allocTransientVertexBuffer(&vb, 3, PosTexCoord0Vertex::ms_decl); + PosTexCoord0Vertex* vertex = (PosTexCoord0Vertex*)vb.data; + + const float minx = -_width; + const float maxx = _width; + const float miny = 0.0f; + const float maxy = _height*2.0f; + + const float texelHalfW = _texelHalf/_textureWidth; + const float texelHalfH = _texelHalf/_textureHeight; + const float minu = -1.0f + texelHalfW; + const float maxu = 1.0f + texelHalfH; + + const float zz = 0.0f; + + float minv = texelHalfH; + float maxv = 2.0f + texelHalfH; + + if (_originBottomLeft) + { + float temp = minv; + minv = maxv; + maxv = temp; + + minv -= 1.0f; + maxv -= 1.0f; + } + + vertex[0].m_x = minx; + vertex[0].m_y = miny; + vertex[0].m_z = zz; + vertex[0].m_u = minu; + vertex[0].m_v = minv; + + vertex[1].m_x = maxx; + vertex[1].m_y = miny; + vertex[1].m_z = zz; + vertex[1].m_u = maxu; + vertex[1].m_v = minv; + + vertex[2].m_x = maxx; + vertex[2].m_y = maxy; + vertex[2].m_z = zz; + vertex[2].m_u = maxu; + vertex[2].m_v = maxv; + + bgfx::setVertexBuffer(&vb); + } +} + +class ExampleRSM : public entry::AppI +{ +public: + ExampleRSM() + : m_reading(0) + , m_currFrame(UINT32_MAX) + , m_cameraSpin(false) + , m_lightElevation(35.0f) + , m_lightAzimuth(215.0f) + , m_rsmAmount(0.25f) + , m_vplRadius(3.0f) + , m_texelHalf(0.0f) + { + } + + 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(args.m_type, args.m_pciId); + + bgfx::reset(m_width, m_height, m_reset); + + // Enable debug text. + bgfx::setDebug(m_debug); + + // Labeling for renderdoc captures, etc + bgfx::setViewName(RENDER_PASS_GBUFFER, "gbuffer" ); + bgfx::setViewName(RENDER_PASS_SHADOW_MAP, "shadow map" ); + bgfx::setViewName(RENDER_PASS_LIGHT_BUFFER, "light buffer"); + bgfx::setViewName(RENDER_PASS_COMBINE, "post combine"); + + // Set up screen clears + bgfx::setViewClear(RENDER_PASS_GBUFFER + , BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH + , 0 + , 1.0f + , 0 + ); + + bgfx::setViewClear(RENDER_PASS_LIGHT_BUFFER + , BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH + , 0 + , 1.0f + , 0 + ); + + bgfx::setViewClear(RENDER_PASS_SHADOW_MAP + , BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH + , 0 + , 1.0f + , 0 + ); + + // Create uniforms + u_tint = bgfx::createUniform("u_tint", bgfx::UniformType::Vec4); // Tint for when you click on items + u_lightDir = bgfx::createUniform("u_lightDir", bgfx::UniformType::Vec4); // Single directional light for entire scene + u_sphereInfo = bgfx::createUniform("u_sphereInfo", bgfx::UniformType::Vec4); // Info for RSM + u_invMvp = bgfx::createUniform("u_invMvp", bgfx::UniformType::Mat4); // Matrix needed in light buffer + u_invMvpShadow = bgfx::createUniform("u_invMvpShadow", bgfx::UniformType::Mat4); // Matrix needed in light buffer + u_lightMtx = bgfx::createUniform("u_lightMtx", bgfx::UniformType::Mat4); // Matrix needed to use shadow map (world to shadow space) + u_shadowDimsInv = bgfx::createUniform("u_shadowDimsInv", bgfx::UniformType::Vec4); // Used in PCF + u_rsmAmount = bgfx::createUniform("u_rsmAmount", bgfx::UniformType::Vec4); // How much RSM to use vs directional light + + // Create texture sampler uniforms (used when we bind textures) + s_normal = bgfx::createUniform("s_normal", bgfx::UniformType::Int1); // Normal gbuffer + s_depth = bgfx::createUniform("s_depth", bgfx::UniformType::Int1); // Normal gbuffer + s_color = bgfx::createUniform("s_color", bgfx::UniformType::Int1); // Color (albedo) gbuffer + s_light = bgfx::createUniform("s_light", bgfx::UniformType::Int1); // Light buffer + s_shadowMap = bgfx::createUniform("s_shadowMap", bgfx::UniformType::Int1); // Shadow map + s_rsm = bgfx::createUniform("s_rsm", bgfx::UniformType::Int1); // Reflective shadow map + + // Create program from shaders. + m_gbufferProgram = loadProgram("vs_rsm_gbuffer", "fs_rsm_gbuffer"); // Gbuffer + m_shadowProgram = loadProgram("vs_rsm_shadow", "fs_rsm_shadow" ); // Drawing shadow map + m_lightProgram = loadProgram("vs_rsm_lbuffer", "fs_rsm_lbuffer"); // Light buffer + m_combineProgram = loadProgram("vs_rsm_combine", "fs_rsm_combine"); // Combiner + + // Load some meshes + for (uint32_t ii = 0; ii < BX_COUNTOF(s_meshPaths); ++ii) + { + m_meshes[ii] = meshLoad(s_meshPaths[ii]); + } + + // Randomly create some models + bx::RngMwc mwc; // Random number generator + for (uint32_t ii = 0; ii < BX_COUNTOF(m_models); ++ii) + { + Model& model = m_models[ii]; + + uint32_t rr = mwc.gen() % 256; + uint32_t gg = mwc.gen() % 256; + uint32_t bb = mwc.gen() % 256; + model.mesh = 1+mwc.gen()%(BX_COUNTOF(s_meshPaths)-1); + model.color[0] = rr/255.0f; + model.color[1] = gg/255.0f; + model.color[2] = bb/255.0f; + model.color[3] = 1.0f; + model.position[0] = (((mwc.gen() % 256)) - 128.0f)/20.0f; + model.position[1] = 0; + model.position[2] = (((mwc.gen() % 256)) - 128.0f)/20.0f; + } + + // Load ground. We'll just use the cube since I don't have a ground model right now + m_ground = meshLoad("meshes/cube.bin"); + + // Light sphere + m_lightSphere = meshLoad("meshes/unit_sphere.bin"); + + const uint32_t samplerFlags = 0 + | BGFX_TEXTURE_RT + | BGFX_TEXTURE_MIN_POINT + | BGFX_TEXTURE_MAG_POINT + | BGFX_TEXTURE_MIP_POINT + | BGFX_TEXTURE_U_CLAMP + | BGFX_TEXTURE_V_CLAMP + ; + + // Make gbuffer and related textures + m_gbufferTex[GBUFFER_RT_NORMAL] = bgfx::createTexture2D(bgfx::BackbufferRatio::Equal, 1, bgfx::TextureFormat::BGRA8, samplerFlags); + m_gbufferTex[GBUFFER_RT_COLOR] = bgfx::createTexture2D(bgfx::BackbufferRatio::Equal, 1, bgfx::TextureFormat::BGRA8, samplerFlags); + m_gbufferTex[GBUFFER_RT_DEPTH] = bgfx::createTexture2D(bgfx::BackbufferRatio::Equal, 1, bgfx::TextureFormat::D24, samplerFlags); + m_gbuffer = bgfx::createFrameBuffer(BX_COUNTOF(m_gbufferTex), m_gbufferTex, true); + + // Make light buffer + m_lightBufferTex = bgfx::createTexture2D(bgfx::BackbufferRatio::Equal, 1, bgfx::TextureFormat::BGRA8, samplerFlags); + bgfx::TextureHandle lightBufferRTs[] = { + m_lightBufferTex + }; + m_lightBuffer = bgfx::createFrameBuffer(BX_COUNTOF(lightBufferRTs), lightBufferRTs, true); + + // Make shadow buffer + const uint32_t rsmFlags = 0 + | BGFX_TEXTURE_RT + | BGFX_TEXTURE_MIN_POINT + | BGFX_TEXTURE_MAG_POINT + | BGFX_TEXTURE_MIP_POINT + | BGFX_TEXTURE_U_CLAMP + | BGFX_TEXTURE_V_CLAMP + ; + + // Reflective shadow map + m_shadowBufferTex[SHADOW_RT_RSM] = bgfx::createTexture2D( + SHADOW_MAP_DIM + , SHADOW_MAP_DIM + , 1 + , bgfx::TextureFormat::BGRA8, + rsmFlags + ); + + // Typical shadow map + m_shadowBufferTex[SHADOW_RT_DEPTH] = bgfx::createTexture2D( + SHADOW_MAP_DIM + , SHADOW_MAP_DIM + , 1 + , bgfx::TextureFormat::D16, + BGFX_TEXTURE_RT/* | BGFX_TEXTURE_COMPARE_LEQUAL*/ + ); // Note I'm not setting BGFX_TEXTURE_COMPARE_LEQUAL. Why? + // Normally a PCF shadow map such as this requires a compare. However, this sample also + // reads from this texture in the lighting pass, and only uses the PCF capabilites in the + // combine pass, so the flag is disabled by default. + + m_shadowBuffer = bgfx::createFrameBuffer(BX_COUNTOF(m_shadowBufferTex), m_shadowBufferTex, true); + + // Vertex decl + PosTexCoord0Vertex::init(); + + // Init camera + cameraCreate(); + float camPos[] = {0.0f, 1.5f, 0.0f}; + cameraSetPosition(camPos); + cameraSetVerticalAngle(-0.3f); + + // Init directional light + updateLightDir(); + + // Get renderer capabilities info. + m_caps = bgfx::getCaps(); + const bgfx::RendererType::Enum renderer = bgfx::getRendererType(); + m_texelHalf = bgfx::RendererType::Direct3D9 == renderer ? 0.5f : 0.0f; + + imguiCreate(); + } + + int shutdown() BX_OVERRIDE + { + for (uint32_t ii = 0; ii < BX_COUNTOF(s_meshPaths); ++ii) + { + meshUnload(m_meshes[ii]); + } + + meshUnload(m_ground); + meshUnload(m_lightSphere); + + // Cleanup. + bgfx::destroyProgram(m_gbufferProgram); + bgfx::destroyProgram(m_lightProgram); + bgfx::destroyProgram(m_combineProgram); + bgfx::destroyProgram(m_shadowProgram); + + bgfx::destroyUniform(u_tint); + bgfx::destroyUniform(u_lightDir); + bgfx::destroyUniform(u_sphereInfo); + bgfx::destroyUniform(u_invMvp); + bgfx::destroyUniform(u_invMvpShadow); + bgfx::destroyUniform(u_lightMtx); + bgfx::destroyUniform(u_shadowDimsInv); + bgfx::destroyUniform(u_rsmAmount); + bgfx::destroyUniform(s_normal); + bgfx::destroyUniform(s_depth); + bgfx::destroyUniform(s_light); + bgfx::destroyUniform(s_color); + bgfx::destroyUniform(s_shadowMap); + bgfx::destroyUniform(s_rsm); + + bgfx::destroyFrameBuffer(m_gbuffer); + bgfx::destroyFrameBuffer(m_lightBuffer); + bgfx::destroyFrameBuffer(m_shadowBuffer); + + for (uint32_t ii = 0; ii < BX_COUNTOF(m_gbufferTex); ++ii) + { + bgfx::destroyTexture(m_gbufferTex[ii]); + } + + bgfx::destroyTexture(m_lightBufferTex); + for (uint32_t ii = 0; ii < BX_COUNTOF(m_shadowBufferTex); ++ii) + { + bgfx::destroyTexture(m_shadowBufferTex[ii]); + } + + cameraDestroy(); + + imguiDestroy(); + + // Shutdown bgfx. + bgfx::shutdown(); + + return 0; + } + + bool update() BX_OVERRIDE + { + if (!entry::processEvents(m_width, m_height, m_debug, m_reset, &m_mouseState) ) + { + // Update frame timer + 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; + const float deltaTime = float(frameTime/freq); + + // Use debug font to print information about this example. + bgfx::dbgTextClear(); + bgfx::dbgTextPrintf(0, 1, 0x4f, "bgfx/examples/31-rsm"); + bgfx::dbgTextPrintf(0, 2, 0x6f, "Description: Global Illumination with Reflective Shadow Map."); + bgfx::dbgTextPrintf(0, 3, 0x0f, "Frame: % 7.3f[ms]", double(frameTime)*toMs); + + // Update camera + cameraUpdate(deltaTime*0.15f, m_mouseState); + + // Set up matrices for gbuffer + float view[16]; + cameraGetViewMtx(view); + + float proj[16]; + bx::mtxProj(proj, 60.0f, float(m_width)/float(m_height), 0.1f, 100.0f); + + bgfx::setViewRect(RENDER_PASS_GBUFFER, 0, 0, uint16_t(m_width), uint16_t(m_height)); + bgfx::setViewTransform(RENDER_PASS_GBUFFER, view, proj); + // Make sure when we draw it goes into gbuffer and not backbuffer + bgfx::setViewFrameBuffer(RENDER_PASS_GBUFFER, m_gbuffer); + // Draw everything into g-buffer + drawAllModels(RENDER_PASS_GBUFFER, m_gbufferProgram); + + // Draw shadow map + + // Set up transforms for shadow map + float smView[16], smProj[16], lightEye[3], lightAt[3]; + lightEye[0] = m_lightDir[0]*LIGHT_DIST; + lightEye[1] = m_lightDir[1]*LIGHT_DIST; + lightEye[2] = m_lightDir[2]*LIGHT_DIST; + + lightAt[0] = 0.0f; + lightAt[1] = 0.0f; + lightAt[2] = 0.0f; + + bx::mtxLookAt(smView, lightEye, lightAt); + const float area = 10.0f; + bgfx::RendererType::Enum renderer = bgfx::getRendererType(); + bool flipV = false + || renderer == bgfx::RendererType::OpenGL + || renderer == bgfx::RendererType::OpenGLES + ; + bx::mtxOrtho(smProj, -area, area, -area, area, -100.0f, 100.0f, 0.0f, flipV); + bgfx::setViewTransform(RENDER_PASS_SHADOW_MAP, smView, smProj); + bgfx::setViewFrameBuffer(RENDER_PASS_SHADOW_MAP, m_shadowBuffer); + bgfx::setViewRect(RENDER_PASS_SHADOW_MAP, 0, 0, SHADOW_MAP_DIM, SHADOW_MAP_DIM); + + drawAllModels(RENDER_PASS_SHADOW_MAP, m_shadowProgram); + + // Next draw light buffer + + // Set up matrices for light buffer + bgfx::setViewRect(RENDER_PASS_LIGHT_BUFFER, 0, 0, uint16_t(m_width), uint16_t(m_height)); + bgfx::setViewTransform(RENDER_PASS_LIGHT_BUFFER, view, proj); // Notice, same view and proj as gbuffer + // Set drawing into light buffer + bgfx::setViewFrameBuffer(RENDER_PASS_LIGHT_BUFFER, m_lightBuffer); + + // Inverse view projection is needed in shader so set that up + float vp[16], invMvp[16]; + bx::mtxMul(vp, view, proj); + bx::mtxInverse(invMvp, vp); + + // Light matrix used in combine pass and inverse used in light pass + float lightMtx[16]; // World space to light space (shadow map space) + bx::mtxMul(lightMtx, smView, smProj); + float invMvpShadow[16]; + bx::mtxInverse(invMvpShadow, lightMtx); + + // Draw some lights (these should really be instanced but for this example they aren't...) + const unsigned MAX_SPHERE = 32; + for (uint32_t i = 0; i < MAX_SPHERE; i++) + { + for (uint32_t j = 0; j < MAX_SPHERE; j++) + { + // These are used in the fragment shader + bgfx::setTexture(0, s_normal, m_gbuffer, GBUFFER_RT_NORMAL); // Normal for lighting calculations + bgfx::setTexture(1, s_depth, m_gbuffer, GBUFFER_RT_DEPTH); // Depth to reconstruct world position + + // Thse are used in the vert shader + bgfx::setTexture(2, s_shadowMap, m_shadowBuffer, SHADOW_RT_DEPTH); // Used to place sphere + bgfx::setTexture(3, s_rsm, m_shadowBuffer, SHADOW_RT_RSM); // Used to scale/color sphere + + bgfx::setUniform(u_invMvp, invMvp); + bgfx::setUniform(u_invMvpShadow, invMvpShadow); + float sphereInfo[4]; + sphereInfo[0] = ((float)i/(MAX_SPHERE-1)); + sphereInfo[1] = ((float)j/(MAX_SPHERE-1)); + sphereInfo[2] = m_vplRadius; + sphereInfo[3] = 0.0; // Unused + bgfx::setUniform(u_sphereInfo, sphereInfo); + + const uint64_t lightDrawState = 0 + | BGFX_STATE_RGB_WRITE + | BGFX_STATE_BLEND_ADD // <=== Overlapping lights contribute more + | BGFX_STATE_ALPHA_WRITE + | BGFX_STATE_CULL_CW // <=== If we go into the lights, there will be problems, so we draw the far back face. + ; + + meshSubmit( + m_lightSphere, + RENDER_PASS_LIGHT_BUFFER, + m_lightProgram, + NULL, + lightDrawState + ); + } + } + + // Draw combine pass + + // Texture inputs for combine pass + bgfx::setTexture(0, s_normal, m_gbuffer, GBUFFER_RT_NORMAL); + bgfx::setTexture(1, s_color, m_gbuffer, GBUFFER_RT_COLOR); + bgfx::setTexture(2, s_light, m_lightBuffer, 0); + bgfx::setTexture(3, s_depth, m_gbuffer, GBUFFER_RT_DEPTH); + bgfx::setTexture(4, s_shadowMap, m_shadowBuffer, SHADOW_RT_DEPTH, BGFX_TEXTURE_COMPARE_LEQUAL); + + // Uniforms for combine pass + + bgfx::setUniform(u_lightDir, m_lightDir); + bgfx::setUniform(u_invMvp, invMvp); + bgfx::setUniform(u_lightMtx, lightMtx); + const float invDim[4] = {1.0f/SHADOW_MAP_DIM, 0.0f, 0.0f, 0.0f}; + bgfx::setUniform(u_shadowDimsInv, invDim); + float rsmAmount[4] = {m_rsmAmount,m_rsmAmount,m_rsmAmount,m_rsmAmount}; + bgfx::setUniform(u_rsmAmount, rsmAmount); + + // Set up state for combine pass + // point of this is to avoid doing depth test, which is in the default state + bgfx::setState(0 + | BGFX_STATE_RGB_WRITE + | BGFX_STATE_ALPHA_WRITE + ); + + // Set up transform matrix for fullscreen quad + float orthoProj[16]; + bx::mtxOrtho(orthoProj, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 100.0f); + bgfx::setViewTransform(RENDER_PASS_COMBINE, NULL, orthoProj); + bgfx::setViewRect(RENDER_PASS_COMBINE, 0, 0, m_width, m_height); + // Bind vertex buffer and draw quad + screenSpaceQuad( (float)m_width, (float)m_height, m_texelHalf, m_caps->originBottomLeft); + bgfx::submit(RENDER_PASS_COMBINE, m_combineProgram); + + // Draw UI + 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 + ); + + imguiBeginArea("RSM:", 10, 100, 300, 400); + + imguiSlider("rsm amount", m_rsmAmount, 0.0f, 0.7f, 0.01f); + imguiSlider("vpl radius", m_vplRadius, 0.25f, 20.0f, 0.1f); + imguiSlider("light azimuth", m_lightAzimuth, 0.0f, 360.0f, 0.01f); + imguiSlider("light elevation", m_lightElevation, 35.0f, 90.0f, 0.01f); + + imguiEndArea(); + imguiEndFrame(); + + updateLightDir(); + + // Advance to next frame. Rendering thread will be kicked to + // process submitted rendering primitives. + m_currFrame = bgfx::frame(); + + return true; + } + + return false; + } + + void drawAllModels(uint8_t _pass, bgfx::ProgramHandle _program) + { + for (uint32_t ii = 0; ii < BX_COUNTOF(m_models); ++ii) + { + const Model& model = m_models[ii]; + + // Set up transform matrix for each model + float scale = s_meshScale[model.mesh]; + float mtx[16]; + bx::mtxSRT(mtx + , scale + , scale + , scale + , 0.0f + , 0.0f + , 0.0f + , model.position[0] + , model.position[1] + , model.position[2] + ); + + // Submit mesh to gbuffer + bgfx::setUniform(u_tint, model.color); + meshSubmit(m_meshes[model.mesh], _pass, _program, mtx); + } + + // Draw ground + const float white[4] = { 1.0f, 1.0f, 1.0f, 1.0f }; + bgfx::setUniform(u_tint, white); + float mtxScale[16]; + float scale = 10.0; + bx::mtxScale(mtxScale + , scale + , scale + , scale + ); + float mtxTrans[16]; + bx::mtxTranslate(mtxTrans + , 0.0f + , -10.0f + , 0.0f + ); + float mtx[16]; + bx::mtxMul(mtx, mtxScale, mtxTrans); + meshSubmit(m_ground, _pass, _program, mtx); + } + + void updateLightDir() + { + float el = m_lightElevation * (bx::pi/180.0f); + float az = m_lightAzimuth * (bx::pi/180.0f); + m_lightDir[0] = cos(el)*cos(az); + m_lightDir[2] = cos(el)*sin(az); + m_lightDir[1] = sin(el); + m_lightDir[3] = 0.0f; + } + + uint32_t m_width; + uint32_t m_height; + uint32_t m_debug; + uint32_t m_reset; + + entry::MouseState m_mouseState; + + Mesh* m_ground; + Mesh* m_lightSphere; // Unit sphere + + // Resource handles + bgfx::ProgramHandle m_gbufferProgram; + bgfx::ProgramHandle m_shadowProgram; + bgfx::ProgramHandle m_lightProgram; + bgfx::ProgramHandle m_combineProgram; + bgfx::FrameBufferHandle m_gbuffer; + bgfx::FrameBufferHandle m_lightBuffer; + bgfx::FrameBufferHandle m_shadowBuffer; + + // Shader uniforms + bgfx::UniformHandle u_tint; + bgfx::UniformHandle u_invMvp; + bgfx::UniformHandle u_invMvpShadow; + bgfx::UniformHandle u_lightMtx; + bgfx::UniformHandle u_lightDir; + bgfx::UniformHandle u_sphereInfo; + bgfx::UniformHandle u_shadowDimsInv; + bgfx::UniformHandle u_rsmAmount; + + // Uniforms to identify texture samples + bgfx::UniformHandle s_normal; + bgfx::UniformHandle s_depth; + bgfx::UniformHandle s_color; + bgfx::UniformHandle s_light; + bgfx::UniformHandle s_shadowMap; + bgfx::UniformHandle s_rsm; + + // Various render targets + bgfx::TextureHandle m_gbufferTex[3]; + bgfx::TextureHandle m_lightBufferTex; + bgfx::TextureHandle m_shadowBufferTex[2]; + + const bgfx::Caps* m_caps; + + struct Model + { + uint32_t mesh; // Index of mesh in m_meshes + float color[4]; + float position[3]; + }; + + Model m_models[MODEL_COUNT]; + Mesh * m_meshes[BX_COUNTOF(s_meshPaths)]; + + uint32_t m_reading; + uint32_t m_currFrame; + + // UI + bool m_cameraSpin; + + // Light position; + float m_lightDir[4]; + float m_lightElevation; + float m_lightAzimuth; + + float m_rsmAmount; // Amount of rsm + float m_vplRadius; // Radius of virtual point light + + float m_texelHalf; +}; + +ENTRY_IMPLEMENT_MAIN(ExampleRSM); diff --git a/3rdparty/bgfx/examples/31-rsm/screenshot.png b/3rdparty/bgfx/examples/31-rsm/screenshot.png new file mode 100644 index 00000000000..f6cea027476 Binary files /dev/null and b/3rdparty/bgfx/examples/31-rsm/screenshot.png differ diff --git a/3rdparty/bgfx/examples/31-rsm/varying.def.sc b/3rdparty/bgfx/examples/31-rsm/varying.def.sc new file mode 100644 index 00000000000..50fbb16f454 --- /dev/null +++ b/3rdparty/bgfx/examples/31-rsm/varying.def.sc @@ -0,0 +1,10 @@ +vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); +vec3 v_normal : NORMAL = vec3(0.0, 0.0, 1.0); +vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); +vec3 v_view : TEXCOORD1 = vec3(0.0, 0.0, 0.0); +vec4 v_lightCenterScale : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0); // xyz is position z is scale + +vec3 a_position : POSITION; +vec4 a_color0 : COLOR0; +vec2 a_texcoord0 : TEXCOORD0; +vec3 a_normal : NORMAL; diff --git a/3rdparty/bgfx/examples/31-rsm/vs_rsm_combine.sc b/3rdparty/bgfx/examples/31-rsm/vs_rsm_combine.sc new file mode 100644 index 00000000000..be7032c2be5 --- /dev/null +++ b/3rdparty/bgfx/examples/31-rsm/vs_rsm_combine.sc @@ -0,0 +1,15 @@ +$input a_position, a_texcoord0 +$output v_texcoord0 + +/* + * Copyright 2016 Joseph Cherlin. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include "../common/common.sh" + +void main() +{ + gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0) ); + v_texcoord0 = a_texcoord0; +} diff --git a/3rdparty/bgfx/examples/31-rsm/vs_rsm_gbuffer.sc b/3rdparty/bgfx/examples/31-rsm/vs_rsm_gbuffer.sc new file mode 100644 index 00000000000..123e4fbf4af --- /dev/null +++ b/3rdparty/bgfx/examples/31-rsm/vs_rsm_gbuffer.sc @@ -0,0 +1,27 @@ +$input a_position, a_normal +$output v_normal + +/* + * Copyright 2016 Joseph Cherlin. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + + +#include "../common/common.sh" + +uniform vec4 u_tint; + +void main() +{ + // Calculate vertex position + vec3 pos = a_position; + gl_Position = mul(u_modelViewProj, vec4(pos, 1.0) ); + + // Calculate normal. Note that compressed normal is stored in the vertices + vec3 normalObjectSpace = a_normal.xyz*2.0+-1.0; // Normal is stored in [0,1], remap to [-1,1]. + + // Transform normal into world space. + vec3 normalWorldSpace = mul(u_model[0], vec4(normalObjectSpace, 0.0) ).xyz; + // Normalize to remove (uniform...) scaling, however, recompress + v_normal.xyz = normalize(normalWorldSpace)*0.5+0.5; +} diff --git a/3rdparty/bgfx/examples/31-rsm/vs_rsm_lbuffer.sc b/3rdparty/bgfx/examples/31-rsm/vs_rsm_lbuffer.sc new file mode 100644 index 00000000000..357b38ec387 --- /dev/null +++ b/3rdparty/bgfx/examples/31-rsm/vs_rsm_lbuffer.sc @@ -0,0 +1,60 @@ +$input a_position +$output v_lightCenterScale, v_color0 + +/* + * Copyright 2016 Joseph Cherlin. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include "../common/common.sh" + +uniform vec4 u_sphereInfo; +uniform mat4 u_invMvpShadow; + + +// Note texture binding starts at slot 2. Problem is that vert textures and frag textures are different. +SAMPLER2D(s_shadowMap, 2); // Used to reconstruct 3d position for lights +SAMPLER2D(s_rsm, 3); // Reflective shadow map, used to scale/color light + +float toClipSpaceDepth(float _depthTextureZ) +{ +#if BGFX_SHADER_LANGUAGE_HLSL || BGFX_SHADER_LANGUAGE_METAL + return _depthTextureZ; +#else + return _depthTextureZ * 2.0 - 1.0; +#endif // BGFX_SHADER_LANGUAGE_HLSL || BGFX_SHADER_LANGUAGE_METAL +} + +vec3 clipToWorld(mat4 _invViewProj, vec3 _clipPos) +{ + vec4 wpos = mul(_invViewProj, vec4(_clipPos, 1.0) ); + return wpos.xyz / wpos.w; +} + +void main() +{ + // Calculate vertex position + vec3 objectSpacePos = a_position; + vec2 texCoord = u_sphereInfo.xy; + + // Get world position using the shadow map + float deviceDepth = texture2DLod(s_shadowMap, texCoord, 0).x; + float depth = toClipSpaceDepth(deviceDepth); + vec3 clip = vec3(texCoord * 2.0 - 1.0, depth); +#if BGFX_SHADER_LANGUAGE_HLSL || BGFX_SHADER_LANGUAGE_METAL + clip.y = -clip.y; +#endif // BGFX_SHADER_LANGUAGE_HLSL || BGFX_SHADER_LANGUAGE_METAL + vec3 wPos = clipToWorld(u_invMvpShadow, clip); + wPos.y -= 0.001; // Would be much better to perturb in normal direction, but I didn't do that. + + // Scale and color are already in the rsm + vec4 rsm = texture2DLod(s_rsm, texCoord, 0).xyzw; + float radScale = u_sphereInfo.z; + float rad = rsm.w * radScale; + + gl_Position = mul(u_viewProj, vec4(wPos+objectSpacePos*rad, 1.0) ); + + v_lightCenterScale.xyz = wPos.xyz; + v_lightCenterScale.w = rad; + v_color0.xyz = rsm.xyz; +} diff --git a/3rdparty/bgfx/examples/31-rsm/vs_rsm_shadow.sc b/3rdparty/bgfx/examples/31-rsm/vs_rsm_shadow.sc new file mode 100644 index 00000000000..41bf8ab118d --- /dev/null +++ b/3rdparty/bgfx/examples/31-rsm/vs_rsm_shadow.sc @@ -0,0 +1,24 @@ +$input a_position, a_normal +$output v_normal // RSM shadow + +/* + * Copyright 2016 Joseph Cherlin. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include "../common/common.sh" + +uniform vec4 u_tint; + +void main() +{ + gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0) ); + + // Calculate normal. Note that compressed normal is stored in the vertices + vec3 normalObjectSpace = a_normal.xyz*2.0+-1.0; // Normal is stored in [0,1], remap to [-1,1]. + + // Transform normal into view space. + v_normal = mul(u_modelView, vec4(normalObjectSpace, 0.0) ).xyz; + // Normalize to remove (uniform...) scaling + v_normal = normalize(v_normal); +} diff --git a/3rdparty/bgfx/examples/assets/meshes/build.ninja b/3rdparty/bgfx/examples/assets/meshes/build.ninja deleted file mode 100644 index 232ba6b6216..00000000000 --- a/3rdparty/bgfx/examples/assets/meshes/build.ninja +++ /dev/null @@ -1,18 +0,0 @@ -include ../../../scripts/common.ninja -meshes = ../../runtime/meshes - -build $meshes/bunny.bin: geometryc_pack_normal bunny.obj -build $meshes/bunny_decimated.bin: geometryc_pack_normal bunny_decimated.obj -build $meshes/bunny_patched.bin: geometryc_pack_normal bunny_patched.obj -build $meshes/column.bin: geometryc_pack_normal column.obj -build $meshes/cube.bin: geometryc_pack_normal cube.obj -build $meshes/hollowcube.bin: geometryc_pack_normal hollowcube.obj -build $meshes/orb.bin: geometryc_pack_normal orb.obj -build $meshes/platform.bin: geometryc_pack_normal platform.obj -build $meshes/tree.bin: geometryc_pack_normal tree.obj -build $meshes/tree1b_lod0_1.bin: geometryc_pack_normal tree1b_lod0_1.obj -build $meshes/tree1b_lod0_2.bin: geometryc_pack_normal tree1b_lod0_2.obj -build $meshes/tree1b_lod1_1.bin: geometryc_pack_normal tree1b_lod1_1.obj -build $meshes/tree1b_lod1_2.bin: geometryc_pack_normal tree1b_lod1_2.obj -build $meshes/tree1b_lod2_1.bin: geometryc_pack_normal tree1b_lod2_1.obj -build $meshes/tree1b_lod2_2.bin: geometryc_pack_normal tree1b_lod2_2.obj diff --git a/3rdparty/bgfx/examples/assets/meshes/meshes.ninja b/3rdparty/bgfx/examples/assets/meshes/meshes.ninja new file mode 100644 index 00000000000..f8a95dac498 --- /dev/null +++ b/3rdparty/bgfx/examples/assets/meshes/meshes.ninja @@ -0,0 +1,17 @@ +meshes = $pwd/../../runtime/meshes + +build $meshes/bunny.bin: geometryc_pack_normal_barycentric $pwd/bunny.obj +build $meshes/bunny_decimated.bin: geometryc_pack_normal $pwd/bunny_decimated.obj +build $meshes/bunny_patched.bin: geometryc_pack_normal $pwd/bunny_patched.obj +build $meshes/column.bin: geometryc_pack_normal $pwd/column.obj +build $meshes/cube.bin: geometryc_pack_normal $pwd/cube.obj +build $meshes/hollowcube.bin: geometryc_pack_normal_barycentric $pwd/hollowcube.obj +build $meshes/orb.bin: geometryc_pack_normal_barycentric $pwd/orb.obj +build $meshes/platform.bin: geometryc_pack_normal $pwd/platform.obj +build $meshes/tree.bin: geometryc_pack_normal $pwd/tree.obj +build $meshes/tree1b_lod0_1.bin: geometryc_pack_normal $pwd/tree1b_lod0_1.obj +build $meshes/tree1b_lod0_2.bin: geometryc_pack_normal $pwd/tree1b_lod0_2.obj +build $meshes/tree1b_lod1_1.bin: geometryc_pack_normal $pwd/tree1b_lod1_1.obj +build $meshes/tree1b_lod1_2.bin: geometryc_pack_normal $pwd/tree1b_lod1_2.obj +build $meshes/tree1b_lod2_1.bin: geometryc_pack_normal $pwd/tree1b_lod2_1.obj +build $meshes/tree1b_lod2_2.bin: geometryc_pack_normal $pwd/tree1b_lod2_2.obj diff --git a/3rdparty/bgfx/examples/assets/textures/build.ninja b/3rdparty/bgfx/examples/assets/textures/build.ninja deleted file mode 100644 index 019e5f868a8..00000000000 --- a/3rdparty/bgfx/examples/assets/textures/build.ninja +++ /dev/null @@ -1,8 +0,0 @@ -include ../../../scripts/common.ninja -textures = ../../runtime/textures - -build $textures/texture_compression_bc1.ktx: texturec_bc1 texture_compression.png -build $textures/texture_compression_bc2.ktx: texturec_bc2 texture_compression.png -build $textures/texture_compression_bc3.ktx: texturec_bc3 texture_compression.png -build $textures/texture_compression_etc1.ktx: texturec_etc1 texture_compression.png -build $textures/texture_compression_etc2.ktx: texturec_etc2 texture_compression.png diff --git a/3rdparty/bgfx/examples/assets/textures/textures.ninja b/3rdparty/bgfx/examples/assets/textures/textures.ninja new file mode 100644 index 00000000000..fffb9c51d34 --- /dev/null +++ b/3rdparty/bgfx/examples/assets/textures/textures.ninja @@ -0,0 +1,7 @@ +textures = $pwd/../../runtime/textures + +build $textures/texture_compression_bc1.ktx: texturec_bc1 $pwd/texture_compression.png +build $textures/texture_compression_bc2.ktx: texturec_bc2 $pwd/texture_compression.png +build $textures/texture_compression_bc3.ktx: texturec_bc3 $pwd/texture_compression.png +build $textures/texture_compression_etc1.ktx: texturec_etc1 $pwd/texture_compression.png +build $textures/texture_compression_etc2.ktx: texturec_etc2 $pwd/texture_compression.png diff --git a/3rdparty/bgfx/examples/common/cube_atlas.cpp b/3rdparty/bgfx/examples/common/cube_atlas.cpp index 7b83f6f7518..9407363a37f 100644 --- a/3rdparty/bgfx/examples/common/cube_atlas.cpp +++ b/3rdparty/bgfx/examples/common/cube_atlas.cpp @@ -149,6 +149,7 @@ bool RectanglePacker::addRectangle(uint16_t _width, uint16_t _height, uint16_t& { m_skyline.erase(m_skyline.begin() + ii); --ii; + --num; } else { diff --git a/3rdparty/bgfx/examples/common/debugdraw/debugdraw.cpp b/3rdparty/bgfx/examples/common/debugdraw/debugdraw.cpp index f02e4d6523d..ac242b01f44 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/debugdraw.cpp +++ b/3rdparty/bgfx/examples/common/debugdraw/debugdraw.cpp @@ -39,13 +39,14 @@ struct DebugShapeVertex float m_x; float m_y; float m_z; - float m_mask; + uint8_t m_indices[4]; static void init() { ms_decl .begin() - .add(bgfx::Attrib::Position, 4, bgfx::AttribType::Float) + .add(bgfx::Attrib::Position, 3, bgfx::AttribType::Float) + .add(bgfx::Attrib::Indices, 4, bgfx::AttribType::Uint8) .end(); } @@ -56,14 +57,14 @@ bgfx::VertexDecl DebugShapeVertex::ms_decl; static DebugShapeVertex s_cubeVertices[8] = { - {-1.0f, 1.0f, 1.0f, 0.0f }, - { 1.0f, 1.0f, 1.0f, 0.0f }, - {-1.0f, -1.0f, 1.0f, 0.0f }, - { 1.0f, -1.0f, 1.0f, 0.0f }, - {-1.0f, 1.0f, -1.0f, 0.0f }, - { 1.0f, 1.0f, -1.0f, 0.0f }, - {-1.0f, -1.0f, -1.0f, 0.0f }, - { 1.0f, -1.0f, -1.0f, 0.0f }, + {-1.0f, 1.0f, 1.0f, { 0, 0, 0, 0 } }, + { 1.0f, 1.0f, 1.0f, { 0, 0, 0, 0 } }, + {-1.0f, -1.0f, 1.0f, { 0, 0, 0, 0 } }, + { 1.0f, -1.0f, 1.0f, { 0, 0, 0, 0 } }, + {-1.0f, 1.0f, -1.0f, { 0, 0, 0, 0 } }, + { 1.0f, 1.0f, -1.0f, { 0, 0, 0, 0 } }, + {-1.0f, -1.0f, -1.0f, { 0, 0, 0, 0 } }, + { 1.0f, -1.0f, -1.0f, { 0, 0, 0, 0 } }, }; static const uint16_t s_cubeIndices[36] = @@ -389,6 +390,7 @@ struct DebugDraw const uint32_t numIndices = numVertices; vertices[id] = BX_ALLOC(m_allocator, numVertices*stride); + memset(vertices[id], 0, numVertices*stride); genSphere(tess, vertices[id], stride); uint16_t* trilist = (uint16_t*)BX_ALLOC(m_allocator, numIndices*sizeof(uint16_t) ); @@ -397,9 +399,6 @@ struct DebugDraw trilist[ii] = uint16_t(ii); } - - - uint32_t numLineListIndices = bgfx::topologyConvert(bgfx::TopologyConvert::TriListToLineList , NULL , 0 @@ -432,6 +431,207 @@ struct DebugDraw BX_FREE(m_allocator, trilist); } + for (uint32_t mesh = 0; mesh < 4; ++mesh) + { + Mesh::Enum id = Mesh::Enum(Mesh::Cone0+mesh); + + const uint32_t num = getCircleLod(uint8_t(mesh) ); + const float step = bx::pi * 2.0f / num; + + const uint32_t numVertices = num+1; + const uint32_t numIndices = num*6; + const uint32_t numLineListIndices = num*4; + + vertices[id] = BX_ALLOC(m_allocator, numVertices*stride); + indices[id] = (uint16_t*)BX_ALLOC(m_allocator, (numIndices + numLineListIndices)*sizeof(uint16_t) ); + memset(indices[id], 0, (numIndices + numLineListIndices)*sizeof(uint16_t) ); + + DebugShapeVertex* vertex = (DebugShapeVertex*)vertices[id]; + uint16_t* index = indices[id]; + + vertex[num].m_x = 0.0f; + vertex[num].m_y = 0.0f; + vertex[num].m_z = 0.0f; + vertex[num].m_indices[0] = 1; + + for (uint32_t ii = 0; ii < num; ++ii) + { + const float angle = step * ii; + + float xy[2]; + circle(xy, angle); + + vertex[ii].m_x = xy[1]; + vertex[ii].m_y = 0.0f; + vertex[ii].m_z = xy[0]; + vertex[ii].m_indices[0] = 0; + + index[ii*3+0] = uint16_t(num); + index[ii*3+1] = uint16_t( (ii+1)%num); + index[ii*3+2] = uint16_t(ii); + + index[num*3+ii*3+0] = 0; + index[num*3+ii*3+1] = uint16_t(ii); + index[num*3+ii*3+2] = uint16_t( (ii+1)%num); + + index[numIndices+ii*2+0] = uint16_t(ii); + index[numIndices+ii*2+1] = uint16_t(num); + + index[numIndices+num*2+ii*2+0] = uint16_t(ii); + index[numIndices+num*2+ii*2+1] = uint16_t( (ii+1)%num); + } + + m_mesh[id].m_startVertex = startVertex; + m_mesh[id].m_numVertices = numVertices; + m_mesh[id].m_startIndex[0] = startIndex; + m_mesh[id].m_numIndices[0] = numIndices; + m_mesh[id].m_startIndex[1] = startIndex+numIndices; + m_mesh[id].m_numIndices[1] = numLineListIndices; + + startVertex += numVertices; + startIndex += numIndices + numLineListIndices; + } + + for (uint32_t mesh = 0; mesh < 4; ++mesh) + { + Mesh::Enum id = Mesh::Enum(Mesh::Cylinder0+mesh); + + const uint32_t num = getCircleLod(uint8_t(mesh) ); + const float step = bx::pi * 2.0f / num; + + const uint32_t numVertices = num*2; + const uint32_t numIndices = num*12; + const uint32_t numLineListIndices = num*6; + + vertices[id] = BX_ALLOC(m_allocator, numVertices*stride); + indices[id] = (uint16_t*)BX_ALLOC(m_allocator, (numIndices + numLineListIndices)*sizeof(uint16_t) ); + memset(indices[id], 0, (numIndices + numLineListIndices)*sizeof(uint16_t) ); + + DebugShapeVertex* vertex = (DebugShapeVertex*)vertices[id]; + uint16_t* index = indices[id]; + + for (uint32_t ii = 0; ii < num; ++ii) + { + const float angle = step * ii; + + float xy[2]; + circle(xy, angle); + + vertex[ii].m_x = xy[1]; + vertex[ii].m_y = 0.0f; + vertex[ii].m_z = xy[0]; + vertex[ii].m_indices[0] = 0; + + vertex[ii+num].m_x = xy[1]; + vertex[ii+num].m_y = 0.0f; + vertex[ii+num].m_z = xy[0]; + vertex[ii+num].m_indices[0] = 1; + + index[ii*6+0] = uint16_t(ii+num); + index[ii*6+1] = uint16_t( (ii+1)%num); + index[ii*6+2] = uint16_t(ii); + index[ii*6+3] = uint16_t(ii+num); + index[ii*6+4] = uint16_t( (ii+1)%num+num); + index[ii*6+5] = uint16_t( (ii+1)%num); + + index[num*6+ii*6+0] = uint16_t(0); + index[num*6+ii*6+1] = uint16_t(ii); + index[num*6+ii*6+2] = uint16_t( (ii+1)%num); + index[num*6+ii*6+3] = uint16_t(num); + index[num*6+ii*6+4] = uint16_t( (ii+1)%num+num); + index[num*6+ii*6+5] = uint16_t(ii+num); + + index[numIndices+ii*2+0] = uint16_t(ii); + index[numIndices+ii*2+1] = uint16_t(ii+num); + + index[numIndices+num*2+ii*2+0] = uint16_t(ii); + index[numIndices+num*2+ii*2+1] = uint16_t( (ii+1)%num); + + index[numIndices+num*4+ii*2+0] = uint16_t(num + ii); + index[numIndices+num*4+ii*2+1] = uint16_t(num + (ii+1)%num); + } + + m_mesh[id].m_startVertex = startVertex; + m_mesh[id].m_numVertices = numVertices; + m_mesh[id].m_startIndex[0] = startIndex; + m_mesh[id].m_numIndices[0] = numIndices; + m_mesh[id].m_startIndex[1] = startIndex+numIndices; + m_mesh[id].m_numIndices[1] = numLineListIndices; + + startVertex += numVertices; + startIndex += numIndices + numLineListIndices; + } + + for (uint32_t mesh = 0; mesh < 4; ++mesh) + { + Mesh::Enum id = Mesh::Enum(Mesh::Capsule0+mesh); + + const uint32_t num = getCircleLod(uint8_t(mesh) ); + const float step = bx::pi * 2.0f / num; + + const uint32_t numVertices = num*2; + const uint32_t numIndices = num*6; + const uint32_t numLineListIndices = num*6; + + vertices[id] = BX_ALLOC(m_allocator, numVertices*stride); + indices[id] = (uint16_t*)BX_ALLOC(m_allocator, (numIndices + numLineListIndices)*sizeof(uint16_t) ); + memset(indices[id], 0, (numIndices + numLineListIndices)*sizeof(uint16_t) ); + + DebugShapeVertex* vertex = (DebugShapeVertex*)vertices[id]; + uint16_t* index = indices[id]; + + for (uint32_t ii = 0; ii < num; ++ii) + { + const float angle = step * ii; + + float xy[2]; + circle(xy, angle); + + vertex[ii].m_x = xy[1]; + vertex[ii].m_y = 0.0f; + vertex[ii].m_z = xy[0]; + vertex[ii].m_indices[0] = 0; + + vertex[ii+num].m_x = xy[1]; + vertex[ii+num].m_y = 0.0f; + vertex[ii+num].m_z = xy[0]; + vertex[ii+num].m_indices[0] = 1; + + index[ii*6+0] = uint16_t(ii+num); + index[ii*6+1] = uint16_t( (ii+1)%num); + index[ii*6+2] = uint16_t(ii); + index[ii*6+3] = uint16_t(ii+num); + index[ii*6+4] = uint16_t( (ii+1)%num+num); + index[ii*6+5] = uint16_t( (ii+1)%num); + +// index[num*6+ii*6+0] = uint16_t(0); +// index[num*6+ii*6+1] = uint16_t(ii); +// index[num*6+ii*6+2] = uint16_t( (ii+1)%num); +// index[num*6+ii*6+3] = uint16_t(num); +// index[num*6+ii*6+4] = uint16_t( (ii+1)%num+num); +// index[num*6+ii*6+5] = uint16_t(ii+num); + + index[numIndices+ii*2+0] = uint16_t(ii); + index[numIndices+ii*2+1] = uint16_t(ii+num); + + index[numIndices+num*2+ii*2+0] = uint16_t(ii); + index[numIndices+num*2+ii*2+1] = uint16_t( (ii+1)%num); + + index[numIndices+num*4+ii*2+0] = uint16_t(num + ii); + index[numIndices+num*4+ii*2+1] = uint16_t(num + (ii+1)%num); + } + + m_mesh[id].m_startVertex = startVertex; + m_mesh[id].m_numVertices = numVertices; + m_mesh[id].m_startIndex[0] = startIndex; + m_mesh[id].m_numIndices[0] = numIndices; + m_mesh[id].m_startIndex[1] = startIndex+numIndices; + m_mesh[id].m_numIndices[1] = numLineListIndices; + + startVertex += numVertices; + startIndex += numIndices + numLineListIndices; + } + m_mesh[Mesh::Cube].m_startVertex = startVertex; m_mesh[Mesh::Cube].m_numVertices = BX_COUNTOF(s_cubeVertices); m_mesh[Mesh::Cube].m_startIndex[0] = startIndex; @@ -444,9 +644,9 @@ struct DebugDraw const bgfx::Memory* vb = bgfx::alloc(startVertex*stride); const bgfx::Memory* ib = bgfx::alloc(startIndex*sizeof(uint16_t) ); - for (uint32_t mesh = 0; mesh < 4; ++mesh) + for (uint32_t mesh = Mesh::Sphere0; mesh < Mesh::Cube; ++mesh) { - Mesh::Enum id = Mesh::Enum(Mesh::Sphere0+mesh); + Mesh::Enum id = Mesh::Enum(mesh); memcpy(&vb->data[m_mesh[id].m_startVertex * stride] , vertices[id] , m_mesh[id].m_numVertices*stride @@ -780,7 +980,7 @@ struct DebugDraw void draw(const Cylinder& _cylinder, bool _capsule) { - BX_UNUSED(_cylinder, _capsule); + drawCylinder(_cylinder.m_pos, _cylinder.m_end, _cylinder.m_radius, _capsule); } void draw(const Disk& _disk) @@ -823,7 +1023,7 @@ struct DebugDraw } else { - draw(Mesh::Cube, _obb.m_mtx, false); + draw(Mesh::Cube, _obb.m_mtx, 1, false); } } @@ -846,7 +1046,7 @@ struct DebugDraw ? uint8_t(Mesh::SphereMaxLod) : attrib.m_lod ; - draw(Mesh::Enum(Mesh::Sphere0 + lod), mtx, attrib.m_wireframe); + draw(Mesh::Enum(Mesh::Sphere0 + lod), mtx, 1, attrib.m_wireframe); } void drawFrustum(const float* _viewProj) @@ -936,7 +1136,7 @@ struct DebugDraw lineTo(_x, _y, _z); } - void drawCircle(const float* _normal, const float* _center, float _radius, float _weight = 0.0f) + void drawCircle(const float* _normal, const float* _center, float _radius, float _weight) { const Attrib& attrib = m_attrib[m_stack]; const uint32_t num = getCircleLod(attrib.m_lod); @@ -979,12 +1179,12 @@ struct DebugDraw close(); } - void drawCircle(const void* _normal, const void* _center, float _radius, float _weight = 0.0f) + void drawCircle(const void* _normal, const void* _center, float _radius, float _weight) { drawCircle( (const float*)_normal, (const float*)_center, _radius, _weight); } - void drawCircle(Axis::Enum _axis, float _x, float _y, float _z, float _radius, float _weight = 0.0f) + void drawCircle(Axis::Enum _axis, float _x, float _y, float _z, float _radius, float _weight) { const Attrib& attrib = m_attrib[m_stack]; const uint32_t num = getCircleLod(attrib.m_lod); @@ -1018,147 +1218,139 @@ struct DebugDraw close(); } - void drawCone(const float* _from, const float* _to, float _radius, float _weight = 0.0f) + void drawCone(const float* _from, const float* _to, float _radius) { const Attrib& attrib = m_attrib[m_stack]; - const uint32_t num = getCircleLod(attrib.m_lod); - const float step = bx::pi * 2.0f / num; - _weight = bx::fclamp(_weight, 0.0f, 2.0f); - float pos[3]; float tmp0[3]; - float tmp1[3]; - bx::vec3Sub(tmp0, _from, _to); - Plane plane; - plane.m_dist = 0.0f; - bx::vec3Norm(plane.m_normal, tmp0); + float normal[3]; + bx::vec3Norm(normal, tmp0); - float udir[3]; - float vdir[3]; - calcPlaneUv(plane, udir, vdir); + float mtx[2][16]; + bx::mtxFromNormal(mtx[0], normal, _radius, _from); - float xy0[2]; - float xy1[2]; - circle(xy0, 0.0f); - squircle(xy1, 0.0f); + memcpy(mtx[1], mtx[0], 64); + mtx[1][12] = _to[0]; + mtx[1][13] = _to[1]; + mtx[1][14] = _to[2]; - bx::vec3Mul(pos, udir, bx::flerp(xy0[0], xy1[0], _weight)*_radius); - bx::vec3Mul(tmp0, vdir, bx::flerp(xy0[1], xy1[1], _weight)*_radius); - bx::vec3Add(tmp1, pos, tmp0); - bx::vec3Add(pos, tmp1, _from); - moveTo(pos); - - for (uint32_t ii = 1; ii < num; ++ii) - { - float angle = step * ii; - circle(xy0, angle); - squircle(xy1, angle); - - bx::vec3Mul(pos, udir, bx::flerp(xy0[0], xy1[0], _weight)*_radius); - bx::vec3Mul(tmp0, vdir, bx::flerp(xy0[1], xy1[1], _weight)*_radius); - bx::vec3Add(tmp1, pos, tmp0); - bx::vec3Add(pos, tmp1, _from); - lineTo(pos); - } - - close(); - - for (uint32_t ii = 0; ii < num; ++ii) - { - float angle = step * ii; - circle(xy0, angle); - squircle(xy1, angle); - - bx::vec3Mul(pos, udir, bx::flerp(xy0[0], xy1[0], _weight)*_radius); - bx::vec3Mul(tmp0, vdir, bx::flerp(xy0[1], xy1[1], _weight)*_radius); - bx::vec3Add(tmp1, pos, tmp0); - bx::vec3Add(pos, tmp1, _from); - moveTo(pos); - lineTo(_to); - } + uint8_t lod = attrib.m_lod > Mesh::ConeMaxLod + ? uint8_t(Mesh::ConeMaxLod) + : attrib.m_lod + ; + draw(Mesh::Enum(Mesh::Cone0 + lod), mtx[0], 2, attrib.m_wireframe); } - void drawCone(const void* _from, const void* _to, float _radius, float _weight = 0.0f) + void drawCone(const void* _from, const void* _to, float _radius) { - drawCone( (const float*)_from, (const float*)_to, _radius, _weight); + drawCone( (const float*)_from, (const float*)_to, _radius); } - void drawCylinder(const float* _from, const float* _to, float _radius, float _weight = 0.0f) + void drawCylinder(const float* _from, const float* _to, float _radius, bool _capsule) { const Attrib& attrib = m_attrib[m_stack]; - const uint32_t num = getCircleLod(attrib.m_lod); - const float step = bx::pi * 2.0f / num; - _weight = bx::fclamp(_weight, 0.0f, 2.0f); - float pos[3]; float tmp0[3]; - float tmp1[3]; - bx::vec3Sub(tmp0, _from, _to); - Plane plane; - plane.m_dist = 0.0f; - bx::vec3Norm(plane.m_normal, tmp0); + float normal[3]; + bx::vec3Norm(normal, tmp0); - float udir[3]; - float vdir[3]; - calcPlaneUv(plane, udir, vdir); + float mtx[2][16]; + bx::mtxFromNormal(mtx[0], normal, _radius, _from); - float xy0[2]; - float xy1[2]; - circle(xy0, 0.0f); - squircle(xy1, 0.0f); + memcpy(mtx[1], mtx[0], 64); + mtx[1][12] = _to[0]; + mtx[1][13] = _to[1]; + mtx[1][14] = _to[2]; - float pos1[3]; - bx::vec3Mul(pos, udir, bx::flerp(xy0[0], xy1[0], _weight)*_radius); - bx::vec3Mul(tmp0, vdir, bx::flerp(xy0[1], xy1[1], _weight)*_radius); - bx::vec3Add(tmp1, pos, tmp0); - bx::vec3Add(pos, tmp1, _from); - bx::vec3Add(pos1, tmp1, _to); - - for (uint32_t ii = 1; ii < num+1; ++ii) + if (_capsule) { - float angle = step * ii; - circle(xy0, angle); - squircle(xy1, angle); + uint8_t lod = attrib.m_lod > Mesh::CapsuleMaxLod + ? uint8_t(Mesh::CapsuleMaxLod) + : attrib.m_lod + ; + draw(Mesh::Enum(Mesh::Capsule0 + lod), mtx[0], 2, attrib.m_wireframe); - moveTo(pos); lineTo(pos1); + Sphere sphere; + bx::vec3Move(sphere.m_center, _from); + sphere.m_radius = _radius; + draw(sphere); - moveTo(pos); - bx::vec3Mul(pos, udir, bx::flerp(xy0[0], xy1[0], _weight)*_radius); - bx::vec3Mul(tmp0, vdir, bx::flerp(xy0[1], xy1[1], _weight)*_radius); - bx::vec3Add(tmp1, pos, tmp0); - bx::vec3Add(pos, tmp1, _from); - lineTo(pos); - - moveTo(pos1); - bx::vec3Add(pos1, tmp1, _to); - lineTo(pos1); + bx::vec3Move(sphere.m_center, _to); + draw(sphere); + } + else + { + uint8_t lod = attrib.m_lod > Mesh::CylinderMaxLod + ? uint8_t(Mesh::CylinderMaxLod) + : attrib.m_lod + ; + draw(Mesh::Enum(Mesh::Cylinder0 + lod), mtx[0], 2, attrib.m_wireframe); } } - void drawCylinder(const void* _from, const void* _to, float _radius, float _weight = 0.0f) + void drawCylinder(const void* _from, const void* _to, float _radius, bool _capsule) { - drawCylinder( (const float*)_from, (const float*)_to, _radius, _weight); + drawCylinder( (const float*)_from, (const float*)_to, _radius, _capsule); } - void drawAxis(float _x, float _y, float _z, float _len, Axis::Enum _highlight) + void drawAxis(float _x, float _y, float _z, float _len, Axis::Enum _highlight, float _thickness) { push(); - setColor(Axis::X == _highlight ? 0xff00ffff : 0xff0000ff); - moveTo(_x, _y, _z); - lineTo(_x + _len, _y, _z); + if (_thickness > 0.0f) + { + float from[3] = { _x, _y, _z }; + float mid[3]; + float to[3]; - setColor(Axis::Y == _highlight ? 0xff00ffff : 0xff00ff00); - moveTo(_x, _y, _z); - lineTo(_x, _y + _len, _z); + setColor(Axis::X == _highlight ? 0xff00ffff : 0xff0000ff); + mid[0] = _x + _len - _thickness; + mid[1] = _y; + mid[2] = _z; + to[0] = _x + _len; + to[1] = _y; + to[2] = _z; + drawCylinder(from, mid, _thickness, false); + drawCone(mid, to, _thickness); - setColor(Axis::Z == _highlight ? 0xff00ffff : 0xffff0000); - moveTo(_x, _y, _z); - lineTo(_x, _y, _z + _len); + setColor(Axis::Y == _highlight ? 0xff00ffff : 0xff00ff00); + mid[0] = _x; + mid[1] = _y + _len - _thickness; + mid[2] = _z; + to[0] = _x; + to[1] = _y + _len; + to[2] = _z; + drawCylinder(from, mid, _thickness, false); + drawCone(mid, to, _thickness); + + setColor(Axis::Z == _highlight ? 0xff00ffff : 0xffff0000); + mid[0] = _x; + mid[1] = _y; + mid[2] = _z + _len - _thickness; + to[0] = _x; + to[1] = _y; + to[2] = _z + _len; + drawCylinder(from, mid, _thickness, false); + drawCone(mid, to, _thickness); + } + else + { + setColor(Axis::X == _highlight ? 0xff00ffff : 0xff0000ff); + moveTo(_x, _y, _z); + lineTo(_x + _len, _y, _z); + + setColor(Axis::Y == _highlight ? 0xff00ffff : 0xff00ff00); + moveTo(_x, _y, _z); + lineTo(_x, _y + _len, _z); + + setColor(Axis::Z == _highlight ? 0xff00ffff : 0xffff0000); + moveTo(_x, _y, _z); + lineTo(_x, _y, _z + _len); + } pop(); } @@ -1274,13 +1466,13 @@ struct DebugDraw push(); setColor(Axis::X == _hightlight ? 0xff00ffff : 0xff0000ff); - drawCircle(Axis::X, _x, _y, _z, _radius); + drawCircle(Axis::X, _x, _y, _z, _radius, 0.0f); setColor(Axis::Y == _hightlight ? 0xff00ffff : 0xff00ff00); - drawCircle(Axis::Y, _x, _y, _z, _radius); + drawCircle(Axis::Y, _x, _y, _z, _radius, 0.0f); setColor(Axis::Z == _hightlight ? 0xff00ffff : 0xffff0000); - drawCircle(Axis::Z, _x, _y, _z, _radius); + drawCircle(Axis::Z, _x, _y, _z, _radius, 0.0f); pop(); } @@ -1294,11 +1486,30 @@ private: Sphere1, Sphere2, Sphere3, + + Cone0, + Cone1, + Cone2, + Cone3, + + Cylinder0, + Cylinder1, + Cylinder2, + Cylinder3, + + Capsule0, + Capsule1, + Capsule2, + Capsule3, + Cube, Count, - SphereMaxLod = Sphere3 - Sphere0, + SphereMaxLod = Sphere3 - Sphere0, + ConeMaxLod = Cone3 - Cone0, + CylinderMaxLod = Cylinder3 - Cylinder0, + CapsuleMaxLod = Capsule3 - Capsule0, }; uint32_t m_startVertex; @@ -1320,7 +1531,7 @@ private: }; }; - void draw(Mesh::Enum _mesh, const float* _mtx, bool _wireframe) const + void draw(Mesh::Enum _mesh, const float* _mtx, uint16_t _num, bool _wireframe) const { const Mesh& mesh = m_mesh[_mesh]; @@ -1334,31 +1545,34 @@ private: ); } + const float flip = 0 == (attrib.m_state & BGFX_STATE_CULL_CCW) ? 1.0f : -1.0f; + const uint8_t alpha = attrib.m_abgr>>24; + float params[4][4] = { - { - 0.0f, - -1.0f, - 0.0f, - 3.0f, + { // lightDir + 0.0f * flip, + -1.0f * flip, + 0.0f * flip, + 3.0f, // shininess }, - { + { // skyColor 1.0f, 0.9f, 0.8f, - 0.0f, + 0.0f, // unused }, - { + { // groundColor.xyz0 0.2f, 0.22f, 0.5f, - 0.0f, + 0.0f, // unused }, - { - ( (attrib.m_abgr>>24) )/255.0f, - ( (attrib.m_abgr>>16)&0xff)/255.0f, - ( (attrib.m_abgr>> 8)&0xff)/255.0f, + { // matColor ( (attrib.m_abgr )&0xff)/255.0f, + ( (attrib.m_abgr>> 8)&0xff)/255.0f, + ( (attrib.m_abgr>>16)&0xff)/255.0f, + ( alpha )/255.0f, }, }; @@ -1366,11 +1580,12 @@ private: bgfx::setUniform(u_params, params, 4); - bgfx::setTransform(_mtx); + bgfx::setTransform(_mtx, _num); bgfx::setVertexBuffer(m_vbh, mesh.m_startVertex, mesh.m_numVertices); bgfx::setState(0 | attrib.m_state - | (_wireframe ? BGFX_STATE_PT_LINES|BGFX_STATE_LINEAA|BGFX_STATE_BLEND_ALPHA : 0) + | (_wireframe ? BGFX_STATE_PT_LINES|BGFX_STATE_LINEAA|BGFX_STATE_BLEND_ALPHA + : (alpha < 0xff) ? BGFX_STATE_BLEND_ALPHA : 0) ); bgfx::submit(m_viewId, m_program[_wireframe ? Program::Fill : Program::FillLit]); } @@ -1608,19 +1823,34 @@ void ddDrawCircle(Axis::Enum _axis, float _x, float _y, float _z, float _radius, s_dd.drawCircle(_axis, _x, _y, _z, _radius, _weight); } -void ddDrawCone(const void* _from, const void* _to, float _radius, float _weight) +void ddDrawCone(const void* _from, const void* _to, float _radius) { - s_dd.drawCone(_from, _to, _radius, _weight); + s_dd.drawCone(_from, _to, _radius); } -void ddDrawCylinder(const void* _from, const void* _to, float _radius, float _weight) +void ddDrawCylinder(const void* _from, const void* _to, float _radius, bool _capsule) { - s_dd.drawCylinder(_from, _to, _radius, _weight); + if (_capsule) + { + s_dd.push(); + s_dd.setLod(0); + s_dd.drawCylinder(_from, _to, _radius, true); + s_dd.pop(); + } + else + { + s_dd.drawCylinder(_from, _to, _radius, false); + } } -void ddDrawAxis(float _x, float _y, float _z, float _len, Axis::Enum _hightlight) +void ddDrawCapsule(const void* _from, const void* _to, float _radius) { - s_dd.drawAxis(_x, _y, _z, _len, _hightlight); + s_dd.drawCylinder(_from, _to, _radius, true); +} + +void ddDrawAxis(float _x, float _y, float _z, float _len, Axis::Enum _hightlight, float _thickness) +{ + s_dd.drawAxis(_x, _y, _z, _len, _hightlight, _thickness); } void ddDrawGrid(const void* _normal, const void* _center, uint32_t _size, float _step) diff --git a/3rdparty/bgfx/examples/common/debugdraw/debugdraw.h b/3rdparty/bgfx/examples/common/debugdraw/debugdraw.h index 0888ffdae61..2535e5b7aff 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/debugdraw.h +++ b/3rdparty/bgfx/examples/common/debugdraw/debugdraw.h @@ -103,13 +103,16 @@ void ddDrawCircle(const void* _normal, const void* _center, float _radius, float void ddDrawCircle(Axis::Enum _axis, float _x, float _y, float _z, float _radius, float _weight = 0.0f); /// -void ddDrawCone(const void* _from, const void* _to, float _radius, float _weight = 0.0f); +void ddDrawCone(const void* _from, const void* _to, float _radius); /// -void ddDrawCylinder(const void* _from, const void* _to, float _radius, float _weight = 0.0f); +void ddDrawCylinder(const void* _from, const void* _to, float _radius, bool _capsule = false); /// -void ddDrawAxis(float _x, float _y, float _z, float _len = 1.0f, Axis::Enum _highlight = Axis::Count); +void ddDrawCapsule(const void* _from, const void* _to, float _radius); + +/// +void ddDrawAxis(float _x, float _y, float _z, float _len = 1.0f, Axis::Enum _highlight = Axis::Count, float _thickness = 0.0f); /// void ddDrawGrid(const void* _normal, const void* _center, uint32_t _size = 20, float _step = 1.0f); diff --git a/3rdparty/bgfx/examples/common/debugdraw/varying.def.sc b/3rdparty/bgfx/examples/common/debugdraw/varying.def.sc index 79ed7aebf68..07d21a33f59 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/varying.def.sc +++ b/3rdparty/bgfx/examples/common/debugdraw/varying.def.sc @@ -1,4 +1,5 @@ vec3 a_position : POSITION; +ivec4 a_indices : BLENDINDICES; vec4 a_color0 : COLOR0; float a_texcoord0 : TEXCOORD0; diff --git a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill.bin.h b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill.bin.h index 16fd98a58ef..50c1b1e580d 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill.bin.h +++ b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill.bin.h @@ -1,107 +1,148 @@ -static const uint8_t vs_debugdraw_fill_glsl[242] = +static const uint8_t vs_debugdraw_fill_glsl[329] = { - 0x56, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 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, 0x01, 0x00, // elViewProj...... - 0xcd, 0x00, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ....attribute hi - 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, // ghp vec3 a_posit - 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, // ion;.uniform hig - 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, // hp mat4 u_modelV - 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, // iewProj;.void ma - 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // in ().{. highp - 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, // vec4 tmpvar_1;. - 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, // tmpvar_1.w = 1. - 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, // 0;. tmpvar_1.xy - 0x7a, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, // z = a_position;. - 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, // gl_Position = - 0x28, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // (u_modelViewProj - 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, // * tmpvar_1);.}. - 0x0a, 0x00, // .. + 0x56, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, // wProj.......u_mo + 0x64, 0x65, 0x6c, 0x04, 0x20, 0x00, 0x00, 0x20, 0x00, 0x1b, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, // del. .. .....att + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // ribute highp vec + 0x34, 0x20, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x3b, 0x0a, 0x61, 0x74, 0x74, // 4 a_indices;.att + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // ribute highp vec + 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x75, 0x6e, // 3 a_position;.un + 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, // iform highp mat4 + 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x75, 0x6e, 0x69, // u_viewProj;.uni + 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // form mat4 u_mode + 0x6c, 0x5b, 0x33, 0x32, 0x5d, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, // l[32];.void main + 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, // ().{. highp ve + 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, // c4 tmpvar_1;. t + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, // mpvar_1.w = 1.0; + 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, // . tmpvar_1.xyz + 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, // = a_position;. + 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x75, // gl_Position = (u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x28, 0x75, 0x5f, 0x6d, // _viewProj * (u_m + 0x6f, 0x64, 0x65, 0x6c, 0x5b, 0x69, 0x6e, 0x74, 0x28, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, // odel[int(a_indic + 0x65, 0x73, 0x2e, 0x78, 0x29, 0x5d, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // es.x)] * tmpvar_ + 0x31, 0x29, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // 1));.}... }; -static const uint8_t vs_debugdraw_fill_dx9[287] = +static const uint8_t vs_debugdraw_fill_dx9[492] = { - 0x56, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 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...... - 0xfc, 0x00, 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_ - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x03, 0x00, // modelViewProj... - 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, 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, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, // ................ - 0x0f, 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, 0xe4, 0xa0, 0x00, 0x00, // U............... - 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, 0xff, 0xff, 0x00, 0x00, 0x00, // ............... + 0x56, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x04, 0x20, 0x00, 0x00, 0x80, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // el. .....u_viewP + 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x80, 0x00, 0x04, 0x00, 0xc0, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, // roj............. + 0xff, 0x2e, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, // ...CTAB......... + 0x03, 0xfe, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x78, // ...............x + 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x4c, // ...D...........L + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x00, 0x04, // ................ + 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // ...h.......u_mod + 0x65, 0x6c, 0x00, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, // el......... .... + 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0xab, 0x03, // ...u_viewProj... + 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, // ...............v + 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, // s_3_0.Microsoft + 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, // (R) HLSL Shader + 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, // Compiler 10.0.10 + 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x84, // 011.16384..Q.... + 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......@......... + 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x02, 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, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x84, // ................ + 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x2e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0xb0, 0x00, // ................ + 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0x55, 0x90, 0x01, // .............U.. + 0x20, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0x80, 0x00, // ............... + 0x20, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, // ............... + 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x20, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x01, // ........ ....... + 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, // ................ + 0x00, 0xe4, 0x80, 0x03, 0x20, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x05, 0x00, 0x00, 0x03, 0x01, // .... ........... + 0x00, 0x0f, 0x80, 0x00, 0x00, 0x55, 0x80, 0x81, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x01, // .....U.......... + 0x00, 0x0f, 0x80, 0x80, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x04, // ................ + 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x82, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x01, // ................ + 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0xe0, 0x83, 0x00, 0xe4, 0xa0, 0x00, // ................ + 0x00, 0xff, 0x80, 0x01, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ............ }; -static const uint8_t vs_debugdraw_fill_dx11[404] = +static const uint8_t vs_debugdraw_fill_dx11[675] = { - 0x56, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod - 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x6c, 0x01, 0x44, 0x58, 0x42, 0x43, 0x87, 0x3c, 0x16, 0xa4, 0x8d, 0x3d, 0x5b, 0xea, 0x61, 0x5c, // l.DXBC.<...=[.a. - 0x10, 0x3b, 0xa1, 0xf8, 0xf8, 0xa1, 0x01, 0x00, 0x00, 0x00, 0x6c, 0x01, 0x00, 0x00, 0x03, 0x00, // .;........l..... - 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x49, 0x53, // ..,...`.......IS - 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, // GN,........... . - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, // ......POSITION.. - 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, // ..OSGN,......... - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, // .. ............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, // ..........SV_POS - 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x53, 0x48, 0x44, 0x52, 0xd0, 0x00, 0x00, 0x00, 0x40, 0x00, // ITION.SHDR....@. - 0x01, 0x00, 0x34, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, // ..4...Y...F. ... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x00, 0x00, // ......_...r..... - 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ..g.... ........ - 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, // ..h.......8..... - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, // ......V.......F. - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, // .........2..... - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......F. ....... - 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, // ..........F..... - 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, // ..2...........F. - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x00, 0x00, // ............... - 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, // ..F............ - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, // ......F.......F. - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x01, // .........>..... - 0x01, 0x00, 0x40, 0x00, // ..@. + 0x56, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, // wProj.......u_mo + 0x64, 0x65, 0x6c, 0x04, 0x20, 0x40, 0x00, 0x80, 0x00, 0x70, 0x02, 0x44, 0x58, 0x42, 0x43, 0x21, // del. @...p.DXBC! + 0x99, 0xbc, 0x62, 0x67, 0xb7, 0x95, 0xd6, 0x90, 0x9d, 0x96, 0xc0, 0x0e, 0x98, 0x00, 0xf9, 0x01, // ..bg............ + 0x00, 0x00, 0x00, 0x70, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, // ...p.......,.... + 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, // .......ISGNP.... + 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .......8........ + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x01, 0x00, 0x00, 0x45, // ...............E + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, // ................ + 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x42, 0x4c, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x44, 0x49, // .......BLENDINDI + 0x43, 0x45, 0x53, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, 0xab, 0x4f, // CES.POSITION...O + 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI + 0x4f, 0x4e, 0x00, 0x53, 0x48, 0x44, 0x52, 0xb0, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x6c, // ON.SHDR....@...l + 0x00, 0x00, 0x00, 0x59, 0x08, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, // ...Y...F. ...... + 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x12, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, // ..._..........._ + 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, // ...r.......g.... + 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x02, // ..........h.... + 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, // ...)............ + 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x38, // ........@......8 + 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, // ...........V.... + 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0a, // ...F. .......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, 0x00, 0x01, // .......2........ + 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0a, // ...F. .......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, // ...............F + 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, 0x00, 0x01, // .......2........ + 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0a, // ...F. .......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, // ...............F + 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, // ...F.......F. .. + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, // ...............8 + 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x00, // ...........V.... + 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, // ...F. .........2 + 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // ...........F. .. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ...............F + 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, // .......2........ + 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, // ...F. .......... + 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, // .......F.......2 + 0x00, 0x00, 0x0a, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. .. + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ...............F + 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x02, 0x0e, 0x00, 0x01, // .......>........ + 0x00, 0x40, 0x08, // .@. }; -static const uint8_t vs_debugdraw_fill_mtl[555] = +static const uint8_t vs_debugdraw_fill_mtl[650] = { - 0x56, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x02, 0x00, 0x00, 0x75, 0x73, // VSH...........us + 0x56, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7b, 0x02, 0x00, 0x00, 0x75, 0x73, // VSH.......{...us 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { - 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // . float3 a_posi - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, // tion [[attribute - 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, // (0)]];.};.struct - 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, // xlatMtlShaderOu - 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // tput {. float4 - 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, 0x6f, // gl_Position [[po - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, // sition]];.};.str - 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // uct xlatMtlShade - 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // rUniform {. flo - 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, // at4x4 u_modelVie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, // wProj;.};.vertex - 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, // xlatMtlShaderOu - 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, // tput xlatMtlMain - 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, // (xlatMtlShaderI - 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, // nput _mtl_i [[st - 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, // age_in]], consta - 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // nt xlatMtlShader - 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, // Uniform& _mtl_u - 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, // [[buffer(0)]]).{ - 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // . xlatMtlShader - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, // Output _mtl_o;. - 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // float4 tmpvar_1 - 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, // ;. tmpvar_1.w = - 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // 1.0;. tmpvar_1 - 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, // .xyz = _mtl_i.a_ - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // position;. _mtl - 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, // _o.gl_Position = - 0x20, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // (_mtl_u.u_model - 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // ViewProj * tmpva - 0x72, 0x5f, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, // r_1);. return _ - 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // mtl_o;.}... + 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x69, // . float4 a_indi + 0x63, 0x65, 0x73, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, // ces [[attribute( + 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x61, // 0)]];. float3 a + 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, // _position [[attr + 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, // ibute(1)]];.};.s + 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // truct xlatMtlSha + 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, // derOutput {. fl + 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // oat4 gl_Position + 0x20, 0x5b, 0x5b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, // [[position]];.} + 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // ;.struct xlatMtl + 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, // ShaderUniform {. + 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, // float4x4 u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, // wProj;. float4x + 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5b, 0x33, 0x32, 0x5d, 0x3b, 0x0a, 0x7d, // 4 u_model[32];.} + 0x3b, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // ;.vertex xlatMtl + 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, // ShaderOutput xla + 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // tMtlMain (xlatMt + 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, // lShaderInput _mt + 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, // l_i [[stage_in]] + 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // , constant xlatM + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, // tlShaderUniform& + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, // _mtl_u [[buffer + 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // (0)]]).{. xlatM + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, // tlShaderOutput _ + 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // mtl_o;. float4 + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // tmpvar_1;. tmpv + 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, // ar_1.w = 1.0;. + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x5f, // tmpvar_1.xyz = _ + 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // mtl_i.a_position + 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, // ;. _mtl_o.gl_Po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, // sition = (_mtl_u + 0x2e, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x28, 0x5f, // .u_viewProj * (_ + 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5b, 0x69, 0x6e, // mtl_u.u_model[in + 0x74, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, // t(_mtl_i.a_indic + 0x65, 0x73, 0x2e, 0x78, 0x29, 0x5d, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // es.x)] * tmpvar_ + 0x31, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, // 1));. return _m + 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // tl_o;.}... }; diff --git a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill.sc b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill.sc index d007e9367cd..58f7be44248 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill.sc +++ b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill.sc @@ -1,4 +1,4 @@ -$input a_position +$input a_position, a_indices /* * Copyright 2011-2016 Branimir Karadzic. All rights reserved. @@ -9,5 +9,6 @@ $input a_position void main() { - gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0) ); + vec4 model = mul(u_model[int(a_indices.x)], vec4(a_position, 1.0) ); + gl_Position = mul(u_viewProj, model); } diff --git a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.bin.h b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.bin.h index 2df5e3fbe89..c8201414fa4 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.bin.h +++ b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.bin.h @@ -1,195 +1,198 @@ -static const uint8_t vs_debugdraw_fill_lit_glsl[613] = +static const uint8_t vs_debugdraw_fill_lit_glsl[532] = { - 0x56, 0x53, 0x48, 0x04, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH...V_...u_mod - 0x65, 0x6c, 0x04, 0x20, 0x00, 0x00, 0x20, 0x00, 0x0b, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // el. .. ..u_model - 0x56, 0x69, 0x65, 0x77, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // View.......u_mod - 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... - 0x20, 0x02, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ...attribute hi - 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, // ghp vec3 a_posit - 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, // ion;.varying hig - 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x3b, 0x0a, // hp vec3 v_view;. - 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, // varying highp ve - 0x63, 0x33, 0x20, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, // c3 v_world;.unif + 0x56, 0x53, 0x48, 0x04, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x06, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH...V_...u_vie + 0x77, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, // w.......u_viewPr + 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // oj.......u_model + 0x04, 0x20, 0x00, 0x00, 0x20, 0x00, 0xd9, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, // . .. .....attrib + 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, // ute highp vec4 a + 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, // _indices;.attrib + 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x61, // ute highp vec3 a + 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, // _position;.varyi + 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x5f, // ng highp vec3 v_ + 0x76, 0x69, 0x65, 0x77, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, // view;.varying hi + 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, // ghp vec3 v_world + 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // ;.uniform highp + 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x3b, 0x0a, 0x75, 0x6e, 0x69, // mat4 u_view;.uni + 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, // form highp mat4 + 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, // u_viewProj;.unif 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // orm mat4 u_model - 0x5b, 0x33, 0x32, 0x5d, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, // [32];.uniform hi - 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // ghp mat4 u_model - 0x56, 0x69, 0x65, 0x77, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, // View;.uniform hi - 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // ghp mat4 u_model - 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, // ViewProj;.void m - 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // ain ().{. highp - 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, // vec4 tmpvar_1;. - 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, // tmpvar_1.w = 1 - 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, // .0;. tmpvar_1.x - 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, // yz = a_position; - 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, // . gl_Position = - 0x20, 0x28, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // (u_modelViewPro - 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x3b, 0x0a, 0x20, // j * tmpvar_1);. - 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, // highp vec4 tmpv - 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, // ar_2;. tmpvar_2 - 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // .w = 1.0;. tmpv - 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, // ar_2.xyz = a_pos - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x20, // ition;. v_view - 0x3d, 0x20, 0x28, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x20, 0x2a, // = (u_modelView * - 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, // tmpvar_2).xyz;. - 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, // highp vec4 tmp - 0x76, 0x61, 0x72, 0x5f, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // var_3;. tmpvar_ - 0x33, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // 3.w = 1.0;. tmp - 0x76, 0x61, 0x72, 0x5f, 0x33, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, // var_3.xyz = a_po - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, // sition;. v_worl - 0x64, 0x20, 0x3d, 0x20, 0x28, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5b, 0x30, 0x5d, 0x20, // d = (u_model[0] - 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, // * tmpvar_3).xyz; - 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // .}... + 0x5b, 0x33, 0x32, 0x5d, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, // [32];.void main + 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // ().{. highp vec + 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, // 4 tmpvar_1;. tm + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, // pvar_1.w = 1.0;. + 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, // tmpvar_1.xyz = + 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x68, // a_position;. h + 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // ighp vec4 tmpvar + 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, // _2;. tmpvar_2 = + 0x20, 0x28, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5b, 0x69, 0x6e, 0x74, 0x28, 0x61, 0x5f, // (u_model[int(a_ + 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x78, 0x29, 0x5d, 0x20, 0x2a, 0x20, 0x74, 0x6d, // indices.x)] * tm + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, // pvar_1);. gl_Po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // sition = (u_view + 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, // Proj * tmpvar_2) + 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x75, 0x5f, // ;. v_view = (u_ + 0x76, 0x69, 0x65, 0x77, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, // view * tmpvar_2) + 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x20, // .xyz;. v_world + 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, // = tmpvar_2.xyz;. + 0x7d, 0x0a, 0x0a, 0x00, // }... }; -static const uint8_t vs_debugdraw_fill_lit_dx9[563] = +static const uint8_t vs_debugdraw_fill_lit_dx9[645] = { 0x56, 0x53, 0x48, 0x04, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH...V_...u_mod - 0x65, 0x6c, 0x04, 0x20, 0x00, 0x00, 0x04, 0x00, 0x0b, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // el. .....u_model - 0x56, 0x69, 0x65, 0x77, 0x04, 0x01, 0x04, 0x00, 0x04, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // View.......u_mod - 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x08, 0x00, 0x04, 0x00, // elViewProj...... - 0xf0, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x37, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ........7.CTAB.. - 0x00, 0x00, 0xa3, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x03, 0x00, 0x00, 0x00, 0x1c, 0x00, // ................ - 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x02, 0x00, // ..........X..... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, // ......`.......p. - 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........|..... - 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x7c, 0x00, // ..............|. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x03, 0x00, // ......u_model... - 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ...... .......u_ - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, // modelView....... - 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..........u_mode - 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, // lViewProj.vs_3_0 - 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, // .Microsoft (R) H - 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, // LSL Shader Compi - 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, // ler 10.0.10011.1 - 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, // 6384............ - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x07, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ - 0x01, 0x80, 0x02, 0x00, 0x07, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x09, 0x00, // ................ - 0xe4, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x08, 0x00, // ....U........... - 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ................ - 0x0f, 0x80, 0x0a, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x0b, 0x00, 0xe4, 0xa0, 0x05, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x05, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, // ............U... - 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x04, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, // ................ - 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x06, 0x00, 0xe4, 0xa0, 0x00, 0x00, // ................ - 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x07, 0xe0, 0x00, 0x00, // ................ - 0xe4, 0x80, 0x07, 0x00, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, // ................ - 0xe4, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, // ....U........... - 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ................ - 0x07, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, // ................ - 0x00, 0x03, 0x02, 0x00, 0x07, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, 0xff, // ................ - 0x00, 0x00, 0x00, // ... + 0x65, 0x6c, 0x04, 0x20, 0x00, 0x00, 0x80, 0x00, 0x06, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x04, // el. .....u_view. + 0x01, 0x80, 0x00, 0x04, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // ......u_viewProj + 0x04, 0x01, 0x84, 0x00, 0x04, 0x00, 0x4c, 0x02, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x35, 0x00, // ......L.......5. + 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, // CTAB............ + 0x03, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x93, 0x00, 0x00, 0x00, // ................ + 0x58, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, // X...........`... + 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00, 0x00, // ....p........... + 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x02, 0x00, 0x84, 0x00, // x............... + 0x04, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ....x.......u_mo + 0x64, 0x65, 0x6c, 0x00, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, // del......... ... + 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0xab, 0x03, 0x00, 0x03, 0x00, // ....u_view...... + 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, // ewProj.vs_3_0.Mi + 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, // crosoft (R) HLSL + 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, // Shader Compiler + 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, // 10.0.10011.1638 + 0x34, 0x00, 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, 0x88, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x40, // 4...Q..........@ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x02, 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, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x07, 0xe0, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x05, 0x00, 0x01, 0x80, 0x02, 0x00, 0x07, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, // ................ + 0x88, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x2e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0xb0, // ................ + 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0x55, 0x90, // ..............U. + 0x01, 0x20, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0x80, // . .............. + 0x00, 0x20, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, // . .............. + 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x20, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0xb0, // ......... ...... + 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, // ................ + 0x00, 0x00, 0xe4, 0x80, 0x03, 0x20, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x05, 0x00, 0x00, 0x03, // ..... .......... + 0x01, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x55, 0x80, 0x85, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, // ......U......... + 0x01, 0x00, 0x0f, 0x80, 0x84, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x80, // ................ + 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x86, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x80, // ................ + 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0xe0, 0x87, 0x00, 0xe4, 0xa0, // ................ + 0x00, 0x00, 0xff, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x07, 0x80, // ................ + 0x00, 0x00, 0x55, 0x80, 0x81, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x07, 0x80, // ..U............. + 0x80, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, // ................ + 0x01, 0x00, 0x07, 0x80, 0x82, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x01, 0x00, 0xe4, 0x80, // ................ + 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x07, 0xe0, 0x83, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xff, 0x80, // ................ + 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x07, 0xe0, 0x00, 0x00, 0xe4, 0x80, // ................ + 0xff, 0xff, 0x00, 0x00, 0x00, // ..... }; -static const uint8_t vs_debugdraw_fill_lit_dx11[808] = +static const uint8_t vs_debugdraw_fill_lit_dx11[944] = { - 0x56, 0x53, 0x48, 0x04, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH...V_...u_mod - 0x65, 0x6c, 0x04, 0x20, 0x00, 0x00, 0x80, 0x00, 0x0b, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // el. .....u_model - 0x56, 0x69, 0x65, 0x77, 0x04, 0x00, 0x00, 0x08, 0x04, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // View.......u_mod - 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x40, 0x08, 0x04, 0x00, // elViewProj..@... - 0xe0, 0x02, 0x44, 0x58, 0x42, 0x43, 0xda, 0xb8, 0xef, 0x0e, 0x34, 0xc8, 0x8c, 0x2c, 0x06, 0xbc, // ..DXBC....4..,.. - 0x07, 0x0b, 0x43, 0x58, 0xee, 0x33, 0x01, 0x00, 0x00, 0x00, 0xe0, 0x02, 0x00, 0x00, 0x03, 0x00, // ..CX.3.......... - 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x49, 0x53, // ..,...`.......IS - 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, // GN,........... . - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, // ......POSITION.. - 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, // ..OSGNh......... - 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, // ..P............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x08, // ................ - 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, // ..........SV_POS - 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, // ITION.TEXCOORD.. - 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x08, 0x02, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x82, 0x00, // ..SHDR....@..... - 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, // ..Y...F. ....... - 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x00, // .._...r.......g. - 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, // ... ..........e. - 0x00, 0x03, 0x72, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x72, 0x20, // ..r ......e...r - 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, // ......h.......8. - 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x00, 0x00, // ..........V..... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x32, 0x00, // ..F. .........2. - 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, // ..........F. ... - 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, // ..............F. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......2......... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x00, 0x00, 0x00, 0xa6, 0x1a, // ..F. ........... - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......F......... - 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, // ... ......F..... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x38, 0x00, // ..F. .........8. - 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x00, 0x00, // ..r.......V..... - 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x32, 0x00, // ..F. .........2. - 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, // ..r.......F. ... - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, // ..............F. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, // ......2...r..... - 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0xa6, 0x1a, // ..F. ........... - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......F......... - 0x00, 0x08, 0x72, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, // ..r ......F..... - 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x38, 0x00, // ..F. .........8. - 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x00, 0x00, // ..r.......V..... - 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, // ..F. .........2. - 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, // ..r.......F. ... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, // ..............F. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, // ......2...r..... - 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x1a, // ..F. ........... - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......F......... - 0x00, 0x08, 0x72, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, // ..r ......F..... - 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3e, 0x00, // ..F. .........>. - 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x80, 0x08, // ........ + 0x56, 0x53, 0x48, 0x04, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x06, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH...V_...u_vie + 0x77, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, // w.......u_viewPr + 0x6f, 0x6a, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // oj..@....u_model + 0x04, 0x20, 0x80, 0x00, 0x80, 0x00, 0x70, 0x03, 0x44, 0x58, 0x42, 0x43, 0x4a, 0x63, 0x00, 0x1f, // . ....p.DXBCJc.. + 0x8c, 0xf0, 0x42, 0x23, 0xf7, 0x2c, 0xd7, 0x55, 0x64, 0x23, 0x64, 0x92, 0x01, 0x00, 0x00, 0x00, // ..B#.,.Ud#d..... + 0x70, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, // p.......,....... + 0xf4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....ISGNP....... + 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....8........... + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x01, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, // ............E... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x07, 0x07, 0x00, 0x00, 0x42, 0x4c, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x44, 0x49, 0x43, 0x45, 0x53, // ....BLENDINDICES + 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, // .POSITION...OSGN + 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, // h...........P... + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, // ................ + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ + 0x07, 0x08, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, // ....SV_POSITION. + 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, // TEXCOORD....SHDR + 0x74, 0x02, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x59, 0x08, 0x00, 0x04, // t...@.......Y... + 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, // F. ........._... + 0x12, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, // ........_...r... + 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....g.... ...... + 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x72, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ....e...r ...... + 0x65, 0x00, 0x00, 0x03, 0x72, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, // e...r ......h... + 0x02, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....)........... + 0x0a, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .........@...... + 0x38, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, // 8...........V... + 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ....F. ......... + 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, 0x00, // ........2....... + 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....F. ......... + 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, 0x00, // F.......2....... + 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....F. ......... + 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, // F............... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, // ....F.......F. . + 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, // 8...........V... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....F. ......... + 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // 2...........F. . + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, // F.......2....... + 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ....F. ......... + 0xa6, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ........F....... + 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // 2.... ......F. . + 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, // F.......8...r... + 0x01, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, // ....V.......F. . + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, // ........2...r... + 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....F. ......... + 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ........F....... + 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, // 2...r.......F. . + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x20, 0x10, 0x00, // F.......2...r .. + 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....F. ......... + 0xf6, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ........F....... + 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, // 6...r ......F... + 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x02, 0x0e, 0x00, 0x01, 0x00, 0x80, 0x08, // ....>........... }; -static const uint8_t vs_debugdraw_fill_lit_mtl[898] = +static const uint8_t vs_debugdraw_fill_lit_mtl[829] = { - 0x56, 0x53, 0x48, 0x04, 0x0f, 0xc8, 0x56, 0x5f, 0x00, 0x00, 0x73, 0x03, 0x00, 0x00, 0x75, 0x73, // VSH...V_..s...us + 0x56, 0x53, 0x48, 0x04, 0x0f, 0xc8, 0x56, 0x5f, 0x00, 0x00, 0x2e, 0x03, 0x00, 0x00, 0x75, 0x73, // VSH...V_......us 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { - 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // . float3 a_posi - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, // tion [[attribute - 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, // (0)]];.};.struct + 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x69, // . float4 a_indi + 0x63, 0x65, 0x73, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, // ces [[attribute( + 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x61, // 0)]];. float3 a + 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, // _position [[attr + 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, // ibute(1)]];.};.s + 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // truct xlatMtlSha + 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, // derOutput {. fl + 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // oat4 gl_Position + 0x20, 0x5b, 0x5b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, // [[position]];. + 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x76, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x3b, 0x0a, // float3 v_view;. + 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, // float3 v_world + 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // ;.};.struct xlat + 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, // MtlShaderUniform + 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, // {. float4x4 u_ + 0x76, 0x69, 0x65, 0x77, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, // view;. float4x4 + 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x20, 0x20, 0x66, // u_viewProj;. f + 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5b, // loat4x4 u_model[ + 0x33, 0x32, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x78, // 32];.};.vertex x + 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, // latMtlShaderOutp + 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, // ut xlatMtlMain ( + 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, // xlatMtlShaderInp + 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, // ut _mtl_i [[stag + 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, // e_in]], constant + 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, // xlatMtlShaderUn + 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, // iform& _mtl_u [[ + 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, // buffer(0)]]).{. 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, // xlatMtlShaderOu - 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // tput {. float4 - 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, 0x6f, // gl_Position [[po - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // sition]];. floa - 0x74, 0x33, 0x20, 0x76, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // t3 v_view;. flo - 0x61, 0x74, 0x33, 0x20, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, // at3 v_world;.};. - 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // struct xlatMtlSh - 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, // aderUniform {. - 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // float4x4 u_model - 0x5b, 0x33, 0x32, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, // [32];. float4x4 - 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x3b, 0x0a, 0x20, 0x20, // u_modelView;. - 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // float4x4 u_model - 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x76, 0x65, 0x72, // ViewProj;.};.ver - 0x74, 0x65, 0x78, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // tex xlatMtlShade - 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, // rOutput xlatMtlM - 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // ain (xlatMtlShad - 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, // erInput _mtl_i [ - 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, // [stage_in]], con - 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // stant xlatMtlSha - 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // derUniform& _mtl - 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, // _u [[buffer(0)]] - 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // ).{. xlatMtlSha - 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // derOutput _mtl_o - 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // ;. float4 tmpva - 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, // r_1;. tmpvar_1. - 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // w = 1.0;. tmpva - 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, // r_1.xyz = _mtl_i - 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x5f, // .a_position;. _ - 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // mtl_o.gl_Positio - 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x6d, 0x6f, // n = (_mtl_u.u_mo - 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, // delViewProj * tm - 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // pvar_1);. float - 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, // 4 tmpvar_2;. tm - 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, // pvar_2.w = 1.0;. - 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, // tmpvar_2.xyz = - 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // _mtl_i.a_positi - 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x76, // on;. _mtl_o.v_v - 0x69, 0x65, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, // iew = (_mtl_u.u_ - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, // modelView * tmpv - 0x61, 0x72, 0x5f, 0x32, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // ar_2).xyz;. flo - 0x61, 0x74, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x3b, 0x0a, 0x20, 0x20, // at4 tmpvar_3;. - 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, // tmpvar_3.w = 1.0 - 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x2e, 0x78, 0x79, 0x7a, // ;. tmpvar_3.xyz - 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // = _mtl_i.a_posi - 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, // tion;. _mtl_o.v - 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, // _world = (_mtl_u - 0x2e, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5b, 0x30, 0x5d, 0x20, 0x2a, 0x20, 0x74, 0x6d, // .u_model[0] * tm - 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x72, // pvar_3).xyz;. r - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, // eturn _mtl_o;.}. - 0x0a, 0x00, // .. + 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x66, // tput _mtl_o;. f + 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, // loat4 tmpvar_1;. + 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, // tmpvar_1.w = 1 + 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, // .0;. tmpvar_1.x + 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x70, 0x6f, // yz = _mtl_i.a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // sition;. float4 + 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // tmpvar_2;. tmp + 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, // var_2 = (_mtl_u. + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5b, 0x69, 0x6e, 0x74, 0x28, 0x5f, 0x6d, 0x74, 0x6c, // u_model[int(_mtl + 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x78, 0x29, 0x5d, // _i.a_indices.x)] + 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, // * tmpvar_1);. + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, // _mtl_o.gl_Positi + 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x76, // on = (_mtl_u.u_v + 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // iewProj * tmpvar + 0x5f, 0x32, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, // _2);. _mtl_o.v_ + 0x76, 0x69, 0x65, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, // view = (_mtl_u.u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, // _view * tmpvar_2 + 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, // ).xyz;. _mtl_o. + 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // v_world = tmpvar + 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, // _2.xyz;. return + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _mtl_o;.}... }; diff --git a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.sc b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.sc index 02054e3ef28..ea4ce6bdcad 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.sc +++ b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.sc @@ -1,4 +1,4 @@ -$input a_position +$input a_position, a_indices $output v_view, v_world /* @@ -10,7 +10,8 @@ $output v_view, v_world void main() { - gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0) ); - v_view = mul(u_modelView, vec4(a_position, 1.0) ).xyz; - v_world = mul(u_model[0], vec4(a_position, 1.0) ).xyz; + vec4 world = mul(u_model[int(a_indices.x)], vec4(a_position, 1.0) ); + gl_Position = mul(u_viewProj, world); + v_view = mul(u_view, world).xyz; + v_world = world.xyz; } diff --git a/3rdparty/bgfx/examples/common/entry/entry.cpp b/3rdparty/bgfx/examples/common/entry/entry.cpp index 0e03876a17e..a72b8027864 100644 --- a/3rdparty/bgfx/examples/common/entry/entry.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry.cpp @@ -473,11 +473,8 @@ BX_PRAGMA_DIAGNOSTIC_POP(); const MouseEvent* mouse = static_cast(ev); handle = mouse->m_handle; - if (mouse->m_move) - { - inputSetMousePos(mouse->m_mx, mouse->m_my, mouse->m_mz); - } - else + inputSetMousePos(mouse->m_mx, mouse->m_my, mouse->m_mz); + if (!mouse->m_move) { inputSetMouseButtonState(mouse->m_button, mouse->m_down); } @@ -485,13 +482,10 @@ BX_PRAGMA_DIAGNOSTIC_POP(); if (NULL != _mouse && !mouseLock) { - if (mouse->m_move) - { - _mouse->m_mx = mouse->m_mx; - _mouse->m_my = mouse->m_my; - _mouse->m_mz = mouse->m_mz; - } - else + _mouse->m_mx = mouse->m_mx; + _mouse->m_my = mouse->m_my; + _mouse->m_mz = mouse->m_mz; + if (!mouse->m_move) { _mouse->m_buttons[mouse->m_button] = mouse->m_down; } diff --git a/3rdparty/bgfx/examples/common/entry/entry_android.cpp b/3rdparty/bgfx/examples/common/entry/entry_android.cpp index 78c9dccbefa..90bfd131368 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_android.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_android.cpp @@ -82,7 +82,6 @@ namespace entry { Context() : m_window(NULL) - , m_count(0) { memset(m_value, 0, sizeof(m_value) ); @@ -297,43 +296,35 @@ namespace entry int32_t action = (actionBits & AMOTION_EVENT_ACTION_MASK); int32_t index = (actionBits & AMOTION_EVENT_ACTION_POINTER_INDEX_MASK) >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT; - count = m_count; - - switch (action) + // Simulate left mouse click with 1st touch and right mouse click with 2nd touch. ignore other touchs + if (count < 2) { - case AMOTION_EVENT_ACTION_DOWN: - case AMOTION_EVENT_ACTION_POINTER_DOWN: - m_count++; - break; - - case AMOTION_EVENT_ACTION_UP: - case AMOTION_EVENT_ACTION_POINTER_UP: - m_count--; - break; - - default: - break; - } - - if (count != m_count) - { - m_eventQueue.postMouseEvent(defaultWindow - , (int32_t)mx - , (int32_t)my - , 0 - , 1 == count ? MouseButton::Left : MouseButton::Right - , false - ); - - if (0 != m_count) + switch (action) { + case AMOTION_EVENT_ACTION_DOWN: + case AMOTION_EVENT_ACTION_POINTER_DOWN: m_eventQueue.postMouseEvent(defaultWindow , (int32_t)mx , (int32_t)my , 0 - , 1 == m_count ? MouseButton::Left : MouseButton::Right + , action == AMOTION_EVENT_ACTION_DOWN ? MouseButton::Left : MouseButton::Right , true ); + break; + + case AMOTION_EVENT_ACTION_UP: + case AMOTION_EVENT_ACTION_POINTER_UP: + m_eventQueue.postMouseEvent(defaultWindow + , (int32_t)mx + , (int32_t)my + , 0 + , action == AMOTION_EVENT_ACTION_UP ? MouseButton::Left : MouseButton::Right + , false + ); + break; + + default: + break; } } @@ -405,7 +396,6 @@ namespace entry ANativeWindow* m_window; android_app* m_app; - int32_t m_count; int32_t m_value[GamepadAxis::Count]; int32_t m_deadzone[GamepadAxis::Count]; }; diff --git a/3rdparty/bgfx/examples/common/entry/entry_ios.mm b/3rdparty/bgfx/examples/common/entry/entry_ios.mm index 052c161abd4..a5348212ef0 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_ios.mm +++ b/3rdparty/bgfx/examples/common/entry/entry_ios.mm @@ -312,7 +312,7 @@ static void* m_device = NULL; [m_window makeKeyAndVisible]; - //float scaleFactor = [[UIScreen mainScreen] scale]; // should use this, but ui is too small on ipad retina + //float scaleFactor = [[UIScreen mainScreen] scale]; // should use this, but needs to further pass the value to the `nvgBeginFrame()` call's `devicePixelRatio` parameter in `ExampleNanoVG` class' `update()` method so it can actually work properly. float scaleFactor = 1.0f; [m_view setContentScaleFactor: scaleFactor ]; 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 9bd34a78a05..c3d5b95de55 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 @@ -185,9 +185,9 @@ static const uint8_t fs_font_distance_field_dx11[1053] = 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, // .6...r ......F.. 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // .....>....... }; -static const uint8_t fs_font_distance_field_mtl[1492] = +static const uint8_t fs_font_distance_field_mtl[1493] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xc5, 0x05, 0x00, 0x00, 0x75, 0x73, // FSH...........us + 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xc6, 0x05, 0x00, 0x00, 0x75, 0x73, // FSH...........us 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { @@ -240,45 +240,45 @@ static const uint8_t fs_font_distance_field_mtl[1492] = 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // mtl_i.v_texcoord 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, // 0.xyz);. float3 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // tmpvar_5;. tmp - 0x76, 0x61, 0x72, 0x5f, 0x35, 0x20, 0x3d, 0x20, 0x64, 0x66, 0x64, 0x79, 0x28, 0x5f, 0x6d, 0x74, // var_5 = dfdy(_mt - 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, // l_i.v_texcoord0. - 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, // xyz);. float tm - 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // pvar_6;. tmpvar - 0x5f, 0x36, 0x20, 0x3d, 0x20, 0x28, 0x38, 0x2e, 0x30, 0x20, 0x2a, 0x20, 0x28, 0x73, 0x71, 0x72, // _6 = (8.0 * (sqr - 0x74, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x74, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, // t(. dot (tmpv - 0x61, 0x72, 0x5f, 0x34, 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x29, 0x0a, // ar_4, tmpvar_4). - 0x20, 0x20, 0x29, 0x20, 0x2b, 0x20, 0x73, 0x71, 0x72, 0x74, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, // ) + sqrt(. - 0x64, 0x6f, 0x74, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x2c, 0x20, 0x74, // dot (tmpvar_5, t - 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, 0x29, 0x3b, 0x0a, // mpvar_5). )));. - 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x37, 0x3b, // float edge0_7; - 0x0a, 0x20, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x37, 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, // . edge0_7 = (0. - 0x35, 0x20, 0x2d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x29, 0x3b, 0x0a, 0x20, // 5 - tmpvar_6);. - 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x65, 0x64, 0x67, 0x65, 0x31, 0x5f, 0x38, 0x3b, 0x0a, // float edge1_8;. - 0x20, 0x20, 0x65, 0x64, 0x67, 0x65, 0x31, 0x5f, 0x38, 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, 0x35, // edge1_8 = (0.5 - 0x20, 0x2b, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x29, 0x3b, 0x0a, 0x20, 0x20, // + tmpvar_6);. - 0x68, 0x61, 0x6c, 0x66, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x3b, 0x0a, 0x20, // half tmpvar_9;. - 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x20, 0x3d, 0x20, 0x63, 0x6c, 0x61, 0x6d, // tmpvar_9 = clam - 0x70, 0x20, 0x28, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x28, 0x28, 0x66, 0x6c, 0x6f, 0x61, // p (((half)((floa - 0x74, 0x29, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x28, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, // t)((half)((float - 0x29, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x5b, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, // )rgba_1[tmpvar_3 - 0x5d, 0x20, 0x2d, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x37, 0x29, 0x29, 0x20, 0x2f, 0x20, // ] - edge0_7)) / - 0x28, 0x65, 0x64, 0x67, 0x65, 0x31, 0x5f, 0x38, 0x20, 0x2d, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, // (edge1_8 - edge0 - 0x5f, 0x37, 0x29, 0x29, 0x29, 0x2c, 0x20, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x30, 0x2e, 0x30, // _7))), (half)0.0 - 0x2c, 0x20, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, // , (half)1.0);. - 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x30, 0x3b, // half4 tmpvar_10; - 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x30, 0x2e, 0x78, 0x79, 0x7a, // . tmpvar_10.xyz - 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x33, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, // = half3(_mtl_i. - 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, // v_color0.xyz);. - 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x30, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, // tmpvar_10.w = ( - 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, // (half)(_mtl_i.v_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x77, 0x20, 0x2a, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, // color0.w * (floa - 0x74, 0x29, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x20, 0x2a, 0x20, 0x28, 0x74, // t)(tmpvar_9 * (t - 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x20, 0x2a, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x28, // mpvar_9 * . ( - 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x33, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x28, 0x28, 0x68, 0x61, // (half)3.0 - ((ha - 0x6c, 0x66, 0x29, 0x32, 0x2e, 0x30, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // lf)2.0 * tmpvar_ - 0x39, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, // 9)). ))));. _m - 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, // tl_o.gl_FragColo - 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x30, 0x3b, 0x0a, 0x20, // r = tmpvar_10;. - 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, // return _mtl_o;. - 0x7d, 0x0a, 0x0a, 0x00, // }... + 0x76, 0x61, 0x72, 0x5f, 0x35, 0x20, 0x3d, 0x20, 0x64, 0x66, 0x64, 0x79, 0x28, 0x2d, 0x5f, 0x6d, // var_5 = dfdy(-_m + 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // tl_i.v_texcoord0 + 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, // .xyz);. float t + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // mpvar_6;. tmpva + 0x72, 0x5f, 0x36, 0x20, 0x3d, 0x20, 0x28, 0x38, 0x2e, 0x30, 0x20, 0x2a, 0x20, 0x28, 0x73, 0x71, // r_6 = (8.0 * (sq + 0x72, 0x74, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x74, 0x20, 0x28, 0x74, 0x6d, 0x70, // rt(. dot (tmp + 0x76, 0x61, 0x72, 0x5f, 0x34, 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x29, // var_4, tmpvar_4) + 0x0a, 0x20, 0x20, 0x29, 0x20, 0x2b, 0x20, 0x73, 0x71, 0x72, 0x74, 0x28, 0x0a, 0x20, 0x20, 0x20, // . ) + sqrt(. + 0x20, 0x64, 0x6f, 0x74, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x2c, 0x20, // dot (tmpvar_5, + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, 0x29, 0x3b, // tmpvar_5). ))); + 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x37, // . float edge0_7 + 0x3b, 0x0a, 0x20, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x37, 0x20, 0x3d, 0x20, 0x28, 0x30, // ;. edge0_7 = (0 + 0x2e, 0x35, 0x20, 0x2d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x29, 0x3b, 0x0a, // .5 - tmpvar_6);. + 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x65, 0x64, 0x67, 0x65, 0x31, 0x5f, 0x38, 0x3b, // float edge1_8; + 0x0a, 0x20, 0x20, 0x65, 0x64, 0x67, 0x65, 0x31, 0x5f, 0x38, 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, // . edge1_8 = (0. + 0x35, 0x20, 0x2b, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x29, 0x3b, 0x0a, 0x20, // 5 + tmpvar_6);. + 0x20, 0x68, 0x61, 0x6c, 0x66, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x3b, 0x0a, // half tmpvar_9;. + 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x20, 0x3d, 0x20, 0x63, 0x6c, 0x61, // tmpvar_9 = cla + 0x6d, 0x70, 0x20, 0x28, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x28, 0x28, 0x66, 0x6c, 0x6f, // mp (((half)((flo + 0x61, 0x74, 0x29, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x28, 0x28, 0x66, 0x6c, 0x6f, 0x61, // at)((half)((floa + 0x74, 0x29, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x5b, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // t)rgba_1[tmpvar_ + 0x33, 0x5d, 0x20, 0x2d, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x37, 0x29, 0x29, 0x20, 0x2f, // 3] - edge0_7)) / + 0x20, 0x28, 0x65, 0x64, 0x67, 0x65, 0x31, 0x5f, 0x38, 0x20, 0x2d, 0x20, 0x65, 0x64, 0x67, 0x65, // (edge1_8 - edge + 0x30, 0x5f, 0x37, 0x29, 0x29, 0x29, 0x2c, 0x20, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x30, 0x2e, // 0_7))), (half)0. + 0x30, 0x2c, 0x20, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, // 0, (half)1.0);. + 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x30, // half4 tmpvar_10 + 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x30, 0x2e, 0x78, 0x79, // ;. tmpvar_10.xy + 0x7a, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x33, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, // z = half3(_mtl_i + 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, // .v_color0.xyz);. + 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x30, 0x2e, 0x77, 0x20, 0x3d, 0x20, // tmpvar_10.w = + 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, // ((half)(_mtl_i.v + 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x77, 0x20, 0x2a, 0x20, 0x28, 0x66, 0x6c, 0x6f, // _color0.w * (flo + 0x61, 0x74, 0x29, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x20, 0x2a, 0x20, 0x28, // at)(tmpvar_9 * ( + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x20, 0x2a, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, // tmpvar_9 * . + 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x33, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x28, 0x28, 0x68, // ((half)3.0 - ((h + 0x61, 0x6c, 0x66, 0x29, 0x32, 0x2e, 0x30, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // alf)2.0 * tmpvar + 0x5f, 0x39, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, // _9)). ))));. _ + 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, // mtl_o.gl_FragCol + 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x30, 0x3b, 0x0a, // or = tmpvar_10;. + 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, // return _mtl_o; + 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // .}... }; 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 154481dc393..f338948d50c 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 @@ -226,9 +226,9 @@ static const uint8_t fs_font_distance_field_subpixel_dx11[1305] = 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x1f, 0x10, 0x00, 0x01, 0x00, 0x00, // .F.............. 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // .>....... }; -static const uint8_t fs_font_distance_field_subpixel_mtl[1945] = +static const uint8_t fs_font_distance_field_subpixel_mtl[1946] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x8a, 0x07, 0x00, 0x00, 0x75, 0x73, // FSH...........us + 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x8b, 0x07, 0x00, 0x00, 0x75, 0x73, // FSH...........us 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { @@ -267,87 +267,87 @@ static const uint8_t fs_font_distance_field_subpixel_mtl[1945] = 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, // excoord0.xyz);. 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, // float3 tmpvar_3 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x64, // ;. tmpvar_3 = d - 0x66, 0x64, 0x79, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, // fdy(_mtl_i.v_tex - 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, // coord0.xyz);. f - 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x3b, 0x0a, // loat3 tmpvar_4;. - 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, // tmpvar_4 = (0. - 0x31, 0x36, 0x36, 0x36, 0x36, 0x37, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // 166667 * tmpvar_ - 0x32, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x74, 0x6d, 0x70, // 2);. float3 tmp - 0x76, 0x61, 0x72, 0x5f, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // var_5;. tmpvar_ - 0x35, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x74, 0x65, // 5 = (_mtl_i.v_te - 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2d, 0x20, 0x74, 0x6d, // xcoord0.xyz - tm - 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // pvar_4);. float - 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, // 3 tmpvar_6;. tm - 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, // pvar_6 = (_mtl_i - 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x7a, // .v_texcoord0.xyz - 0x20, 0x2b, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x29, 0x3b, 0x0a, 0x20, 0x20, // + tmpvar_4);. - 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x37, 0x3b, 0x0a, // half4 tmpvar_7;. - 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x37, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, // tmpvar_7 = hal - 0x66, 0x34, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x73, 0x61, // f4(s_texColor.sa - 0x6d, 0x70, 0x6c, 0x65, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, // mple(_mtlsmp_s_t - 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, // exColor, (float3 - 0x29, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x29, 0x29, 0x29, 0x3b, 0x0a, 0x20, // )(tmpvar_5)));. - 0x20, 0x68, 0x61, 0x6c, 0x66, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x3b, 0x0a, // half tmpvar_8;. - 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x68, // tmpvar_8 = ((h - 0x61, 0x6c, 0x66, 0x29, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x37, 0x2e, 0x7a, 0x79, 0x78, // alf)tmpvar_7.zyx - 0x77, 0x5b, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, // w[tmpvar_1]);. - 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x3b, 0x0a, // half4 tmpvar_9;. - 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, // tmpvar_9 = hal - 0x66, 0x34, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x73, 0x61, // f4(s_texColor.sa - 0x6d, 0x70, 0x6c, 0x65, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, // mple(_mtlsmp_s_t - 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, // exColor, (float3 - 0x29, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x29, 0x29, 0x29, 0x3b, 0x0a, 0x20, // )(tmpvar_6)));. - 0x20, 0x68, 0x61, 0x6c, 0x66, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x30, 0x3b, // half tmpvar_10; - 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x30, 0x20, 0x3d, 0x20, 0x28, // . tmpvar_10 = ( - 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x2e, 0x7a, // (half)tmpvar_9.z - 0x79, 0x78, 0x77, 0x5b, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x5d, 0x29, 0x3b, 0x0a, // yxw[tmpvar_1]);. - 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x31, // half tmpvar_11 - 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x31, 0x20, 0x3d, 0x20, // ;. tmpvar_11 = - 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x30, 0x2e, 0x35, 0x20, 0x2a, 0x20, 0x28, 0x74, 0x6d, // ((half)0.5 * (tm - 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x20, 0x2b, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // pvar_8 + tmpvar_ - 0x31, 0x30, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, // 10));. float tm - 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // pvar_12;. tmpva - 0x72, 0x5f, 0x31, 0x32, 0x20, 0x3d, 0x20, 0x28, 0x38, 0x2e, 0x30, 0x20, 0x2a, 0x20, 0x28, 0x73, // r_12 = (8.0 * (s - 0x71, 0x72, 0x74, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x74, 0x20, 0x28, 0x74, 0x6d, // qrt(. dot (tm - 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, // pvar_2, tmpvar_2 - 0x29, 0x0a, 0x20, 0x20, 0x29, 0x20, 0x2b, 0x20, 0x73, 0x71, 0x72, 0x74, 0x28, 0x0a, 0x20, 0x20, // ). ) + sqrt(. - 0x20, 0x20, 0x64, 0x6f, 0x74, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x2c, // dot (tmpvar_3, - 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, 0x29, // tmpvar_3). ))) - 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // ;. half3 tmpvar - 0x5f, 0x31, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x33, // _13;. tmpvar_13 - 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x3b, 0x0a, 0x20, // .x = tmpvar_8;. - 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x33, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x74, // tmpvar_13.y = t - 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // mpvar_11;. tmpv - 0x61, 0x72, 0x5f, 0x31, 0x33, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // ar_13.z = tmpvar - 0x5f, 0x31, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x65, 0x64, 0x67, // _10;. float edg - 0x65, 0x30, 0x5f, 0x31, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x31, // e0_14;. edge0_1 - 0x34, 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, 0x35, 0x20, 0x2d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // 4 = (0.5 - tmpva - 0x72, 0x5f, 0x31, 0x32, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x65, // r_12);. float e - 0x64, 0x67, 0x65, 0x31, 0x5f, 0x31, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x65, 0x64, 0x67, 0x65, 0x31, // dge1_15;. edge1 - 0x5f, 0x31, 0x35, 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, 0x35, 0x20, 0x2b, 0x20, 0x74, 0x6d, 0x70, // _15 = (0.5 + tmp - 0x76, 0x61, 0x72, 0x5f, 0x31, 0x32, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x33, // var_12);. half3 - 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, // tmpvar_16;. tm - 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x36, 0x20, 0x3d, 0x20, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x20, // pvar_16 = clamp - 0x28, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x33, 0x29, 0x28, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, // (((half3)((float - 0x33, 0x29, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x33, 0x29, 0x28, 0x28, 0x66, 0x6c, 0x6f, 0x61, // 3)((half3)((floa - 0x74, 0x33, 0x29, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x33, 0x20, 0x2d, 0x20, 0x65, // t3)tmpvar_13 - e - 0x64, 0x67, 0x65, 0x30, 0x5f, 0x31, 0x34, 0x29, 0x29, 0x20, 0x2f, 0x20, 0x28, 0x65, 0x64, 0x67, // dge0_14)) / (edg - 0x65, 0x31, 0x5f, 0x31, 0x35, 0x20, 0x2d, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x31, 0x34, // e1_15 - edge0_14 - 0x29, 0x29, 0x29, 0x2c, 0x20, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x30, 0x2e, 0x30, 0x2c, 0x20, // ))), (half)0.0, - 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, // (half)1.0);. _m - 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, // tl_o.gl_FragColo - 0x72, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x33, 0x29, // r.xyz = ((half3) - 0x28, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x29, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // ((float3)(tmpvar - 0x5f, 0x31, 0x36, 0x20, 0x2a, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x36, // _16 * (tmpvar_16 - 0x20, 0x2a, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x33, // * . ((half)3 - 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x32, 0x2e, 0x30, 0x20, // .0 - ((half)2.0 - 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x36, 0x29, 0x29, 0x0a, 0x20, 0x20, // * tmpvar_16)). - 0x29, 0x29, 0x20, 0x2a, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x63, 0x6f, // )) * _mtl_i.v_co - 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x77, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // lor0.w));. _mtl - 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, // _o.gl_FragColor. - 0x77, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x28, 0x28, 0x66, 0x6c, 0x6f, // w = ((half)((flo - 0x61, 0x74, 0x29, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x31, 0x20, 0x2a, 0x20, 0x5f, // at)tmpvar_11 * _ - 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x77, // mtl_i.v_color0.w - 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, // ));. return _mt - 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // l_o;.}... + 0x66, 0x64, 0x79, 0x28, 0x2d, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x74, 0x65, // fdy(-_mtl_i.v_te + 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, 0x20, // xcoord0.xyz);. + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x3b, // float3 tmpvar_4; + 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x28, 0x30, // . tmpvar_4 = (0 + 0x2e, 0x31, 0x36, 0x36, 0x36, 0x36, 0x37, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // .166667 * tmpvar + 0x5f, 0x32, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x74, 0x6d, // _2);. float3 tm + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // pvar_5;. tmpvar + 0x5f, 0x35, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x74, // _5 = (_mtl_i.v_t + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2d, 0x20, 0x74, // excoord0.xyz - t + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // mpvar_4);. floa + 0x74, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x74, // t3 tmpvar_6;. t + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // mpvar_6 = (_mtl_ + 0x69, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, // i.v_texcoord0.xy + 0x7a, 0x20, 0x2b, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x29, 0x3b, 0x0a, 0x20, // z + tmpvar_4);. + 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x37, 0x3b, // half4 tmpvar_7; + 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x37, 0x20, 0x3d, 0x20, 0x68, 0x61, // . tmpvar_7 = ha + 0x6c, 0x66, 0x34, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x73, // lf4(s_texColor.s + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, // ample(_mtlsmp_s_ + 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, // texColor, (float + 0x33, 0x29, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x29, 0x29, 0x29, 0x3b, 0x0a, // 3)(tmpvar_5)));. + 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x3b, // half tmpvar_8; + 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x20, 0x3d, 0x20, 0x28, 0x28, // . tmpvar_8 = (( + 0x68, 0x61, 0x6c, 0x66, 0x29, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x37, 0x2e, 0x7a, 0x79, // half)tmpvar_7.zy + 0x78, 0x77, 0x5b, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x5d, 0x29, 0x3b, 0x0a, 0x20, // xw[tmpvar_1]);. + 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x3b, // half4 tmpvar_9; + 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x20, 0x3d, 0x20, 0x68, 0x61, // . tmpvar_9 = ha + 0x6c, 0x66, 0x34, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x73, // lf4(s_texColor.s + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, // ample(_mtlsmp_s_ + 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, // texColor, (float + 0x33, 0x29, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x29, 0x29, 0x29, 0x3b, 0x0a, // 3)(tmpvar_6)));. + 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x30, // half tmpvar_10 + 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x30, 0x20, 0x3d, 0x20, // ;. tmpvar_10 = + 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x2e, // ((half)tmpvar_9. + 0x7a, 0x79, 0x78, 0x77, 0x5b, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x5d, 0x29, 0x3b, // zyxw[tmpvar_1]); + 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // . half tmpvar_1 + 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x31, 0x20, 0x3d, // 1;. tmpvar_11 = + 0x20, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x30, 0x2e, 0x35, 0x20, 0x2a, 0x20, 0x28, 0x74, // ((half)0.5 * (t + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x20, 0x2b, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // mpvar_8 + tmpvar + 0x5f, 0x31, 0x30, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, // _10));. float t + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // mpvar_12;. tmpv + 0x61, 0x72, 0x5f, 0x31, 0x32, 0x20, 0x3d, 0x20, 0x28, 0x38, 0x2e, 0x30, 0x20, 0x2a, 0x20, 0x28, // ar_12 = (8.0 * ( + 0x73, 0x71, 0x72, 0x74, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x74, 0x20, 0x28, 0x74, // sqrt(. dot (t + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // mpvar_2, tmpvar_ + 0x32, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x20, 0x2b, 0x20, 0x73, 0x71, 0x72, 0x74, 0x28, 0x0a, 0x20, // 2). ) + sqrt(. + 0x20, 0x20, 0x20, 0x64, 0x6f, 0x74, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, // dot (tmpvar_3 + 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, // , tmpvar_3). )) + 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // );. half3 tmpva + 0x72, 0x5f, 0x31, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // r_13;. tmpvar_1 + 0x33, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x3b, 0x0a, // 3.x = tmpvar_8;. + 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x33, 0x2e, 0x79, 0x20, 0x3d, 0x20, // tmpvar_13.y = + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // tmpvar_11;. tmp + 0x76, 0x61, 0x72, 0x5f, 0x31, 0x33, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // var_13.z = tmpva + 0x72, 0x5f, 0x31, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x65, 0x64, // r_10;. float ed + 0x67, 0x65, 0x30, 0x5f, 0x31, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, // ge0_14;. edge0_ + 0x31, 0x34, 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, 0x35, 0x20, 0x2d, 0x20, 0x74, 0x6d, 0x70, 0x76, // 14 = (0.5 - tmpv + 0x61, 0x72, 0x5f, 0x31, 0x32, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, // ar_12);. float + 0x65, 0x64, 0x67, 0x65, 0x31, 0x5f, 0x31, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x65, 0x64, 0x67, 0x65, // edge1_15;. edge + 0x31, 0x5f, 0x31, 0x35, 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, 0x35, 0x20, 0x2b, 0x20, 0x74, 0x6d, // 1_15 = (0.5 + tm + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x32, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, // pvar_12);. half + 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x74, // 3 tmpvar_16;. t + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x36, 0x20, 0x3d, 0x20, 0x63, 0x6c, 0x61, 0x6d, 0x70, // mpvar_16 = clamp + 0x20, 0x28, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x33, 0x29, 0x28, 0x28, 0x66, 0x6c, 0x6f, 0x61, // (((half3)((floa + 0x74, 0x33, 0x29, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x33, 0x29, 0x28, 0x28, 0x66, 0x6c, 0x6f, // t3)((half3)((flo + 0x61, 0x74, 0x33, 0x29, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x33, 0x20, 0x2d, 0x20, // at3)tmpvar_13 - + 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x31, 0x34, 0x29, 0x29, 0x20, 0x2f, 0x20, 0x28, 0x65, 0x64, // edge0_14)) / (ed + 0x67, 0x65, 0x31, 0x5f, 0x31, 0x35, 0x20, 0x2d, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x31, // ge1_15 - edge0_1 + 0x34, 0x29, 0x29, 0x29, 0x2c, 0x20, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x30, 0x2e, 0x30, 0x2c, // 4))), (half)0.0, + 0x20, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, // (half)1.0);. _ + 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, // mtl_o.gl_FragCol + 0x6f, 0x72, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x33, // or.xyz = ((half3 + 0x29, 0x28, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x29, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, // )((float3)(tmpva + 0x72, 0x5f, 0x31, 0x36, 0x20, 0x2a, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // r_16 * (tmpvar_1 + 0x36, 0x20, 0x2a, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, // 6 * . ((half) + 0x33, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x32, 0x2e, 0x30, // 3.0 - ((half)2.0 + 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x36, 0x29, 0x29, 0x0a, 0x20, // * tmpvar_16)). + 0x20, 0x29, 0x29, 0x20, 0x2a, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x63, // )) * _mtl_i.v_c + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x77, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, // olor0.w));. _mt + 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // l_o.gl_FragColor + 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x28, 0x28, 0x66, 0x6c, // .w = ((half)((fl + 0x6f, 0x61, 0x74, 0x29, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x31, 0x20, 0x2a, 0x20, // oat)tmpvar_11 * + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, // _mtl_i.v_color0. + 0x77, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, // w));. return _m + 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // tl_o;.}... }; diff --git a/3rdparty/bgfx/examples/common/imgui/imgui.cpp b/3rdparty/bgfx/examples/common/imgui/imgui.cpp index b8bf5b97a39..6a80447a34b 100644 --- a/3rdparty/bgfx/examples/common/imgui/imgui.cpp +++ b/3rdparty/bgfx/examples/common/imgui/imgui.cpp @@ -1488,7 +1488,7 @@ struct Imgui } } - uint8_t tabs(uint8_t _selected, bool _enabled, ImguiAlign::Enum _align, int32_t _height, int32_t _r, uint8_t _nTabs, uint8_t _nEnabled, va_list _argList) + uint8_t tabs(uint8_t _selected, bool _enabled, ImguiAlign::Enum _align, int32_t _height, int32_t _r, uint32_t _nTabs, uint32_t _nEnabled, va_list _argList) { const char* titles[16]; bool tabEnabled[16]; @@ -3469,7 +3469,7 @@ void imguiInput(const char* _label, char* _str, uint32_t _len, bool _enabled, Im s_imgui.input(_label, _str, _len, _enabled, _align, _r); } -uint8_t imguiTabs(uint8_t _selected, bool _enabled, ImguiAlign::Enum _align, int32_t _height, int32_t _r, uint8_t _nTabs, uint8_t _nEnabled, ...) +uint8_t imguiTabs(uint8_t _selected, bool _enabled, ImguiAlign::Enum _align, int32_t _height, int32_t _r, uint32_t _nTabs, uint32_t _nEnabled, ...) { va_list argList; va_start(argList, _nEnabled); @@ -3479,7 +3479,7 @@ uint8_t imguiTabs(uint8_t _selected, bool _enabled, ImguiAlign::Enum _align, int return result; } -uint8_t imguiTabs(uint8_t _selected, bool _enabled, ImguiAlign::Enum _align, int32_t _height, int32_t _r, uint8_t _nTabs, ...) +uint8_t imguiTabs(uint8_t _selected, bool _enabled, ImguiAlign::Enum _align, int32_t _height, int32_t _r, uint32_t _nTabs, ...) { va_list argList; va_start(argList, _nTabs); diff --git a/3rdparty/bgfx/examples/common/imgui/imgui.h b/3rdparty/bgfx/examples/common/imgui/imgui.h index 273f2a817e7..3b0fc54f875 100644 --- a/3rdparty/bgfx/examples/common/imgui/imgui.h +++ b/3rdparty/bgfx/examples/common/imgui/imgui.h @@ -190,8 +190,8 @@ void imguiInput(const char* _label, char* _str, uint32_t _len, bool _enabled = t /// _nEnabled - Number of specified 'enabled' flags. All other unspecified tabs are considered enabled by default. /// In the above example, there are 2 enabled flags: 'Tab0' is specified as enabled and 'Tab1' is specified as disabled. /// Tab2 is unspecified and therefore is treated as enabled. -uint8_t imguiTabs(uint8_t _selected, bool _enabled, ImguiAlign::Enum _align, int32_t _height, int32_t _r, uint8_t _nTabs, uint8_t _nEnabled, ...); -uint8_t imguiTabs(uint8_t _selected, bool _enabled, ImguiAlign::Enum _align, int32_t _height, int32_t _r, uint8_t _nTabs, ...); +uint8_t imguiTabs(uint8_t _selected, bool _enabled, ImguiAlign::Enum _align, int32_t _height, int32_t _r, uint32_t _nTabs, uint32_t _nEnabled, ...); +uint8_t imguiTabs(uint8_t _selected, bool _enabled, ImguiAlign::Enum _align, int32_t _height, int32_t _r, uint32_t _nTabs, ...); uint32_t imguiChooseUseMacroInstead(uint32_t _selected, ...); #define imguiChoose(...) imguiChooseUseMacroInstead(__VA_ARGS__, NULL) diff --git a/3rdparty/bgfx/examples/common/nanovg/nanovg.cpp b/3rdparty/bgfx/examples/common/nanovg/nanovg.cpp index 8dbac8a294e..c7433cdc45d 100644 --- a/3rdparty/bgfx/examples/common/nanovg/nanovg.cpp +++ b/3rdparty/bgfx/examples/common/nanovg/nanovg.cpp @@ -339,7 +339,7 @@ void nvgBeginFrame(NVGcontext* ctx, int windowWidth, int windowHeight, float dev nvg__setDevicePixelRatio(ctx, devicePixelRatio); - ctx->params.renderViewport(ctx->params.userPtr, windowWidth, windowHeight); + ctx->params.renderViewport(ctx->params.userPtr, windowWidth, windowHeight, devicePixelRatio); ctx->drawCallCount = 0; ctx->fillTriCount = 0; diff --git a/3rdparty/bgfx/examples/common/nanovg/nanovg.h b/3rdparty/bgfx/examples/common/nanovg/nanovg.h index 692d1bd2be8..984c1935e3c 100644 --- a/3rdparty/bgfx/examples/common/nanovg/nanovg.h +++ b/3rdparty/bgfx/examples/common/nanovg/nanovg.h @@ -19,6 +19,8 @@ #ifndef NANOVG_H #define NANOVG_H +#include "nanovg_bgfx.h" + #ifdef __cplusplus extern "C" { #endif @@ -588,7 +590,7 @@ struct NVGparams { int (*renderDeleteTexture)(void* uptr, int image); int (*renderUpdateTexture)(void* uptr, int image, int x, int y, int w, int h, const unsigned char* data); int (*renderGetTextureSize)(void* uptr, int image, int* w, int* h); - void (*renderViewport)(void* uptr, int width, int height); + void (*renderViewport)(void* uptr, int width, int height, float devicePixelRatio); void (*renderCancel)(void* uptr); void (*renderFlush)(void* uptr); void (*renderFill)(void* uptr, NVGpaint* paint, NVGscissor* scissor, float fringe, const float* bounds, const NVGpath* paths, int npaths); @@ -598,12 +600,6 @@ struct NVGparams { }; typedef struct NVGparams NVGparams; -namespace bx { struct AllocatorI; } - -NVGcontext* nvgCreate(int edgeaa, unsigned char _viewId, bx::AllocatorI* _allocator = NULL); -void nvgViewId(struct NVGcontext* ctx, unsigned char _viewId); -void nvgDelete(struct NVGcontext* ctx); - // Constructor and destructor, called by the render back-end. NVGcontext* nvgCreateInternal(NVGparams* params); void nvgDeleteInternal(NVGcontext* ctx); diff --git a/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp b/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp index e5795ad2131..05973f26284 100644 --- a/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp +++ b/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp @@ -545,12 +545,13 @@ namespace gl->th = handle; } - static void nvgRenderViewport(void* _userPtr, int width, int height) + static void nvgRenderViewport(void* _userPtr, int width, int height, float devicePixelRatio) { struct GLNVGcontext* gl = (struct GLNVGcontext*)_userPtr; + gl->state = 0; gl->view[0] = (float)width; gl->view[1] = (float)height; - bgfx::setViewRect(gl->m_viewId, 0, 0, width, height); + bgfx::setViewRect(gl->m_viewId, 0, 0, width * devicePixelRatio, height * devicePixelRatio); } static void fan(uint32_t _start, uint32_t _count) @@ -714,33 +715,24 @@ namespace int allocated = gl->tvb.size/gl->tvb.stride; - if (allocated < gl->nverts) { + if (allocated < gl->nverts) + { gl->nverts = allocated; BX_WARN(true, "Vertex number truncated due to transient vertex buffer overflow"); } - memcpy(gl->tvb.data, gl->verts, gl->nverts * sizeof(struct NVGvertex) ); - gl->state = 0 + if (0 == gl->state) + { + gl->state = BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA); + } + + gl->state |= 0 | BGFX_STATE_RGB_WRITE | BGFX_STATE_ALPHA_WRITE ; -// if (alphaBlend == NVG_PREMULTIPLIED_ALPHA) -// { -// gl->state |= BGFX_STATE_BLEND_FUNC_SEPARATE( -// BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA -// , BGFX_STATE_BLEND_ONE, BGFX_STATE_BLEND_INV_SRC_ALPHA -// ); -// } -// else - { - gl->state |= BGFX_STATE_BLEND_FUNC( - BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA - ); - } - bgfx::setUniform(gl->u_viewSize, gl->view); for (uint32_t ii = 0, num = gl->ncalls; ii < num; ++ii) @@ -1088,6 +1080,29 @@ error: return NULL; } +NVGcontext* nvgCreate(int edgeaa, unsigned char _viewId) { + return nvgCreate(edgeaa, _viewId, NULL); +} + +void nvgDelete(struct NVGcontext* ctx) +{ + nvgDeleteInternal(ctx); +} + +void nvgState(struct NVGcontext* ctx, uint64_t state) +{ + struct NVGparams* params = nvgInternalParams(ctx); + struct GLNVGcontext* gl = (struct GLNVGcontext*)params->userPtr; + gl->state = state; +} + +uint8_t nvgViewId(struct NVGcontext* ctx) +{ + struct NVGparams* params = nvgInternalParams(ctx); + struct GLNVGcontext* gl = (struct GLNVGcontext*)params->userPtr; + return gl->m_viewId; +} + void nvgViewId(struct NVGcontext* ctx, unsigned char _viewId) { struct NVGparams* params = nvgInternalParams(ctx); @@ -1095,7 +1110,55 @@ void nvgViewId(struct NVGcontext* ctx, unsigned char _viewId) gl->m_viewId = uint8_t(_viewId); } -void nvgDelete(struct NVGcontext* ctx) +bgfx::TextureHandle nvglImageHandle(NVGcontext* ctx, int image) { - nvgDeleteInternal(ctx); + GLNVGcontext* gl = (GLNVGcontext*)nvgInternalParams(ctx)->userPtr; + GLNVGtexture* tex = glnvg__findTexture(gl, image); + return tex->id; +} + +NVGLUframebuffer* nvgluCreateFramebuffer(NVGcontext* ctx, int width, + int height, int imageFlags) { + NVGLUframebuffer* framebuffer = new NVGLUframebuffer; + framebuffer->ctx = ctx; + framebuffer->image = nvgCreateImageRGBA(ctx, width, height, + imageFlags, NULL); + bgfx::TextureHandle texture = nvglImageHandle(ctx, framebuffer->image); + if (!bgfx::isValid(texture)) { + nvgluDeleteFramebuffer(framebuffer); + return NULL; + } + framebuffer->handle = bgfx::createFrameBuffer(1, &texture, false); + if (!bgfx::isValid(framebuffer->handle)) + { + nvgluDeleteFramebuffer(framebuffer); + return NULL; + } + static uint8_t s_ViewId = 1; // may have a better way to assign new view id + framebuffer->viewId = s_ViewId++; + bgfx::setViewFrameBuffer(framebuffer->viewId, framebuffer->handle); + bgfx::setViewSeq(framebuffer->viewId, true); + return framebuffer; +} + +void nvgluBindFramebuffer(NVGLUframebuffer* framebuffer) { + static NVGcontext* s_prevCtx = NULL; + static uint8_t s_prevViewId; + if (framebuffer != NULL) { + s_prevCtx = framebuffer->ctx; + s_prevViewId = nvgViewId(framebuffer->ctx); + nvgViewId(framebuffer->ctx, framebuffer->viewId); + } else if (s_prevCtx != NULL) { + nvgViewId(s_prevCtx, s_prevViewId); + } +} + +void nvgluDeleteFramebuffer(NVGLUframebuffer* framebuffer) { + if (framebuffer == NULL) + return; + if (framebuffer->image >= 0) + nvgDeleteImage(framebuffer->ctx, framebuffer->image); + if (bgfx::isValid(framebuffer->handle)) + bgfx::destroyFrameBuffer(framebuffer->handle); + delete framebuffer; } diff --git a/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.h b/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.h new file mode 100644 index 00000000000..2268e900f99 --- /dev/null +++ b/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.h @@ -0,0 +1,52 @@ +/* + * Copyright 2011-2016 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#ifndef NANOVG_BGFX_H_HEADER_GUARD +#define NANOVG_BGFX_H_HEADER_GUARD + +#include "bgfx/bgfx.h" + +namespace bx { struct AllocatorI; } + +struct NVGcontext; + +struct NVGLUframebuffer { + NVGcontext* ctx; + bgfx::FrameBufferHandle handle; + int image; + uint8_t viewId; +}; +typedef struct NVGLUframebuffer NVGLUframebuffer; + +NVGcontext* nvgCreate(int edgeaa, unsigned char _viewId, bx::AllocatorI* _allocator); +NVGcontext* nvgCreate(int edgeaa, unsigned char _viewId); +void nvgDelete(struct NVGcontext* ctx); +void nvgState(struct NVGcontext* ctx, uint64_t state); +uint8_t nvgViewId(struct NVGcontext* ctx); +void nvgViewId(struct NVGcontext* ctx, unsigned char _viewId); + +// Helper functions to create bgfx framebuffer to render to. +// Example: +// float scale = 2; +// NVGLUframebuffer* fb = nvgluCreateFramebuffer(ctx, 100 * scale, 100 * scale, 0); +// nvgluBindFramebuffer(fb); +// nvgBeginFrame(ctx, 100, 100, scale); +// // renders anything offscreen +// nvgEndFrame(ctx); +// nvgluBindFramebuffer(NULL); +// +// // Pastes the framebuffer rendering. +// nvgBeginFrame(ctx, 1024, 768, scale); +// NVGpaint paint = nvgImagePattern(ctx, 0, 0, 100, 100, 0, fb->image, 1); +// nvgBeginPath(ctx); +// nvgRect(ctx, 0, 0, 100, 100); +// nvgFillPaint(ctx, paint); +// nvgFill(ctx); +// nvgEndFrame(ctx); +NVGLUframebuffer* nvgluCreateFramebuffer(NVGcontext* ctx, int width, int height, int imageFlags); +void nvgluBindFramebuffer(NVGLUframebuffer* framebuffer); +void nvgluDeleteFramebuffer(NVGLUframebuffer* framebuffer); + +#endif // NANOVG_BGFX_H_HEADER_GUARD diff --git a/3rdparty/bgfx/examples/runtime/meshes/bunny.bin b/3rdparty/bgfx/examples/runtime/meshes/bunny.bin index adcca877ef8..794ec22c7fe 100644 Binary files a/3rdparty/bgfx/examples/runtime/meshes/bunny.bin and b/3rdparty/bgfx/examples/runtime/meshes/bunny.bin differ diff --git a/3rdparty/bgfx/examples/runtime/meshes/hollowcube.bin b/3rdparty/bgfx/examples/runtime/meshes/hollowcube.bin index 3234750e081..0ea300901e5 100644 Binary files a/3rdparty/bgfx/examples/runtime/meshes/hollowcube.bin and b/3rdparty/bgfx/examples/runtime/meshes/hollowcube.bin differ diff --git a/3rdparty/bgfx/examples/runtime/meshes/orb.bin b/3rdparty/bgfx/examples/runtime/meshes/orb.bin index 336f3680565..22b9a8af452 100644 Binary files a/3rdparty/bgfx/examples/runtime/meshes/orb.bin and b/3rdparty/bgfx/examples/runtime/meshes/orb.bin differ diff --git a/3rdparty/bgfx/examples/runtime/meshes/unit_sphere.bin b/3rdparty/bgfx/examples/runtime/meshes/unit_sphere.bin new file mode 100644 index 00000000000..1ffc27f623f Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/meshes/unit_sphere.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_ibl_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_ibl_mesh.bin index 155058f3846..68159a75736 100644 Binary files a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_ibl_mesh.bin and b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_ibl_mesh.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_picking_id.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_picking_id.bin new file mode 100644 index 00000000000..88fffd64461 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_picking_id.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_picking_shaded.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_picking_shaded.bin new file mode 100644 index 00000000000..efa26898d42 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_picking_shaded.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_rsm_combine.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_rsm_combine.bin new file mode 100644 index 00000000000..5c633734433 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_rsm_combine.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_rsm_gbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_rsm_gbuffer.bin new file mode 100644 index 00000000000..71c20d5bfc5 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_rsm_gbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_rsm_lbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_rsm_lbuffer.bin new file mode 100644 index 00000000000..ae81827f81b Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_rsm_lbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_rsm_shadow.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_rsm_shadow.bin new file mode 100644 index 00000000000..faf21f024b8 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_rsm_shadow.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_shadow.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_shadow.bin index 2477d864d9a..2ffc6baeefc 100644 Binary files a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_shadow.bin and b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_shadow.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/vs_ibl_skybox.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/vs_ibl_skybox.bin index 8c29510aa1b..1b32e1c6552 100644 Binary files a/3rdparty/bgfx/examples/runtime/shaders/dx11/vs_ibl_skybox.bin and b/3rdparty/bgfx/examples/runtime/shaders/dx11/vs_ibl_skybox.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/vs_picking_shaded.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/vs_picking_shaded.bin new file mode 100644 index 00000000000..27e8c4d29b9 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx11/vs_picking_shaded.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/vs_rsm_combine.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/vs_rsm_combine.bin new file mode 100644 index 00000000000..2278290e567 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx11/vs_rsm_combine.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/vs_rsm_gbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/vs_rsm_gbuffer.bin new file mode 100644 index 00000000000..40a542facc4 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx11/vs_rsm_gbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/vs_rsm_lbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/vs_rsm_lbuffer.bin new file mode 100644 index 00000000000..be1624f7796 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx11/vs_rsm_lbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/vs_rsm_shadow.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/vs_rsm_shadow.bin new file mode 100644 index 00000000000..1a351d8cd61 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx11/vs_rsm_shadow.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_mesh.bin index 74ad610bbf1..337a86b34cd 100644 Binary files a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_mesh.bin and b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_mesh.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_picking_id.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_picking_id.bin new file mode 100644 index 00000000000..6e0208149a0 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_picking_id.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_picking_shaded.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_picking_shaded.bin new file mode 100644 index 00000000000..8c5005ca008 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_picking_shaded.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_rsm_combine.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_rsm_combine.bin new file mode 100644 index 00000000000..28d904d8986 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_rsm_combine.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_rsm_gbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_rsm_gbuffer.bin new file mode 100644 index 00000000000..7facc87fc72 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_rsm_gbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_rsm_lbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_rsm_lbuffer.bin new file mode 100644 index 00000000000..5f9e5c0236e Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_rsm_lbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_rsm_shadow.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_rsm_shadow.bin new file mode 100644 index 00000000000..d93441c2f28 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_rsm_shadow.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_skybox.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_skybox.bin index 0c8d2ffaf25..f408ee78684 100644 Binary files a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_skybox.bin and b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_skybox.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_picking_shaded.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_picking_shaded.bin new file mode 100644 index 00000000000..9df3ff89fd7 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_picking_shaded.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_rsm_combine.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_rsm_combine.bin new file mode 100644 index 00000000000..fe8592c138d Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_rsm_combine.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_rsm_gbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_rsm_gbuffer.bin new file mode 100644 index 00000000000..3cc1c15e95a Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_rsm_gbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_rsm_lbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_rsm_lbuffer.bin new file mode 100644 index 00000000000..12579db146c Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_rsm_lbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_rsm_shadow.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_rsm_shadow.bin new file mode 100644 index 00000000000..2d9ef91e8bb Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_rsm_shadow.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_ibl_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_ibl_mesh.bin index 75c93b113e3..a4cd92a1904 100644 Binary files a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_ibl_mesh.bin and b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_ibl_mesh.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_picking_id.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_picking_id.bin new file mode 100644 index 00000000000..91acdf18ecd Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_picking_id.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_picking_shaded.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_picking_shaded.bin new file mode 100644 index 00000000000..62c604c3d4a Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_picking_shaded.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_rsm_combine.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_rsm_combine.bin new file mode 100644 index 00000000000..23364eb50e3 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_rsm_combine.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_rsm_gbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_rsm_gbuffer.bin new file mode 100644 index 00000000000..911c8ff6f09 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_rsm_gbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_rsm_lbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_rsm_lbuffer.bin new file mode 100644 index 00000000000..207c88361b2 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_rsm_lbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_rsm_shadow.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_rsm_shadow.bin new file mode 100644 index 00000000000..6c9adff2df9 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_rsm_shadow.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_shadow.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_shadow.bin index 3262874eaf3..81ccc6436e4 100644 Binary files a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_shadow.bin and b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_shadow.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/vs_ibl_skybox.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/vs_ibl_skybox.bin index d0c60ada93c..d518d061f73 100644 Binary files a/3rdparty/bgfx/examples/runtime/shaders/gles/vs_ibl_skybox.bin and b/3rdparty/bgfx/examples/runtime/shaders/gles/vs_ibl_skybox.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/vs_picking_shaded.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/vs_picking_shaded.bin new file mode 100644 index 00000000000..d066f631d54 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/gles/vs_picking_shaded.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/vs_rsm_combine.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/vs_rsm_combine.bin new file mode 100644 index 00000000000..3368689b86a Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/gles/vs_rsm_combine.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/vs_rsm_gbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/vs_rsm_gbuffer.bin new file mode 100644 index 00000000000..e86a13cbb9b Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/gles/vs_rsm_gbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/vs_rsm_lbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/vs_rsm_lbuffer.bin new file mode 100644 index 00000000000..68d4a767431 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/gles/vs_rsm_lbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/vs_rsm_shadow.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/vs_rsm_shadow.bin new file mode 100644 index 00000000000..cd0a5da2676 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/gles/vs_rsm_shadow.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_ibl_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_ibl_mesh.bin index 3260e151099..ea3aad7be31 100644 Binary files a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_ibl_mesh.bin and b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_ibl_mesh.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_picking_id.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_picking_id.bin new file mode 100644 index 00000000000..be0e43459bf Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_picking_id.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_picking_shaded.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_picking_shaded.bin new file mode 100644 index 00000000000..d53e31c1b60 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_picking_shaded.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_rsm_combine.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_rsm_combine.bin new file mode 100644 index 00000000000..fd9c2e5cf0c Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_rsm_combine.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_rsm_gbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_rsm_gbuffer.bin new file mode 100644 index 00000000000..1dcf49ce0da Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_rsm_gbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_rsm_lbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_rsm_lbuffer.bin new file mode 100644 index 00000000000..b1277284441 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_rsm_lbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_rsm_shadow.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_rsm_shadow.bin new file mode 100644 index 00000000000..c8b88b15b41 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_rsm_shadow.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_shadow.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_shadow.bin index 946d0e83e3b..81ccc6436e4 100644 Binary files a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_shadow.bin and b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_shadow.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/vs_ibl_skybox.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/vs_ibl_skybox.bin index be3bea2edbd..e079c0a9c25 100644 Binary files a/3rdparty/bgfx/examples/runtime/shaders/glsl/vs_ibl_skybox.bin and b/3rdparty/bgfx/examples/runtime/shaders/glsl/vs_ibl_skybox.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/vs_picking_shaded.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/vs_picking_shaded.bin new file mode 100644 index 00000000000..786b5e30d1d Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/glsl/vs_picking_shaded.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/vs_rsm_combine.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/vs_rsm_combine.bin new file mode 100644 index 00000000000..c75e2e66ea5 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/glsl/vs_rsm_combine.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/vs_rsm_gbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/vs_rsm_gbuffer.bin new file mode 100644 index 00000000000..3bf03fd859f Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/glsl/vs_rsm_gbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/vs_rsm_lbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/vs_rsm_lbuffer.bin new file mode 100644 index 00000000000..8553e1738a0 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/glsl/vs_rsm_lbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/vs_rsm_shadow.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/vs_rsm_shadow.bin new file mode 100644 index 00000000000..a5d351de0f8 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/glsl/vs_rsm_shadow.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/metal/fs_callback.bin b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_callback.bin index 9ac95509870..b08e28f567d 100644 Binary files a/3rdparty/bgfx/examples/runtime/shaders/metal/fs_callback.bin and b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_callback.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/metal/fs_deferred_light.bin b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_deferred_light.bin index 89bc35bc2a3..e5a03968999 100644 Binary files a/3rdparty/bgfx/examples/runtime/shaders/metal/fs_deferred_light.bin and b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_deferred_light.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/metal/fs_ibl_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_ibl_mesh.bin index 917de5500a2..fef2951fc64 100644 Binary files a/3rdparty/bgfx/examples/runtime/shaders/metal/fs_ibl_mesh.bin and b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_ibl_mesh.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/metal/fs_picking_id.bin b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_picking_id.bin new file mode 100644 index 00000000000..fd86c31031a Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_picking_id.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/metal/fs_picking_shaded.bin b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_picking_shaded.bin new file mode 100644 index 00000000000..4e5208aff4a Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_picking_shaded.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/metal/fs_rsm_combine.bin b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_rsm_combine.bin new file mode 100644 index 00000000000..ef8a8cf216c Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_rsm_combine.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/metal/fs_rsm_gbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_rsm_gbuffer.bin new file mode 100644 index 00000000000..fdd2b86573a Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_rsm_gbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/metal/fs_rsm_lbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_rsm_lbuffer.bin new file mode 100644 index 00000000000..6eb32d9395e Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_rsm_lbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/metal/fs_rsm_shadow.bin b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_rsm_shadow.bin new file mode 100644 index 00000000000..c88531c9d78 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_rsm_shadow.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/metal/fs_sms_shadow.bin b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_sms_shadow.bin index b5140b48e9a..42cd46cf0c3 100644 Binary files a/3rdparty/bgfx/examples/runtime/shaders/metal/fs_sms_shadow.bin and b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_sms_shadow.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/metal/fs_wf_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_wf_mesh.bin index 3628dd93e5d..995ba28b892 100644 Binary files a/3rdparty/bgfx/examples/runtime/shaders/metal/fs_wf_mesh.bin and b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_wf_mesh.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/metal/fs_wf_wireframe.bin b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_wf_wireframe.bin index e00b6fa3f91..5b3d28b2c06 100644 Binary files a/3rdparty/bgfx/examples/runtime/shaders/metal/fs_wf_wireframe.bin and b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_wf_wireframe.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/metal/vs_ibl_skybox.bin b/3rdparty/bgfx/examples/runtime/shaders/metal/vs_ibl_skybox.bin index 0052efc7049..78302fa339b 100644 Binary files a/3rdparty/bgfx/examples/runtime/shaders/metal/vs_ibl_skybox.bin and b/3rdparty/bgfx/examples/runtime/shaders/metal/vs_ibl_skybox.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/metal/vs_picking_shaded.bin b/3rdparty/bgfx/examples/runtime/shaders/metal/vs_picking_shaded.bin new file mode 100644 index 00000000000..c5326d93db6 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/metal/vs_picking_shaded.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/metal/vs_rsm_combine.bin b/3rdparty/bgfx/examples/runtime/shaders/metal/vs_rsm_combine.bin new file mode 100644 index 00000000000..10fb2d926e2 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/metal/vs_rsm_combine.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/metal/vs_rsm_gbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/metal/vs_rsm_gbuffer.bin new file mode 100644 index 00000000000..83a9b434292 Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/metal/vs_rsm_gbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/metal/vs_rsm_lbuffer.bin b/3rdparty/bgfx/examples/runtime/shaders/metal/vs_rsm_lbuffer.bin new file mode 100644 index 00000000000..1050eb976bf Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/metal/vs_rsm_lbuffer.bin differ diff --git a/3rdparty/bgfx/examples/runtime/shaders/metal/vs_rsm_shadow.bin b/3rdparty/bgfx/examples/runtime/shaders/metal/vs_rsm_shadow.bin new file mode 100644 index 00000000000..c0b666b772a Binary files /dev/null and b/3rdparty/bgfx/examples/runtime/shaders/metal/vs_rsm_shadow.bin differ diff --git a/3rdparty/bgfx/include/bgfx/bgfx.h b/3rdparty/bgfx/include/bgfx/bgfx.h index 323a2ebe19e..03f360528a1 100644 --- a/3rdparty/bgfx/include/bgfx/bgfx.h +++ b/3rdparty/bgfx/include/bgfx/bgfx.h @@ -285,6 +285,7 @@ namespace bgfx /// struct OcclusionQueryResult { + /// Occlusion query results: enum Enum { Invisible, //!< Query failed test. @@ -301,6 +302,7 @@ namespace bgfx /// struct TopologyConvert { + /// Topology conversion functions: enum Enum { TriListFlipWinding, //!< Flip winding order of triangle list. @@ -312,6 +314,32 @@ namespace bgfx }; }; + /// Topology sort order. + /// + /// @attention C99 equivalent is `bgfx_topology_sort_t`. + /// + struct TopologySort + { + /// Topology sort order: + enum Enum + { + DirectionFrontToBackMin, //!< + DirectionFrontToBackAvg, //!< + DirectionFrontToBackMax, //!< + DirectionBackToFrontMin, //!< + DirectionBackToFrontAvg, //!< + DirectionBackToFrontMax, //!< + DistanceFrontToBackMin, //!< + DistanceFrontToBackAvg, //!< + DistanceFrontToBackMax, //!< + DistanceBackToFrontMin, //!< + DistanceBackToFrontAvg, //!< + DistanceBackToFrontMax, //!< + + Count + }; + }; + static const uint16_t invalidHandle = UINT16_MAX; BGFX_HANDLE(DynamicIndexBufferHandle); @@ -515,10 +543,24 @@ namespace bgfx GPU gpu[4]; //!< Enumerated GPUs. /// Supported texture formats. - /// - `BGFX_CAPS_FORMAT_TEXTURE_NONE` - not supported - /// - `BGFX_CAPS_FORMAT_TEXTURE_2D` - supported - /// - `BGFX_CAPS_FORMAT_TEXTURE_2D_EMULATED` - emulated - /// - `BGFX_CAPS_FORMAT_TEXTURE_VERTEX` - supported vertex texture + /// - `BGFX_CAPS_FORMAT_TEXTURE_NONE` - Texture format is not supported. + /// - `BGFX_CAPS_FORMAT_TEXTURE_2D` - Texture format is supported. + /// - `BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB` - Texture as sRGB format is supported. + /// - `BGFX_CAPS_FORMAT_TEXTURE_2D_EMULATED` - Texture format is emulated. + /// - `BGFX_CAPS_FORMAT_TEXTURE_3D` - Texture format is supported. + /// - `BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB` - Texture as sRGB format is supported. + /// - `BGFX_CAPS_FORMAT_TEXTURE_3D_EMULATED` - Texture format is emulated. + /// - `BGFX_CAPS_FORMAT_TEXTURE_CUBE` - Texture format is supported. + /// - `BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB` - Texture as sRGB format is supported. + /// - `BGFX_CAPS_FORMAT_TEXTURE_CUBE_EMULATED` - Texture format is emulated. + /// - `BGFX_CAPS_FORMAT_TEXTURE_VERTEX` - Texture format can be used from vertex shader. + /// - `BGFX_CAPS_FORMAT_TEXTURE_IMAGE` - Texture format can be used as image from compute + /// shader. + /// - `BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER` - Texture format can be used as frame + /// buffer. + /// - `BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA` - Texture format can be used as MSAA + /// frame buffer. + /// - `BGFX_CAPS_FORMAT_TEXTURE_MSAA` - Texture can be sampled as MSAA. uint16_t formats[TextureFormat::Count]; }; @@ -641,8 +683,9 @@ namespace bgfx uint64_t gpuTimeEnd; //!< GPU frame end time. uint64_t gpuTimerFreq; //!< GPU timer frequency. - int64_t waitRender; //!< Render wait time. - int64_t waitSubmit; //!< Submit wait time. + int64_t waitRender; //!< Time spent waiting for render backend thread to finish issuing + //! draw commands to underlying graphics API. + int64_t waitSubmit; //!< Time spent waiting for submit thread to advance to next frame. }; /// Vertex declaration. @@ -798,7 +841,7 @@ namespace bgfx /// @param[in] _dstSize Destination index buffer in bytes. It must be /// large enough to contain output indices. If destination size is /// insufficient index buffer will be truncated. - /// @param[in] _indices Source indices. + /// @param[in]_indices Source indices. /// @param[in] _numIndices Number of input indices. /// @param[in] _index32 Set to `true` if input indices are 32-bit. /// @@ -815,6 +858,38 @@ namespace bgfx , bool _index32 ); + /// Sort indices. + /// + /// @param[in] _sort Sort order, see `TopologySort::Enum`. + /// @param[in] _dst Destination index buffer. + /// @param[in] _dstSize Destination index buffer in bytes. It must be + /// large enough to contain output indices. If destination size is + /// insufficient index buffer will be truncated. + /// @param[in] _dir Direction (vector must be normalized). + /// @param[in] _pos Position. + /// @param[in] _vertices Pointer to first vertex represented as + /// float x, y, z. Must contain at least number of vertices + /// referencende by index buffer. + /// @param[in] _stride Vertex stride. + /// @param[in] _indices Source indices. + /// @param[in] _numIndices Number of input indices. + /// @param[in] _index32 Set to `true` if input indices are 32-bit. + /// + /// @attention C99 equivalent is `bgfx_topology_sort_tri_list`. + /// + void topologySortTriList( + TopologySort::Enum _sort + , void* _dst + , uint32_t _dstSize + , const float _dir[3] + , const float _pos[3] + , const void* _vertices + , uint32_t _stride + , const void* _indices + , uint32_t _numIndices + , bool _index32 + ); + /// Swizzle RGBA8 image to BGRA8. /// /// @param[in] _width Width of input image (pixels). diff --git a/3rdparty/bgfx/include/bgfx/bgfxdefines.h b/3rdparty/bgfx/include/bgfx/bgfxdefines.h index f8923517184..36e308507bf 100644 --- a/3rdparty/bgfx/include/bgfx/bgfxdefines.h +++ b/3rdparty/bgfx/include/bgfx/bgfxdefines.h @@ -6,7 +6,7 @@ #ifndef BGFX_DEFINES_H_HEADER_GUARD #define BGFX_DEFINES_H_HEADER_GUARD -#define BGFX_API_VERSION UINT32_C(16) +#define BGFX_API_VERSION UINT32_C(17) /// #define BGFX_STATE_RGB_WRITE UINT64_C(0x0000000000000001) //!< Enable RGB write. @@ -403,6 +403,7 @@ #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_CAPS_FORMAT_TEXTURE_MIP_AUTOGEN UINT16_C(0x4000) //!< Texture format supports auto-generated mips. /// #define BGFX_VIEW_NONE UINT8_C(0x00) //!< diff --git a/3rdparty/bgfx/include/bgfx/bgfxplatform.h b/3rdparty/bgfx/include/bgfx/bgfxplatform.h index 1912c05b9d8..4984d68e8f9 100644 --- a/3rdparty/bgfx/include/bgfx/bgfxplatform.h +++ b/3rdparty/bgfx/include/bgfx/bgfxplatform.h @@ -316,7 +316,7 @@ namespace bgfx PlatformData pd; # if BX_PLATFORM_LINUX || BX_PLATFORM_BSD pd.ndt = glfwGetX11Display(); - pd.nwh = (void*)(uintptr_t)glfwGetX11Window(_window); + pd.nwh = (void*)(uintptr_t)glfwGetGLXWindow(_window); pd.context = glfwGetGLXContext(_window); # elif BX_PLATFORM_OSX pd.ndt = NULL; diff --git a/3rdparty/bgfx/include/bgfx/c99/bgfx.h b/3rdparty/bgfx/include/bgfx/c99/bgfx.h index 222f202f29d..c91c5e7ee67 100644 --- a/3rdparty/bgfx/include/bgfx/c99/bgfx.h +++ b/3rdparty/bgfx/include/bgfx/c99/bgfx.h @@ -235,6 +235,25 @@ typedef enum bgfx_topology_convert } bgfx_topology_convert_t; +typedef enum bgfx_topology_sort +{ + BGFX_TOPOLOGY_SORT_DIRECTION_FRONT_TO_BACK_MIN, + BGFX_TOPOLOGY_SORT_DIRECTION_FRONT_TO_BACK_AVG, + BGFX_TOPOLOGY_SORT_DIRECTION_FRONT_TO_BACK_MAX, + BGFX_TOPOLOGY_SORT_DIRECTION_BACK_TO_FRONT_MIN, + BGFX_TOPOLOGY_SORT_DIRECTION_BACK_TO_FRONT_AVG, + BGFX_TOPOLOGY_SORT_DIRECTION_BACK_TO_FRONT_MAX, + BGFX_TOPOLOGY_SORT_DISTANCE_FRONT_TO_BACK_MIN, + BGFX_TOPOLOGY_SORT_DISTANCE_FRONT_TO_BACK_AVG, + BGFX_TOPOLOGY_SORT_DISTANCE_FRONT_TO_BACK_MAX, + BGFX_TOPOLOGY_SORT_DISTANCE_BACK_TO_FRONT_MIN, + BGFX_TOPOLOGY_SORT_DISTANCE_BACK_TO_FRONT_AVG, + BGFX_TOPOLOGY_SORT_DISTANCE_BACK_TO_FRONT_MAX, + + BGFX_TOPOLOGY_SORT_COUNT + +} bgfx_topology_sort_t; + #define BGFX_HANDLE_T(_name) \ typedef struct _name { uint16_t idx; } _name##_t @@ -483,6 +502,12 @@ BGFX_C_API void bgfx_vertex_convert(const bgfx_vertex_decl_t* _destDecl, void* _ /**/ BGFX_C_API uint16_t bgfx_weld_vertices(uint16_t* _output, const bgfx_vertex_decl_t* _decl, const void* _data, uint16_t _num, float _epsilon); +/**/ +BGFX_C_API uint32_t bgfx_topology_convert(bgfx_topology_convert_t _conversion, void* _dst, uint32_t _dstSize, const void* _indices, uint32_t _numIndices, bool _index32); + +/**/ +BGFX_C_API void bgfx_topology_sort_tri_list(bgfx_topology_sort_t _sort, void* _dst, uint32_t _dstSize, const float _dir[3], const float _pos[3], const void* _vertices, uint32_t _stride, const void* _indices, uint32_t _numIndices, bool _index32); + /**/ BGFX_C_API void bgfx_image_swizzle_bgra8(uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, void* _dst); diff --git a/3rdparty/bgfx/include/bgfx/c99/bgfxplatform.h b/3rdparty/bgfx/include/bgfx/c99/bgfxplatform.h index f7d5b76b532..cfde4834214 100644 --- a/3rdparty/bgfx/include/bgfx/c99/bgfxplatform.h +++ b/3rdparty/bgfx/include/bgfx/c99/bgfxplatform.h @@ -78,6 +78,7 @@ typedef struct bgfx_interface_vtbl void (*vertex_convert)(const bgfx_vertex_decl_t* _destDecl, void* _destData, const bgfx_vertex_decl_t* _srcDecl, const void* _srcData, uint32_t _num); uint16_t (*weld_vertices)(uint16_t* _output, const bgfx_vertex_decl_t* _decl, const void* _data, uint16_t _num, float _epsilon); uint32_t (*topology_convert)(bgfx_topology_convert_t _conversion, void* _dst, uint32_t _dstSize, const void* _indices, uint32_t _numIndices, bool _index32); + void (*topology_sort_tri_list)(bgfx_topology_sort_t _sort, void* _dst, uint32_t _dstSize, const float _dir[3], const float _pos[3], const void* _vertices, uint32_t _stride, const void* _indices, uint32_t _numIndices, bool _index32); void (*image_swizzle_bgra8)(uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, void* _dst); void (*image_rgba8_downsample_2x2)(uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, void* _dst); uint8_t (*get_supported_renderers)(bgfx_renderer_type_t _enum[BGFX_RENDERER_TYPE_COUNT]); diff --git a/3rdparty/bgfx/makefile b/3rdparty/bgfx/makefile index 965de58a245..82a054ffa56 100644 --- a/3rdparty/bgfx/makefile +++ b/3rdparty/bgfx/makefile @@ -25,6 +25,7 @@ endif BX_DIR?=../bx GENIE?=$(BX_DIR)/tools/bin/$(OS)/genie +NINJA?=$(BX_DIR)/tools/bin/$(OS)/ninja .PHONY: help @@ -276,6 +277,9 @@ build: build-$(OS) rebuild-shaders: $(MAKE) -R -C examples rebuild +assets: # Build assets. + $(NINJA) -C scripts + analyze: cppcheck src/ cppcheck examples/ diff --git a/3rdparty/bgfx/scripts/common.ninja b/3rdparty/bgfx/scripts/build.ninja similarity index 65% rename from 3rdparty/bgfx/scripts/common.ninja rename to 3rdparty/bgfx/scripts/build.ninja index 0cde35fa310..54b099e0b6f 100644 --- a/3rdparty/bgfx/scripts/common.ninja +++ b/3rdparty/bgfx/scripts/build.ninja @@ -4,6 +4,10 @@ rule geometryc_pack_normal command = geometryc -f $in -o $out --packnormal 1 description = Converting geometry $in... +rule geometryc_pack_normal_barycentric + command = geometryc -f $in -o $out --packnormal 1 --barycentric + description = Converting geometry $in... + rule texturec_bc1 command = texturec -f $in -o $out -t bc1 -m @@ -24,3 +28,9 @@ rule texturec_etc1 rule texturec_etc2 command = texturec -f $in -o $out -t etc2 -m + +pwd = ../examples/assets/meshes +subninja ../examples/assets/meshes/meshes.ninja + +pwd = ../examples/assets/textures +subninja ../examples/assets/textures/textures.ninja diff --git a/3rdparty/bgfx/scripts/genie.lua b/3rdparty/bgfx/scripts/genie.lua index ce34df5d990..fe21f0eaa14 100644 --- a/3rdparty/bgfx/scripts/genie.lua +++ b/3rdparty/bgfx/scripts/genie.lua @@ -391,6 +391,8 @@ exampleProject("26-occlusion") exampleProject("27-terrain") exampleProject("28-wireframe") exampleProject("29-debugdraw") +exampleProject("30-picking") +exampleProject("31-rsm") -- C99 source doesn't compile under WinRT settings if not premake.vstudio.iswinrt() then diff --git a/3rdparty/bgfx/scripts/shader-embeded.mk b/3rdparty/bgfx/scripts/shader-embeded.mk index aea94c7c930..14cc9c23c1e 100644 --- a/3rdparty/bgfx/scripts/shader-embeded.mk +++ b/3rdparty/bgfx/scripts/shader-embeded.mk @@ -24,7 +24,7 @@ SHADER_TMP = $(TEMP)/tmp vs_%.bin.h : vs_%.sc @echo [$(<)] - $(SILENT) $(SHADERC) $(VS_FLAGS) --platform linux -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_glsl + $(SILENT) $(SHADERC) $(VS_FLAGS) --platform linux -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_glsl @cat $(SHADER_TMP) > $(@) -$(SILENT) $(SHADERC) $(VS_FLAGS) --platform windows -p vs_3_0 -O 3 -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_dx9 -@cat $(SHADER_TMP) >> $(@) @@ -35,7 +35,7 @@ vs_%.bin.h : vs_%.sc fs_%.bin.h : fs_%.sc @echo [$(<)] - $(SILENT) $(SHADERC) $(FS_FLAGS) --platform linux -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_glsl + $(SILENT) $(SHADERC) $(FS_FLAGS) --platform linux -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_glsl @cat $(SHADER_TMP) > $(@) -$(SILENT) $(SHADERC) $(FS_FLAGS) --platform windows -p ps_3_0 -O 3 -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_dx9 -@cat $(SHADER_TMP) >> $(@) @@ -46,7 +46,7 @@ fs_%.bin.h : fs_%.sc cs_%.bin.h : cs_%.sc @echo [$(<)] - $(SILENT) $(SHADERC) $(CS_FLAGS) --platform linux -p 430 -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_glsl + $(SILENT) $(SHADERC) $(CS_FLAGS) --platform linux -p 430 -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_glsl @cat $(SHADER_TMP) > $(@) -$(SILENT) $(SHADERC) $(CS_FLAGS) --platform windows -p cs_5_0 -O 1 -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_dx11 -@cat $(SHADER_TMP) >> $(@) diff --git a/3rdparty/bgfx/src/bgfx.cpp b/3rdparty/bgfx/src/bgfx.cpp index a1d37e82c41..90c6cee6113 100644 --- a/3rdparty/bgfx/src/bgfx.cpp +++ b/3rdparty/bgfx/src/bgfx.cpp @@ -383,28 +383,38 @@ namespace bgfx void fatal(Fatal::Enum _code, const char* _format, ...) { - char temp[8192]; - va_list argList; va_start(argList, _format); - char* out = temp; - int32_t len = bx::vsnprintf(out, sizeof(temp), _format, argList); - if ( (int32_t)sizeof(temp) < len) - { - out = (char*)alloca(len+1); - len = bx::vsnprintf(out, len, _format, argList); - } - out[len] = '\0'; - va_end(argList); - g_callback->fatal(_code, out); + if (BX_UNLIKELY(NULL == g_callback) ) + { + dbgPrintfVargs(_format, argList); + abort(); + } + else + { + char temp[8192]; + char* out = temp; + int32_t len = bx::vsnprintf(out, sizeof(temp), _format, argList); + if ( (int32_t)sizeof(temp) < len) + { + out = (char*)alloca(len+1); + len = bx::vsnprintf(out, len, _format, argList); + } + out[len] = '\0'; + + g_callback->fatal(_code, out); + } + + va_end(argList); } void trace(const char* _filePath, uint16_t _line, const char* _format, ...) { va_list argList; va_start(argList, _format); - if (NULL == g_callback) + + if (BX_UNLIKELY(NULL == g_callback) ) { dbgPrintfVargs(_format, argList); } @@ -412,6 +422,7 @@ namespace bgfx { g_callback->traceVargs(_filePath, _line, _format, argList); } + va_end(argList); } @@ -1118,25 +1129,26 @@ namespace bgfx } BX_TRACE("Supported texture formats:"); - 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"); + 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 |||||||||||+----- Auto-generated mips"); + BX_TRACE("\t |||||||||||| +-- name"); for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii) { if (TextureFormat::Unknown != ii && TextureFormat::UnknownDepth != ii) { uint16_t flags = g_caps.formats[ii]; - BX_TRACE("\t[%c%c%c%c%c%c%c%c%c%c%c] %s" + BX_TRACE("\t[%c%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 ? '*' : ' ' @@ -1148,6 +1160,7 @@ namespace bgfx , flags&BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER ? 'f' : ' ' , flags&BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA ? '+' : ' ' , flags&BGFX_CAPS_FORMAT_TEXTURE_MSAA ? 'm' : ' ' + , flags&BGFX_CAPS_FORMAT_TEXTURE_MIP_AUTOGEN ? 'M' : ' ' , getName(TextureFormat::Enum(ii) ) ); BX_UNUSED(flags); @@ -2236,7 +2249,10 @@ namespace bgfx uint16_t height; _cmdbuf.read(height); - m_renderCtx->resizeTexture(handle, width, height); + uint8_t numMips; + _cmdbuf.read(numMips); + + m_renderCtx->resizeTexture(handle, width, height, numMips); } break; @@ -2363,6 +2379,11 @@ namespace bgfx return topologyConvert(_conversion, _dst, _dstSize, _indices, _numIndices, _index32, g_allocator); } + void topologySortTriList(TopologySort::Enum _sort, void* _dst, uint32_t _dstSize, const float _dir[3], const float _pos[3], const void* _vertices, uint32_t _stride, const void* _indices, uint32_t _numIndices, bool _index32) + { + topologySortTriList(_sort, _dst, _dstSize, _dir, _pos, _vertices, _stride, _indices, _numIndices, _index32, g_allocator); + } + uint8_t getSupportedRenderers(RendererType::Enum _enum[RendererType::Count]) { uint8_t num = 0; @@ -2393,27 +2414,20 @@ namespace bgfx { if (NULL != s_ctx) { - BX_CHECK(false, "bgfx is already initialized."); + BX_TRACE("bgfx is already initialized."); return false; } - if (!BX_ENABLED(BX_PLATFORM_EMSCRIPTEN || BX_PLATFORM_NACL) - && NULL == g_platformData.ndt - && NULL == g_platformData.nwh - && NULL == g_platformData.context - && NULL == g_platformData.backBuffer - && NULL == g_platformData.backBufferDS) + struct ErrorState { - BX_CHECK(false, "bgfx platform data like window handle or backbuffer must be set."); - return false; - } + enum Enum + { + Default, + ContextAllocated, + }; + }; - memset(&g_caps, 0, sizeof(g_caps) ); - g_caps.maxViews = BGFX_CONFIG_MAX_VIEWS; - g_caps.maxDrawCalls = BGFX_CONFIG_MAX_DRAW_CALLS; - g_caps.maxFBAttachments = 1; - g_caps.vendorId = _vendorId; - g_caps.deviceId = _deviceId; + ErrorState::Enum errorState = ErrorState::Default; if (NULL != _allocator) { @@ -2436,16 +2450,45 @@ namespace bgfx s_callbackStub = BX_NEW(g_allocator, CallbackStub); } + if (!BX_ENABLED(BX_PLATFORM_EMSCRIPTEN || BX_PLATFORM_NACL) + && NULL == g_platformData.ndt + && NULL == g_platformData.nwh + && NULL == g_platformData.context + && NULL == g_platformData.backBuffer + && NULL == g_platformData.backBufferDS) + { + BX_TRACE("bgfx platform data like window handle or backbuffer must be set."); + goto error; + } + + memset(&g_caps, 0, sizeof(g_caps) ); + g_caps.maxViews = BGFX_CONFIG_MAX_VIEWS; + g_caps.maxDrawCalls = BGFX_CONFIG_MAX_DRAW_CALLS; + g_caps.maxFBAttachments = 1; + g_caps.vendorId = _vendorId; + g_caps.deviceId = _deviceId; + BX_TRACE("Init..."); - s_ctx = BX_ALIGNED_NEW(g_allocator, Context, 16); - if (!s_ctx->init(_type) ) - { - BX_TRACE("Init failed."); + errorState = ErrorState::ContextAllocated; + s_ctx = BX_ALIGNED_NEW(g_allocator, Context, 16); + if (s_ctx->init(_type) ) + { + BX_TRACE("Init complete."); + return true; + } + +error: + BX_TRACE("Init failed."); + + switch (errorState) + { + case ErrorState::ContextAllocated: BX_ALIGNED_DELETE(g_allocator, s_ctx, 16); s_ctx = NULL; + case ErrorState::Default: if (NULL != s_callbackStub) { BX_DELETE(g_allocator, s_callbackStub); @@ -2462,11 +2505,10 @@ namespace bgfx s_threadIndex = 0; g_callback = NULL; g_allocator = NULL; - return false; + break; } - BX_TRACE("Init complete."); - return true; + return false; } void shutdown() @@ -2920,7 +2962,14 @@ namespace bgfx , getName(_format) ); - _numMips = uint8_t(bx::uint32_max(1, _numMips) ); + if (BackbufferRatio::Count != _ratio) + { + _width = uint16_t(s_ctx->m_resolution.m_width); + _height = uint16_t(s_ctx->m_resolution.m_height); + getTextureSizeFromRatio(_ratio, _width, _height); + } + + _numMips = calcNumMips(_numMips, _width, _height); if (BX_ENABLED(BGFX_CONFIG_DEBUG) && NULL != _mem) @@ -2934,13 +2983,6 @@ namespace bgfx ); } - if (BackbufferRatio::Count != _ratio) - { - _width = uint16_t(s_ctx->m_resolution.m_width); - _height = uint16_t(s_ctx->m_resolution.m_height); - getTextureSizeFromRatio(_ratio, _width, _height); - } - uint32_t size = sizeof(uint32_t)+sizeof(TextureCreate); const Memory* mem = alloc(size); @@ -2983,7 +3025,7 @@ namespace bgfx , getName(_format) ); - _numMips = uint8_t(bx::uint32_max(1, _numMips) ); + _numMips = calcNumMips(_numMips, _width, _height, _depth); if (BX_ENABLED(BGFX_CONFIG_DEBUG) && NULL != _mem) @@ -3026,7 +3068,7 @@ namespace bgfx , getName(_format) ); - _numMips = uint8_t(bx::uint32_max(1, _numMips) ); + _numMips = calcNumMips(_numMips, _size, _size); if (BX_ENABLED(BGFX_CONFIG_DEBUG) && NULL != _mem) @@ -3815,6 +3857,11 @@ uint32_t bgfx_topology_convert(bgfx_topology_convert_t _conversion, void* _dst, return bgfx::topologyConvert(bgfx::TopologyConvert::Enum(_conversion), _dst, _dstSize, _indices, _numIndices, _index32); } +void bgfx_topology_sort_tri_list(bgfx_topology_sort_t _sort, void* _dst, uint32_t _dstSize, const float _dir[3], const float _pos[3], const void* _vertices, uint32_t _stride, const void* _indices, uint32_t _numIndices, bool _index32) +{ + bgfx::topologySortTriList(bgfx::TopologySort::Enum(_sort), _dst, _dstSize, _dir, _pos, _vertices, _stride, _indices, _numIndices, _index32); +} + BGFX_C_API void bgfx_image_swizzle_bgra8(uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, void* _dst) { bgfx::imageSwizzleBgra8(_width, _height, _pitch, _src, _dst); @@ -4588,6 +4635,7 @@ BGFX_C_API bgfx_interface_vtbl_t* bgfx_get_interface(uint32_t _version) BGFX_IMPORT_FUNC(vertex_convert) \ BGFX_IMPORT_FUNC(weld_vertices) \ BGFX_IMPORT_FUNC(topology_convert) \ + BGFX_IMPORT_FUNC(topology_sort_tri_list) \ BGFX_IMPORT_FUNC(image_swizzle_bgra8) \ BGFX_IMPORT_FUNC(image_rgba8_downsample_2x2) \ BGFX_IMPORT_FUNC(get_supported_renderers) \ diff --git a/3rdparty/bgfx/src/bgfx_p.h b/3rdparty/bgfx/src/bgfx_p.h index 02955987eff..e624dba372d 100644 --- a/3rdparty/bgfx/src/bgfx_p.h +++ b/3rdparty/bgfx/src/bgfx_p.h @@ -62,9 +62,9 @@ # define RMT_USE_D3D11 BGFX_CONFIG_RENDERER_DIRECT3D11 # define RMT_USE_OPENGL BGFX_CONFIG_RENDERER_OPENGL # include -# define BGFX_PROFILER_SCOPE(_group, _name, _color) rmt_ScopedCPUSample(_group##_##_name) -# define BGFX_PROFILER_BEGIN(_group, _name, _color) rmt_BeginCPUSample(_group##_##_name) -# define BGFX_PROFILER_BEGIN_DYNAMIC(_namestr) rmt_BeginCPUSampleDynamic(_namestr) +# define BGFX_PROFILER_SCOPE(_group, _name, _color) rmt_ScopedCPUSample(_group##_##_name, RMTSF_None) +# define BGFX_PROFILER_BEGIN(_group, _name, _color) rmt_BeginCPUSample(_group##_##_name, RMTSF_None) +# define BGFX_PROFILER_BEGIN_DYNAMIC(_namestr) rmt_BeginCPUSampleDynamic(_namestr, RMTSF_None) # define BGFX_PROFILER_END() rmt_EndCPUSample() # define BGFX_PROFILER_SET_CURRENT_THREAD_NAME(_name) rmt_SetCurrentThreadName(_name) # else @@ -364,6 +364,19 @@ namespace bgfx ; } + inline uint8_t calcNumMips(uint8_t _numMips, uint16_t _width, uint16_t _height, uint16_t _depth = 1) + { + if (1 < _numMips) + { + const uint32_t max = bx::uint32_max(bx::uint32_max(_width, _height), _depth); + const uint32_t num = 1 + uint32_t(bx::flog2(float(max) ) ); + + return uint8_t(num); + } + + return 1; + } + void dump(const VertexDecl& _decl); struct TextVideoMem @@ -1460,8 +1473,9 @@ namespace bgfx void setState(uint64_t _state, uint32_t _rgba) { uint8_t blend = ( (_state&BGFX_STATE_BLEND_MASK)>>BGFX_STATE_BLEND_SHIFT)&0xff; + uint8_t alphaRef = ( (_state&BGFX_STATE_ALPHA_REF_MASK)>>BGFX_STATE_ALPHA_REF_SHIFT)&0xff; // transparency sort order table - m_key.m_trans = "\x0\x1\x1\x2\x2\x1\x2\x1\x2\x1\x1\x1\x1\x1\x1\x1\x1\x1\x1"[( (blend)&0xf) + (!!blend)]; + m_key.m_trans = "\x0\x2\x2\x3\x3\x2\x3\x2\x3\x2\x2\x2\x2\x2\x2\x2\x2\x2\x2"[( (blend)&0xf) + (!!blend)] + !!alphaRef; m_draw.m_stateFlags = _state; m_draw.m_rgba = _rgba; } @@ -2060,7 +2074,7 @@ namespace bgfx 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 resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) = 0; virtual void overrideInternal(TextureHandle _handle, uintptr_t _ptr) = 0; virtual uintptr_t getInternal(TextureHandle _handle) = 0; virtual void destroyTexture(TextureHandle _handle) = 0; @@ -2159,6 +2173,7 @@ namespace bgfx resizeTexture(handle , uint16_t(m_resolution.m_width) , uint16_t(m_resolution.m_height) + , textureRef.m_numMips ); m_resolution.m_flags |= BGFX_RESET_INTERNAL_FORCE; } @@ -2626,8 +2641,9 @@ namespace bgfx uint16_t flags = BGFX_BUFFER_NONE; cmdbuf.write(flags); - tib = (TransientIndexBuffer*)BX_ALLOC(g_allocator, sizeof(TransientIndexBuffer)+_size); - tib->data = (uint8_t*)&tib[1]; + const uint32_t size = BX_ALIGN_16(sizeof(TransientIndexBuffer) ) + BX_ALIGN_16(_size); + tib = (TransientIndexBuffer*)BX_ALIGNED_ALLOC(g_allocator, size, 16); + tib->data = (uint8_t *)tib + BX_ALIGN_16(sizeof(TransientIndexBuffer) ); tib->size = _size; tib->handle = handle; } @@ -2641,7 +2657,7 @@ namespace bgfx cmdbuf.write(_tib->handle); m_submit->free(_tib->handle); - BX_FREE(g_allocator, _tib); + BX_ALIGNED_FREE(g_allocator, _tib, 16); } BGFX_API_FUNC(void allocTransientIndexBuffer(TransientIndexBuffer* _tib, uint32_t _num) ) @@ -2682,8 +2698,9 @@ namespace bgfx uint16_t flags = BGFX_BUFFER_NONE; cmdbuf.write(flags); - tvb = (TransientVertexBuffer*)BX_ALLOC(g_allocator, sizeof(TransientVertexBuffer)+_size); - tvb->data = (uint8_t*)&tvb[1]; + const uint32_t size = BX_ALIGN_16(sizeof(TransientVertexBuffer) ) + BX_ALIGN_16(_size); + tvb = (TransientVertexBuffer*)BX_ALIGNED_ALLOC(g_allocator, size, 16); + tvb->data = (uint8_t *)tvb + BX_ALIGN_16(sizeof(TransientVertexBuffer) ); tvb->size = _size; tvb->startVertex = 0; tvb->stride = stride; @@ -2700,7 +2717,7 @@ namespace bgfx cmdbuf.write(_tvb->handle); m_submit->free(_tvb->handle); - BX_FREE(g_allocator, _tvb); + BX_ALIGNED_FREE(g_allocator, _tvb, 16); } BGFX_API_FUNC(void allocTransientVertexBuffer(TransientVertexBuffer* _tvb, uint32_t _num, const VertexDecl& _decl) ) @@ -3104,6 +3121,7 @@ namespace bgfx ref.m_refCount = 1; ref.m_bbRatio = uint8_t(_ratio); ref.m_format = uint8_t(_info->format); + ref.m_numMips = imageContainer.m_numMips; ref.m_owned = false; CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::CreateTexture); @@ -3146,12 +3164,13 @@ namespace bgfx return readTexture(textureHandle, _data); } - void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) + void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) { const TextureRef& textureRef = m_textureRef[_handle.idx]; BX_CHECK(BackbufferRatio::Count != textureRef.m_bbRatio, ""); getTextureSizeFromRatio(BackbufferRatio::Enum(textureRef.m_bbRatio), _width, _height); + _numMips = calcNumMips(_numMips, _width, _height); BX_TRACE("Resize %3d: %4dx%d %s" , _handle.idx @@ -3164,6 +3183,7 @@ namespace bgfx cmdbuf.write(_handle); cmdbuf.write(_width); cmdbuf.write(_height); + cmdbuf.write(_numMips); } void textureTakeOwnership(TextureHandle _handle) @@ -4009,6 +4029,7 @@ namespace bgfx int16_t m_refCount; uint8_t m_bbRatio; uint8_t m_format; + uint8_t m_numMips; bool m_owned; }; diff --git a/3rdparty/bgfx/src/debug_renderdoc.cpp b/3rdparty/bgfx/src/debug_renderdoc.cpp index b3e3e61f468..0aca626468b 100644 --- a/3rdparty/bgfx/src/debug_renderdoc.cpp +++ b/3rdparty/bgfx/src/debug_renderdoc.cpp @@ -56,7 +56,7 @@ namespace bgfx } pRENDERDOC_GetAPI RENDERDOC_GetAPI; - static RENDERDOC_API_1_0_1* s_renderDoc; + static RENDERDOC_API_1_1_0* s_renderDoc; void* loadRenderDoc() { @@ -72,7 +72,7 @@ namespace bgfx { RENDERDOC_GetAPI = (pRENDERDOC_GetAPI)bx::dlsym(renderdocdll, "RENDERDOC_GetAPI"); if (NULL != RENDERDOC_GetAPI - && 1 == RENDERDOC_GetAPI(eRENDERDOC_API_Version_1_0_0, (void**)&s_renderDoc) ) + && 1 == RENDERDOC_GetAPI(eRENDERDOC_API_Version_1_1_0, (void**)&s_renderDoc) ) { s_renderDoc->SetLogFilePathTemplate("temp/bgfx"); diff --git a/3rdparty/bgfx/src/glcontext_eagl.mm b/3rdparty/bgfx/src/glcontext_eagl.mm index 1092b6259a8..24c6ec04ab0 100644 --- a/3rdparty/bgfx/src/glcontext_eagl.mm +++ b/3rdparty/bgfx/src/glcontext_eagl.mm @@ -27,7 +27,7 @@ namespace bgfx { namespace gl { _layer.contentsScale = [UIScreen mainScreen].scale; - _layer.opaque = true; + _layer.opaque = [_layer.style valueForKey:@"opaque"] == nil ? true : [[_layer.style valueForKey:@"opaque"] boolValue]; _layer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys : [NSNumber numberWithBool:false] @@ -158,7 +158,7 @@ namespace bgfx { namespace gl BX_UNUSED(_width, _height); CAEAGLLayer* layer = (CAEAGLLayer*)g_platformData.nwh; - layer.opaque = true; + layer.opaque = [layer.style valueForKey:@"opaque"] == nil ? true : [[layer.style valueForKey:@"opaque"] boolValue]; layer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys : [NSNumber numberWithBool:false] diff --git a/3rdparty/bgfx/src/glimports.h b/3rdparty/bgfx/src/glimports.h index a12acb19d50..40781f43da0 100644 --- a/3rdparty/bgfx/src/glimports.h +++ b/3rdparty/bgfx/src/glimports.h @@ -113,6 +113,7 @@ typedef void (GL_APIENTRYP PFNGLFLUSHPROC) (); typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); typedef void (GL_APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); +typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); typedef void (GL_APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); @@ -301,6 +302,7 @@ GL_IMPORT______(false, PFNGLFLUSHPROC, glFlush); GL_IMPORT______(true, PFNGLFRAMEBUFFERRENDERBUFFERPROC, glFramebufferRenderbuffer); GL_IMPORT______(true, PFNGLFRAMEBUFFERTEXTURE2DPROC, glFramebufferTexture2D); GL_IMPORT______(false, PFNGLGENBUFFERSPROC, glGenBuffers); +GL_IMPORT______(true, PFNGLGENERATEMIPMAPPROC, glGenerateMipmap); GL_IMPORT______(true, PFNGLGENFRAMEBUFFERSPROC, glGenFramebuffers); GL_IMPORT______(true, PFNGLGENRENDERBUFFERSPROC, glGenRenderbuffers); GL_IMPORT______(true, PFNGLGENQUERIESPROC, glGenQueries); @@ -372,9 +374,7 @@ GL_IMPORT______(true, PFNGLSTENCILMASKSEPARATEPROC, glStencilMask GL_IMPORT______(false, PFNGLSTENCILOPPROC, glStencilOp); GL_IMPORT______(true, PFNGLSTENCILOPSEPARATEPROC, glStencilOpSeparate); GL_IMPORT______(false, PFNGLTEXIMAGE2DPROC, glTexImage2D); -GL_IMPORT______(true, PFNGLTEXIMAGE2DMULTISAMPLEPROC, glTexImage2DMultisample); GL_IMPORT______(true, PFNGLTEXIMAGE3DPROC, glTexImage3D); -GL_IMPORT______(true, PFNGLTEXIMAGE3DMULTISAMPLEPROC, glTexImage3DMultisample); GL_IMPORT______(false, PFNGLTEXPARAMETERIPROC, glTexParameteri); GL_IMPORT______(false, PFNGLTEXPARAMETERIVPROC, glTexParameteriv); GL_IMPORT______(false, PFNGLTEXPARAMETERFPROC, glTexParameterf); @@ -446,6 +446,9 @@ GL_IMPORT_EXT__(true, PFNGLDELETERENDERBUFFERSPROC, glDeleteRende GL_IMPORT_EXT__(true, PFNGLRENDERBUFFERSTORAGEPROC, glRenderbufferStorage); GL_IMPORT_EXT__(true, PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC, glRenderbufferStorageMultisample); +GL_IMPORT______(true, PFNGLTEXIMAGE2DMULTISAMPLEPROC, glTexImage2DMultisample); +GL_IMPORT______(true, PFNGLTEXIMAGE3DMULTISAMPLEPROC, glTexImage3DMultisample); + # else // GLES GL_IMPORT______(false, PFNGLCLEARDEPTHFPROC, glClearDepthf); # endif // BGFX_CONFIG_RENDERER_OPENGL @@ -488,6 +491,7 @@ GL_IMPORT_OES__(true, PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC, glCompressedT GL_IMPORT_EXT__(true, PFNGLTEXSTORAGE2DPROC, glTexStorage2D); GL_IMPORT_EXT__(true, PFNGLTEXSTORAGE3DPROC, glTexStorage3D); GL_IMPORT______(true, PFNGLTEXIMAGE2DMULTISAMPLEPROC, glTexImage2DMultisample); +GL_IMPORT______(true, PFNGLTEXIMAGE3DMULTISAMPLEPROC, glTexImage3DMultisample); GL_IMPORT_EXT__(true, PFNGLINSERTEVENTMARKEREXTPROC, glInsertEventMarker); GL_IMPORT_EXT__(true, PFNGLPUSHGROUPMARKEREXTPROC, glPushGroupMarker); diff --git a/3rdparty/bgfx/src/image.cpp b/3rdparty/bgfx/src/image.cpp index 1d91f1e7627..4b31a7ba08a 100644 --- a/3rdparty/bgfx/src/image.cpp +++ b/3rdparty/bgfx/src/image.cpp @@ -387,68 +387,68 @@ namespace bgfx const uint8_t* src = (const uint8_t*)_src; using namespace bx; - const float4_t unpack = float4_ld(1.0f, 1.0f/256.0f, 1.0f/65536.0f, 1.0f/16777216.0f); - const float4_t pack = float4_ld(1.0f, 256.0f*0.5f, 65536.0f, 16777216.0f*0.5f); - const float4_t umask = float4_ild(0xff, 0xff00, 0xff0000, 0xff000000); - const float4_t pmask = float4_ild(0xff, 0x7f80, 0xff0000, 0x7f800000); - const float4_t wflip = float4_ild(0, 0, 0, 0x80000000); - const float4_t wadd = float4_ld(0.0f, 0.0f, 0.0f, 32768.0f*65536.0f); - const float4_t gamma = float4_ld(1.0f/2.2f, 1.0f/2.2f, 1.0f/2.2f, 1.0f); - const float4_t linear = float4_ld(2.2f, 2.2f, 2.2f, 1.0f); - const float4_t quater = float4_splat(0.25f); + const simd128_t unpack = simd_ld(1.0f, 1.0f/256.0f, 1.0f/65536.0f, 1.0f/16777216.0f); + const simd128_t pack = simd_ld(1.0f, 256.0f*0.5f, 65536.0f, 16777216.0f*0.5f); + const simd128_t umask = simd_ild(0xff, 0xff00, 0xff0000, 0xff000000); + const simd128_t pmask = simd_ild(0xff, 0x7f80, 0xff0000, 0x7f800000); + const simd128_t wflip = simd_ild(0, 0, 0, 0x80000000); + const simd128_t wadd = simd_ld(0.0f, 0.0f, 0.0f, 32768.0f*65536.0f); + const simd128_t gamma = simd_ld(1.0f/2.2f, 1.0f/2.2f, 1.0f/2.2f, 1.0f); + const simd128_t linear = simd_ld(2.2f, 2.2f, 2.2f, 1.0f); + const simd128_t quater = simd_splat(0.25f); for (uint32_t yy = 0, ystep = _pitch*2; yy < dstheight; ++yy, src += ystep) { const uint8_t* rgba = src; for (uint32_t xx = 0; xx < dstwidth; ++xx, rgba += 8, dst += 4) { - const float4_t abgr0 = float4_splat(rgba); - const float4_t abgr1 = float4_splat(rgba+4); - const float4_t abgr2 = float4_splat(rgba+_pitch); - const float4_t abgr3 = float4_splat(rgba+_pitch+4); + const simd128_t abgr0 = simd_splat(rgba); + const simd128_t abgr1 = simd_splat(rgba+4); + const simd128_t abgr2 = simd_splat(rgba+_pitch); + const simd128_t abgr3 = simd_splat(rgba+_pitch+4); - const float4_t abgr0m = float4_and(abgr0, umask); - const float4_t abgr1m = float4_and(abgr1, umask); - const float4_t abgr2m = float4_and(abgr2, umask); - const float4_t abgr3m = float4_and(abgr3, umask); - const float4_t abgr0x = float4_xor(abgr0m, wflip); - const float4_t abgr1x = float4_xor(abgr1m, wflip); - const float4_t abgr2x = float4_xor(abgr2m, wflip); - const float4_t abgr3x = float4_xor(abgr3m, wflip); - const float4_t abgr0f = float4_itof(abgr0x); - const float4_t abgr1f = float4_itof(abgr1x); - const float4_t abgr2f = float4_itof(abgr2x); - const float4_t abgr3f = float4_itof(abgr3x); - const float4_t abgr0c = float4_add(abgr0f, wadd); - const float4_t abgr1c = float4_add(abgr1f, wadd); - const float4_t abgr2c = float4_add(abgr2f, wadd); - const float4_t abgr3c = float4_add(abgr3f, wadd); - const float4_t abgr0n = float4_mul(abgr0c, unpack); - const float4_t abgr1n = float4_mul(abgr1c, unpack); - const float4_t abgr2n = float4_mul(abgr2c, unpack); - const float4_t abgr3n = float4_mul(abgr3c, unpack); + const simd128_t abgr0m = simd_and(abgr0, umask); + const simd128_t abgr1m = simd_and(abgr1, umask); + const simd128_t abgr2m = simd_and(abgr2, umask); + const simd128_t abgr3m = simd_and(abgr3, umask); + const simd128_t abgr0x = simd_xor(abgr0m, wflip); + const simd128_t abgr1x = simd_xor(abgr1m, wflip); + const simd128_t abgr2x = simd_xor(abgr2m, wflip); + const simd128_t abgr3x = simd_xor(abgr3m, wflip); + const simd128_t abgr0f = simd_itof(abgr0x); + const simd128_t abgr1f = simd_itof(abgr1x); + const simd128_t abgr2f = simd_itof(abgr2x); + const simd128_t abgr3f = simd_itof(abgr3x); + const simd128_t abgr0c = simd_add(abgr0f, wadd); + const simd128_t abgr1c = simd_add(abgr1f, wadd); + const simd128_t abgr2c = simd_add(abgr2f, wadd); + const simd128_t abgr3c = simd_add(abgr3f, wadd); + const simd128_t abgr0n = simd_mul(abgr0c, unpack); + const simd128_t abgr1n = simd_mul(abgr1c, unpack); + const simd128_t abgr2n = simd_mul(abgr2c, unpack); + const simd128_t abgr3n = simd_mul(abgr3c, unpack); - const float4_t abgr0l = float4_pow(abgr0n, linear); - const float4_t abgr1l = float4_pow(abgr1n, linear); - const float4_t abgr2l = float4_pow(abgr2n, linear); - const float4_t abgr3l = float4_pow(abgr3n, linear); + const simd128_t abgr0l = simd_pow(abgr0n, linear); + const simd128_t abgr1l = simd_pow(abgr1n, linear); + const simd128_t abgr2l = simd_pow(abgr2n, linear); + const simd128_t abgr3l = simd_pow(abgr3n, linear); - const float4_t sum0 = float4_add(abgr0l, abgr1l); - const float4_t sum1 = float4_add(abgr2l, abgr3l); - const float4_t sum2 = float4_add(sum0, sum1); - const float4_t avg0 = float4_mul(sum2, quater); - const float4_t avg1 = float4_pow(avg0, gamma); + const simd128_t sum0 = simd_add(abgr0l, abgr1l); + const simd128_t sum1 = simd_add(abgr2l, abgr3l); + const simd128_t sum2 = simd_add(sum0, sum1); + const simd128_t avg0 = simd_mul(sum2, quater); + const simd128_t avg1 = simd_pow(avg0, gamma); - const float4_t avg2 = float4_mul(avg1, pack); - const float4_t ftoi0 = float4_ftoi(avg2); - const float4_t ftoi1 = float4_and(ftoi0, pmask); - const float4_t zwxy = float4_swiz_zwxy(ftoi1); - const float4_t tmp0 = float4_or(ftoi1, zwxy); - const float4_t yyyy = float4_swiz_yyyy(tmp0); - const float4_t tmp1 = float4_iadd(yyyy, yyyy); - const float4_t result = float4_or(tmp0, tmp1); + const simd128_t avg2 = simd_mul(avg1, pack); + const simd128_t ftoi0 = simd_ftoi(avg2); + const simd128_t ftoi1 = simd_and(ftoi0, pmask); + const simd128_t zwxy = simd_swiz_zwxy(ftoi1); + const simd128_t tmp0 = simd_or(ftoi1, zwxy); + const simd128_t yyyy = simd_swiz_yyyy(tmp0); + const simd128_t tmp1 = simd_iadd(yyyy, yyyy); + const simd128_t result = simd_or(tmp0, tmp1); - float4_stx(dst, result); + simd_stx(dst, result); } } } @@ -630,8 +630,8 @@ namespace bgfx using namespace bx; - const float4_t mf0f0 = float4_isplat(0xff00ff00); - const float4_t m0f0f = float4_isplat(0x00ff00ff); + const simd128_t mf0f0 = simd_isplat(0xff00ff00); + const simd128_t m0f0f = simd_isplat(0x00ff00ff); const uint8_t* src = (uint8_t*) _src; const uint8_t* next = src + _pitch; uint8_t* dst = (uint8_t*)_dst; @@ -642,14 +642,14 @@ namespace bgfx { for (uint32_t xx = 0; xx < width; ++xx, src += 16, dst += 16) { - const float4_t tabgr = float4_ld(src); - const float4_t t00ab = float4_srl(tabgr, 16); - const float4_t tgr00 = float4_sll(tabgr, 16); - const float4_t tgrab = float4_or(t00ab, tgr00); - const float4_t ta0g0 = float4_and(tabgr, mf0f0); - const float4_t t0r0b = float4_and(tgrab, m0f0f); - const float4_t targb = float4_or(ta0g0, t0r0b); - float4_st(dst, targb); + const simd128_t tabgr = simd_ld(src); + const simd128_t t00ab = simd_srl(tabgr, 16); + const simd128_t tgr00 = simd_sll(tabgr, 16); + const simd128_t tgrab = simd_or(t00ab, tgr00); + const simd128_t ta0g0 = simd_and(tabgr, mf0f0); + const simd128_t t0r0b = simd_and(tgrab, m0f0f); + const simd128_t targb = simd_or(ta0g0, t0r0b); + simd_st(dst, targb); } } } @@ -707,6 +707,9 @@ namespace bgfx { const uint8_t* src = (const uint8_t*)_src; _dst[0] = fromUnorm(src[0], 255.0f); + _dst[1] = 0.0f; + _dst[2] = 0.0f; + _dst[3] = 1.0f; } // R8S @@ -720,6 +723,9 @@ namespace bgfx { const int8_t* src = (const int8_t*)_src; _dst[0] = fromSnorm(src[0], 127.0f); + _dst[1] = 0.0f; + _dst[2] = 0.0f; + _dst[3] = 1.0f; } // R8I @@ -733,6 +739,9 @@ namespace bgfx { const int8_t* src = (const int8_t*)_src; _dst[0] = float(src[0]); + _dst[1] = 0.0f; + _dst[2] = 0.0f; + _dst[3] = 1.0f; } // R8U @@ -746,6 +755,9 @@ namespace bgfx { const uint8_t* src = (const uint8_t*)_src; _dst[0] = float(src[0]); + _dst[1] = 0.0f; + _dst[2] = 0.0f; + _dst[3] = 1.0f; } // RG8 @@ -761,6 +773,8 @@ namespace bgfx const uint8_t* src = (const uint8_t*)_src; _dst[0] = fromUnorm(src[0], 255.0f); _dst[1] = fromUnorm(src[1], 255.0f); + _dst[2] = 0.0f; + _dst[3] = 1.0f; } // RG8S @@ -776,6 +790,8 @@ namespace bgfx const int8_t* src = (const int8_t*)_src; _dst[0] = fromSnorm(src[0], 127.0f); _dst[1] = fromSnorm(src[1], 127.0f); + _dst[2] = 0.0f; + _dst[3] = 1.0f; } // RG8I @@ -791,6 +807,8 @@ namespace bgfx const int8_t* src = (const int8_t*)_src; _dst[0] = float(src[0]); _dst[1] = float(src[1]); + _dst[2] = 0.0f; + _dst[3] = 1.0f; } // RG8U @@ -806,6 +824,8 @@ namespace bgfx const uint8_t* src = (const uint8_t*)_src; _dst[0] = float(src[0]); _dst[1] = float(src[1]); + _dst[2] = 0.0f; + _dst[3] = 1.0f; } // RGB8 @@ -823,6 +843,7 @@ namespace bgfx _dst[0] = fromUnorm(src[0], 255.0f); _dst[1] = fromUnorm(src[1], 255.0f); _dst[2] = fromUnorm(src[2], 255.0f); + _dst[3] = 1.0f; } // RGB8S @@ -840,6 +861,7 @@ namespace bgfx _dst[0] = fromSnorm(src[0], 127.0f); _dst[1] = fromSnorm(src[1], 127.0f); _dst[2] = fromSnorm(src[2], 127.0f); + _dst[3] = 1.0f; } // RGB8I @@ -857,6 +879,7 @@ namespace bgfx _dst[0] = float(src[0]); _dst[1] = float(src[1]); _dst[2] = float(src[2]); + _dst[3] = 1.0f; } // RGB8U @@ -874,6 +897,7 @@ namespace bgfx _dst[0] = float(src[0]); _dst[1] = float(src[1]); _dst[2] = float(src[2]); + _dst[3] = 1.0f; } // BGRA8 @@ -982,6 +1006,9 @@ namespace bgfx { const uint16_t* src = (const uint16_t*)_src; _dst[0] = fromUnorm(src[0], 65535.0f); + _dst[1] = 0.0f; + _dst[2] = 0.0f; + _dst[3] = 1.0f; } // R16S @@ -995,6 +1022,9 @@ namespace bgfx { const int16_t* src = (const int16_t*)_src; _dst[0] = fromSnorm(src[0], 32767.0f); + _dst[1] = 0.0f; + _dst[2] = 0.0f; + _dst[3] = 1.0f; } // R16I @@ -1008,6 +1038,9 @@ namespace bgfx { const int16_t* src = (const int16_t*)_src; _dst[0] = float(src[0]); + _dst[1] = 0.0f; + _dst[2] = 0.0f; + _dst[3] = 1.0f; } // R16U @@ -1034,6 +1067,9 @@ namespace bgfx { const uint16_t* src = (const uint16_t*)_src; _dst[0] = bx::halfToFloat(src[0]); + _dst[1] = 0.0f; + _dst[2] = 0.0f; + _dst[3] = 1.0f; } // RG16 @@ -1049,6 +1085,8 @@ namespace bgfx const uint16_t* src = (const uint16_t*)_src; _dst[0] = fromUnorm(src[0], 65535.0f); _dst[1] = fromUnorm(src[1], 65535.0f); + _dst[2] = 0.0f; + _dst[3] = 1.0f; } // RG16S @@ -1064,6 +1102,8 @@ namespace bgfx const int16_t* src = (const int16_t*)_src; _dst[0] = fromSnorm(src[0], 32767.0f); _dst[1] = fromSnorm(src[1], 32767.0f); + _dst[2] = 0.0f; + _dst[3] = 1.0f; } // RG16I @@ -1079,6 +1119,8 @@ namespace bgfx const int16_t* src = (const int16_t*)_src; _dst[0] = float(src[0]); _dst[1] = float(src[1]); + _dst[2] = 0.0f; + _dst[3] = 1.0f; } // RG16U @@ -1094,6 +1136,8 @@ namespace bgfx const uint16_t* src = (const uint16_t*)_src; _dst[0] = float(src[0]); _dst[1] = float(src[1]); + _dst[2] = 0.0f; + _dst[3] = 1.0f; } // RG16F @@ -1109,6 +1153,8 @@ namespace bgfx const uint16_t* src = (const uint16_t*)_src; _dst[0] = bx::halfToFloat(src[0]); _dst[1] = bx::halfToFloat(src[1]); + _dst[2] = 0.0f; + _dst[3] = 1.0f; } // RGBA16 @@ -1389,6 +1435,7 @@ namespace bgfx _dst[0] = float( ( (packed>>11) & 0x1f) ) / 31.0f; _dst[1] = float( ( (packed>> 5) & 0x3f) ) / 63.0f; _dst[2] = float( ( (packed ) & 0x1f) ) / 31.0f; + _dst[3] = 1.0f; } // RGBA4 @@ -1507,6 +1554,7 @@ namespace bgfx _dst[0] = bx::halfToFloat( (packed<< 4) & 0x7ff0); _dst[1] = bx::halfToFloat( (packed>> 7) & 0x7ff0); _dst[2] = bx::halfToFloat( (packed>>17) & 0x7fe0); + _dst[3] = 1.0f; } struct PackUnpack @@ -3581,7 +3629,7 @@ namespace bgfx default: imageDecodeToBgra8(_dst, _src, _width, _height, _pitch, _format); - imageSwizzleBgra8(_width, _height, _pitch, _dst, _dst); + imageSwizzleBgra8(_width, _height, _width*4, _dst, _dst); break; } } @@ -3628,24 +3676,24 @@ namespace bgfx const uint8_t* src = (const uint8_t*)_src; using namespace bx; - const float4_t unpack = float4_ld(1.0f, 1.0f/256.0f, 1.0f/65536.0f, 1.0f/16777216.0f); - const float4_t umask = float4_ild(0xff, 0xff00, 0xff0000, 0xff000000); - const float4_t wflip = float4_ild(0, 0, 0, 0x80000000); - const float4_t wadd = float4_ld(0.0f, 0.0f, 0.0f, 32768.0f*65536.0f); + const simd128_t unpack = simd_ld(1.0f, 1.0f/256.0f, 1.0f/65536.0f, 1.0f/16777216.0f); + const simd128_t umask = simd_ild(0xff, 0xff00, 0xff0000, 0xff000000); + const simd128_t wflip = simd_ild(0, 0, 0, 0x80000000); + const simd128_t wadd = simd_ld(0.0f, 0.0f, 0.0f, 32768.0f*65536.0f); for (uint32_t yy = 0, ystep = _pitch; yy < dstheight; ++yy, src += ystep) { const uint8_t* rgba = src; for (uint32_t xx = 0; xx < dstwidth; ++xx, rgba += 4, dst += 4) { - const float4_t abgr0 = float4_splat(rgba); - const float4_t abgr0m = float4_and(abgr0, umask); - const float4_t abgr0x = float4_xor(abgr0m, wflip); - const float4_t abgr0f = float4_itof(abgr0x); - const float4_t abgr0c = float4_add(abgr0f, wadd); - const float4_t abgr0n = float4_mul(abgr0c, unpack); + const simd128_t abgr0 = simd_splat(rgba); + const simd128_t abgr0m = simd_and(abgr0, umask); + const simd128_t abgr0x = simd_xor(abgr0m, wflip); + const simd128_t abgr0f = simd_itof(abgr0x); + const simd128_t abgr0c = simd_add(abgr0f, wadd); + const simd128_t abgr0n = simd_mul(abgr0c, unpack); - float4_st(dst, abgr0n); + simd_st(dst, abgr0n); } } } diff --git a/3rdparty/bgfx/src/renderer_d3d11.cpp b/3rdparty/bgfx/src/renderer_d3d11.cpp index f8185ed0900..5e6fb036dde 100644 --- a/3rdparty/bgfx/src/renderer_d3d11.cpp +++ b/3rdparty/bgfx/src/renderer_d3d11.cpp @@ -800,7 +800,11 @@ namespace bgfx { namespace d3d11 errorState = ErrorState::LoadedDXGI; - CreateDXGIFactory = (PFN_CREATE_DXGI_FACTORY)bx::dlsym(m_dxgidll, "CreateDXGIFactory"); + CreateDXGIFactory = (PFN_CREATE_DXGI_FACTORY)bx::dlsym(m_dxgidll, "CreateDXGIFactory1"); + if (NULL == CreateDXGIFactory) + { + CreateDXGIFactory = (PFN_CREATE_DXGI_FACTORY)bx::dlsym(m_dxgidll, "CreateDXGIFactory"); + } if (NULL == CreateDXGIFactory) { BX_TRACE("Function CreateDXGIFactory not found."); @@ -1342,7 +1346,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii) { - uint8_t support = BGFX_CAPS_FORMAT_TEXTURE_NONE; + uint16_t support = BGFX_CAPS_FORMAT_TEXTURE_NONE; const DXGI_FORMAT fmt = isDepth(TextureFormat::Enum(ii) ) ? s_textureFormat[ii].m_fmtDsv @@ -1425,6 +1429,13 @@ BX_PRAGMA_DIAGNOSTIC_POP(); ? BGFX_CAPS_FORMAT_TEXTURE_MSAA : BGFX_CAPS_FORMAT_TEXTURE_NONE ; + + support |= 0 != (data.OutFormatSupport & (0 + | D3D11_FORMAT_SUPPORT_MIP_AUTOGEN + ) ) + ? BGFX_CAPS_FORMAT_TEXTURE_MIP_AUTOGEN + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; } else { @@ -1827,7 +1838,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); m_deviceCtx->Unmap(texture.m_ptr, 0); } - void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) BX_OVERRIDE + void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) BX_OVERRIDE { TextureD3D11& texture = m_textures[_handle.idx]; @@ -1843,7 +1854,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); tc.m_height = _height; tc.m_sides = 0; tc.m_depth = 0; - tc.m_numMips = 1; + tc.m_numMips = _numMips; tc.m_format = TextureFormat::Enum(texture.m_requestedFormat); tc.m_cubeMap = false; tc.m_mem = NULL; @@ -2662,18 +2673,26 @@ BX_PRAGMA_DIAGNOSTIC_POP(); { _state &= BGFX_D3D11_BLEND_STATE_MASK; - const uint64_t hash = _state; + bx::HashMurmur2A murmur; + murmur.begin(); + murmur.add(_state); + murmur.add(!!(BGFX_STATE_BLEND_INDEPENDENT & _state) + ? _rgba + : -1 + ); + const uint32_t hash = murmur.end(); + ID3D11BlendState* bs = m_blendStateCache.find(hash); if (NULL == bs) { D3D11_BLEND_DESC desc; desc.AlphaToCoverageEnable = !!(BGFX_STATE_BLEND_ALPHA_TO_COVERAGE & _state); - desc.IndependentBlendEnable = !!(BGFX_STATE_BLEND_INDEPENDENT & _state); + desc.IndependentBlendEnable = !!(BGFX_STATE_BLEND_INDEPENDENT & _state); D3D11_RENDER_TARGET_BLEND_DESC* drt = &desc.RenderTarget[0]; drt->BlendEnable = !!(BGFX_STATE_BLEND_MASK & _state); - const uint32_t blend = uint32_t( (_state&BGFX_STATE_BLEND_MASK)>>BGFX_STATE_BLEND_SHIFT); + const uint32_t blend = uint32_t( (_state&BGFX_STATE_BLEND_MASK )>>BGFX_STATE_BLEND_SHIFT); const uint32_t equation = uint32_t( (_state&BGFX_STATE_BLEND_EQUATION_MASK)>>BGFX_STATE_BLEND_EQUATION_SHIFT); const uint32_t srcRGB = (blend ) & 0xf; @@ -2889,6 +2908,12 @@ BX_PRAGMA_DIAGNOSTIC_POP(); const uint32_t index = (_flags & BGFX_TEXTURE_BORDER_COLOR_MASK) >> BGFX_TEXTURE_BORDER_COLOR_SHIFT; _flags &= BGFX_TEXTURE_SAMPLER_BITS_MASK; + // Force both min+max anisotropic, can't be set individually. + _flags |= 0 != (_flags & (BGFX_TEXTURE_MIN_ANISOTROPIC|BGFX_TEXTURE_MAG_ANISOTROPIC) ) + ? BGFX_TEXTURE_MIN_ANISOTROPIC|BGFX_TEXTURE_MAG_ANISOTROPIC + : 0 + ; + uint32_t hash; ID3D11SamplerState* sampler; if (!needBorderColor(_flags) ) @@ -3079,16 +3104,16 @@ BX_PRAGMA_DIAGNOSTIC_POP(); if (NULL == ptr) { const TextureD3D11& texture = m_textures[_handle.idx]; - const bool msaaSample = 0 != (texture.m_flags&BGFX_TEXTURE_MSAA_SAMPLE); 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]; + const bool msaaSample = 1 < msaa.Count && 0 != (texture.m_flags&BGFX_TEXTURE_MSAA_SAMPLE); D3D11_SHADER_RESOURCE_VIEW_DESC desc; desc.Format = s_textureFormat[texture.m_textureFormat].m_fmtSrv; switch (texture.m_type) { case TextureD3D11::Texture2D: - desc.ViewDimension = 1 < msaa.Count && msaaSample + desc.ViewDimension = msaaSample ? D3D11_SRV_DIMENSION_TEXTURE2DMS : D3D11_SRV_DIMENSION_TEXTURE2D ; @@ -4333,9 +4358,18 @@ BX_PRAGMA_DIAGNOSTIC_POP(); 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 bool msaaSample = 0 != (m_flags&BGFX_TEXTURE_MSAA_SAMPLE); 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]; + const bool msaaSample = true + && 1 < msaa.Count + && 0 != (m_flags&BGFX_TEXTURE_MSAA_SAMPLE) + && !writeOnly + ; + const bool needResolve = true + && 1 < msaa.Count + && 0 == (m_flags&BGFX_TEXTURE_MSAA_SAMPLE) + && !writeOnly + ; D3D11_SHADER_RESOURCE_VIEW_DESC srvd; memset(&srvd, 0, sizeof(srvd) ); @@ -4374,6 +4408,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); desc.Usage = kk == 0 || blit ? D3D11_USAGE_DEFAULT : D3D11_USAGE_IMMUTABLE; desc.BindFlags = writeOnly ? 0 : D3D11_BIND_SHADER_RESOURCE; desc.CPUAccessFlags = 0; + desc.MiscFlags = 0; if (isDepth( (TextureFormat::Enum)m_textureFormat) ) { @@ -4384,6 +4419,9 @@ BX_PRAGMA_DIAGNOSTIC_POP(); { desc.BindFlags |= D3D11_BIND_RENDER_TARGET; desc.Usage = D3D11_USAGE_DEFAULT; + desc.MiscFlags |= 0 + | (1 < numMips ? D3D11_RESOURCE_MISC_GENERATE_MIPS : 0) + ; } if (computeWrite) @@ -4402,16 +4440,14 @@ BX_PRAGMA_DIAGNOSTIC_POP(); if (imageContainer.m_cubeMap) { desc.ArraySize = 6; - desc.MiscFlags = D3D11_RESOURCE_MISC_TEXTURECUBE; + desc.MiscFlags |= D3D11_RESOURCE_MISC_TEXTURECUBE; srvd.ViewDimension = D3D11_SRV_DIMENSION_TEXTURECUBE; srvd.TextureCube.MipLevels = numMips; } else { desc.ArraySize = 1; - desc.MiscFlags = 0; - if (1 < msaa.Count - && msaaSample) + if (msaaSample) { srvd.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2DMS; } @@ -4422,6 +4458,13 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } } + if (needResolve) + { + DX_CHECK(s_renderD3D11->m_device->CreateTexture2D(&desc, NULL, &m_rt2d) ); + desc.BindFlags &= ~(D3D11_BIND_RENDER_TARGET|D3D11_BIND_DEPTH_STENCIL); + desc.SampleDesc = s_msaa[0]; + } + DX_CHECK(s_renderD3D11->m_device->CreateTexture2D(&desc, kk == 0 ? NULL : srd, &m_texture2d) ); } break; @@ -4482,6 +4525,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); void TextureD3D11::destroy() { s_renderD3D11->m_srvUavLru.invalidateWithParent(getHandle().idx); + DX_RELEASE(m_rt, 0); DX_RELEASE(m_srv, 0); DX_RELEASE(m_uav, 0); if (0 == (m_flags & BGFX_TEXTURE_INTERNAL_SHARED) ) @@ -4550,8 +4594,22 @@ BX_PRAGMA_DIAGNOSTIC_POP(); ; } - void TextureD3D11::resolve() + void TextureD3D11::resolve() const { + ID3D11DeviceContext* deviceCtx = s_renderD3D11->m_deviceCtx; + + const bool needResolve = NULL != m_rt; + if (needResolve) + { + deviceCtx->ResolveSubresource(m_texture2d, 0, m_rt, 0, s_textureFormat[m_textureFormat].m_fmt); + } + + const bool renderTarget = 0 != (m_flags&BGFX_TEXTURE_RT_MASK); + if (renderTarget + && 1 < m_numMips) + { + deviceCtx->GenerateMips(m_srv); + } } TextureHandle TextureD3D11::getHandle() const @@ -4713,7 +4771,11 @@ BX_PRAGMA_DIAGNOSTIC_POP(); ; dsvDesc.Flags = 0; dsvDesc.Texture2D.MipSlice = m_attachment[ii].mip; - DX_CHECK(s_renderD3D11->m_device->CreateDepthStencilView(texture.m_ptr, &dsvDesc, &m_dsv) ); + DX_CHECK(s_renderD3D11->m_device->CreateDepthStencilView( + NULL == texture.m_rt ? texture.m_ptr : texture.m_rt + , &dsvDesc + , &m_dsv + ) ); } break; @@ -4758,7 +4820,12 @@ BX_PRAGMA_DIAGNOSTIC_POP(); desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D; desc.Texture2D.MipSlice = m_attachment[ii].mip; } - DX_CHECK(s_renderD3D11->m_device->CreateRenderTargetView(texture.m_ptr, &desc, &m_rtv[m_num]) ); + + DX_CHECK(s_renderD3D11->m_device->CreateRenderTargetView( + NULL == texture.m_rt ? texture.m_ptr : texture.m_rt + , &desc + , &m_rtv[m_num] + ) ); } break; @@ -4806,6 +4873,18 @@ BX_PRAGMA_DIAGNOSTIC_POP(); void FrameBufferD3D11::resolve() { + if (0 < m_numTh) + { + for (uint32_t ii = 0; ii < m_numTh; ++ii) + { + TextureHandle handle = m_attachment[ii].handle; + if (isValid(handle) ) + { + const TextureD3D11& texture = s_renderD3D11->m_textures[handle.idx]; + texture.resolve(); + } + } + } } void FrameBufferD3D11::clear(const Clear& _clear, const float _palette[][4]) @@ -5958,12 +6037,14 @@ BX_PRAGMA_DIAGNOSTIC_POP(); { m_gpuTimer.end(); - while (m_gpuTimer.get() ) + do { double toGpuMs = 1000.0 / double(m_gpuTimer.m_frequency); elapsedGpuMs = m_gpuTimer.m_elapsed * toGpuMs; maxGpuElapsed = elapsedGpuMs > maxGpuElapsed ? elapsedGpuMs : maxGpuElapsed; } + while (m_gpuTimer.get() ); + maxGpuLatency = bx::uint32_imax(maxGpuLatency, m_gpuTimer.m_control.available()-1); } diff --git a/3rdparty/bgfx/src/renderer_d3d11.h b/3rdparty/bgfx/src/renderer_d3d11.h index 84dd0c61981..5d8614a7301 100644 --- a/3rdparty/bgfx/src/renderer_d3d11.h +++ b/3rdparty/bgfx/src/renderer_d3d11.h @@ -242,6 +242,7 @@ namespace bgfx { namespace d3d11 TextureD3D11() : m_ptr(NULL) + , m_rt(NULL) , m_srv(NULL) , m_uav(NULL) , m_numMips(0) @@ -253,7 +254,7 @@ namespace bgfx { namespace d3d11 void overrideInternal(uintptr_t _ptr); void update(uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem); void commit(uint8_t _stage, uint32_t _flags, const float _palette[][4]); - void resolve(); + void resolve() const; TextureHandle getHandle() const; union @@ -263,6 +264,12 @@ namespace bgfx { namespace d3d11 ID3D11Texture3D* m_texture3d; }; + union + { + ID3D11Resource* m_rt; + ID3D11Texture2D* m_rt2d; + }; + ID3D11ShaderResourceView* m_srv; ID3D11UnorderedAccessView* m_uav; uint32_t m_flags; diff --git a/3rdparty/bgfx/src/renderer_d3d12.cpp b/3rdparty/bgfx/src/renderer_d3d12.cpp index 3a35feacd04..5624dc5dc58 100644 --- a/3rdparty/bgfx/src/renderer_d3d12.cpp +++ b/3rdparty/bgfx/src/renderer_d3d12.cpp @@ -1014,7 +1014,7 @@ namespace bgfx { namespace d3d12 for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii) { - uint8_t support = BGFX_CAPS_FORMAT_TEXTURE_NONE; + uint16_t support = BGFX_CAPS_FORMAT_TEXTURE_NONE; const DXGI_FORMAT fmt = isDepth(TextureFormat::Enum(ii) ) ? s_textureFormat[ii].m_fmtDsv @@ -1464,7 +1464,7 @@ namespace bgfx { namespace d3d12 DX_RELEASE(readback, 0); } - void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) BX_OVERRIDE + void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) BX_OVERRIDE { TextureD3D12& texture = m_textures[_handle.idx]; @@ -1480,7 +1480,7 @@ namespace bgfx { namespace d3d12 tc.m_height = _height; tc.m_sides = 0; tc.m_depth = 0; - tc.m_numMips = 1; + tc.m_numMips = _numMips; tc.m_format = TextureFormat::Enum(texture.m_requestedFormat); tc.m_cubeMap = false; tc.m_mem = NULL; @@ -5413,12 +5413,14 @@ data.NumQualityLevels = 0; m_gpuTimer.end(m_commandList); - while (m_gpuTimer.get() ) + do { double toGpuMs = 1000.0 / double(m_gpuTimer.m_frequency); elapsedGpuMs = m_gpuTimer.m_elapsed * toGpuMs; maxGpuElapsed = elapsedGpuMs > maxGpuElapsed ? elapsedGpuMs : maxGpuElapsed; } + while (m_gpuTimer.get() ); + maxGpuLatency = bx::uint32_imax(maxGpuLatency, m_gpuTimer.m_control.available()-1); const int64_t timerFreq = bx::getHPFrequency(); diff --git a/3rdparty/bgfx/src/renderer_d3d9.cpp b/3rdparty/bgfx/src/renderer_d3d9.cpp index 84230d317df..81e53cecba1 100644 --- a/3rdparty/bgfx/src/renderer_d3d9.cpp +++ b/3rdparty/bgfx/src/renderer_d3d9.cpp @@ -628,7 +628,7 @@ namespace bgfx { namespace d3d9 for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii) { - uint8_t support = 0; + uint16_t support = BGFX_CAPS_FORMAT_TEXTURE_NONE; support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter , m_deviceType @@ -702,6 +702,14 @@ namespace bgfx { namespace d3d9 , NULL ) ) ? BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA : BGFX_CAPS_FORMAT_TEXTURE_NONE; + support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter + , m_deviceType + , adapterFormat + , isDepth(TextureFormat::Enum(ii) ) ? D3DUSAGE_DEPTHSTENCIL : D3DUSAGE_RENDERTARGET + , D3DRTYPE_TEXTURE + , s_textureFormat[ii].m_fmt + ) ) ? BGFX_CAPS_FORMAT_TEXTURE_MIP_AUTOGEN : BGFX_CAPS_FORMAT_TEXTURE_NONE; + g_caps.formats[ii] = support; } @@ -1011,7 +1019,7 @@ namespace bgfx { namespace d3d9 DX_CHECK(texture.m_texture2d->UnlockRect(0) ); } - void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) BX_OVERRIDE + void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) BX_OVERRIDE { TextureD3D9& texture = m_textures[_handle.idx]; @@ -1027,13 +1035,13 @@ namespace bgfx { namespace d3d9 tc.m_height = _height; tc.m_sides = 0; tc.m_depth = 0; - tc.m_numMips = 1; + tc.m_numMips = _numMips; tc.m_format = TextureFormat::Enum(texture.m_requestedFormat); tc.m_cubeMap = false; tc.m_mem = NULL; bx::write(&writer, tc); - texture.destroy(); + texture.destroy(true); texture.create(mem, texture.m_flags, 0); release(mem); @@ -1340,8 +1348,7 @@ namespace bgfx { namespace d3d9 void setFrameBuffer(FrameBufferHandle _fbh, bool _msaa = true) { if (isValid(m_fbh) - && m_fbh.idx != _fbh.idx - && m_rtMsaa) + && m_fbh.idx != _fbh.idx) { FrameBufferD3D9& frameBuffer = m_frameBuffers[m_fbh.idx]; frameBuffer.resolve(); @@ -2495,7 +2502,10 @@ namespace bgfx { namespace d3d9 } else if (renderTarget || blit) { - usage = D3DUSAGE_RENDERTARGET; + usage = 0 + | D3DUSAGE_RENDERTARGET + | (1 < _numMips ? D3DUSAGE_AUTOGENMIPMAP : 0) + ; } IDirect3DDevice9* device = s_renderD3D9->m_device; @@ -3092,7 +3102,7 @@ namespace bgfx { namespace d3d9 void TextureD3D9::resolve() const { if (NULL != m_surface - && NULL != m_texture2d) + && NULL != m_ptr) { IDirect3DSurface9* surface = getSurface(); DX_CHECK(s_renderD3D9->m_device->StretchRect(m_surface @@ -3102,6 +3112,11 @@ namespace bgfx { namespace d3d9 , D3DTEXF_LINEAR ) ); DX_RELEASE(surface, 1); + + if (1 < m_numMips) + { + m_ptr->GenerateMipSubLevels(); + } } } @@ -4188,12 +4203,14 @@ namespace bgfx { namespace d3d9 { m_gpuTimer.end(); - while (m_gpuTimer.get() ) + do { double toGpuMs = 1000.0 / double(m_gpuTimer.m_frequency); elapsedGpuMs = m_gpuTimer.m_elapsed * toGpuMs; maxGpuElapsed = elapsedGpuMs > maxGpuElapsed ? elapsedGpuMs : maxGpuElapsed; } + while (m_gpuTimer.get() ); + maxGpuLatency = bx::uint32_imax(maxGpuLatency, m_gpuTimer.m_control.available()-1); } diff --git a/3rdparty/bgfx/src/renderer_d3d9.h b/3rdparty/bgfx/src/renderer_d3d9.h index 84bb83f1399..dc5f234b7c3 100644 --- a/3rdparty/bgfx/src/renderer_d3d9.h +++ b/3rdparty/bgfx/src/renderer_d3d9.h @@ -323,11 +323,21 @@ namespace bgfx { namespace d3d9 void create(const Memory* _mem, uint32_t _flags, uint8_t _skip); - void destroy() + void destroy(bool _resize = false) { if (0 == (m_flags & BGFX_TEXTURE_INTERNAL_SHARED) ) { - DX_RELEASE(m_ptr, 0); + if (_resize) + { + // BK - at the time of resize there might be one reference held by frame buffer + // surface. This frame buffer will be recreated later, and release reference + // to existing surface. That's why here we don't care about ref count. + m_ptr->Release(); + } + else + { + DX_RELEASE(m_ptr, 0); + } } DX_RELEASE(m_surface, 0); DX_RELEASE(m_staging, 0); diff --git a/3rdparty/bgfx/src/renderer_gl.cpp b/3rdparty/bgfx/src/renderer_gl.cpp index 1ed6333c217..0fea6a7c9d8 100644 --- a/3rdparty/bgfx/src/renderer_gl.cpp +++ b/3rdparty/bgfx/src/renderer_gl.cpp @@ -223,8 +223,8 @@ namespace bgfx { namespace gl { GL_ZERO, GL_ZERO, GL_ZERO, GL_ZERO, false }, // R1 { GL_ALPHA, GL_ZERO, GL_ALPHA, GL_UNSIGNED_BYTE, false }, // A8 { GL_R8, GL_ZERO, GL_RED, GL_UNSIGNED_BYTE, false }, // R8 - { GL_R8I, GL_ZERO, GL_RED, GL_BYTE, false }, // R8S - { GL_R8UI, GL_ZERO, GL_RED, GL_UNSIGNED_BYTE, false }, // R8S + { GL_R8I, GL_ZERO, GL_RED, GL_BYTE, false }, // R8I + { GL_R8UI, GL_ZERO, GL_RED, GL_UNSIGNED_BYTE, false }, // R8U { GL_R8_SNORM, GL_ZERO, GL_RED, GL_BYTE, false }, // R8S { GL_R16, GL_ZERO, GL_RED, GL_UNSIGNED_SHORT, false }, // R16 { GL_R16I, GL_ZERO, GL_RED, GL_SHORT, false }, // R16I @@ -239,8 +239,8 @@ namespace bgfx { namespace gl { GL_RG8UI, GL_ZERO, GL_RG, GL_UNSIGNED_BYTE, false }, // RG8U { GL_RG8_SNORM, GL_ZERO, GL_RG, GL_BYTE, false }, // RG8S { GL_RG16, GL_ZERO, GL_RG, GL_UNSIGNED_SHORT, false }, // RG16 - { GL_RG16I, GL_ZERO, GL_RG, GL_SHORT, false }, // RG16 - { GL_RG16UI, GL_ZERO, GL_RG, GL_UNSIGNED_SHORT, false }, // RG16 + { GL_RG16I, GL_ZERO, GL_RG, GL_SHORT, false }, // RG16I + { GL_RG16UI, GL_ZERO, GL_RG, GL_UNSIGNED_SHORT, false }, // RG16U { GL_RG16F, GL_ZERO, GL_RG, GL_FLOAT, false }, // RG16F { GL_RG16_SNORM, GL_ZERO, GL_RG, GL_SHORT, false }, // RG16S { GL_RG32I, GL_ZERO, GL_RG, GL_INT, false }, // RG32I @@ -1110,10 +1110,10 @@ namespace bgfx { namespace gl tfi.m_type = _type; } - void initTestTexture(TextureFormat::Enum _format, bool srgb = false) + GLenum initTestTexture(TextureFormat::Enum _format, bool _srgb, bool _mipmaps) { const TextureFormatInfo& tfi = s_textureFormat[_format]; - GLenum internalFmt = srgb + GLenum internalFmt = _srgb ? tfi.m_internalFmtSrgb : tfi.m_internalFmt ; @@ -1121,20 +1121,48 @@ namespace bgfx { namespace gl GLsizei size = (16*16*getBitsPerPixel(_format) )/8; void* data = bx::alignPtr(alloca(size+16), 0, 16); + GLenum err = 0; + if (isCompressed(_format) ) { glCompressedTexImage2D(GL_TEXTURE_2D, 0, internalFmt, 16, 16, 0, size, data); + err |= glGetError(); + if (_mipmaps) + { + glCompressedTexImage2D(GL_TEXTURE_2D, 1, internalFmt, 8, 8, 0, size, data); + err |= glGetError(); + glCompressedTexImage2D(GL_TEXTURE_2D, 2, internalFmt, 4, 4, 0, size, data); + err |= glGetError(); + glCompressedTexImage2D(GL_TEXTURE_2D, 3, internalFmt, 2, 2, 0, size, data); + err |= glGetError(); + glCompressedTexImage2D(GL_TEXTURE_2D, 4, internalFmt, 1, 1, 0, size, data); + err |= glGetError(); + } } else { glTexImage2D(GL_TEXTURE_2D, 0, internalFmt, 16, 16, 0, tfi.m_fmt, tfi.m_type, data); + err |= glGetError(); + if (_mipmaps) + { + glTexImage2D(GL_TEXTURE_2D, 1, internalFmt, 8, 8, 0, tfi.m_fmt, tfi.m_type, data); + err |= glGetError(); + glTexImage2D(GL_TEXTURE_2D, 2, internalFmt, 4, 4, 0, tfi.m_fmt, tfi.m_type, data); + err |= glGetError(); + glTexImage2D(GL_TEXTURE_2D, 3, internalFmt, 2, 2, 0, tfi.m_fmt, tfi.m_type, data); + err |= glGetError(); + glTexImage2D(GL_TEXTURE_2D, 4, internalFmt, 1, 1, 0, tfi.m_fmt, tfi.m_type, data); + err |= glGetError(); + } } + + return err; } - static bool isTextureFormatValid(TextureFormat::Enum _format, bool srgb = false) + static bool isTextureFormatValid(TextureFormat::Enum _format, bool _srgb = false, bool _mipAutogen = false) { const TextureFormatInfo& tfi = s_textureFormat[_format]; - GLenum internalFmt = srgb + GLenum internalFmt = _srgb ? tfi.m_internalFmtSrgb : tfi.m_internalFmt ; @@ -1146,11 +1174,17 @@ namespace bgfx { namespace gl GLuint id; GL_CHECK(glGenTextures(1, &id) ); GL_CHECK(glBindTexture(GL_TEXTURE_2D, id) ); - initTestTexture(_format); - GLenum err = glGetError(); + GLenum err = initTestTexture(_format, _srgb, _mipAutogen); BX_WARN(0 == err, "TextureFormat::%s is not supported (%x: %s).", getName(_format), err, glEnumName(err) ); + if (0 == err + && _mipAutogen) + { + glGenerateMipmap(GL_TEXTURE_2D); + err = glGetError(); + } + GL_CHECK(glDeleteTextures(1, &id) ); return 0 == err; @@ -1186,10 +1220,10 @@ namespace bgfx { namespace gl return 0 == err; } - static bool isFramebufferFormatValid(TextureFormat::Enum _format, bool srgb = false) + static bool isFramebufferFormatValid(TextureFormat::Enum _format, bool _srgb = false) { const TextureFormatInfo& tfi = s_textureFormat[_format]; - GLenum internalFmt = srgb + GLenum internalFmt = _srgb ? tfi.m_internalFmtSrgb : tfi.m_internalFmt ; @@ -1207,9 +1241,7 @@ namespace bgfx { namespace gl GL_CHECK(glGenTextures(1, &id) ); GL_CHECK(glBindTexture(GL_TEXTURE_2D, id) ); - initTestTexture(_format); - - GLenum err = glGetError(); + GLenum err = initTestTexture(_format, _srgb, false); GLenum attachment; if (isDepth(_format) ) @@ -1686,7 +1718,7 @@ namespace bgfx { namespace gl for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii) { - uint8_t supported = 0; + uint16_t supported = BGFX_CAPS_FORMAT_TEXTURE_NONE; supported |= s_textureFormat[ii].m_supported ? BGFX_CAPS_FORMAT_TEXTURE_2D | BGFX_CAPS_FORMAT_TEXTURE_3D @@ -1701,6 +1733,11 @@ namespace bgfx { namespace gl : BGFX_CAPS_FORMAT_TEXTURE_NONE ; + supported |= isTextureFormatValid(TextureFormat::Enum(ii), false, true) + ? BGFX_CAPS_FORMAT_TEXTURE_MIP_AUTOGEN + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; + supported |= computeSupport && isImageFormatValid(TextureFormat::Enum(ii) ) ? BGFX_CAPS_FORMAT_TEXTURE_IMAGE @@ -2269,7 +2306,7 @@ namespace bgfx { namespace gl } } - void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) BX_OVERRIDE + void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) BX_OVERRIDE { TextureGL& texture = m_textures[_handle.idx]; @@ -2285,7 +2322,7 @@ namespace bgfx { namespace gl tc.m_height = _height; tc.m_sides = 0; tc.m_depth = 0; - tc.m_numMips = 1; + tc.m_numMips = _numMips; tc.m_format = TextureFormat::Enum(texture.m_requestedFormat); tc.m_cubeMap = false; tc.m_mem = NULL; @@ -2573,21 +2610,16 @@ namespace bgfx { namespace gl uint32_t setFrameBuffer(FrameBufferHandle _fbh, uint32_t _height, uint16_t _discard = BGFX_CLEAR_NONE, bool _msaa = true) { if (isValid(m_fbh) - && m_fbh.idx != _fbh.idx - && (BGFX_CLEAR_NONE != m_fbDiscard || m_rtMsaa) ) + && m_fbh.idx != _fbh.idx) { FrameBufferGL& frameBuffer = m_frameBuffers[m_fbh.idx]; - if (m_rtMsaa) - { - frameBuffer.resolve(); - } + frameBuffer.resolve(); if (BGFX_CLEAR_NONE != m_fbDiscard) { frameBuffer.discard(m_fbDiscard); + m_fbDiscard = BGFX_CLEAR_NONE; } - - m_fbDiscard = BGFX_CLEAR_NONE; } m_glctx.makeCurrent(NULL); @@ -4315,9 +4347,10 @@ namespace bgfx { namespace gl uint32_t msaaQuality = ( (m_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT); msaaQuality = bx::uint32_satsub(msaaQuality, 1); msaaQuality = bx::uint32_min(s_renderGL->m_maxMsaa, msaaQuality == 0 ? 0 : 1<m_msaaBackBufferFbo) ); } + + if (0 < m_numTh) + { + for (uint32_t ii = 0; ii < m_numTh; ++ii) + { + TextureHandle handle = m_attachment[ii].handle; + if (isValid(handle) ) + { + const TextureGL& texture = s_renderGL->m_textures[handle.idx]; + texture.resolve(); + } + } + } } void FrameBufferGL::discard(uint16_t _flags) @@ -6785,12 +6851,14 @@ namespace bgfx { namespace gl if (m_timerQuerySupport) { m_gpuTimer.end(); - while (m_gpuTimer.get() ) + do { elapsedGl = m_gpuTimer.m_elapsed; elapsedGpuMs = double(elapsedGl)/1e6; maxGpuElapsed = elapsedGpuMs > maxGpuElapsed ? elapsedGpuMs : maxGpuElapsed; } + while (m_gpuTimer.get() ); + maxGpuLatency = bx::uint32_imax(maxGpuLatency, m_gpuTimer.m_control.available()-1); } diff --git a/3rdparty/bgfx/src/renderer_gl.h b/3rdparty/bgfx/src/renderer_gl.h index 4e205fe3095..189c17b29e5 100644 --- a/3rdparty/bgfx/src/renderer_gl.h +++ b/3rdparty/bgfx/src/renderer_gl.h @@ -1234,6 +1234,7 @@ namespace bgfx { namespace gl void update(uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem); void setSamplerState(uint32_t _flags, const float _rgba[4]); void commit(uint32_t _stage, uint32_t _flags, const float _palette[][4]); + void resolve() const; GLuint m_id; GLuint m_rbo; diff --git a/3rdparty/bgfx/src/renderer_mtl.h b/3rdparty/bgfx/src/renderer_mtl.h index f471ee5d457..13f1bf6b7af 100644 --- a/3rdparty/bgfx/src/renderer_mtl.h +++ b/3rdparty/bgfx/src/renderer_mtl.h @@ -19,10 +19,38 @@ namespace bgfx { namespace mtl { + //runtime os check + inline bool iOSVersionEqualOrGreater(const char* _version) + { +#if BX_PLATFORM_IOS + return ([[[UIDevice currentDevice] systemVersion] compare:@(_version) options:NSNumericSearch] != NSOrderedAscending); +#else + BX_UNUSED(_version); + return false; +#endif + } + + inline bool macOSVersionEqualOrGreater(NSInteger _majorVersion, + NSInteger _minorVersion, + NSInteger _patchVersion) + { +#if BX_PLATFORM_OSX + NSOperatingSystemVersion v = [[NSProcessInfo processInfo] operatingSystemVersion]; + return (v.majorVersion<<16) + (v.minorVersion<<8) + v.patchVersion >= + (_majorVersion<<16) + (_minorVersion<<8) + _patchVersion; +#else + BX_UNUSED(_majorVersion, _minorVersion, _patchVersion); + return false; +#endif + } + + // c++ wrapper // objects with creation functions starting with 'new' has a refcount 1 after creation, object must be destroyed with release. // commandBuffer, commandEncoders are autoreleased objects. Needs AutoreleasePool! +#define MTL_MAX_FRAMES_IN_FLIGHT (3) + #define MTL_CLASS(name) \ class name \ { \ @@ -35,6 +63,46 @@ namespace bgfx { namespace mtl typedef void (*mtlCallback)(void* userData); + MTL_CLASS(BlitCommandEncoder) + void copyFromTexture(id _sourceTexture, NSUInteger _sourceSlice, NSUInteger _sourceLevel, MTLOrigin _sourceOrigin, MTLSize _sourceSize, + id _destinationTexture, NSUInteger _destinationSlice, NSUInteger _destinationLevel, MTLOrigin _destinationOrigin) + { + [m_obj copyFromTexture:_sourceTexture sourceSlice:_sourceSlice sourceLevel:_sourceLevel sourceOrigin:_sourceOrigin sourceSize:_sourceSize + toTexture:_destinationTexture destinationSlice:_destinationSlice destinationLevel:_destinationLevel destinationOrigin:_destinationOrigin]; + } + + void copyFromBuffer(id _sourceBuffer, NSUInteger _sourceOffset, id _destinationBuffer, + NSUInteger _destinationOffset, NSUInteger _size) + { + [m_obj copyFromBuffer:_sourceBuffer sourceOffset:_sourceOffset toBuffer:_destinationBuffer + destinationOffset:_destinationOffset size:_size]; + } + + void copyFromBuffer(id _sourceBuffer, NSUInteger _sourceOffset, NSUInteger _sourceBytesPerRow, + NSUInteger _sourceBytesPerImage, MTLSize _sourceSize, id _destinationTexture, + NSUInteger _destinationSlice, NSUInteger _destinationLevel, MTLOrigin _destinationOrigin) + { + [m_obj copyFromBuffer:_sourceBuffer sourceOffset:_sourceOffset sourceBytesPerRow:_sourceBytesPerRow + sourceBytesPerImage:_sourceBytesPerImage sourceSize:_sourceSize toTexture:_destinationTexture + destinationSlice:_destinationSlice destinationLevel:_destinationLevel destinationOrigin:_destinationOrigin]; + } + + void synchronizeTexture(id _texture, NSUInteger _slice, NSUInteger _level) + { + [m_obj synchronizeTexture:_texture slice:_slice level:_level]; + } + + void synchronizeResource(id _resource) + { + [m_obj synchronizeResource:_resource]; + } + + void endEncoding() + { + [m_obj endEncoding]; + } + MTL_CLASS_END + MTL_CLASS(Buffer) void* contents() { @@ -74,6 +142,11 @@ namespace bgfx { namespace mtl [m_obj commit]; } + void addScheduledHandler(mtlCallback _cb, void* _data) + { + [m_obj addScheduledHandler:^(id ){ _cb(_data); }]; + } + void addCompletedHandler(mtlCallback _cb, void* _data) { [m_obj addCompletedHandler:^(id ){ _cb(_data); }]; @@ -148,8 +221,14 @@ namespace bgfx { namespace mtl id newLibraryWithSource(const char* _source) { + MTLCompileOptions* options = [MTLCompileOptions new]; + //NOTE: turned of as 'When using the fast variants, math functions execute more quickly, + // but operate over a **LIMITED RANGE** and their behavior when handling NaN values is not defined.' + if (BX_ENABLED(BX_PLATFORM_IOS)) + options.fastMathEnabled = NO; + NSError* error; - id lib = [m_obj newLibraryWithSource:@(_source) options:nil error:&error]; + id lib = [m_obj newLibraryWithSource:@(_source) options:options error:&error]; BX_WARN(NULL == error , "Shader compilation failed: %s" , [error.localizedDescription cStringUsingEncoding:NSASCIIStringEncoding] @@ -229,6 +308,23 @@ namespace bgfx { namespace mtl ); return state; } + + bool supportsTextureSampleCount(int sampleCount) + { + if (BX_ENABLED(BX_PLATFORM_IOS) && !iOSVersionEqualOrGreater("9.0.0") ) + return sampleCount == 1 || sampleCount == 2 || sampleCount == 4; + else + return [m_obj supportsTextureSampleCount:sampleCount]; + } + + bool depth24Stencil8PixelFormatSupported() + { +#if BX_PLATFORM_IOS + return false; +#else + return m_obj.depth24Stencil8PixelFormatSupported; +#endif // BX_PLATFORM_IOS + } MTL_CLASS_END MTL_CLASS(Function) @@ -369,7 +465,7 @@ namespace bgfx { namespace mtl } // Copying Data from a Texture Image - void getBytes(void* _pixelBytes, NSUInteger _bytesPerRow, NSUInteger _bytesPerImage, MTLRegion _region, NSUInteger _mipmapLevel, NSUInteger _slice) + void getBytes(void* _pixelBytes, NSUInteger _bytesPerRow, NSUInteger _bytesPerImage, MTLRegion _region, NSUInteger _mipmapLevel, NSUInteger _slice) const { [m_obj getBytes:_pixelBytes bytesPerRow:_bytesPerRow bytesPerImage:_bytesPerImage fromRegion:_region mipmapLevel:_mipmapLevel slice:_slice]; } @@ -381,12 +477,12 @@ namespace bgfx { namespace mtl } //properties - uint32_t width() + uint32_t width() const { return (uint32_t)m_obj.width; } - uint32_t height() + uint32_t height() const { return (uint32_t)m_obj.height; } @@ -395,6 +491,16 @@ namespace bgfx { namespace mtl { return m_obj.pixelFormat; } + + uint32_t sampleCount() const + { + return (uint32_t)m_obj.sampleCount; + } + + MTLTextureType textureType() const + { + return m_obj.textureType; + } MTL_CLASS_END typedef id ComputePipelineState; @@ -493,14 +599,6 @@ namespace bgfx { namespace mtl _obj = nil; \ BX_MACRO_BLOCK_END -#if BX_PLATFORM_IOS - inline bool OsVersionEqualOrGreater(const char* _version) - { - return ([[[UIDevice currentDevice] systemVersion] compare:@(_version) options:NSNumericSearch] != NSOrderedAscending); - } - //TODO: this could be in bx ? -#endif // - // end of c++ wrapper template @@ -557,10 +655,12 @@ namespace bgfx { namespace mtl struct BufferMtl { BufferMtl() - : m_buffer(NULL) - , m_flags(BGFX_BUFFER_NONE) + : m_flags(BGFX_BUFFER_NONE) , m_dynamic(false) + , m_bufferIndex(0) { + for (uint32_t ii = 0; ii < MTL_MAX_FRAMES_IN_FLIGHT; ++ii) + m_buffers[ii] = NULL; } void create(uint32_t _size, void* _data, uint16_t _flags, uint16_t _stride = 0, bool _vertex = false); @@ -568,18 +668,22 @@ namespace bgfx { namespace mtl void destroy() { - if (NULL != m_buffer) + for (uint32_t ii = 0; ii < MTL_MAX_FRAMES_IN_FLIGHT; ++ii) { - [m_buffer release]; - m_buffer = NULL; - m_dynamic = false; + MTL_RELEASE(m_buffers[ii]); } + m_dynamic = false; } - Buffer m_buffer; + Buffer getBuffer() const { return m_buffers[m_bufferIndex]; } + uint32_t m_size; uint16_t m_flags; + bool m_dynamic; + private: + uint8_t m_bufferIndex; + Buffer m_buffers[MTL_MAX_FRAMES_IN_FLIGHT]; }; typedef BufferMtl IndexBufferMtl; @@ -625,6 +729,8 @@ namespace bgfx { namespace mtl , m_vshConstantBufferAlignmentMask(0) , m_fshConstantBufferSize(0) , m_fshConstantBufferAlignmentMask(0) + , m_usedVertexSamplerStages(0) + , m_usedFragmentSamplerStages(0) , m_numPredefined(0) , m_processedUniforms(false) { @@ -650,6 +756,8 @@ namespace bgfx { namespace mtl uint32_t m_vshConstantBufferAlignmentMask; uint32_t m_fshConstantBufferSize; uint32_t m_fshConstantBufferAlignmentMask; + uint32_t m_usedVertexSamplerStages; + uint32_t m_usedFragmentSamplerStages; PredefinedUniform m_predefined[PredefinedUniform::Count*2]; uint8_t m_numPredefined; bool m_processedUniforms; @@ -659,9 +767,13 @@ namespace bgfx { namespace mtl { TextureMtl() : m_ptr(NULL) + , m_ptrMSAA(NULL) , m_ptrStencil(NULL) , m_sampler(NULL) , m_flags(0) + , m_width(0) + , m_height(0) + , m_depth(0) , m_numMips(0) { } @@ -673,14 +785,18 @@ namespace bgfx { namespace mtl MTL_RELEASE(m_ptrStencil); } void update(uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem); - void commit(uint8_t _stage, uint32_t _flags = BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER); + void commit(uint8_t _stage, bool _vertex, bool _fragment, uint32_t _flags = BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER); Texture m_ptr; + Texture m_ptrMSAA; Texture m_ptrStencil; // for emulating packed depth/stencil formats - only for iOS8... SamplerState m_sampler; uint32_t m_flags; uint8_t m_requestedFormat; uint8_t m_textureFormat; + uint32_t m_width; + uint32_t m_height; + uint32_t m_depth; uint8_t m_numMips; }; @@ -711,6 +827,27 @@ namespace bgfx { namespace mtl uint8_t m_num; // number of color handles }; + struct TimerQueryMtl + { + TimerQueryMtl() + : m_control(4) + { + } + + void init(); + void shutdown(); + void addHandlers(CommandBuffer& _commandBuffer); + bool get(); + + uint64_t m_begin; + uint64_t m_end; + uint64_t m_elapsed; + uint64_t m_frequency; + + uint64_t m_result[4*2]; + bx::RingBufferControl m_control; + }; + struct OcclusionQueryMTL { OcclusionQueryMTL() diff --git a/3rdparty/bgfx/src/renderer_mtl.mm b/3rdparty/bgfx/src/renderer_mtl.mm index 5de80bd577d..ce2bf3b8b51 100644 --- a/3rdparty/bgfx/src/renderer_mtl.mm +++ b/3rdparty/bgfx/src/renderer_mtl.mm @@ -1,5 +1,5 @@ /* - * Copyright 2011-2015 Attila Kocsis. All rights reserved. + * Copyright 2011-2016 Attila Kocsis. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -17,36 +17,57 @@ #import -#define UNIFORM_BUFFER_SIZE (1024*1024) -#define UNIFORM_BUFFER_COUNT (3) +#define UNIFORM_BUFFER_SIZE (8*1024*1024) /* -Known issues / TODOs: -- 15-shadowmaps-simple (modified shaderc and example needs modification too, mtxCrop znew = z * 0.5 + 0.5 is not needed ) could be hacked in shader too -- 19-oit ( hacked shaderc to support MRT output) -- 21-deferred ( hacked shaderc to support MRT output and fs_deferred_light needed modification for metal (similar to BGFX_SHADER_LANGUAGE_HLSL ) + // known metal shader generation issues: + 03-raymarch: OSX10.11.3 nothing is visible ( depth/color swap in fragment output struct fixed this ) + 14-shadowvolumes: in texture as stencil mode - columns/bunny are dark. in fs_shadowvolume_color_lighting SAMPLER2D(s_texStencil, 1) is + converted to "texture2d s_texStencil [[texture(0)]], sampler _mtlsmp_s_texStencil [[sampler(0)]]". Slot is 1 -> 0. + 15-shadowmaps-simple: shader compilation error + 16-shadowmaps: //problem with essl -> metal: SAMPLER2D(u_shadowMap0, 4); sampler index is lost. Shadowmap is set to slot 4, but + metal shader uses sampler/texture slot 0. this could require changes outside of renderer_mtl? + packFloatToRGBA needs highp. currently it uses half. + 24-nbody: no generated compute shaders for metal + 27-terrain: shaderc generates invalid metal shader for vs_terrain_height_texture. vertex output: half4 gl_Position [[position]], should be float4 + 31-rsm: + :6:23: error: type 'half4' (aka 'vector_half4') is not valid for attribute 'position' + half4 gl_Position [[position]]; -07-callback, saveScreenshot should be implemented with one frame latency (using saveScreenshotBegin and End) -16-shadowmaps, //problem with essl -> metal: SAMPLER2D(u_shadowMap0, 4); sampler index is lost. Shadowmap is set to slot 4, but - metal shader uses sampler/texture slot 0. this could require changes outside of renderer_mtl? - Otherwise it works with hacking the slot. +Known issues(driver problems??): + OSX mac mini(late 2014), OSX10.11.3 : nanovg-rendering: color writemask off causes problem... + 03-raymarch: OSX nothing is visible ( depth/color order should be swapped in fragment output struct) + works fine with newer OSX + iPad mini 2, iOS 8.1.1: 21-deferred: scissor not working properly + 26-occlusion: query doesn't work with two rendercommandencoders + Only on this device ( no problem on iPad Air 2 with iOS9.3.1) -24-nbody - cannot generate compute shaders for metal + TODOs: + - remove sync points at mesh update. clearquad: 13-stencil, 26-occlusion, 30-picking + - framebufferMtl and TextureMtl resolve -20-nanonvg - TODO: remove sampler/texture hack + - FrameBufferMtl::postReset recreate framebuffer??? -- caps + renderpass load/resolve + - capture with msaa: 07-callback + - implement fb discard. problematic with multiple views that has same fb... + - msaa color/depth/stencil is not saved. could have problem when we switch back to msaa framebuffer + - refactor store/load actions to support msaa/discard/capture/readback etc... -- optimization... + - finish savescreenshot with screenshotbegin/end -create binary shader representation + - support multiple windows: 22-windows + - multithreading with multiple commandbuffer - 13-stencil and 16-shadowmaps are very inefficient. every view stores/loads backbuffer data + - compute and drawindirect: 24-nbody (needs compute shaders) - BGFX_RESET_FLIP_AFTER_RENDER on low level renderers should be true? (crashes even with BGFX_RESET_FLIP_AFTER_RENDER because there is - one rendering frame before reset). Do I have absolutely need to send result to View at flip or can I do it in submit? + INFO: + - 15-shadowmaps-simple (example needs modification mtxCrop znew = z * 0.5 + 0.5 is not needed ) could be hacked in shader too + ASK: + BGFX_RESET_FLIP_AFTER_RENDER on low level renderers should be true? + Do I have absolutely need to send result to screen at flip or can I do it in submit? */ namespace bgfx { namespace mtl @@ -122,12 +143,12 @@ namespace bgfx { namespace mtl }, //Uint10 - //TODO: normalized only + //Note: unnormalized is handled as normalized now { - { MTLVertexFormatInvalid, MTLVertexFormatUInt1010102Normalized }, - { MTLVertexFormatInvalid, MTLVertexFormatUInt1010102Normalized }, - { MTLVertexFormatInvalid, MTLVertexFormatUInt1010102Normalized }, - { MTLVertexFormatInvalid, MTLVertexFormatUInt1010102Normalized } + { MTLVertexFormatUInt1010102Normalized, MTLVertexFormatUInt1010102Normalized }, + { MTLVertexFormatUInt1010102Normalized, MTLVertexFormatUInt1010102Normalized }, + { MTLVertexFormatUInt1010102Normalized, MTLVertexFormatUInt1010102Normalized }, + { MTLVertexFormatUInt1010102Normalized, MTLVertexFormatUInt1010102Normalized } }, //Int16 @@ -142,8 +163,8 @@ namespace bgfx { namespace mtl { { MTLVertexFormatHalf2, MTLVertexFormatHalf2 }, { MTLVertexFormatHalf2, MTLVertexFormatHalf2 }, - { MTLVertexFormatHalf3, MTLVertexFormatHalf2 }, - { MTLVertexFormatHalf4, MTLVertexFormatHalf2 } + { MTLVertexFormatHalf3, MTLVertexFormatHalf3 }, + { MTLVertexFormatHalf4, MTLVertexFormatHalf4 } }, //Float @@ -193,7 +214,7 @@ namespace bgfx { namespace mtl static const MTLCompareFunction s_cmpFunc[] = { - MTLCompareFunctionAlways, //TODO: depth disable? + MTLCompareFunctionAlways, MTLCompareFunctionLess, MTLCompareFunctionLessEqual, MTLCompareFunctionEqual, @@ -245,81 +266,87 @@ namespace bgfx { namespace mtl static TextureFormatInfo s_textureFormat[] = { - { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // BC1 - { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // BC2 - { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // BC3 - { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // BC4 - { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // BC5 - { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // BC6H - { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // BC7 - { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // ETC1 - { MTLPixelFormat(180) /*ETC2_RGB8*/, MTLPixelFormat(181) /*ETC2_RGB8_sRGB*/ }, // ETC2 - { MTLPixelFormat(178) /*EAC_RGBA8*/, MTLPixelFormat(179) /*EAC_RGBA8_sRGB*/ }, // ETC2A - { MTLPixelFormat(182) /*ETC2_RGB8A1*/, MTLPixelFormat(183) /*ETC2_RGB8A1_sRGB*/ }, // ETC2A1 - { MTLPixelFormat(160) /*PVRTC_RGB_2BPP*/, MTLPixelFormat(161) /*PVRTC_RGB_2BPP_sRGB*/ }, // PTC12 - { MTLPixelFormat(162) /*PVRTC_RGB_4BPP*/, MTLPixelFormat(163) /*PVRTC_RGB_4BPP_sRGB*/ }, // PTC14 - { MTLPixelFormat(164) /*PVRTC_RGBA_2BPP*/, MTLPixelFormat(165) /*PVRTC_RGBA_2BPP_sRGB*/ }, // PTC12A - { MTLPixelFormat(166) /*PVRTC_RGBA_4BPP*/, MTLPixelFormat(167) /*PVRTC_RGBA_4BPP_sRGB*/ }, // PTC14A - { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // PTC22 - { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // PTC24 - { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // Unknown - { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // R1 - { MTLPixelFormatA8Unorm, MTLPixelFormatInvalid }, // A8 - { MTLPixelFormatR8Unorm, MTLPixelFormat(11) /*R8Unorm_sRGB*/ }, // R8 - { MTLPixelFormatR8Sint, MTLPixelFormatInvalid }, // R8I - { MTLPixelFormatR8Uint, MTLPixelFormatInvalid }, // R8U - { MTLPixelFormatR8Snorm, MTLPixelFormatInvalid }, // R8S - { MTLPixelFormatR16Unorm, MTLPixelFormatInvalid }, // R16 - { MTLPixelFormatR16Sint, MTLPixelFormatInvalid }, // R16I - { MTLPixelFormatR16Uint, MTLPixelFormatInvalid }, // R16U - { MTLPixelFormatR16Float, MTLPixelFormatInvalid }, // R16F - { MTLPixelFormatR16Snorm, MTLPixelFormatInvalid }, // R16S - { MTLPixelFormatR32Sint, MTLPixelFormatInvalid }, // R32I - { MTLPixelFormatR32Uint, MTLPixelFormatInvalid }, // R32U - { MTLPixelFormatR32Float, MTLPixelFormatInvalid }, // R32F - { MTLPixelFormatRG8Unorm, MTLPixelFormat(31) /*RG8Unorm_sRGB*/ }, // RG8 - { MTLPixelFormatRG8Sint, MTLPixelFormatInvalid }, // RG8I - { MTLPixelFormatRG8Uint, MTLPixelFormatInvalid }, // RG8U - { MTLPixelFormatRG8Snorm, MTLPixelFormatInvalid }, // RG8S - { MTLPixelFormatRG16Unorm, MTLPixelFormatInvalid }, // RG16 - { MTLPixelFormatRG16Sint, MTLPixelFormatInvalid }, // RG16I - { MTLPixelFormatRG16Uint, MTLPixelFormatInvalid }, // RG16U - { MTLPixelFormatRG16Float, MTLPixelFormatInvalid }, // RG16F - { MTLPixelFormatRG16Snorm, MTLPixelFormatInvalid }, // RG16S - { MTLPixelFormatRG32Sint, MTLPixelFormatInvalid }, // RG32I - { MTLPixelFormatRG32Uint, MTLPixelFormatInvalid }, // RG32U - { MTLPixelFormatRG32Float, MTLPixelFormatInvalid }, // RG32F - { MTLPixelFormatRGB9E5Float, MTLPixelFormatInvalid }, // RGB9E5F - { MTLPixelFormatBGRA8Unorm, MTLPixelFormatBGRA8Unorm_sRGB }, // BGRA8 - { MTLPixelFormatRGBA8Unorm, MTLPixelFormatRGBA8Unorm_sRGB }, // RGBA8 - { MTLPixelFormatRGBA8Sint, MTLPixelFormatInvalid }, // RGBA8I - { MTLPixelFormatRGBA8Uint, MTLPixelFormatInvalid }, // RGBA8U - { MTLPixelFormatRGBA8Snorm, MTLPixelFormatInvalid }, // RGBA8S - { MTLPixelFormatRGBA16Unorm, MTLPixelFormatInvalid }, // RGBA16 - { MTLPixelFormatRGBA16Sint, MTLPixelFormatInvalid }, // RGBA16I - { MTLPixelFormatRGBA16Uint, MTLPixelFormatInvalid }, // RGBA16I - { MTLPixelFormatRGBA16Float, MTLPixelFormatInvalid }, // RGBA16F - { MTLPixelFormatRGBA16Snorm, MTLPixelFormatInvalid }, // RGBA16S - { MTLPixelFormatRGBA32Sint, MTLPixelFormatInvalid }, // RGBA32I - { MTLPixelFormatRGBA32Uint, MTLPixelFormatInvalid }, // RGBA32U - { MTLPixelFormatRGBA32Float, MTLPixelFormatInvalid }, // RGBA32F - { MTLPixelFormat(40) /*B5G6R5Unorm*/, MTLPixelFormatInvalid }, // R5G6B5 - { MTLPixelFormat(42) /*ABGR4Unorm*/, MTLPixelFormatInvalid }, // RGBA4 - { MTLPixelFormat(41) /*A1BGR5Unorm*/, MTLPixelFormatInvalid }, // RGB5A1 - { MTLPixelFormatRGB10A2Unorm, MTLPixelFormatInvalid }, // RGB10A2 - { MTLPixelFormatRG11B10Float, MTLPixelFormatInvalid }, // R11G11B10F - { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // UnknownDepth - { MTLPixelFormatDepth32Float, MTLPixelFormatInvalid }, // D16 - { MTLPixelFormatDepth32Float, MTLPixelFormatInvalid }, // D24 - { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // D24S8 - { MTLPixelFormatDepth32Float, MTLPixelFormatInvalid }, // D32 - { MTLPixelFormatDepth32Float, MTLPixelFormatInvalid }, // D16F - { MTLPixelFormatDepth32Float, MTLPixelFormatInvalid }, // D24F - { MTLPixelFormatDepth32Float, MTLPixelFormatInvalid }, // D32F - { MTLPixelFormatStencil8, MTLPixelFormatInvalid }, // D0S8 + { MTLPixelFormat(130) /*BC1_RGBA*/, MTLPixelFormat(131) /*BC1_RGBA_sRGB*/ }, // BC1 + { MTLPixelFormat(132) /*BC2_RGBA*/, MTLPixelFormat(133) /*BC2_RGBA_sRGB*/ }, // BC2 + { MTLPixelFormat(134) /*BC3_RGBA*/, MTLPixelFormat(135) /*BC3_RGBA_sRGB*/ }, // BC3 + { MTLPixelFormat(140) /*BC4_RUnorm*/, MTLPixelFormatInvalid }, // BC4 + { MTLPixelFormat(142) /*BC5_RGUnorm*/, MTLPixelFormatInvalid }, // BC5 + { MTLPixelFormat(150) /*BC6H_RGBFloat*/, MTLPixelFormatInvalid }, // BC6H + { MTLPixelFormat(152) /*BC7_RGBAUnorm*/, MTLPixelFormat(153) /*BC7_RGBAUnorm_sRGB*/ }, // BC7 + { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // ETC1 + { MTLPixelFormat(180) /*ETC2_RGB8*/, MTLPixelFormat(181) /*ETC2_RGB8_sRGB*/ }, // ETC2 + { MTLPixelFormat(178) /*EAC_RGBA8*/, MTLPixelFormat(179) /*EAC_RGBA8_sRGB*/ }, // ETC2A + { MTLPixelFormat(182) /*ETC2_RGB8A1*/, MTLPixelFormat(183) /*ETC2_RGB8A1_sRGB*/ }, // ETC2A1 + { MTLPixelFormat(160) /*PVRTC_RGB_2BPP*/, MTLPixelFormat(161) /*PVRTC_RGB_2BPP_sRGB*/ }, // PTC12 + { MTLPixelFormat(162) /*PVRTC_RGB_4BPP*/, MTLPixelFormat(163) /*PVRTC_RGB_4BPP_sRGB*/ }, // PTC14 + { MTLPixelFormat(164) /*PVRTC_RGBA_2BPP*/, MTLPixelFormat(165) /*PVRTC_RGBA_2BPP_sRGB*/ }, // PTC12A + { MTLPixelFormat(166) /*PVRTC_RGBA_4BPP*/, MTLPixelFormat(167) /*PVRTC_RGBA_4BPP_sRGB*/ }, // PTC14A + { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // PTC22 + { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // PTC24 + { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // Unknown + { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // R1 + { MTLPixelFormatA8Unorm, MTLPixelFormatInvalid }, // A8 + { MTLPixelFormatR8Unorm, MTLPixelFormat(11) /*R8Unorm_sRGB*/ }, // R8 + { MTLPixelFormatR8Sint, MTLPixelFormatInvalid }, // R8I + { MTLPixelFormatR8Uint, MTLPixelFormatInvalid }, // R8U + { MTLPixelFormatR8Snorm, MTLPixelFormatInvalid }, // R8S + { MTLPixelFormatR16Unorm, MTLPixelFormatInvalid }, // R16 + { MTLPixelFormatR16Sint, MTLPixelFormatInvalid }, // R16I + { MTLPixelFormatR16Uint, MTLPixelFormatInvalid }, // R16U + { MTLPixelFormatR16Float, MTLPixelFormatInvalid }, // R16F + { MTLPixelFormatR16Snorm, MTLPixelFormatInvalid }, // R16S + { MTLPixelFormatR32Sint, MTLPixelFormatInvalid }, // R32I + { MTLPixelFormatR32Uint, MTLPixelFormatInvalid }, // R32U + { MTLPixelFormatR32Float, MTLPixelFormatInvalid }, // R32F + { MTLPixelFormatRG8Unorm, MTLPixelFormat(31) /*RG8Unorm_sRGB*/ }, // RG8 + { MTLPixelFormatRG8Sint, MTLPixelFormatInvalid }, // RG8I + { MTLPixelFormatRG8Uint, MTLPixelFormatInvalid }, // RG8U + { MTLPixelFormatRG8Snorm, MTLPixelFormatInvalid }, // RG8S + { MTLPixelFormatRG16Unorm, MTLPixelFormatInvalid }, // RG16 + { MTLPixelFormatRG16Sint, MTLPixelFormatInvalid }, // RG16I + { MTLPixelFormatRG16Uint, MTLPixelFormatInvalid }, // RG16U + { MTLPixelFormatRG16Float, MTLPixelFormatInvalid }, // RG16F + { MTLPixelFormatRG16Snorm, MTLPixelFormatInvalid }, // RG16S + { MTLPixelFormatRG32Sint, MTLPixelFormatInvalid }, // RG32I + { MTLPixelFormatRG32Uint, MTLPixelFormatInvalid }, // RG32U + { MTLPixelFormatRG32Float, MTLPixelFormatInvalid }, // RG32F + { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // RGB8 + { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // RGB8I + { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // RGB8U + { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // RGB8S + { MTLPixelFormatRGB9E5Float, MTLPixelFormatInvalid }, // RGB9E5F + { MTLPixelFormatBGRA8Unorm, MTLPixelFormatBGRA8Unorm_sRGB }, // BGRA8 + { MTLPixelFormatRGBA8Unorm, MTLPixelFormatRGBA8Unorm_sRGB }, // RGBA8 + { MTLPixelFormatRGBA8Sint, MTLPixelFormatInvalid }, // RGBA8I + { MTLPixelFormatRGBA8Uint, MTLPixelFormatInvalid }, // RGBA8U + { MTLPixelFormatRGBA8Snorm, MTLPixelFormatInvalid }, // RGBA8S + { MTLPixelFormatRGBA16Unorm, MTLPixelFormatInvalid }, // RGBA16 + { MTLPixelFormatRGBA16Sint, MTLPixelFormatInvalid }, // RGBA16I + { MTLPixelFormatRGBA16Uint, MTLPixelFormatInvalid }, // RGBA16U + { MTLPixelFormatRGBA16Float, MTLPixelFormatInvalid }, // RGBA16F + { MTLPixelFormatRGBA16Snorm, MTLPixelFormatInvalid }, // RGBA16S + { MTLPixelFormatRGBA32Sint, MTLPixelFormatInvalid }, // RGBA32I + { MTLPixelFormatRGBA32Uint, MTLPixelFormatInvalid }, // RGBA32U + { MTLPixelFormatRGBA32Float, MTLPixelFormatInvalid }, // RGBA32F + { MTLPixelFormat(40) /*B5G6R5Unorm*/, MTLPixelFormatInvalid }, // R5G6B5 + { MTLPixelFormat(42) /*ABGR4Unorm*/, MTLPixelFormatInvalid }, // RGBA4 + { MTLPixelFormat(41) /*A1BGR5Unorm*/, MTLPixelFormatInvalid }, // RGB5A1 + { MTLPixelFormatRGB10A2Unorm, MTLPixelFormatInvalid }, // RGB10A2 + { MTLPixelFormatRG11B10Float, MTLPixelFormatInvalid }, // R11G11B10F + { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // UnknownDepth + { MTLPixelFormatDepth32Float, MTLPixelFormatInvalid }, // D16 + { MTLPixelFormatDepth32Float, MTLPixelFormatInvalid }, // D24 + { MTLPixelFormat(255) /*Depth24Unorm_Stencil8*/,MTLPixelFormatInvalid }, // D24S8 + { MTLPixelFormatDepth32Float, MTLPixelFormatInvalid }, // D32 + { MTLPixelFormatDepth32Float, MTLPixelFormatInvalid }, // D16F + { MTLPixelFormatDepth32Float, MTLPixelFormatInvalid }, // D24F + { MTLPixelFormatDepth32Float, MTLPixelFormatInvalid }, // D32F + { MTLPixelFormatStencil8, MTLPixelFormatInvalid }, // D0S8 }; BX_STATIC_ASSERT(TextureFormat::Count == BX_COUNTOF(s_textureFormat) ); + int s_msaa[5] = { 1,2,4,8,16 }; + #define SHADER_FUNCTION_NAME ("xlatMtlMain") #define SHADER_UNIFORM_NAME ("_mtl_u") @@ -329,10 +356,13 @@ namespace bgfx { namespace mtl : m_metalLayer(NULL) , m_backBufferPixelFormatHash(0) , m_maxAnisotropy(1) - , m_uniformBufferIndex(0) + , m_bufferIndex(0) , m_numWindows(1) , m_rtMsaa(false) + , m_capture(NULL) + , m_captureSize(0) , m_drawable(NULL) + , m_saveScreenshot(false) { } @@ -400,52 +430,107 @@ namespace bgfx { namespace mtl m_textureDescriptor = newTextureDescriptor(); m_samplerDescriptor = newSamplerDescriptor(); - for (uint8_t i=0; i < UNIFORM_BUFFER_COUNT; ++i) + m_framesSemaphore.post(MTL_MAX_FRAMES_IN_FLIGHT); + for (uint8_t i=0; i < MTL_MAX_FRAMES_IN_FLIGHT; ++i) { m_uniformBuffers[i] = m_device.newBufferWithLength(UNIFORM_BUFFER_SIZE, 0); } m_uniformBufferVertexOffset = 0; m_uniformBufferFragmentOffset = 0; + const char* vshSource = + "using namespace metal;\n" + "struct xlatMtlShaderOutput { float4 gl_Position [[position]]; float2 v_texcoord0; }; \n" + "vertex xlatMtlShaderOutput xlatMtlMain (uint v_id [[ vertex_id ]]) \n" + "{\n" + " xlatMtlShaderOutput _mtl_o;\n" + " if (v_id==0) { _mtl_o.gl_Position = float4(-1.0,-1.0,0.0,1.0); _mtl_o.v_texcoord0 = float2(0.0,1.0); } \n" + " else if (v_id==1) { _mtl_o.gl_Position = float4(3.0,-1.0,0.0,1.0); _mtl_o.v_texcoord0 = float2(2.0,1.0); } \n" + " else { _mtl_o.gl_Position = float4(-1.0,3.0,0.0,1.0); _mtl_o.v_texcoord0 = float2(0.0,-1.0); }\n" + " return _mtl_o;\n" + "}\n"; + + const char* fshSource = "using namespace metal; \n" + " struct xlatMtlShaderInput { float2 v_texcoord0; }; \n" + " fragment half4 xlatMtlMain (xlatMtlShaderInput _mtl_i[[stage_in]], texture2d s_texColor [[texture(0)]], sampler _mtlsmp_s_texColor [[sampler(0)]] ) \n" + " { return half4(s_texColor.sample(_mtlsmp_s_texColor, _mtl_i.v_texcoord0)); } \n"; + + Library lib = m_device.newLibraryWithSource(vshSource); + if (NULL != lib) + { + m_screenshotBlitProgramVsh.m_function = lib.newFunctionWithName(SHADER_FUNCTION_NAME); + } + lib = m_device.newLibraryWithSource(fshSource); + if (NULL != lib) + { + m_screenshotBlitProgramFsh.m_function = lib.newFunctionWithName(SHADER_FUNCTION_NAME); + } + m_screenshotBlitProgram.create(&m_screenshotBlitProgramVsh, &m_screenshotBlitProgramFsh); + + reset(m_renderPipelineDescriptor); + m_renderPipelineDescriptor.colorAttachments[0].pixelFormat = m_metalLayer.pixelFormat; + m_renderPipelineDescriptor.vertexFunction = m_screenshotBlitProgram.m_vsh->m_function; + m_renderPipelineDescriptor.fragmentFunction = m_screenshotBlitProgram.m_fsh->m_function; + m_screenshotBlitRenderPipelineState = m_device.newRenderPipelineStateWithDescriptor(m_renderPipelineDescriptor); + g_caps.supported |= (0 + | BGFX_CAPS_TEXTURE_COMPARE_LEQUAL //NOTE: on IOS Gpu Family 1/2 have to set compare in shader + | BGFX_CAPS_TEXTURE_COMPARE_ALL | BGFX_CAPS_TEXTURE_3D - | BGFX_CAPS_TEXTURE_COMPARE_LEQUAL - | BGFX_CAPS_INSTANCING | BGFX_CAPS_VERTEX_ATTRIB_HALF -// | BGFX_CAPS_FRAGMENT_DEPTH + | BGFX_CAPS_VERTEX_ATTRIB_UINT10 + | BGFX_CAPS_INSTANCING + | BGFX_CAPS_FRAGMENT_DEPTH | BGFX_CAPS_BLEND_INDEPENDENT - | BGFX_CAPS_COMPUTE + //| BGFX_CAPS_COMPUTE // TODO: api/hw supports it but metal compute shaders are not yet supported | BGFX_CAPS_INDEX32 - | BGFX_CAPS_DRAW_INDIRECT -// | BGFX_CAPS_TEXTURE_BLIT -// | BGFX_CAPS_TEXTURE_READ_BACK - | BGFX_CAPS_OCCLUSION_QUERY + //| BGFX_CAPS_DRAW_INDIRECT // TODO: support on iOS9+gpu family3+ and on macOS + | BGFX_CAPS_TEXTURE_BLIT + | BGFX_CAPS_TEXTURE_READ_BACK + | BGFX_CAPS_OCCLUSION_QUERY + | BGFX_CAPS_ALPHA_TO_COVERAGE ); - g_caps.maxTextureSize = 2048; //ASK: real caps width/height: 4096, but max depth(3D) size is only: 2048 - g_caps.maxFBAttachments = 4; // uint8_t(bx::uint32_min(m_device.supportsFeatureSet(MTLFeatureSet_iOS_GPUFamily2_v1) ? 8 : 4, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS)); + if (BX_ENABLED(BX_PLATFORM_IOS) ) + { + if ( iOSVersionEqualOrGreater("9.0.0") ) + { + g_caps.maxTextureSize = m_device.supportsFeatureSet((MTLFeatureSet)4 /* iOS_GPUFamily3_v1 */) ? 16384 : 8192; + } + else + { + g_caps.maxTextureSize = 4096; + } + g_caps.maxFBAttachments = uint8_t(bx::uint32_min(m_device.supportsFeatureSet((MTLFeatureSet)1 /* MTLFeatureSet_iOS_GPUFamily2_v1 */) ? 8 : 4, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS)); + + } else if (BX_ENABLED(BX_PLATFORM_OSX) ) + { + g_caps.maxTextureSize = 16384; + g_caps.maxFBAttachments = 8; + } //todo: vendor id, device id, gpu enum - //todo: texture format caps - //add texture formats/caps/etc that are available only on new sdk/devices -#if BX_PLATFORM_IOS -# ifdef __IPHONE_8_0 - if (OsVersionEqualOrGreater("8.0.0")) + m_hasPixelFormatDepth32Float_Stencil8 = (BX_ENABLED(BX_PLATFORM_OSX) || + ( BX_ENABLED(BX_PLATFORM_IOS) && iOSVersionEqualOrGreater("9.0.0") ) ); + m_macOS11Runtime = (BX_ENABLED(BX_PLATFORM_OSX) && macOSVersionEqualOrGreater(10,11,0) ); + m_iOS9Runtime = (BX_ENABLED(BX_PLATFORM_IOS) && iOSVersionEqualOrGreater("9.0.0") ); + + if (BX_ENABLED(BX_PLATFORM_OSX) ) { - s_textureFormat[TextureFormat::D24S8].m_fmt = MTLPixelFormatDepth32Float; + s_textureFormat[TextureFormat::R8].m_fmtSrgb = MTLPixelFormatInvalid; + s_textureFormat[TextureFormat::RG8].m_fmtSrgb = MTLPixelFormatInvalid; } -# endif // __IPHONE_8_0 -#endif // BX_PLATFORM_* for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii) { - uint8_t support = 0; + uint16_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_VERTEX : BGFX_CAPS_FORMAT_TEXTURE_NONE ; @@ -453,20 +538,51 @@ namespace bgfx { namespace mtl ? BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB | BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB | BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB + | BGFX_CAPS_FORMAT_TEXTURE_VERTEX : BGFX_CAPS_FORMAT_TEXTURE_NONE ; + if (!isCompressed((TextureFormat::Enum)(ii))) + { + support |= BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER + | BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA; + } + //TODO: additional caps flags -// support |= BGFX_CAPS_FORMAT_TEXTURE_VERTEX : BGFX_CAPS_FORMAT_TEXTURE_NONE; // support |= BGFX_CAPS_FORMAT_TEXTURE_IMAGE : BGFX_CAPS_FORMAT_TEXTURE_NONE; -// support |= BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER : BGFX_CAPS_FORMAT_TEXTURE_NONE; g_caps.formats[ii] = support; } + g_caps.formats[TextureFormat::A8] &= ~(BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER | BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA); + g_caps.formats[TextureFormat::RG32I] &= ~(BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA); + g_caps.formats[TextureFormat::RG32U] &= ~(BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA); + g_caps.formats[TextureFormat::RGBA32I] &= ~(BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA); + g_caps.formats[TextureFormat::RGBA32U] &= ~(BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA); + + + if (BX_ENABLED(BX_PLATFORM_IOS) ) + { + s_textureFormat[TextureFormat::D24S8].m_fmt = MTLPixelFormatDepth32Float; + + g_caps.formats[TextureFormat::BC1] = + g_caps.formats[TextureFormat::BC2] = + g_caps.formats[TextureFormat::BC3] = + g_caps.formats[TextureFormat::BC4] = + g_caps.formats[TextureFormat::BC5] = + g_caps.formats[TextureFormat::BC6H] = + g_caps.formats[TextureFormat::BC7] = BGFX_CAPS_FORMAT_TEXTURE_NONE; + + g_caps.formats[TextureFormat::RG32F] &= ~(BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA); + g_caps.formats[TextureFormat::RGBA32F] &= ~(BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA); + } + if (BX_ENABLED(BX_PLATFORM_OSX) ) { - g_caps.formats[TextureFormat::ETC1 ] = + s_textureFormat[TextureFormat::D24S8].m_fmt = (MTLPixelFormat)(m_device.depth24Stencil8PixelFormatSupported() ? + 255 /* Depth24Unorm_Stencil8 */ : + MTLPixelFormatDepth32Float_Stencil8); + g_caps.formats[TextureFormat::ETC2 ] = g_caps.formats[TextureFormat::ETC2A ] = g_caps.formats[TextureFormat::ETC2A1] = @@ -474,8 +590,11 @@ namespace bgfx { namespace mtl 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; + g_caps.formats[TextureFormat::R5G6B5] = + g_caps.formats[TextureFormat::RGBA4 ] = + g_caps.formats[TextureFormat::RGB5A1] = BGFX_CAPS_FORMAT_TEXTURE_NONE; + + g_caps.formats[TextureFormat::RGB9E5F] &= ~(BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER | BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA); } for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii) @@ -487,6 +606,15 @@ namespace bgfx { namespace mtl } } + for(uint32_t ii=1; ii<5; ++ii) + { + if (!m_device.supportsTextureSampleCount(s_msaa[ii])) + { + s_msaa[ii] = s_msaa[ii-1]; + } + } + + // Init reserved part of view name. for (uint32_t ii = 0; ii < BGFX_CONFIG_MAX_VIEWS; ++ii) { @@ -494,6 +622,7 @@ namespace bgfx { namespace mtl } m_occlusionQuery.preReset(); + m_gpuTimer.init(); g_internalData.context = m_device; return true; @@ -502,6 +631,7 @@ namespace bgfx { namespace mtl void shutdown() { m_occlusionQuery.postReset(); + m_gpuTimer.shutdown(); for (uint32_t ii = 0; ii < BX_COUNTOF(m_shaders); ++ii) { @@ -513,6 +643,8 @@ namespace bgfx { namespace mtl m_textures[ii].destroy(); } + captureFinish(); + MTL_RELEASE(m_depthStencilDescriptor); MTL_RELEASE(m_frontFaceStencilDescriptor); MTL_RELEASE(m_backFaceStencilDescriptor); @@ -527,7 +659,7 @@ namespace bgfx { namespace mtl MTL_RELEASE(m_backBufferStencil); } - for (uint8_t i=0; i < UNIFORM_BUFFER_COUNT; ++i) + for (uint8_t i=0; i < MTL_MAX_FRAMES_IN_FLIGHT; ++i) { MTL_RELEASE(m_uniformBuffers[i]); } @@ -645,11 +777,27 @@ namespace bgfx { namespace mtl { } - void readTexture(TextureHandle /*_handle*/, void* /*_data*/) BX_OVERRIDE + void readTexture(TextureHandle _handle, void* _data) BX_OVERRIDE { + m_commandBuffer.commit(); + m_commandBuffer.waitUntilCompleted(); + MTL_RELEASE(m_commandBuffer) + + const TextureMtl& texture = m_textures[_handle.idx]; + + uint32_t width = texture.m_ptr.width(); + uint32_t height = texture.m_ptr.height(); + const uint8_t bpp = getBitsPerPixel(TextureFormat::Enum(texture.m_textureFormat) ); + + MTLRegion region = { { 0, 0, 0 }, { width, height, 1 } }; + + texture.m_ptr.getBytes(_data, width*bpp/8, 0, region, 0, 0); + + m_commandBuffer = m_commandQueue.commandBuffer(); + retain(m_commandBuffer); //NOTE: keep alive to be useable at 'flip' } - void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) BX_OVERRIDE + void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) BX_OVERRIDE { TextureMtl& texture = m_textures[_handle.idx]; @@ -665,7 +813,7 @@ namespace bgfx { namespace mtl tc.m_height = _height; tc.m_sides = 0; tc.m_depth = 0; - tc.m_numMips = 1; + tc.m_numMips = _numMips; tc.m_format = TextureFormat::Enum(texture.m_requestedFormat); tc.m_cubeMap = false; tc.m_mem = NULL; @@ -740,30 +888,35 @@ namespace bgfx { namespace mtl m_uniforms[_handle.idx] = NULL; } + //cmdPre + void saveScreenShotPre(const char* _filePath) BX_OVERRIDE + { + BX_UNUSED(_filePath); + m_saveScreenshot = true; + } + + //cmdPost void saveScreenShot(const char* _filePath) BX_OVERRIDE { - if (NULL == m_drawable - || NULL == m_drawable.texture) - { + if (NULL == m_screenshotTarget) return; - } - //TODO: we should wait for completion of pending commandBuffers - //TODO: implement this with saveScreenshotBegin/End + m_commandBuffer.commit(); + m_commandBuffer.waitUntilCompleted(); + MTL_RELEASE(m_commandBuffer) - Texture backBuffer = m_drawable.texture; - uint32_t width = backBuffer.width(); - uint32_t height = backBuffer.height(); + uint32_t width = m_screenshotTarget.width(); + uint32_t height = m_screenshotTarget.height(); uint32_t length = width*height*4; uint8_t* data = (uint8_t*)BX_ALLOC(g_allocator, length); MTLRegion region = { { 0, 0, 0 }, { width, height, 1 } }; - backBuffer.getBytes(data, 4*width, 0, region, 0, 0); + m_screenshotTarget.getBytes(data, 4*width, 0, region, 0, 0); g_callback->screenShot(_filePath - , backBuffer.width() - , backBuffer.height() + , m_screenshotTarget.width() + , m_screenshotTarget.height() , width*4 , data , length @@ -771,6 +924,9 @@ namespace bgfx { namespace mtl ); BX_FREE(g_allocator, data); + + m_commandBuffer = m_commandQueue.commandBuffer(); + retain(m_commandBuffer); //NOTE: keep alive to be useable at 'flip' } void updateViewName(uint8_t _id, const char* _name) BX_OVERRIDE @@ -812,8 +968,25 @@ namespace bgfx { namespace mtl //} FrameBufferHandle fbh = BGFX_INVALID_HANDLE; - //TODO: change to default framebuffer - we need a new encoder for this! - //setFrameBuffer(fbh, false); + + if ( NULL == rce || m_renderCommandEncoderFrameBufferHandle.idx != invalidHandle ) + { + if ( m_renderCommandEncoder ) + m_renderCommandEncoder.endEncoding(); + + RenderPassDescriptor renderPassDescriptor = newRenderPassDescriptor(); + + setFrameBuffer(renderPassDescriptor, fbh); + + renderPassDescriptor.colorAttachments[0].loadAction = MTLLoadActionLoad; + renderPassDescriptor.colorAttachments[0].storeAction = NULL != renderPassDescriptor.colorAttachments[0].resolveTexture ? + MTLStoreActionMultisampleResolve : MTLStoreActionStore; + + rce = m_commandBuffer.renderCommandEncoderWithDescriptor(renderPassDescriptor); + m_renderCommandEncoder = rce; + m_renderCommandEncoderFrameBufferHandle = fbh; + MTL_RELEASE(renderPassDescriptor); + } MTLViewport viewport = { 0.0f, 0.0f, (float)width, (float)height, 0.0f, 1.0f}; rce.setViewport(viewport); @@ -849,9 +1022,6 @@ namespace bgfx { namespace mtl rce.setFragmentBuffer(m_uniformBuffer, m_uniformBufferFragmentOffset, 0); } - VertexBufferMtl& vb = m_vertexBuffers[_blitter.m_vb->handle.idx]; - rce.setVertexBuffer(vb.m_buffer, 0, 1); - float proj[16]; bx::mtxOrtho(proj, 0.0f, (float)width, (float)height, 0.0f, 0.0f, 1000.0f); @@ -859,7 +1029,7 @@ namespace bgfx { namespace mtl uint8_t flags = predefined.m_type; setShaderUniform(flags, predefined.m_loc, proj, 4); - m_textures[_blitter.m_texture.idx].commit(0); + m_textures[_blitter.m_texture.idx].commit(0, false, true); } void blitRender(TextVideoMemBlitter& _blitter, uint32_t _numIndices) BX_OVERRIDE @@ -867,30 +1037,44 @@ namespace bgfx { namespace mtl const uint32_t numVertices = _numIndices*4/6; if (0 < numVertices) { - m_indexBuffers [_blitter.m_ib->handle.idx].update(0, _numIndices*2, _blitter.m_ib->data); + m_indexBuffers [_blitter.m_ib->handle.idx].update(0, _numIndices*2, _blitter.m_ib->data, true); m_vertexBuffers[_blitter.m_vb->handle.idx].update(0, numVertices*_blitter.m_decl.m_stride, _blitter.m_vb->data, true); - m_renderCommandEncoder.drawIndexedPrimitives(MTLPrimitiveTypeTriangle, _numIndices, MTLIndexTypeUInt16, m_indexBuffers[_blitter.m_ib->handle.idx].m_buffer, 0, 1); + VertexBufferMtl& vb = m_vertexBuffers[_blitter.m_vb->handle.idx]; + m_renderCommandEncoder.setVertexBuffer(vb.getBuffer(), 0, 1); + + m_renderCommandEncoder.drawIndexedPrimitives(MTLPrimitiveTypeTriangle, _numIndices, MTLIndexTypeUInt16, m_indexBuffers[_blitter.m_ib->handle.idx].getBuffer(), 0, 1); } } + static void commandBufferFinishedCallback(void* _data) + { + RendererContextMtl* renderer = (RendererContextMtl*)_data; + if ( renderer ) + renderer->m_framesSemaphore.post(); + } + void flip(HMD& /*_hmd*/) BX_OVERRIDE { - if (NULL == m_drawable - || NULL == m_commandBuffer) + if (NULL == m_commandBuffer) { return; } // Present and commit the command buffer - m_commandBuffer.presentDrawable(m_drawable); - MTL_RELEASE(m_drawable); + if ( NULL != m_drawable) + { + m_commandBuffer.presentDrawable(m_drawable); + MTL_RELEASE(m_drawable); + } + + m_commandBuffer.addCompletedHandler(commandBufferFinishedCallback, this); m_commandBuffer.commit(); - // using heavy syncing now - // TODO: refactor it with double/triple buffering frame data - m_commandBuffer.waitUntilCompleted(); + MTL_RELEASE(m_prevCommandBuffer); + m_prevCommandBuffer = m_commandBuffer; + retain(m_prevCommandBuffer); MTL_RELEASE(m_commandBuffer); @@ -918,55 +1102,83 @@ namespace bgfx { namespace mtl : 1 ; - //TODO: _resolution has wrong dimensions, using m_drawable.texture size now - if (NULL == m_drawable.texture) - { - return; - } - - uint32_t width = (uint32_t)m_drawable.texture.width; - uint32_t height = (uint32_t)m_drawable.texture.height; - //TODO: there should be a way to specify if backbuffer needs stencil/depth. - //TODO: support msaa - if (NULL == m_backBufferDepth - || width != m_backBufferDepth.width() - || 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) + const uint32_t maskFlags = ~(0 + | BGFX_RESET_HMD_RECENTER + | BGFX_RESET_MAXANISOTROPY + | BGFX_RESET_DEPTH_CLAMP + | BGFX_RESET_SUSPEND + ); + + if (m_resolution.m_width != _resolution.m_width + || m_resolution.m_height != _resolution.m_height + || (m_resolution.m_flags&maskFlags) != (_resolution.m_flags&maskFlags) ) { + int sampleCount = s_msaa[(_resolution.m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT]; + + MTLPixelFormat prevMetalLayerPixelFormat = m_metalLayer.pixelFormat; + + m_metalLayer.drawableSize = CGSizeMake(_resolution.m_width, _resolution.m_height); + m_metalLayer.pixelFormat = (m_resolution.m_flags & BGFX_RESET_SRGB_BACKBUFFER) + ? MTLPixelFormatBGRA8Unorm_sRGB + : MTLPixelFormatBGRA8Unorm + ; + m_resolution = _resolution; m_resolution.m_flags &= ~BGFX_RESET_INTERNAL_FORCE; - m_textureDescriptor.textureType = MTLTextureType2D; + m_textureDescriptor.textureType = sampleCount > 1 ? MTLTextureType2DMultisample : MTLTextureType2D; - m_textureDescriptor.pixelFormat = MTLPixelFormatDepth32Float_Stencil8; + if (m_hasPixelFormatDepth32Float_Stencil8) + m_textureDescriptor.pixelFormat = MTLPixelFormatDepth32Float_Stencil8; + else + m_textureDescriptor.pixelFormat = MTLPixelFormatDepth32Float; - m_textureDescriptor.width = width; - m_textureDescriptor.height = height; + m_textureDescriptor.width = _resolution.m_width; + m_textureDescriptor.height = _resolution.m_height; m_textureDescriptor.depth = 1; m_textureDescriptor.mipmapLevelCount = 1; - m_textureDescriptor.sampleCount = 1; + m_textureDescriptor.sampleCount = sampleCount; m_textureDescriptor.arrayLength = 1; - m_textureDescriptor.resourceOptions = MTLResourceStorageModePrivate; - m_textureDescriptor.cpuCacheMode = MTLCPUCacheModeDefaultCache; - m_textureDescriptor.storageMode = MTLStorageModePrivate; - m_textureDescriptor.usage = MTLTextureUsageRenderTarget; + if ( m_iOS9Runtime || m_macOS11Runtime ) + { + m_textureDescriptor.cpuCacheMode = MTLCPUCacheModeDefaultCache; + m_textureDescriptor.storageMode = MTLStorageModePrivate; + m_textureDescriptor.usage = MTLTextureUsageRenderTarget; + } if (NULL != m_backBufferDepth) { release(m_backBufferDepth); } m_backBufferDepth = m_device.newTextureWithDescriptor(m_textureDescriptor); - m_backBufferStencil = m_backBufferDepth; + + + if (m_hasPixelFormatDepth32Float_Stencil8) + m_backBufferStencil = m_backBufferDepth; + else + { + m_textureDescriptor.pixelFormat = MTLPixelFormatStencil8; + m_backBufferStencil = m_device.newTextureWithDescriptor(m_textureDescriptor); + } + + if ( sampleCount > 1 ) + { + if (NULL != m_backBufferColorMSAA) + { + release(m_backBufferColorMSAA); + } + m_textureDescriptor.pixelFormat = m_metalLayer.pixelFormat; + m_backBufferColorMSAA = m_device.newTextureWithDescriptor(m_textureDescriptor); + } bx::HashMurmur2A murmur; murmur.begin(); murmur.add(1); - murmur.add((uint32_t)m_drawable.texture.pixelFormat); + murmur.add((uint32_t)m_metalLayer.pixelFormat); murmur.add((uint32_t)m_backBufferDepth.pixelFormat()); murmur.add((uint32_t)m_backBufferStencil.pixelFormat()); + murmur.add((uint32_t)sampleCount); m_backBufferPixelFormatHash = murmur.end(); for (uint32_t ii = 0; ii < BX_COUNTOF(m_frameBuffers); ++ii) @@ -974,11 +1186,107 @@ namespace bgfx { namespace mtl m_frameBuffers[ii].postReset(); } - m_textVideoMem.resize(false, width, height); + updateCapture(); + + m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height); m_textVideoMem.clear(); + + if ( prevMetalLayerPixelFormat != m_metalLayer.pixelFormat) + { + MTL_RELEASE(m_screenshotBlitRenderPipelineState) + reset(m_renderPipelineDescriptor); + m_renderPipelineDescriptor.colorAttachments[0].pixelFormat = m_metalLayer.pixelFormat; + m_renderPipelineDescriptor.vertexFunction = m_screenshotBlitProgram.m_vsh->m_function; + m_renderPipelineDescriptor.fragmentFunction = m_screenshotBlitProgram.m_fsh->m_function; + m_screenshotBlitRenderPipelineState = m_device.newRenderPipelineStateWithDescriptor(m_renderPipelineDescriptor); + } } } + + void updateCapture() + { + if (m_resolution.m_flags&BGFX_RESET_CAPTURE) + { + m_captureSize = m_resolution.m_width*m_resolution.m_height*4; + m_capture = BX_REALLOC(g_allocator, m_capture, m_captureSize); + g_callback->captureBegin(m_resolution.m_width, m_resolution.m_height, m_resolution.m_width*4, TextureFormat::BGRA8, false); + } + else + { + captureFinish(); + } + } + + void capture() + { + if (NULL != m_capture) + { + if (NULL == m_screenshotTarget) + return; + + m_renderCommandEncoder.endEncoding(); + + m_commandBuffer.commit(); + m_commandBuffer.waitUntilCompleted(); + MTL_RELEASE(m_commandBuffer) + + MTLRegion region = { { 0, 0, 0 }, { m_resolution.m_width, m_resolution.m_height, 1 } }; + + //TODO: enable screenshot target when capturing + m_screenshotTarget.getBytes(m_capture, 4*m_resolution.m_width, 0, region, 0, 0); + + m_commandBuffer = m_commandQueue.commandBuffer(); + retain(m_commandBuffer); //NOTE: keep alive to be useable at 'flip' + + if (m_screenshotTarget.pixelFormat() == MTLPixelFormatRGBA8Uint) + { + imageSwizzleBgra8(m_resolution.m_width, m_resolution.m_height, m_resolution.m_width*4, m_capture, m_capture); + } + + g_callback->captureFrame(m_capture, m_captureSize); + + RenderPassDescriptor renderPassDescriptor = newRenderPassDescriptor(); + setFrameBuffer(renderPassDescriptor, m_renderCommandEncoderFrameBufferHandle); + + for(uint32_t ii = 0; ii < g_caps.maxFBAttachments; ++ii) + { + MTLRenderPassColorAttachmentDescriptor* desc = renderPassDescriptor.colorAttachments[ii]; + if ( desc.texture != NULL) + desc.loadAction = MTLLoadActionLoad; + } + + RenderPassDepthAttachmentDescriptor depthAttachment = renderPassDescriptor.depthAttachment; + if (NULL != depthAttachment.texture) + { + depthAttachment.loadAction = MTLLoadActionLoad; + depthAttachment.storeAction = MTLStoreActionStore; + } + + RenderPassStencilAttachmentDescriptor stencilAttachment = renderPassDescriptor.stencilAttachment; + if (NULL != stencilAttachment.texture) + { + stencilAttachment.loadAction = MTLLoadActionLoad; + stencilAttachment.storeAction = MTLStoreActionStore; + } + + m_renderCommandEncoder = m_commandBuffer.renderCommandEncoderWithDescriptor(renderPassDescriptor); + MTL_RELEASE(renderPassDescriptor); + } + } + + void captureFinish() + { + if (NULL != m_capture) + { + g_callback->captureEnd(); + BX_FREE(g_allocator, m_capture); + m_capture = NULL; + m_captureSize = 0; + } + } + + void setShaderUniform(uint8_t _flags, uint32_t _loc, const void* _val, uint32_t _numRegs) { uint32_t offset = 0 != (_flags&BGFX_UNIFORM_FRAGMENTBIT) @@ -1081,16 +1389,155 @@ namespace bgfx { namespace mtl } } - void clearQuad(ClearQuad& _clearQuad, const Rect& _rect, const Clear& _clear, const float _palette[][4]) + void clearQuad(ClearQuad& _clearQuad, const Rect& /*_rect*/, const Clear& _clear, const float _palette[][4]) { - BX_UNUSED(_clearQuad, _rect, _clear, _palette); + uint32_t width; + uint32_t height; + + if (isValid(m_fbh) ) + { + const FrameBufferMtl& fb = m_frameBuffers[m_fbh.idx]; + width = fb.m_width; + height = fb.m_height; + } + else + { + width = getBufferWidth(); + height = getBufferHeight(); + } + + + uint64_t state = 0; + state |= _clear.m_flags & BGFX_CLEAR_COLOR ? BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE : 0; + state |= _clear.m_flags & BGFX_CLEAR_DEPTH ? BGFX_STATE_DEPTH_TEST_ALWAYS|BGFX_STATE_DEPTH_WRITE : 0; + + uint64_t stencil = 0; + stencil |= _clear.m_flags & BGFX_CLEAR_STENCIL ? 0 + | BGFX_STENCIL_TEST_ALWAYS + | BGFX_STENCIL_FUNC_REF(_clear.m_stencil) + | BGFX_STENCIL_FUNC_RMASK(0xff) + | BGFX_STENCIL_OP_FAIL_S_REPLACE + | BGFX_STENCIL_OP_FAIL_Z_REPLACE + | BGFX_STENCIL_OP_PASS_Z_REPLACE + : 0 + ; + + setDepthStencilState(state, stencil); + + uint32_t numMrt = 1; + FrameBufferHandle fbh = m_fbh; + if (isValid(fbh) ) + { + const FrameBufferMtl& fb = m_frameBuffers[fbh.idx]; + numMrt = bx::uint32_max(1, fb.m_num); + } + + ProgramMtl& program = m_program[_clearQuad.m_program[numMrt-1].idx]; + m_renderCommandEncoder.setRenderPipelineState(program.getRenderPipelineState(state, 0, fbh, _clearQuad.m_vb->decl, 0)); + + uint32_t fragmentUniformBufferSize = program.m_fshConstantBufferSize; + + m_uniformBufferFragmentOffset = m_uniformBufferVertexOffset; + if (fragmentUniformBufferSize) + { + m_uniformBufferFragmentOffset = BX_ALIGN_MASK(m_uniformBufferFragmentOffset, program.m_fshConstantBufferAlignmentMask); + m_renderCommandEncoder.setFragmentBuffer(m_uniformBuffer, m_uniformBufferFragmentOffset, 0); + } + + if (BGFX_CLEAR_COLOR_USE_PALETTE & _clear.m_flags) + { + float mrtClear[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS][4]; + for (uint32_t ii = 0; ii < numMrt; ++ii) + { + uint8_t index = (uint8_t)bx::uint32_min(BGFX_CONFIG_MAX_COLOR_PALETTE-1, _clear.m_index[ii]); + memcpy(mrtClear[ii], _palette[index], 16); + } + + memcpy((uint8_t*)m_uniformBuffer.contents() + m_uniformBufferFragmentOffset, + mrtClear, + bx::uint32_min(fragmentUniformBufferSize, sizeof(mrtClear))); + } + else + { + float rgba[4] = + { + _clear.m_index[0]*1.0f/255.0f, + _clear.m_index[1]*1.0f/255.0f, + _clear.m_index[2]*1.0f/255.0f, + _clear.m_index[3]*1.0f/255.0f, + }; + + memcpy((uint8_t*)m_uniformBuffer.contents() + m_uniformBufferFragmentOffset, + rgba, + bx::uint32_min(fragmentUniformBufferSize, sizeof(rgba))); + } + + m_uniformBufferFragmentOffset += fragmentUniformBufferSize; + m_uniformBufferVertexOffset = m_uniformBufferFragmentOffset; + + const VertexBufferMtl& vb = m_vertexBuffers[_clearQuad.m_vb->handle.idx]; + const VertexDecl& vertexDecl = m_vertexDecls[_clearQuad.m_vb->decl.idx]; + const uint32_t stride = vertexDecl.m_stride; + const uint32_t offset = 0; + + { + struct Vertex + { + float m_x; + float m_y; + float m_z; + }; + + Vertex* vertex = (Vertex*)_clearQuad.m_vb->data; + BX_CHECK(stride == sizeof(Vertex) + , "Stride/Vertex mismatch (stride %d, sizeof(Vertex) %d)" + , stride + , sizeof(Vertex) + ); + BX_UNUSED(stride); + + const float depth = _clear.m_depth; + + vertex->m_x = -1.0f; + vertex->m_y = -1.0f; + vertex->m_z = depth; + vertex++; + vertex->m_x = 1.0f; + vertex->m_y = -1.0f; + vertex->m_z = depth; + vertex++; + vertex->m_x = -1.0f; + vertex->m_y = 1.0f; + vertex->m_z = depth; + vertex++; + vertex->m_x = 1.0f; + vertex->m_y = 1.0f; + vertex->m_z = depth; + } + + m_vertexBuffers[_clearQuad.m_vb->handle.idx].update(0, 4*_clearQuad.m_decl.m_stride, _clearQuad.m_vb->data); + m_renderCommandEncoder.setCullMode(MTLCullModeNone); + m_renderCommandEncoder.setVertexBuffer(vb.getBuffer(), offset, 1); + m_renderCommandEncoder.drawPrimitives(MTLPrimitiveTypeTriangleStrip, 0, 4, 1); } void setFrameBuffer(RenderPassDescriptor renderPassDescriptor, FrameBufferHandle _fbh, bool _msaa = true) { if (!isValid(_fbh) ) { - renderPassDescriptor.colorAttachments[0].texture = m_drawable.texture; + if ( NULL != m_backBufferColorMSAA ) + { + renderPassDescriptor.colorAttachments[0].texture = m_backBufferColorMSAA; + renderPassDescriptor.colorAttachments[0].resolveTexture = ((NULL != m_screenshotTarget) ? + m_screenshotTarget.m_obj : + currentDrawable().texture); + } + else + { + renderPassDescriptor.colorAttachments[0].texture = ((NULL != m_screenshotTarget) ? + m_screenshotTarget.m_obj : + currentDrawable().texture); + } renderPassDescriptor.depthAttachment.texture = m_backBufferDepth; renderPassDescriptor.stencilAttachment.texture = m_backBufferStencil; } @@ -1101,15 +1548,26 @@ namespace bgfx { namespace mtl for (uint32_t ii = 0; ii < frameBuffer.m_num; ++ii) { const TextureMtl& texture = m_textures[frameBuffer.m_colorHandle[ii].idx]; - renderPassDescriptor.colorAttachments[ii].texture = texture.m_ptr; + renderPassDescriptor.colorAttachments[ii].texture = texture.m_ptrMSAA ? texture.m_ptrMSAA : texture.m_ptr; + renderPassDescriptor.colorAttachments[ii].resolveTexture = texture.m_ptrMSAA ? texture.m_ptr.m_obj : NULL; } if (isValid(frameBuffer.m_depthHandle) ) { const TextureMtl& texture = m_textures[frameBuffer.m_depthHandle.idx]; - renderPassDescriptor.depthAttachment.texture = texture.m_ptr; + renderPassDescriptor.depthAttachment.texture = texture.m_ptrMSAA ? texture.m_ptrMSAA : texture.m_ptr; renderPassDescriptor.stencilAttachment.texture = texture.m_ptrStencil; - //TODO: stencilAttachment should be the same if packed/depth stencil format is used + + if ( texture.m_textureFormat == TextureFormat::D24S8)//TODO: msaa and stencil iOS8 hack + { + if ( texture.m_ptr.pixelFormat() == 255 /* Depth24Unorm_Stencil8 */|| + texture.m_ptr.pixelFormat() == 260 /* Depth32Float_Stencil8 */ ) + { + renderPassDescriptor.stencilAttachment.texture = renderPassDescriptor.depthAttachment.texture; + } + else + renderPassDescriptor.stencilAttachment.texture = texture.m_ptrMSAA ? texture.m_ptrMSAA : texture.m_ptrStencil; + } } } @@ -1203,11 +1661,12 @@ namespace bgfx { namespace mtl m_samplerDescriptor.normalizedCoordinates = TRUE; m_samplerDescriptor.maxAnisotropy = m_maxAnisotropy; - //TODO: I haven't found how to specify this. Comparison function can be specified in shader. - // On OSX this can be specified. There is no support for this on iOS right now. - //const uint32_t cmpFunc = (_flags&BGFX_TEXTURE_COMPARE_MASK)>>BGFX_TEXTURE_COMPARE_SHIFT; - //const uint8_t filter = 0 == cmpFunc ? 0 : D3D11_COMPARISON_FILTERING_BIT; - //m_samplerDescriptor.comparisonFunc = 0 == cmpFunc ? D3D11_COMPARISON_NEVER : s_cmpFunc[cmpFunc]; + //NOTE: Comparison function can be specified in shader on all metal hw. + if ( m_macOS11Runtime || [m_device supportsFeatureSet:(MTLFeatureSet)4/*MTLFeatureSet_iOS_GPUFamily3_v1*/]) + { + const uint32_t cmpFunc = (_flags&BGFX_TEXTURE_COMPARE_MASK)>>BGFX_TEXTURE_COMPARE_SHIFT; + m_samplerDescriptor.compareFunction = 0 == cmpFunc ? MTLCompareFunctionNever : s_cmpFunc[cmpFunc]; + } sampler = m_device.newSamplerStateWithDescriptor(m_samplerDescriptor); m_samplerStateCache.add(_flags, sampler); @@ -1232,21 +1691,68 @@ namespace bgfx { namespace mtl return m_backBufferDepth.height(); } - Device m_device; + void sync() + { + if ( m_prevCommandBuffer ) + m_prevCommandBuffer.waitUntilCompleted(); + } + + BlitCommandEncoder getBlitCommandEncoder() + { + if ( m_blitCommandEncoder == NULL) + { + if ( m_commandBuffer == NULL ) + { + m_commandBuffer = m_commandQueue.commandBuffer(); + retain(m_commandBuffer); + } + + m_blitCommandEncoder = m_commandBuffer.blitCommandEncoder(); + } + + return m_blitCommandEncoder; + } + + id currentDrawable() + { + if (m_drawable == nil) + { + m_drawable = m_metalLayer.nextDrawable; +#if BX_PLATFORM_IOS + retain(m_drawable); // keep alive to be useable at 'flip' +#endif + } + + return m_drawable; + } + + + Device m_device; + OcclusionQueryMTL m_occlusionQuery; + TimerQueryMtl m_gpuTimer; + CommandQueue m_commandQueue; CAMetalLayer* m_metalLayer; + Texture m_backBufferColorMSAA; Texture m_backBufferDepth; Texture m_backBufferStencil; uint32_t m_backBufferPixelFormatHash; uint32_t m_maxAnisotropy; - OcclusionQueryMTL m_occlusionQuery; + bool m_iOS9Runtime; + bool m_macOS11Runtime; + bool m_hasPixelFormatDepth32Float_Stencil8; + + + + bx::Semaphore m_framesSemaphore; Buffer m_uniformBuffer; - Buffer m_uniformBuffers[UNIFORM_BUFFER_COUNT]; + Buffer m_uniformBuffers[MTL_MAX_FRAMES_IN_FLIGHT]; uint32_t m_uniformBufferVertexOffset; uint32_t m_uniformBufferFragmentOffset; - uint8_t m_uniformBufferIndex; + + uint8_t m_bufferIndex; uint16_t m_numWindows; FrameBufferHandle m_windows[BGFX_CONFIG_MAX_FRAME_BUFFERS]; @@ -1270,6 +1776,8 @@ namespace bgfx { namespace mtl bool m_rtMsaa; Resolution m_resolution; + void* m_capture; + uint32_t m_captureSize; // descriptors RenderPipelineDescriptor m_renderPipelineDescriptor; @@ -1281,9 +1789,19 @@ namespace bgfx { namespace mtl SamplerDescriptor m_samplerDescriptor; // currently active objects data - id m_drawable; - CommandBuffer m_commandBuffer; - RenderCommandEncoder m_renderCommandEncoder; + id m_drawable; + bool m_saveScreenshot; + Texture m_screenshotTarget; + ShaderMtl m_screenshotBlitProgramVsh; + ShaderMtl m_screenshotBlitProgramFsh; + ProgramMtl m_screenshotBlitProgram; + RenderPipelineState m_screenshotBlitRenderPipelineState; + + CommandBuffer m_commandBuffer; + CommandBuffer m_prevCommandBuffer; + BlitCommandEncoder m_blitCommandEncoder; + RenderCommandEncoder m_renderCommandEncoder; + FrameBufferHandle m_renderCommandEncoderFrameBufferHandle; }; static RendererContextMtl* s_renderMtl; @@ -1330,8 +1848,6 @@ namespace bgfx { namespace mtl break; } - //bool fragment = BGFX_CHUNK_MAGIC_FSH == magic; - uint32_t iohash; bx::read(&reader, iohash); @@ -1371,23 +1887,6 @@ namespace bgfx { namespace mtl const char* code = (const char*)reader.getDataPtr(); bx::skip(&reader, shaderSize+1); - int32_t codeLen = (int32_t)strlen(code); - int32_t tempLen = codeLen + (4<<10); - char* temp = (char*)alloca(tempLen); - bx::StaticMemoryBlockWriter writer(temp, tempLen); - - //TODO: remove this hack. some shaders have problem with half<->float conversion - writeString(&writer - , "#define half float\n" - "#define half2 float2\n" - "#define half3 float3\n" - "#define half4 float4\n" - ); - - bx::write(&writer, code, codeLen); - bx::write(&writer, '\0'); - code = temp; - //TODO: use binary format Library lib = s_renderMtl->m_device.newLibraryWithSource(code); @@ -1506,7 +2005,7 @@ namespace bgfx { namespace mtl RenderPipelineState ProgramMtl::getRenderPipelineState(uint64_t _state, uint32_t _rgba, FrameBufferHandle _fbHandle, VertexDeclHandle _declHandle, uint16_t _numInstanceData) { - _state &= (BGFX_STATE_BLEND_MASK|BGFX_STATE_BLEND_EQUATION_MASK|BGFX_STATE_ALPHA_WRITE|BGFX_STATE_RGB_WRITE|BGFX_STATE_BLEND_INDEPENDENT|BGFX_STATE_MSAA); + _state &= (BGFX_STATE_BLEND_MASK|BGFX_STATE_BLEND_EQUATION_MASK|BGFX_STATE_ALPHA_WRITE|BGFX_STATE_RGB_WRITE|BGFX_STATE_BLEND_INDEPENDENT|BGFX_STATE_MSAA|BGFX_STATE_BLEND_ALPHA_TO_COVERAGE); bool independentBlendEnable = !!(BGFX_STATE_BLEND_INDEPENDENT & _state); @@ -1532,11 +2031,15 @@ namespace bgfx { namespace mtl { RenderPipelineDescriptor& pd = s_renderMtl->m_renderPipelineDescriptor; reset(pd); + + pd.alphaToCoverageEnabled = !!(BGFX_STATE_BLEND_ALPHA_TO_COVERAGE & _state); + uint32_t frameBufferAttachment = 1; if (!isValid(_fbHandle) ) { - pd.colorAttachments[0].pixelFormat = s_renderMtl->m_drawable.texture.pixelFormat; + pd.sampleCount = NULL != s_renderMtl->m_backBufferColorMSAA ? s_renderMtl->m_backBufferColorMSAA.sampleCount() : 1; + pd.colorAttachments[0].pixelFormat = s_renderMtl->currentDrawable().texture.pixelFormat; pd.depthAttachmentPixelFormat = s_renderMtl->m_backBufferDepth.m_obj.pixelFormat; pd.stencilAttachmentPixelFormat = s_renderMtl->m_backBufferStencil.m_obj.pixelFormat; } @@ -1548,6 +2051,7 @@ namespace bgfx { namespace mtl for (uint32_t ii = 0; ii < frameBuffer.m_num; ++ii) { const TextureMtl& texture = s_renderMtl->m_textures[frameBuffer.m_colorHandle[ii].idx]; + pd.sampleCount = NULL != texture.m_ptrMSAA ? texture.m_ptrMSAA.sampleCount() : 1; pd.colorAttachments[ii].pixelFormat = texture.m_ptr.m_obj.pixelFormat; } @@ -1557,13 +2061,16 @@ namespace bgfx { namespace mtl pd.depthAttachmentPixelFormat = texture.m_ptr.m_obj.pixelFormat; if (NULL != texture.m_ptrStencil) { - pd.stencilAttachmentPixelFormat = MTLPixelFormatInvalid; //texture.m_ptrStencil.m_obj.pixelFormat; + pd.stencilAttachmentPixelFormat = texture.m_ptrStencil.m_obj.pixelFormat; + } + else + { + if ( texture.m_textureFormat == TextureFormat::D24S8) + pd.stencilAttachmentPixelFormat = texture.m_ptr.m_obj.pixelFormat; } - //todo: stencil attachment should be the same as depth for packed depth/stencil } } - // TODO: BGFX_STATE_MSAA using _fbHandle texture msaa values const uint32_t blend = uint32_t( (_state&BGFX_STATE_BLEND_MASK)>>BGFX_STATE_BLEND_SHIFT); const uint32_t equation = uint32_t( (_state&BGFX_STATE_BLEND_EQUATION_MASK)>>BGFX_STATE_BLEND_EQUATION_SHIFT); @@ -1649,7 +2156,7 @@ namespace bgfx { namespace mtl BX_TRACE("attrib:%s format: %d offset:%d", s_attribName[attr], (int)vertexDesc.attributes[loc].format, (int)vertexDesc.attributes[loc].offset); } else - { // missing attribute: using dummy attribute with smallest possible size + { // NOTE: missing attribute: using dummy attribute with smallest possible size vertexDesc.attributes[loc].format = MTLVertexFormatUChar2; vertexDesc.attributes[loc].bufferIndex = 1; vertexDesc.attributes[loc].offset = 0; @@ -1778,6 +2285,9 @@ namespace bgfx { namespace mtl } else if (arg.type == MTLArgumentTypeTexture) { + if ( shaderType == 0 ) m_usedVertexSamplerStages |= 1<m_device.newBufferWithLength(_size, 0); + for (uint32_t ii = 0; ii < MTL_MAX_FRAMES_IN_FLIGHT; ++ii) + m_buffers[ii] = s_renderMtl->m_device.newBufferWithLength(_size, 0); } else { - m_buffer = s_renderMtl->m_device.newBufferWithBytes(_data, _size, 0); + m_buffers[0] = s_renderMtl->m_device.newBufferWithBytes(_data, _size, 0); } } @@ -1824,7 +2337,26 @@ namespace bgfx { namespace mtl { BX_UNUSED(_discard); - memcpy( (uint8_t*)m_buffer.contents() + _offset, _data, _size); + //TODO: cannot call this more than once per frame + if ( m_dynamic && _discard ) + { + m_bufferIndex = (m_bufferIndex + 1) % MTL_MAX_FRAMES_IN_FLIGHT; + memcpy( (uint8_t*)getBuffer().contents() + _offset, _data, _size); + } + else if ( NULL != s_renderMtl->m_renderCommandEncoder ) + { // NOTE: cannot blit while rendercommander is active. have to sync. slow. remove these. + // ClearQuad triggers this now + s_renderMtl->sync(); + memcpy( (uint8_t*)getBuffer().contents() + _offset, _data, _size); + } + else + { + BlitCommandEncoder bce = s_renderMtl->getBlitCommandEncoder(); + + Buffer temp = s_renderMtl->m_device.newBufferWithBytes(_data, _size, 0); + bce.copyFromBuffer(temp, 0, getBuffer(), _offset, _size); + release(temp); + } } void VertexBufferMtl::create(uint32_t _size, void* _data, VertexDeclHandle _declHandle, uint16_t _flags) @@ -1854,6 +2386,9 @@ namespace bgfx { namespace mtl const uint32_t textureHeight = bx::uint32_max(blockInfo.blockHeight, imageContainer.m_height>>startLod); 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(getViableTextureFormat(imageContainer) ); const bool convert = m_textureFormat != m_requestedFormat; @@ -1889,11 +2424,11 @@ namespace bgfx { namespace mtl ); const bool writeOnly = 0 != (_flags&BGFX_TEXTURE_RT_WRITE_ONLY); -// const bool computeWrite = 0 != (_flags&BGFX_TEXTURE_COMPUTE_WRITE); -// const bool renderTarget = 0 != (_flags&BGFX_TEXTURE_RT_MASK); + 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); -// const DXGI_SAMPLE_DESC& msaa = s_msaa[msaaQuality]; + const uint32_t msaaQuality = bx::uint32_satsub( (_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT, 1); + int sampleCount = s_msaa[msaaQuality]; MTLPixelFormat format = MTLPixelFormatInvalid; if (srgb) @@ -1916,22 +2451,35 @@ namespace bgfx { namespace mtl desc.height = textureHeight; desc.depth = bx::uint32_max(1,imageContainer.m_depth); desc.mipmapLevelCount = imageContainer.m_numMips; - desc.sampleCount = 1; //TODO: set samplecount - If textureType is not MTLTextureType2DMultisample, the value must be 1. - desc.resourceOptions = MTLResourceStorageModePrivate; - desc.cpuCacheMode = MTLCPUCacheModeDefaultCache; + desc.sampleCount = 1; - desc.storageMode = (MTLStorageMode)(writeOnly - ? 2 /*MTLStorageModePrivate*/ - : 1 /*MTLStorageModeManaged*/ - ); - desc.usage = writeOnly - ? MTLTextureUsageShaderWrite - : MTLTextureUsageShaderRead - ; + if (s_renderMtl->m_iOS9Runtime || s_renderMtl->m_macOS11Runtime) + { + desc.cpuCacheMode = MTLCPUCacheModeDefaultCache; - //TODO: set resource flags depending on usage(renderTarget/computeWrite/etc) on iOS9/OSX + desc.storageMode = (MTLStorageMode)(writeOnly||isDepth(TextureFormat::Enum(m_textureFormat)) + ? 2 /*MTLStorageModePrivate*/ + : ((BX_ENABLED(BX_PLATFORM_IOS)) ? 0 /* MTLStorageModeShared */ : 1 /*MTLStorageModeManaged*/) + ); + + desc.usage = MTLTextureUsageShaderRead; + if (computeWrite) + desc.usage |= MTLTextureUsageShaderWrite; + if (renderTarget) + desc.usage |= MTLTextureUsageRenderTarget; + } m_ptr = s_renderMtl->m_device.newTextureWithDescriptor(desc); + + if ( sampleCount > 1) + { + desc.textureType = MTLTextureType2DMultisample; + desc.sampleCount = sampleCount; + if (s_renderMtl->m_iOS9Runtime || s_renderMtl->m_macOS11Runtime) + desc.storageMode = (MTLStorageMode)( 2 /*MTLStorageModePrivate*/); + m_ptrMSAA = s_renderMtl->m_device.newTextureWithDescriptor(desc); + } + if (m_requestedFormat == TextureFormat::D24S8 && desc.pixelFormat == MTLPixelFormatDepth32Float) { @@ -1964,7 +2512,7 @@ namespace bgfx { namespace mtl if (convert) { - imageDecodeToRgba8(temp + imageDecodeToBgra8(temp , mip.m_data , mip.m_width , mip.m_height @@ -2023,12 +2571,6 @@ 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 }, - }; - 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; @@ -2051,7 +2593,38 @@ namespace bgfx { namespace mtl data = temp; } - m_ptr.replaceRegion(region, _mip, _side, data, srcpitch, srcpitch * _rect.m_height); + if ( NULL != s_renderMtl->m_renderCommandEncoder ) + { + s_renderMtl->sync(); + + MTLRegion region = + { + { _rect.m_x, _rect.m_y, _z }, + { _rect.m_width, _rect.m_height, _depth }, + }; + + m_ptr.replaceRegion(region, _mip, _side, data, srcpitch, srcpitch * _rect.m_height); + } + else + { + BlitCommandEncoder bce = s_renderMtl->getBlitCommandEncoder(); + + const uint32_t dstpitch = bx::strideAlign(rectpitch, 64); + + Buffer tempBuffer = s_renderMtl->m_device.newBufferWithLength(dstpitch*_rect.m_height, 0); + + const uint8_t* src = (uint8_t*)data; + uint8_t* dst = (uint8_t*)tempBuffer.contents(); + + for (uint32_t yy = 0; yy < _rect.m_height; ++yy, src += srcpitch, dst += dstpitch) + { + memcpy(dst, src, rectpitch); + } + + bce.copyFromBuffer(tempBuffer, 0, dstpitch, dstpitch * _rect.m_height, MTLSizeMake(_rect.m_width, _rect.m_height, _depth), + m_ptr, _side, _mip, MTLOriginMake(_rect.m_x, _rect.m_y, _z)); + release(tempBuffer); + } if (NULL != temp) { @@ -2059,13 +2632,23 @@ namespace bgfx { namespace mtl } } - void TextureMtl::commit(uint8_t _stage, uint32_t _flags) + void TextureMtl::commit(uint8_t _stage, bool _vertex, bool _fragment, uint32_t _flags) { - //TODO: vertex or fragment stage? - s_renderMtl->m_renderCommandEncoder.setFragmentTexture(m_ptr, _stage); - s_renderMtl->m_renderCommandEncoder.setFragmentSamplerState(0 == (BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER & _flags) - ? s_renderMtl->getSamplerState(_flags) - : m_sampler, _stage); + if (_vertex) + { + s_renderMtl->m_renderCommandEncoder.setVertexTexture(m_ptr, _stage); + s_renderMtl->m_renderCommandEncoder.setVertexSamplerState(0 == (BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER & _flags) + ? s_renderMtl->getSamplerState(_flags) + : m_sampler, _stage); + } + + if (_fragment) + { + s_renderMtl->m_renderCommandEncoder.setFragmentTexture(m_ptr, _stage); + s_renderMtl->m_renderCommandEncoder.setFragmentSamplerState(0 == (BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER & _flags) + ? s_renderMtl->getSamplerState(_flags) + : m_sampler, _stage); + } } void FrameBufferMtl::create(uint8_t _num, const Attachment* _attachment) @@ -2078,7 +2661,6 @@ namespace bgfx { namespace mtl { const TextureMtl& texture = s_renderMtl->m_textures[handle.idx]; - //TODO: separate stencil buffer? or just use packed depth/stencil (which is not available on iOS8) if (isDepth( (TextureFormat::Enum)texture.m_textureFormat) ) { m_depthHandle = handle; @@ -2100,9 +2682,18 @@ namespace bgfx { namespace mtl const TextureMtl& texture = s_renderMtl->m_textures[m_colorHandle[ii].idx]; murmur.add((uint32_t)texture.m_ptr.pixelFormat()); } - const TextureMtl& depthTexture = s_renderMtl->m_textures[m_depthHandle.idx]; - murmur.add((uint32_t)depthTexture.m_ptr.pixelFormat()); - murmur.add((uint32_t)MTLPixelFormatInvalid); //stencil + if (!isValid(m_depthHandle)) + { + murmur.add((uint32_t)MTLPixelFormatInvalid); + murmur.add((uint32_t)MTLPixelFormatInvalid); + } + else + { + const TextureMtl& depthTexture = s_renderMtl->m_textures[m_depthHandle.idx]; + murmur.add((uint32_t)depthTexture.m_ptr.pixelFormat()); + murmur.add((uint32_t)(NULL != depthTexture.m_ptrStencil ? depthTexture.m_ptrStencil.pixelFormat() : MTLPixelFormatInvalid)); + } + murmur.add(1); //SampleCount m_pixelFormatHash = murmur.end(); } @@ -2131,6 +2722,51 @@ namespace bgfx { namespace mtl return denseIdx; } + void TimerQueryMtl::init() + { + m_frequency = bx::getHPFrequency(); + } + + void TimerQueryMtl::shutdown() + { + } + + static void setTimestamp(void* _data) + { + *((int64_t*)_data) = bx::getHPCounter(); + } + + void TimerQueryMtl::addHandlers(CommandBuffer& _commandBuffer) + { + while (0 == m_control.reserve(1) ) + { + m_control.consume(1); + } + + uint32_t offset = m_control.m_current * 2 + 0; + + _commandBuffer.addScheduledHandler(setTimestamp, &m_result[offset]); + _commandBuffer.addCompletedHandler(setTimestamp, &m_result[offset+1]); + m_control.commit(1); + } + + bool TimerQueryMtl::get() + { + if (0 != m_control.available() ) + { + uint32_t offset = m_control.m_read * 2; + m_begin = m_result[offset+0]; + m_end = m_result[offset+1]; + m_elapsed = m_end - m_begin; + + m_control.consume(1); + + return true; + } + + return false; + } + void OcclusionQueryMTL::postReset() { MTL_RELEASE(m_buffer); @@ -2177,42 +2813,82 @@ namespace bgfx { namespace mtl void RendererContextMtl::submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) BX_OVERRIDE { - m_commandBuffer = m_commandQueue.commandBuffer(); - retain(m_commandBuffer); // keep alive to be useable at 'flip' + m_framesSemaphore.wait(); - //TODO: multithreading with multiple commandbuffer - // is there a FAST way to tell which view is active? - - //TODO: acquire CAMetalDrawable just before we really need it. When we are using an encoder with target metalLayer's texture - m_drawable = m_metalLayer.nextDrawable; -// retain(m_drawable); // keep alive to be useable at 'flip' - - m_uniformBuffer = m_uniformBuffers[m_uniformBufferIndex]; - m_uniformBufferIndex = (m_uniformBufferIndex + 1) % UNIFORM_BUFFER_COUNT; - m_uniformBufferVertexOffset = 0; - m_uniformBufferFragmentOffset = 0; - - updateResolution(_render->m_resolution); + if ( m_commandBuffer == NULL ) + { + m_commandBuffer = m_commandQueue.commandBuffer(); + retain(m_commandBuffer); // keep alive to be useable at 'flip' + } int64_t elapsed = -bx::getHPCounter(); int64_t captureElapsed = 0; - if (_render->m_debug & (BGFX_DEBUG_IFH|BGFX_DEBUG_STATS) ) + m_gpuTimer.addHandlers(m_commandBuffer); + + if ( m_blitCommandEncoder ) { - //TODO - //m_gpuTimer.begin(); + m_blitCommandEncoder.endEncoding(); + m_blitCommandEncoder = 0; } + updateResolution(_render->m_resolution); + + if ( m_saveScreenshot || NULL != m_capture ) + { + if ( m_screenshotTarget ) + { + if ( m_screenshotTarget.width() != m_resolution.m_width || + m_screenshotTarget.height() != m_resolution.m_height ) + { + MTL_RELEASE(m_screenshotTarget); + } + } + + if ( NULL == m_screenshotTarget) + { + m_textureDescriptor.textureType = MTLTextureType2D; + m_textureDescriptor.pixelFormat = m_metalLayer.pixelFormat; + m_textureDescriptor.width = m_resolution.m_width; + m_textureDescriptor.height = m_resolution.m_height; + m_textureDescriptor.depth = 1; + m_textureDescriptor.mipmapLevelCount = 1; + m_textureDescriptor.sampleCount = 1; + m_textureDescriptor.arrayLength = 1; + if ( m_iOS9Runtime || m_macOS11Runtime ) + { + m_textureDescriptor.cpuCacheMode = MTLCPUCacheModeDefaultCache; + m_textureDescriptor.storageMode = (MTLStorageMode)(((BX_ENABLED(BX_PLATFORM_IOS)) ? 0 /* MTLStorageModeShared */ : 1 /*MTLStorageModeManaged*/) + ); + m_textureDescriptor.usage = MTLTextureUsageRenderTarget | MTLTextureUsageShaderRead; + } + + m_screenshotTarget = m_device.newTextureWithDescriptor(m_textureDescriptor); + } + m_saveScreenshot = false; + } + else + { + MTL_RELEASE(m_screenshotTarget); + } + + m_uniformBuffer = m_uniformBuffers[m_bufferIndex]; + m_bufferIndex = (m_bufferIndex + 1) % MTL_MAX_FRAMES_IN_FLIGHT; + m_uniformBufferVertexOffset = 0; + m_uniformBufferFragmentOffset = 0; + + + if (0 < _render->m_iboffset) { TransientIndexBuffer* ib = _render->m_transientIb; - m_indexBuffers[ib->handle.idx].update(0, _render->m_iboffset, ib->data); + m_indexBuffers[ib->handle.idx].update(0, _render->m_iboffset, ib->data, true); } if (0 < _render->m_vboffset) { TransientVertexBuffer* vb = _render->m_transientVb; - m_vertexBuffers[vb->handle.idx].update(0, _render->m_vboffset, vb->data); + m_vertexBuffers[vb->handle.idx].update(0, _render->m_vboffset, vb->data, true); } _render->sort(); @@ -2230,23 +2906,16 @@ namespace bgfx { namespace mtl bool wireframe = !!(_render->m_debug&BGFX_DEBUG_WIREFRAME); - //TODO: REMOVE THIS - TEMPORARY HACK - m_textureDescriptor.textureType = MTLTextureType2D; - m_textureDescriptor.pixelFormat = MTLPixelFormatRGBA8Unorm; - m_textureDescriptor.width = 4; - m_textureDescriptor.height = 4; - m_textureDescriptor.depth = 1; - m_textureDescriptor.mipmapLevelCount = 1; - m_textureDescriptor.sampleCount = 1; //TODO: set samplecount - If textureType is not MTLTextureType2DMultisample, the value must be 1. - Texture zeroTexture = m_device.newTextureWithDescriptor(m_textureDescriptor); - uint16_t programIdx = invalidHandle; SortKey key; uint16_t view = UINT16_MAX; FrameBufferHandle fbh = { BGFX_CONFIG_MAX_FRAME_BUFFERS }; - //ASK: why should we use this? It changes topology, so possible renders a big mess, doesn't it? - //const uint64_t primType = _render->m_debug&BGFX_DEBUG_WIREFRAME ? BGFX_STATE_PT_LINES : 0; + BlitKey blitKey; + blitKey.decode(_render->m_blitKeys[0]); + uint16_t numBlitItems = _render->m_numBlitItems; + uint16_t blitItem = 0; + const uint64_t primType = 0; uint8_t primIndex = uint8_t(primType>>BGFX_STATE_PT_SHIFT); PrimInfo prim = s_primInfo[primIndex]; @@ -2329,94 +2998,182 @@ namespace bgfx { namespace mtl viewState.m_rect.m_width /= 2; } + + for (; blitItem < numBlitItems && blitKey.m_view <= view; blitItem++) + { + if (0 != m_renderCommandEncoder) + { + m_renderCommandEncoder.endEncoding(); + m_renderCommandEncoder = 0; + } + m_blitCommandEncoder = getBlitCommandEncoder(); + + const BlitItem& blit = _render->m_blitItem[blitItem]; + blitKey.decode(_render->m_blitKeys[blitItem+1]); + + const TextureMtl& src = m_textures[blit.m_src.idx]; + const TextureMtl& 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); + bool readBack = !!(dst.m_flags & BGFX_TEXTURE_READ_BACK); + + if ( MTLTextureType3D == src.m_ptr.textureType()) + { + m_blitCommandEncoder.copyFromTexture(src.m_ptr, 0, 0, MTLOriginMake(blit.m_srcX, blit.m_srcY, blit.m_srcZ), MTLSizeMake(width, height, bx::uint32_imax(depth, 1)), + dst.m_ptr, 0, 0, MTLOriginMake(blit.m_dstX, blit.m_dstY, blit.m_dstZ)); + if (m_macOS11Runtime &&readBack) { + m_blitCommandEncoder.synchronizeResource(dst.m_ptr); + } + } + else + { + m_blitCommandEncoder.copyFromTexture(src.m_ptr, blit.m_srcZ, blit.m_srcMip, MTLOriginMake(blit.m_srcX, blit.m_srcY, 0), MTLSizeMake(width, height, 1), + dst.m_ptr, blit.m_dstZ, blit.m_dstMip, MTLOriginMake(blit.m_dstX, blit.m_dstY, 0)); + if (m_macOS11Runtime && readBack) { + m_blitCommandEncoder.synchronizeTexture(dst.m_ptr, 0, blit.m_dstMip); + } + } + } + + if (0 != m_blitCommandEncoder) + { + m_blitCommandEncoder.endEncoding(); + m_blitCommandEncoder = 0; + } + const Rect& scissorRect = _render->m_scissor[view]; viewHasScissor = !scissorRect.isZero(); viewScissorRect = viewHasScissor ? scissorRect : viewState.m_rect; Clear& clr = _render->m_clear[view]; - RenderPassDescriptor renderPassDescriptor = newRenderPassDescriptor(); - renderPassDescriptor.visibilityResultBuffer = m_occlusionQuery.m_buffer; - uint32_t width = getBufferWidth(); uint32_t height = getBufferHeight(); Rect viewRect = viewState.m_rect; - bool fullscreenRect = true + bool clearWithRenderPass = true && 0 == viewRect.m_x && 0 == viewRect.m_y && width == viewRect.m_width && height == viewRect.m_height ; - fbh = _render->m_fb[view]; - setFrameBuffer(renderPassDescriptor, fbh); - - RenderPassColorAttachmentDescriptor colorAttachment0 = renderPassDescriptor.colorAttachments[0]; - - if (0 != (BGFX_CLEAR_COLOR & clr.m_flags) ) + if ( NULL == m_renderCommandEncoder || fbh.idx != _render->m_fb[view].idx ) { - if (0 != (BGFX_CLEAR_COLOR_USE_PALETTE & clr.m_flags) ) + if (0 != m_renderCommandEncoder) { - uint8_t index = (uint8_t)bx::uint32_min(BGFX_CONFIG_MAX_COLOR_PALETTE-1, clr.m_index[0]); - const float* rgba = _render->m_colorPalette[index]; - const float rr = rgba[0]; - const float gg = rgba[1]; - const float bb = rgba[2]; - const float aa = rgba[3]; - colorAttachment0.clearColor = MTLClearColorMake(rr, gg, bb, aa); + m_renderCommandEncoder.endEncoding(); + } + + RenderPassDescriptor renderPassDescriptor = newRenderPassDescriptor(); + renderPassDescriptor.visibilityResultBuffer = m_occlusionQuery.m_buffer; + + fbh = _render->m_fb[view]; + setFrameBuffer(renderPassDescriptor, fbh); + + if ( clearWithRenderPass ) + { + for(uint32_t ii = 0; ii < g_caps.maxFBAttachments; ++ii) + { + MTLRenderPassColorAttachmentDescriptor* desc = renderPassDescriptor.colorAttachments[ii]; + + if ( desc.texture != NULL) + { + if (0 != (BGFX_CLEAR_COLOR & clr.m_flags) ) + { + if (0 != (BGFX_CLEAR_COLOR_USE_PALETTE & clr.m_flags) ) + { + uint8_t index = (uint8_t)bx::uint32_min(BGFX_CONFIG_MAX_COLOR_PALETTE-1, clr.m_index[ii]); + const float* rgba = _render->m_colorPalette[index]; + const float rr = rgba[0]; + const float gg = rgba[1]; + const float bb = rgba[2]; + const float aa = rgba[3]; + desc.clearColor = MTLClearColorMake(rr, gg, bb, aa); + } + else + { + float rr = clr.m_index[0]*1.0f/255.0f; + float gg = clr.m_index[1]*1.0f/255.0f; + float bb = clr.m_index[2]*1.0f/255.0f; + float aa = clr.m_index[3]*1.0f/255.0f; + desc.clearColor = MTLClearColorMake(rr, gg, bb, aa); + } + + desc.loadAction = MTLLoadActionClear; + } + else + { + desc.loadAction = MTLLoadActionLoad; + } + desc.storeAction = desc.texture.sampleCount > 1 ? MTLStoreActionMultisampleResolve : MTLStoreActionStore; + } + } + + //TODO: optimize store actions use discard flag + RenderPassDepthAttachmentDescriptor depthAttachment = renderPassDescriptor.depthAttachment; + if (NULL != depthAttachment.texture) + { + depthAttachment.clearDepth = clr.m_depth; + depthAttachment.loadAction = 0 != (BGFX_CLEAR_DEPTH & clr.m_flags) + ? MTLLoadActionClear + : MTLLoadActionLoad + ; + depthAttachment.storeAction = NULL != m_backBufferColorMSAA ? MTLStoreActionDontCare : MTLStoreActionStore; + } + + RenderPassStencilAttachmentDescriptor stencilAttachment = renderPassDescriptor.stencilAttachment; + if (NULL != stencilAttachment.texture) + { + stencilAttachment.clearStencil = clr.m_stencil; + stencilAttachment.loadAction = 0 != (BGFX_CLEAR_STENCIL & clr.m_flags) + ? MTLLoadActionClear + : MTLLoadActionLoad + ; + stencilAttachment.storeAction = NULL != m_backBufferColorMSAA ? MTLStoreActionDontCare : MTLStoreActionStore; + } } else { - float rr = clr.m_index[0]*1.0f/255.0f; - float gg = clr.m_index[1]*1.0f/255.0f; - float bb = clr.m_index[2]*1.0f/255.0f; - float aa = clr.m_index[3]*1.0f/255.0f; - colorAttachment0.clearColor = MTLClearColorMake(rr, gg, bb, aa); + for(uint32_t ii = 0; ii < g_caps.maxFBAttachments; ++ii) + { + MTLRenderPassColorAttachmentDescriptor* desc = renderPassDescriptor.colorAttachments[ii]; + if ( desc.texture != NULL) + desc.loadAction = MTLLoadActionLoad; + } + + //TODO: optimize store actions use discard flag + RenderPassDepthAttachmentDescriptor depthAttachment = renderPassDescriptor.depthAttachment; + if (NULL != depthAttachment.texture) + { + depthAttachment.loadAction = MTLLoadActionLoad; + depthAttachment.storeAction = MTLStoreActionStore; + } + + RenderPassStencilAttachmentDescriptor stencilAttachment = renderPassDescriptor.stencilAttachment; + if (NULL != stencilAttachment.texture) + { + stencilAttachment.loadAction = MTLLoadActionLoad; + stencilAttachment.storeAction = MTLStoreActionStore; + } } - colorAttachment0.loadAction = MTLLoadActionClear; + rce = m_commandBuffer.renderCommandEncoderWithDescriptor(renderPassDescriptor); + m_renderCommandEncoder = rce; + m_renderCommandEncoderFrameBufferHandle = fbh; + MTL_RELEASE(renderPassDescriptor); } else { - colorAttachment0.loadAction = MTLLoadActionLoad; + clearWithRenderPass = false; } - //TODO: optimize store actions use discard flag - RenderPassDepthAttachmentDescriptor depthAttachment = renderPassDescriptor.depthAttachment; - if (NULL != depthAttachment.texture) - { - depthAttachment.clearDepth = clr.m_depth; - depthAttachment.loadAction = 0 != (BGFX_CLEAR_DEPTH & clr.m_flags) - ? MTLLoadActionClear - : MTLLoadActionLoad - ; - depthAttachment.storeAction = MTLStoreActionStore; - } - - RenderPassStencilAttachmentDescriptor stencilAttachment = renderPassDescriptor.stencilAttachment; - if (NULL != stencilAttachment.texture) - { - stencilAttachment.clearStencil = clr.m_stencil; - stencilAttachment.loadAction = 0 != (BGFX_CLEAR_STENCIL & clr.m_flags) - ? MTLLoadActionClear - : MTLLoadActionLoad - ; - stencilAttachment.storeAction = MTLStoreActionStore; - } - - if (0 != m_renderCommandEncoder) - { - m_renderCommandEncoder.endEncoding(); - } - - rce = m_commandBuffer.renderCommandEncoderWithDescriptor(renderPassDescriptor); - m_renderCommandEncoder = rce; - MTL_RELEASE(renderPassDescriptor); - - //TODO: REMOVE THIS!!!! - // TERRIBLE HACK TO SUPPRESS DEBUG LAYER WARNING ABOUT MISSING TEXTURE/SAMPLER AT 0 in 20-nanovg - m_renderCommandEncoder.setFragmentTexture(zeroTexture, 0); - m_renderCommandEncoder.setFragmentSamplerState(getSamplerState(0), 0); - rce.setTriangleFillMode(wireframe? MTLTriangleFillModeLines : MTLTriangleFillModeFill); if (BX_ENABLED(BGFX_CONFIG_DEBUG_MTL) ) @@ -2439,7 +3196,7 @@ namespace bgfx { namespace mtl rce.setViewport(vp); if (BGFX_CLEAR_NONE != (clr.m_flags & BGFX_CLEAR_MASK) - && !fullscreenRect) + && !clearWithRenderPass) { clearQuad(_clearQuad, viewState.m_rect, clr, _render->m_colorPalette); } @@ -2527,6 +3284,9 @@ namespace bgfx { namespace mtl rc.y = scissorRect.m_y; rc.width = scissorRect.m_width; rc.height = scissorRect.m_height; + + if ( rc.width == 0 || rc.height == 0 ) + continue; } rce.setScissorRect(rc); } @@ -2541,7 +3301,6 @@ namespace bgfx { namespace mtl | BGFX_STATE_CULL_MASK | BGFX_STATE_ALPHA_REF_MASK | BGFX_STATE_PT_MASK -// | BGFX_STATE_POINT_SIZE_MASK ) & changedFlags) { if (BGFX_STATE_CULL_MASK & changedFlags) @@ -2583,7 +3342,7 @@ namespace bgfx { namespace mtl rendererUpdateUniforms(this, _render->m_uniformBuffer, draw.m_constBegin, draw.m_constEnd); if (key.m_program != programIdx - || (BGFX_STATE_BLEND_MASK|BGFX_STATE_BLEND_EQUATION_MASK|BGFX_STATE_ALPHA_WRITE|BGFX_STATE_RGB_WRITE|BGFX_STATE_BLEND_INDEPENDENT|BGFX_STATE_MSAA) & changedFlags + || (BGFX_STATE_BLEND_MASK|BGFX_STATE_BLEND_EQUATION_MASK|BGFX_STATE_ALPHA_WRITE|BGFX_STATE_RGB_WRITE|BGFX_STATE_BLEND_INDEPENDENT|BGFX_STATE_MSAA|BGFX_STATE_BLEND_ALPHA_TO_COVERAGE) & changedFlags || currentState.m_vertexBuffer.idx != draw.m_vertexBuffer.idx || currentState.m_vertexDecl.idx != draw.m_vertexDecl.idx || currentState.m_instanceDataStride != draw.m_instanceDataStride @@ -2603,12 +3362,18 @@ namespace bgfx { namespace mtl ProgramMtl& program = m_program[programIdx]; currentProgram = &program; - uint16_t handle = draw.m_vertexBuffer.idx; - const VertexBufferMtl& vb = m_vertexBuffers[handle]; - VertexDeclHandle decl; - decl.idx = !isValid(vb.m_decl) ? draw.m_vertexDecl.idx : vb.m_decl.idx; + RenderPipelineState pipelineState = NULL; + + if ( isValid(draw.m_vertexBuffer) ) + { + uint16_t handle = draw.m_vertexBuffer.idx; + const VertexBufferMtl& vb = m_vertexBuffers[handle]; + VertexDeclHandle decl; + decl.idx = !isValid(vb.m_decl) ? draw.m_vertexDecl.idx : vb.m_decl.idx; + + pipelineState = program.getRenderPipelineState(newFlags, draw.m_rgba, fbh, decl, draw.m_instanceDataStride/16); + } - RenderPipelineState pipelineState = program.getRenderPipelineState(newFlags, draw.m_rgba, fbh, decl, draw.m_instanceDataStride/16); if (NULL == pipelineState ) { //call with invalid program currentProgram = NULL; @@ -2665,6 +3430,16 @@ namespace bgfx { namespace mtl } { + uint32_t usedVertexSamplerStages = 0; + uint32_t usedFragmentSamplerStages = 0; + + if (invalidHandle != programIdx) + { + ProgramMtl& program = m_program[programIdx]; + usedVertexSamplerStages = program.m_usedVertexSamplerStages; + usedFragmentSamplerStages = program.m_usedFragmentSamplerStages; + } + for (uint8_t stage = 0; stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS; ++stage) { const Binding& sampler = draw.m_bind[stage]; @@ -2676,7 +3451,9 @@ namespace bgfx { namespace mtl if (invalidHandle != sampler.m_idx) { TextureMtl& texture = m_textures[sampler.m_idx]; - texture.commit(stage, sampler.m_un.m_draw.m_textureFlags); + texture.commit(stage, (usedVertexSamplerStages&(1<m_num) { captureElapsed = -bx::getHPCounter(); - //capture(); + capture(); + rce = m_renderCommandEncoder; //TODO: ugly, can create new encoder captureElapsed += bx::getHPCounter(); } } @@ -2814,32 +3592,45 @@ namespace bgfx { namespace mtl elapsed += now; static int64_t last = now; + + Stats& perfStats = _render->m_perfStats; + perfStats.cpuTimeBegin = last; + int64_t frameTime = now - last; last = now; static int64_t min = frameTime; static int64_t max = frameTime; - min = min > frameTime ? frameTime : min; - max = max < frameTime ? frameTime : max; + min = bx::int64_min(min, frameTime); + max = bx::int64_max(max, frameTime); + static uint32_t maxGpuLatency = 0; + static double maxGpuElapsed = 0.0f; + double elapsedGpuMs = 0.0; + + do + { + double toGpuMs = 1000.0 / double(m_gpuTimer.m_frequency); + elapsedGpuMs = m_gpuTimer.m_elapsed * toGpuMs; + maxGpuElapsed = elapsedGpuMs > maxGpuElapsed ? elapsedGpuMs : maxGpuElapsed; + } + while (m_gpuTimer.get() ); + + maxGpuLatency = bx::uint32_imax(maxGpuLatency, m_gpuTimer.m_control.available()-1); + + const int64_t timerFreq = bx::getHPFrequency(); + + perfStats.cpuTimeEnd = now; + perfStats.cpuTimerFreq = timerFreq; + perfStats.gpuTimeBegin = m_gpuTimer.m_begin; + perfStats.gpuTimeEnd = m_gpuTimer.m_end; + perfStats.gpuTimerFreq = m_gpuTimer.m_frequency; + + rce.setTriangleFillMode(MTLTriangleFillModeFill); if (_render->m_debug & (BGFX_DEBUG_IFH|BGFX_DEBUG_STATS) ) { rce.pushDebugGroup("debugstats"); - static uint32_t maxGpuLatency = 0; - static double maxGpuElapsed = 0.0f; -// double elapsedGpuMs = 0.0; - -// m_gpuTimer.end(); -// -// while (m_gpuTimer.get() ) -// { -// double toGpuMs = 1000.0 / double(m_gpuTimer.m_frequency); -// elapsedGpuMs = m_gpuTimer.m_elapsed * toGpuMs; -// maxGpuElapsed = elapsedGpuMs > maxGpuElapsed ? elapsedGpuMs : maxGpuElapsed; -// } -// maxGpuLatency = bx::uint32_imax(maxGpuLatency, m_gpuTimer.m_control.available()-1); - TextVideoMem& tvm = m_textVideoMem; static int64_t next = now; @@ -2916,6 +3707,7 @@ namespace bgfx { namespace mtl } blit(this, _textVideoMemBlitter, tvm); + rce = m_renderCommandEncoder; //TODO: ugly, blit can create encoder rce.popDebugGroup(); } @@ -2924,15 +3716,35 @@ namespace bgfx { namespace mtl rce.pushDebugGroup("debugtext"); blit(this, _textVideoMemBlitter, _render->m_textVideoMem); + rce = m_renderCommandEncoder; //TODO: ugly, blit can create encoder rce.popDebugGroup(); } - //TODO: REMOVE THIS - TEMPORARY HACK - release(zeroTexture); - rce.endEncoding(); m_renderCommandEncoder = 0; + m_renderCommandEncoderFrameBufferHandle.idx = invalidHandle; + + + if ( m_screenshotTarget ) + { + RenderPassDescriptor renderPassDescriptor = newRenderPassDescriptor(); + renderPassDescriptor.colorAttachments[0].texture = currentDrawable().texture; + renderPassDescriptor.colorAttachments[0].storeAction = MTLStoreActionStore; + + rce = m_commandBuffer.renderCommandEncoderWithDescriptor(renderPassDescriptor); + + rce.setCullMode(MTLCullModeNone); + + rce.setRenderPipelineState(m_screenshotBlitRenderPipelineState); + + rce.setFragmentSamplerState(getSamplerState(BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_MIN_POINT|BGFX_TEXTURE_MAG_POINT|BGFX_TEXTURE_MIP_POINT), 0); + rce.setFragmentTexture(m_screenshotTarget, 0); + + rce.drawPrimitives(MTLPrimitiveTypeTriangle, 0, 3, 1); + + rce.endEncoding(); + } } } /* namespace mtl */ } // namespace bgfx diff --git a/3rdparty/bgfx/src/renderer_null.cpp b/3rdparty/bgfx/src/renderer_null.cpp index 9b3de91416b..1dcd621759a 100644 --- a/3rdparty/bgfx/src/renderer_null.cpp +++ b/3rdparty/bgfx/src/renderer_null.cpp @@ -117,7 +117,7 @@ namespace bgfx { namespace noop { } - void resizeTexture(TextureHandle /*_handle*/, uint16_t /*_width*/, uint16_t /*_height*/) BX_OVERRIDE + void resizeTexture(TextureHandle /*_handle*/, uint16_t /*_width*/, uint16_t /*_height*/, uint8_t /*_numMips*/) BX_OVERRIDE { } diff --git a/3rdparty/bgfx/src/topology.cpp b/3rdparty/bgfx/src/topology.cpp index 767e4995772..da4609711f6 100644 --- a/3rdparty/bgfx/src/topology.cpp +++ b/3rdparty/bgfx/src/topology.cpp @@ -3,9 +3,11 @@ * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ -#include #include +#include +#include #include +#include #include "config.h" #include "topology.h" @@ -165,7 +167,15 @@ namespace bgfx return uint32_t(dst - (IndexT*)_dst); } - uint32_t topologyConvert(TopologyConvert::Enum _conversion, void* _dst, uint32_t _dstSize, const void* _indices, uint32_t _numIndices, bool _index32, bx::AllocatorI* _allocator) + uint32_t topologyConvert( + TopologyConvert::Enum _conversion + , void* _dst + , uint32_t _dstSize + , const void* _indices + , uint32_t _numIndices + , bool _index32 + , bx::AllocatorI* _allocator + ) { switch (_conversion) { @@ -213,4 +223,187 @@ namespace bgfx return 0; } + inline uint32_t floatFlip(uint32_t _value) + { + using namespace bx; + const uint32_t tmp0 = uint32_sra(_value, 31); + const uint32_t tmp1 = uint32_neg(tmp0); + const uint32_t mask = uint32_or(tmp1, 0x80000000); + const uint32_t result = uint32_xor(_value, mask); + return result; + } + + inline float favg3(float _a, float _b, float _c) + { + return (_a + _b + _c) * 1.0f/3.0f; + } + + const float* vertexPos(const void* _vertices, uint32_t _stride, uint32_t _index) + { + const uint8_t* vertices = (const uint8_t*)_vertices; + return (const float*)&vertices[_index*_stride]; + } + + inline float distanceDir(const float* __restrict _dir, const void* __restrict _vertices, uint32_t _stride, uint32_t _index) + { + return bx::vec3Dot(vertexPos(_vertices, _stride, _index), _dir); + } + + inline float distancePos(const float* __restrict _pos, const void* __restrict _vertices, uint32_t _stride, uint32_t _index) + { + float tmp[3]; + bx::vec3Sub(tmp, _pos, vertexPos(_vertices, _stride, _index) ); + return bx::fsqrt(bx::vec3Dot(tmp, tmp) ); + } + + typedef float (*KeyFn)(float, float, float); + typedef float (*DistanceFn)(const float*, const void*, uint32_t, uint32_t); + + template + inline void calcSortKeys( + uint32_t* __restrict _keys + , uint32_t* __restrict _values + , const float _dirOrPos[3] + , const void* __restrict _vertices + , uint32_t _stride + , const IndexT* _indices + , uint32_t _num + ) + { + for (uint32_t ii = 0; ii < _num; ++ii) + { + const uint32_t idx0 = _indices[0]; + const uint32_t idx1 = _indices[1]; + const uint32_t idx2 = _indices[2]; + _indices += 3; + + float distance0 = dfn(_dirOrPos, _vertices, _stride, idx0); + float distance1 = dfn(_dirOrPos, _vertices, _stride, idx1); + float distance2 = dfn(_dirOrPos, _vertices, _stride, idx2); + + union { float fl; uint32_t ui; } un; + un.fl = kfn(distance0, distance1, distance2); + + _keys[ii] = floatFlip(un.ui) ^ xorBits; + _values[ii] = ii; + } + } + + template + void topologySortTriList( + TopologySort::Enum _sort + , IndexT* _dst + , uint32_t* _keys + , uint32_t* _values + , uint32_t* _tempKeys + , uint32_t* _tempValues + , uint32_t _num + , const float _dir[3] + , const float _pos[3] + , const void* _vertices + , uint32_t _stride + , const IndexT* _indices + ) + { + using namespace bx; + + switch (_sort) + { + default: + case TopologySort::DirectionFrontToBackMin: calcSortKeys(_keys, _values, _dir, _vertices, _stride, _indices, _num); break; + case TopologySort::DirectionFrontToBackAvg: calcSortKeys(_keys, _values, _dir, _vertices, _stride, _indices, _num); break; + case TopologySort::DirectionFrontToBackMax: calcSortKeys(_keys, _values, _dir, _vertices, _stride, _indices, _num); break; + case TopologySort::DirectionBackToFrontMin: calcSortKeys(_keys, _values, _dir, _vertices, _stride, _indices, _num); break; + case TopologySort::DirectionBackToFrontAvg: calcSortKeys(_keys, _values, _dir, _vertices, _stride, _indices, _num); break; + case TopologySort::DirectionBackToFrontMax: calcSortKeys(_keys, _values, _dir, _vertices, _stride, _indices, _num); break; + case TopologySort::DistanceFrontToBackMin: calcSortKeys(_keys, _values, _pos, _vertices, _stride, _indices, _num); break; + case TopologySort::DistanceFrontToBackAvg: calcSortKeys(_keys, _values, _pos, _vertices, _stride, _indices, _num); break; + case TopologySort::DistanceFrontToBackMax: calcSortKeys(_keys, _values, _pos, _vertices, _stride, _indices, _num); break; + case TopologySort::DistanceBackToFrontMin: calcSortKeys(_keys, _values, _pos, _vertices, _stride, _indices, _num); break; + case TopologySort::DistanceBackToFrontAvg: calcSortKeys(_keys, _values, _pos, _vertices, _stride, _indices, _num); break; + case TopologySort::DistanceBackToFrontMax: calcSortKeys(_keys, _values, _pos, _vertices, _stride, _indices, _num); break; + } + + radixSort(_keys, _tempKeys, _values, _tempValues, _num); + + IndexT* sorted = _dst; + + for (uint32_t ii = 0; ii < _num; ++ii) + { + uint32_t face = _values[ii]*3; + const IndexT idx0 = _indices[face+0]; + const IndexT idx1 = _indices[face+1]; + const IndexT idx2 = _indices[face+2]; + + sorted[0] = idx0; + sorted[1] = idx1; + sorted[2] = idx2; + sorted += 3; + } + } + + void topologySortTriList( + TopologySort::Enum _sort + , void* _dst + , uint32_t _dstSize + , const float _dir[3] + , const float _pos[3] + , const void* _vertices + , uint32_t _stride + , const void* _indices + , uint32_t _numIndices + , bool _index32 + , bx::AllocatorI* _allocator + ) + { + uint32_t indexSize = _index32 + ? sizeof(uint32_t) + : sizeof(uint16_t) + ; + uint32_t num = bx::uint32_min(_numIndices*indexSize, _dstSize)/(indexSize*3); + uint32_t* temp = (uint32_t*)BX_ALLOC(_allocator, sizeof(uint32_t)*num*4); + + uint32_t* keys = &temp[num*0]; + uint32_t* values = &temp[num*1]; + uint32_t* tempKeys = &temp[num*2]; + uint32_t* tempValues = &temp[num*3]; + + if (_index32) + { + topologySortTriList( + _sort + , (uint32_t*)_dst + , keys + , values + , tempKeys + , tempValues + , num + , _dir + , _pos + , _vertices + , _stride + , (const uint32_t*)_indices + ); + } + else + { + topologySortTriList( + _sort + , (uint16_t*)_dst + , keys + , values + , tempKeys + , tempValues + , num + , _dir + , _pos + , _vertices + , _stride + , (const uint16_t*)_indices + ); + } + + BX_FREE(_allocator, temp); + } + } //namespace bgfx diff --git a/3rdparty/bgfx/src/topology.h b/3rdparty/bgfx/src/topology.h index 014d67559df..a0a1be588ce 100644 --- a/3rdparty/bgfx/src/topology.h +++ b/3rdparty/bgfx/src/topology.h @@ -26,7 +26,30 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_topology_convert`. /// - uint32_t topologyConvert(TopologyConvert::Enum _conversion, void* _dst, uint32_t _dstSize, const void* _indices, uint32_t _numIndices, bool _index32, bx::AllocatorI* _allocator); + uint32_t topologyConvert( + TopologyConvert::Enum _conversion + , void* _dst + , uint32_t _dstSize + , const void* _indices + , uint32_t _numIndices + , bool _index32 + , bx::AllocatorI* _allocator + ); + + /// + void topologySortTriList( + TopologySort::Enum _sort + , void* _dst + , uint32_t _dstSize + , const float _dir[3] + , const float _pos[3] + , const void* _vertices + , uint32_t _stride + , const void* _indices + , uint32_t _numIndices + , bool _index32 + , bx::AllocatorI* _allocator + ); } // namespace bgfx diff --git a/3rdparty/bgfx/tools/shaderc/shaderc.cpp b/3rdparty/bgfx/tools/shaderc/shaderc.cpp index 2376e492a1d..1b3e03900c0 100644 --- a/3rdparty/bgfx/tools/shaderc/shaderc.cpp +++ b/3rdparty/bgfx/tools/shaderc/shaderc.cpp @@ -20,15 +20,6 @@ namespace bgfx #define BGFX_CHUNK_MAGIC_FSH BX_MAKEFOURCC('F', 'S', 'H', 0x4) #define BGFX_CHUNK_MAGIC_VSH BX_MAKEFOURCC('V', 'S', 'H', 0x4) - long int fsize(FILE* _file) - { - long int pos = ftell(_file); - fseek(_file, 0L, SEEK_END); - long int size = ftell(_file); - fseek(_file, pos, SEEK_SET); - return size; - } - static const char* s_ARB_shader_texture_lod[] = { "texture2DLod", @@ -106,6 +97,13 @@ namespace bgfx NULL }; + static const char* s_texelFetch[] = + { + "texelFetch", + "texelFetchOffset", + NULL + }; + const char* s_uniformTypeName[UniformType::Count] = { "int", @@ -126,7 +124,7 @@ namespace bgfx return "nointerpolation"; } - return _glsl; // noperspective + return _glsl; // centroid, noperspective } const char* getUniformTypeName(UniformType::Enum _enum) @@ -291,14 +289,23 @@ namespace bgfx File(const char* _filePath) : m_data(NULL) { - FILE* file = fopen(_filePath, "r"); - if (NULL != file) + bx::CrtFileReader reader; + if (bx::open(&reader, _filePath) ) { - m_size = fsize(file); + m_size = (uint32_t)bx::getSize(&reader); m_data = new char[m_size+1]; - m_size = (uint32_t)fread(m_data, 1, m_size, file); + m_size = (uint32_t)bx::read(&reader, m_data, m_size); + bx::close(&reader); + + if (m_data[0] == '\xef' + && m_data[1] == '\xbb' + && m_data[2] == '\xbf') + { + memmove(m_data, &m_data[3], m_size-3); + m_size -= 3; + } + m_data[m_size] = '\0'; - fclose(file); } } @@ -322,11 +329,12 @@ namespace bgfx uint32_t m_size; }; - void strInsert(char* _str, const char* _insert) + char* strInsert(char* _str, const char* _insert) { size_t len = strlen(_insert); memmove(&_str[len], _str, strlen(_str) ); memcpy(_str, _insert, len); + return _str + len; } void strReplace(char* _str, const char* _find, const char* _replace) @@ -946,8 +954,8 @@ namespace bgfx bool compiled = false; - FILE* file = fopen(filePath, "r"); - if (NULL == file) + bx::CrtFileReader reader; + if (!bx::open(&reader, filePath) ) { fprintf(stderr, "Unable to open file '%s'.\n", filePath); } @@ -995,7 +1003,8 @@ namespace bgfx if (0 == strncmp(typen, "flat", 4) || 0 == strncmp(typen, "smooth", 6) - || 0 == strncmp(typen, "noperspective", 13) ) + || 0 == strncmp(typen, "noperspective", 13) + || 0 == strncmp(typen, "centroid", 8) ) { interpolation = typen; typen = parse = bx::strws(bx::strword(parse) ); @@ -1056,15 +1065,24 @@ namespace bgfx char* data; char* input; { - const size_t padding = 1024; - uint32_t size = (uint32_t)fsize(file); + const size_t padding = 4096; + uint32_t size = (uint32_t)bx::getSize(&reader); data = new char[size+padding+1]; - size = (uint32_t)fread(data, 1, size, file); + size = (uint32_t)bx::read(&reader, data, size); + + if (data[0] == '\xef' + && data[1] == '\xbb' + && data[2] == '\xbf') + { + memmove(data, &data[3], size-3); + size -= 3; + } + // Compiler generates "error X3000: syntax error: unexpected end of file" // if input doesn't have empty line at EOF. data[size] = '\n'; memset(&data[size+1], 0, padding); - fclose(file); + bx::close(&reader); if (!raw) { @@ -1360,16 +1378,6 @@ namespace bgfx || 0 != essl || 0 != metal) { - if (120 == glsl - || 0 != essl) - { - preprocessor.writef( - "#define ivec2 vec2\n" - "#define ivec3 vec3\n" - "#define ivec4 vec4\n" - ); - } - if (0 == essl) { // bgfx shadow2D/Proj behave like EXT_shadow_samplers @@ -1447,9 +1455,10 @@ namespace bgfx if (hlsl < 4) { preprocessor.writef( + "#define centroid\n" "#define flat\n" - "#define smooth\n" "#define noperspective\n" + "#define smooth\n" ); } @@ -1457,12 +1466,13 @@ namespace bgfx if ('f' == shaderType) { - const char* brace = strstr(entry, "{"); - if (NULL != brace) + const char* insert = strstr(entry, "{"); + if (NULL != insert) { - strInsert(const_cast(brace+1), "\nvec4 bgfx_VoidFrag;\n"); + insert = strInsert(const_cast(insert+1), "\nvec4 bgfx_VoidFrag = vec4_splat(0.0);\n"); } + const bool hasFragColor = NULL != strstr(input, "gl_FragColor"); const bool hasFragCoord = NULL != strstr(input, "gl_FragCoord") || hlsl > 3 || hlsl == 2; const bool hasFragDepth = NULL != strstr(input, "gl_FragDepth"); const bool hasFrontFacing = NULL != strstr(input, "gl_FrontFacing"); @@ -1483,6 +1493,18 @@ namespace bgfx // GL errors when both gl_FragColor and gl_FragData is used. // This will trigger the same error with HLSL compiler too. preprocessor.writef("#define gl_FragColor gl_FragData_0_\n"); + + // If it has gl_FragData or gl_FragColor, color target at + // index 0 exists, otherwise shader is not modifying color + // targets. + hasFragData[0] |= hasFragColor || d3d < 11; + + if (NULL != insert + && d3d < 11 + && !hasFragColor) + { + insert = strInsert(const_cast(insert+1), "\ngl_FragColor = bgfx_VoidFrag;\n"); + } } preprocessor.writef("#define void_main()"); @@ -1512,11 +1534,9 @@ namespace bgfx } } - addFragData(preprocessor, input, 0, arg++ > 0); - const uint32_t maxRT = d3d > 9 ? BX_COUNTOF(hasFragData) : 4; - for (uint32_t ii = 1; ii < BX_COUNTOF(hasFragData); ++ii) + for (uint32_t ii = 0; ii < BX_COUNTOF(hasFragData); ++ii) { if (ii < maxRT) { @@ -1740,16 +1760,18 @@ namespace bgfx { std::string code; - const bool hasTextureLod = NULL != bx::findIdentifierMatch(input, s_ARB_shader_texture_lod /*EXT_shader_texture_lod*/); - const bool hasShader5 = NULL != bx::findIdentifierMatch(input, s_ARB_gpu_shader5); - const bool hasShaderPacking = NULL != bx::findIdentifierMatch(input, s_ARB_shading_language_packing); - const bool hasTextureMS = NULL != bx::findIdentifierMatch(input, s_ARB_texture_multisample); + const bool usesTextureLod = !!bx::findIdentifierMatch(input, s_ARB_shader_texture_lod /*EXT_shader_texture_lod*/); + const bool usesGpuShader5 = !!bx::findIdentifierMatch(input, s_ARB_gpu_shader5); + const bool usesPacking = !!bx::findIdentifierMatch(input, s_ARB_shading_language_packing); + const bool usesTextureMS = !!bx::findIdentifierMatch(input, s_ARB_texture_multisample); + const bool usesTexelFetch = !!bx::findIdentifierMatch(input, s_texelFetch); if (0 == essl) { - const bool need130 = 120 == glsl - && bx::findIdentifierMatch(input, s_130) - ; + const bool need130 = 120 == glsl && (false + || bx::findIdentifierMatch(input, s_130) + || usesTexelFetch + ); if (0 != metal) { @@ -1760,14 +1782,23 @@ namespace bgfx bx::stringPrintf(code, "#version %s\n", need130 ? "130" : profile); } - if (hasShader5) + if (130 > glsl) + { + bx::stringPrintf(code, + "#define ivec2 vec2\n" + "#define ivec3 vec3\n" + "#define ivec4 vec4\n" + ); + } + + if (usesGpuShader5) { bx::stringPrintf(code , "#extension GL_ARB_gpu_shader5 : enable\n" ); } - if (hasShaderPacking) + if (usesPacking) { bx::stringPrintf(code , "#extension GL_ARB_shading_language_packing : enable\n" @@ -1779,7 +1810,7 @@ namespace bgfx "#define bgfxShadow2DProj shadow2DProj\n" ); - if (hasTextureLod + if (usesTextureLod && 130 > glsl) { bx::stringPrintf(code @@ -1787,7 +1818,7 @@ namespace bgfx ); } - if (hasTextureMS) + if (usesTextureMS) { bx::stringPrintf(code , "#extension GL_ARB_texture_multisample : enable\n" @@ -1796,9 +1827,15 @@ namespace bgfx } else { + bx::stringPrintf(code, + "#define ivec2 vec2\n" + "#define ivec3 vec3\n" + "#define ivec4 vec4\n" + ); + // Pretend that all extensions are available. // This will be stripped later. - if (hasTextureLod) + if (usesTextureLod) { bx::stringPrintf(code , "#extension GL_EXT_shader_texture_lod : enable\n" @@ -1830,14 +1867,14 @@ namespace bgfx ); } - if (hasShader5) + if (usesGpuShader5) { bx::stringPrintf(code , "#extension GL_ARB_gpu_shader5 : enable\n" ); } - if (hasShaderPacking) + if (usesPacking) { bx::stringPrintf(code , "#extension GL_ARB_shading_language_packing : enable\n" diff --git a/3rdparty/bgfx/tools/texturec/texturec.cpp b/3rdparty/bgfx/tools/texturec/texturec.cpp index c1c271fddbc..687ccf82fdb 100644 --- a/3rdparty/bgfx/tools/texturec/texturec.cpp +++ b/3rdparty/bgfx/tools/texturec/texturec.cpp @@ -570,10 +570,13 @@ int main(int _argc, const char* _argv[]) const bool normalMap = cmdLine.hasArg('n', "normalmap"); const bool iqa = cmdLine.hasArg('\0', "iqa"); - uint32_t size = (uint32_t)bx::getSize(&reader); - const bgfx::Memory* mem = bgfx::alloc(size); - bx::read(&reader, mem->data, mem->size); - bx::close(&reader); + const bgfx::Memory* mem; + { + uint32_t size = (uint32_t)bx::getSize(&reader); + mem = bgfx::alloc(size); + bx::read(&reader, mem->data, mem->size); + bx::close(&reader); + } { using namespace bgfx; diff --git a/3rdparty/bgfx/tools/texturev/texturev.cpp b/3rdparty/bgfx/tools/texturev/texturev.cpp index 8d866f97799..faa10220d2f 100644 --- a/3rdparty/bgfx/tools/texturev/texturev.cpp +++ b/3rdparty/bgfx/tools/texturev/texturev.cpp @@ -33,12 +33,14 @@ namespace stl = tinystl; static const char* s_supportedExt[] = { + "bmp", "dds", "jpg", "jpeg", "hdr", "ktx", "png", + "psd", "pvr", "tga", }; diff --git a/3rdparty/bx/include/bx/crtimpl.h b/3rdparty/bx/include/bx/crtimpl.h index a4820334ee3..71b9e61e1c6 100644 --- a/3rdparty/bx/include/bx/crtimpl.h +++ b/3rdparty/bx/include/bx/crtimpl.h @@ -194,10 +194,10 @@ namespace bx #if BX_CONFIG_CRT_PROCESS -#if BX_COMPILER_MSVC_COMPATIBLE +#if BX_CRT_MSVC # define popen _popen # define pclose _pclose -#endif // BX_COMPILER_MSVC_COMPATIBLE +#endif // BX_CRT_MSVC class ProcessReader : public ReaderOpenI, public CloserI, public ReaderI { diff --git a/3rdparty/bx/include/bx/float4_langext.h b/3rdparty/bx/include/bx/float4_langext.h deleted file mode 100644 index c5c3dddfa02..00000000000 --- a/3rdparty/bx/include/bx/float4_langext.h +++ /dev/null @@ -1,482 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#ifndef BX_FLOAT4_LANGEXT_H_HEADER_GUARD -#define BX_FLOAT4_LANGEXT_H_HEADER_GUARD - -#include - -namespace bx -{ - typedef union float4_t - { - float __attribute__((vector_size(16))) vf; - int32_t __attribute__((vector_size(16))) vi; - uint32_t __attribute__((vector_size(16))) vu; - float fxyzw[4]; - int32_t ixyzw[4]; - uint32_t uxyzw[4]; - - } float4_t; - -#define ELEMx 0 -#define ELEMy 1 -#define ELEMz 2 -#define ELEMw 3 -#define IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ - BX_FLOAT4_FORCE_INLINE float4_t float4_swiz_##_x##_y##_z##_w(float4_t _a) \ - { \ - float4_t result; \ - result.vf = __builtin_shufflevector(_a.vf, _a.vf, ELEM##_x, ELEM##_y, ELEM##_z, ELEM##_w); \ - return result; \ - } - -#include "float4_swizzle.inl" - -#undef IMPLEMENT_SWIZZLE -#undef ELEMw -#undef ELEMz -#undef ELEMy -#undef ELEMx - -#define IMPLEMENT_TEST(_xyzw, _mask) \ - BX_FLOAT4_FORCE_INLINE bool float4_test_any_##_xyzw(float4_t _test) \ - { \ - uint32_t tmp = ( (_test.uxyzw[3]>>31)<<3) \ - | ( (_test.uxyzw[2]>>31)<<2) \ - | ( (_test.uxyzw[1]>>31)<<1) \ - | ( _test.uxyzw[0]>>31) \ - ; \ - return 0 != (tmp&(_mask) ); \ - } \ - \ - BX_FLOAT4_FORCE_INLINE bool float4_test_all_##_xyzw(float4_t _test) \ - { \ - uint32_t tmp = ( (_test.uxyzw[3]>>31)<<3) \ - | ( (_test.uxyzw[2]>>31)<<2) \ - | ( (_test.uxyzw[1]>>31)<<1) \ - | ( _test.uxyzw[0]>>31) \ - ; \ - return (_mask) == (tmp&(_mask) ); \ - } - -IMPLEMENT_TEST(x , 0x1); -IMPLEMENT_TEST(y , 0x2); -IMPLEMENT_TEST(xy , 0x3); -IMPLEMENT_TEST(z , 0x4); -IMPLEMENT_TEST(xz , 0x5); -IMPLEMENT_TEST(yz , 0x6); -IMPLEMENT_TEST(xyz , 0x7); -IMPLEMENT_TEST(w , 0x8); -IMPLEMENT_TEST(xw , 0x9); -IMPLEMENT_TEST(yw , 0xa); -IMPLEMENT_TEST(xyw , 0xb); -IMPLEMENT_TEST(zw , 0xc); -IMPLEMENT_TEST(xzw , 0xd); -IMPLEMENT_TEST(yzw , 0xe); -IMPLEMENT_TEST(xyzw , 0xf); - -#undef IMPLEMENT_TEST - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_xyAB(float4_t _a, float4_t _b) - { - float4_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 0, 1, 4, 5); - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_ABxy(float4_t _a, float4_t _b) - { - float4_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 4, 5, 0, 1); - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_CDzw(float4_t _a, float4_t _b) - { - float4_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 5, 7, 2, 3); - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_zwCD(float4_t _a, float4_t _b) - { - float4_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 2, 3, 5, 7); - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_xAyB(float4_t _a, float4_t _b) - { - float4_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 0, 4, 1, 5); - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_yBxA(float4_t _a, float4_t _b) - { - float4_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 1, 5, 0, 4); - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_zCwD(float4_t _a, float4_t _b) - { - float4_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 2, 6, 3, 7); - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_CzDw(float4_t _a, float4_t _b) - { - float4_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 6, 2, 7, 3); - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_xAzC(float4_t _a, float4_t _b) - { - float4_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 0, 4, 2, 6); - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_yBwD(float4_t _a, float4_t _b) - { - float4_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 1, 5, 3, 7); - return result; - } - - BX_FLOAT4_FORCE_INLINE float float4_x(float4_t _a) - { - return _a.fxyzw[0]; - } - - BX_FLOAT4_FORCE_INLINE float float4_y(float4_t _a) - { - return _a.fxyzw[1]; - } - - BX_FLOAT4_FORCE_INLINE float float4_z(float4_t _a) - { - return _a.fxyzw[2]; - } - - BX_FLOAT4_FORCE_INLINE float float4_w(float4_t _a) - { - return _a.fxyzw[3]; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_ld(const void* _ptr) - { - const uint32_t* input = reinterpret_cast(_ptr); - float4_t result; - result.uxyzw[0] = input[0]; - result.uxyzw[1] = input[1]; - result.uxyzw[2] = input[2]; - result.uxyzw[3] = input[3]; - return result; - } - - BX_FLOAT4_FORCE_INLINE void float4_st(void* _ptr, float4_t _a) - { - uint32_t* result = reinterpret_cast(_ptr); - result[0] = _a.uxyzw[0]; - result[1] = _a.uxyzw[1]; - result[2] = _a.uxyzw[2]; - result[3] = _a.uxyzw[3]; - } - - BX_FLOAT4_FORCE_INLINE void float4_stx(void* _ptr, float4_t _a) - { - uint32_t* result = reinterpret_cast(_ptr); - result[0] = _a.uxyzw[0]; - } - - BX_FLOAT4_FORCE_INLINE void float4_stream(void* _ptr, float4_t _a) - { - uint32_t* result = reinterpret_cast(_ptr); - result[0] = _a.uxyzw[0]; - result[1] = _a.uxyzw[1]; - result[2] = _a.uxyzw[2]; - result[3] = _a.uxyzw[3]; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_ld(float _x, float _y, float _z, float _w) - { - float4_t result; - result.vf = { _x, _y, _z, _w }; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w) - { - float4_t result; - result.vu = { _x, _y, _z, _w }; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_splat(const void* _ptr) - { - const uint32_t val = *reinterpret_cast(_ptr); - float4_t result; - result.vu = { val, val, val, val }; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_splat(float _a) - { - return float4_ld(_a, _a, _a, _a); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_isplat(uint32_t _a) - { - return float4_ild(_a, _a, _a, _a); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_zero() - { - return float4_ild(0, 0, 0, 0); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_itof(float4_t _a) - { - float4_t result; - result.vf = __builtin_convertvector(_a.vi, float __attribute__((vector_size(16))) ); - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_ftoi(float4_t _a) - { - float4_t result; - result.vi = __builtin_convertvector(_a.vf, int32_t __attribute__((vector_size(16))) ); - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_round(float4_t _a) - { - const float4_t tmp = float4_ftoi(_a); - const float4_t result = float4_itof(tmp); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_add(float4_t _a, float4_t _b) - { - float4_t result; - result.vf = _a.vf + _b.vf; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_sub(float4_t _a, float4_t _b) - { - float4_t result; - result.vf = _a.vf - _b.vf; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_mul(float4_t _a, float4_t _b) - { - float4_t result; - result.vf = _a.vf * _b.vf; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_div(float4_t _a, float4_t _b) - { - float4_t result; - result.vf = _a.vf / _b.vf; - return result; - } - -#if 0 - BX_FLOAT4_FORCE_INLINE float4_t float4_rcp_est(float4_t _a) - { - float4_t result; - const float4_t one = float4_splat(1.0f); - result.vf = one / _a.vf; - return result; - } -#endif // 0 - - BX_FLOAT4_FORCE_INLINE float4_t float4_sqrt(float4_t _a) - { - float4_t result; - result.vf[0] = sqrtf(_a.vf[0]); - result.vf[1] = sqrtf(_a.vf[1]); - result.vf[2] = sqrtf(_a.vf[2]); - result.vf[3] = sqrtf(_a.vf[3]); - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_rsqrt_est(float4_t _a) - { - float4_t result; - result.vf[0] = 1.0f / sqrtf(_a.vf[0]); - result.vf[1] = 1.0f / sqrtf(_a.vf[1]); - result.vf[2] = 1.0f / sqrtf(_a.vf[2]); - result.vf[3] = 1.0f / sqrtf(_a.vf[3]); - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_cmpeq(float4_t _a, float4_t _b) - { - float4_t result; - result.vi = _a.vf == _b.vf; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_cmplt(float4_t _a, float4_t _b) - { - float4_t result; - result.vi = _a.vf < _b.vf; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_cmple(float4_t _a, float4_t _b) - { - float4_t result; - result.vi = _a.vf <= _b.vf; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_cmpgt(float4_t _a, float4_t _b) - { - float4_t result; - result.vi = _a.vf > _b.vf; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_cmpge(float4_t _a, float4_t _b) - { - float4_t result; - result.vi = _a.vf >= _b.vf; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_and(float4_t _a, float4_t _b) - { - float4_t result; - result.vu = _a.vu & _b.vu; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_andc(float4_t _a, float4_t _b) - { - float4_t result; - result.vu = _a.vu & ~_b.vu; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_or(float4_t _a, float4_t _b) - { - float4_t result; - result.vu = _a.vu | _b.vu; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_xor(float4_t _a, float4_t _b) - { - float4_t result; - result.vu = _a.vu ^ _b.vu; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_sll(float4_t _a, int _count) - { - float4_t result; - const float4_t count = float4_isplat(_count); - result.vu = _a.vu << count.vi; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_srl(float4_t _a, int _count) - { - float4_t result; - const float4_t count = float4_isplat(_count); - result.vu = _a.vu >> count.vi; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_sra(float4_t _a, int _count) - { - float4_t result; - const float4_t count = float4_isplat(_count); - result.vi = _a.vi >> count.vi; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_icmpeq(float4_t _a, float4_t _b) - { - float4_t result; - result.vi = _a.vi == _b.vi; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_icmplt(float4_t _a, float4_t _b) - { - float4_t result; - result.vi = _a.vi < _b.vi; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_icmpgt(float4_t _a, float4_t _b) - { - float4_t result; - result.vi = _a.vi > _b.vi; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_iadd(float4_t _a, float4_t _b) - { - float4_t result; - result.vi = _a.vi + _b.vi; - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_isub(float4_t _a, float4_t _b) - { - float4_t result; - result.vi = _a.vi - _b.vi; - return result; - } - -} // namespace bx - -#define float4_rcp float4_rcp_ni -#define float4_orx float4_orx_ni -#define float4_orc float4_orc_ni -#define float4_neg float4_neg_ni -#define float4_madd float4_madd_ni -#define float4_nmsub float4_nmsub_ni -#define float4_div_nr float4_div_nr_ni -#define float4_selb float4_selb_ni -#define float4_sels float4_sels_ni -#define float4_not float4_not_ni -#define float4_abs float4_abs_ni -#define float4_clamp float4_clamp_ni -#define float4_lerp float4_lerp_ni -#define float4_rcp_est float4_rcp_ni -#define float4_rsqrt float4_rsqrt_ni -#define float4_rsqrt_nr float4_rsqrt_nr_ni -#define float4_rsqrt_carmack float4_rsqrt_carmack_ni -#define float4_sqrt_nr float4_sqrt_nr_ni -#define float4_log2 float4_log2_ni -#define float4_exp2 float4_exp2_ni -#define float4_pow float4_pow_ni -#define float4_cross3 float4_cross3_ni -#define float4_normalize3 float4_normalize3_ni -#define float4_dot3 float4_dot3_ni -#define float4_dot float4_dot_ni -#define float4_ceil float4_ceil_ni -#define float4_floor float4_floor_ni -#define float4_min float4_min_ni -#define float4_max float4_max_ni -#define float4_imin float4_imin_ni -#define float4_imax float4_imax_ni -#include "float4_ni.h" - -#endif // BX_FLOAT4_LANGEXT_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/float4_neon.h b/3rdparty/bx/include/bx/float4_neon.h deleted file mode 100644 index 3b6fa185296..00000000000 --- a/3rdparty/bx/include/bx/float4_neon.h +++ /dev/null @@ -1,525 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#ifndef BX_FLOAT4_NEON_H_HEADER_GUARD -#define BX_FLOAT4_NEON_H_HEADER_GUARD - -namespace bx -{ - typedef __builtin_neon_sf float4_t __attribute__( (__vector_size__(16) ) ); - - typedef __builtin_neon_sf _f32x2_t __attribute__( (__vector_size__( 8) ) ); - typedef __builtin_neon_si _i32x4_t __attribute__( (__vector_size__(16) ) ); - typedef __builtin_neon_usi _u32x4_t __attribute__( (__vector_size__(16) ) ); - -#define ELEMx 0 -#define ELEMy 1 -#define ELEMz 2 -#define ELEMw 3 -#define IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ - BX_FLOAT4_FORCE_INLINE float4_t float4_swiz_##_x##_y##_z##_w(float4_t _a) \ - { \ - return __builtin_shuffle(_a, (_u32x4_t){ ELEM##_x, ELEM##_y, ELEM##_z, ELEM##_w }); \ - } - -#include "float4_swizzle.inl" - -#undef IMPLEMENT_SWIZZLE -#undef ELEMw -#undef ELEMz -#undef ELEMy -#undef ELEMx - -#define IMPLEMENT_TEST(_xyzw, _swizzle) \ - BX_FLOAT4_FORCE_INLINE bool float4_test_any_##_xyzw(float4_t _test); \ - BX_FLOAT4_FORCE_INLINE bool float4_test_all_##_xyzw(float4_t _test); - -IMPLEMENT_TEST(x , xxxx); -IMPLEMENT_TEST(y , yyyy); -IMPLEMENT_TEST(xy , xyyy); -IMPLEMENT_TEST(z , zzzz); -IMPLEMENT_TEST(xz , xzzz); -IMPLEMENT_TEST(yz , yzzz); -IMPLEMENT_TEST(xyz , xyzz); -IMPLEMENT_TEST(w , wwww); -IMPLEMENT_TEST(xw , xwww); -IMPLEMENT_TEST(yw , ywww); -IMPLEMENT_TEST(xyw , xyww); -IMPLEMENT_TEST(zw , zwww); -IMPLEMENT_TEST(xzw , xzww); -IMPLEMENT_TEST(yzw , yzww); -IMPLEMENT_TEST(xyzw , xyzw); - -#undef IMPLEMENT_TEST - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_xyAB(float4_t _a, float4_t _b) - { - return __builtin_shuffle(_a, _b, (_u32x4_t){ 0, 1, 4, 5 }); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_ABxy(float4_t _a, float4_t _b) - { - return __builtin_shuffle(_a, _b, (_u32x4_t){ 4, 5, 0, 1 }); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_CDzw(float4_t _a, float4_t _b) - { - return __builtin_shuffle(_a, _b, (_u32x4_t){ 6, 7, 2, 3 }); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_zwCD(float4_t _a, float4_t _b) - { - return __builtin_shuffle(_a, _b, (_u32x4_t){ 2, 3, 6, 7 }); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_xAyB(float4_t _a, float4_t _b) - { - return __builtin_shuffle(_a, _b, (_u32x4_t){ 0, 4, 1, 5 }); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_yBxA(float4_t _a, float4_t _b) - { - return __builtin_shuffle(_a, _b, (_u32x4_t){ 1, 5, 0, 4 }); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_zCwD(float4_t _a, float4_t _b) - { - return __builtin_shuffle(_a, _b, (_u32x4_t){ 2, 6, 3, 7 }); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_CzDw(float4_t _a, float4_t _b) - { - return __builtin_shuffle(_a, _b, (_u32x4_t){ 6, 2, 7, 3 }); - } - - BX_FLOAT4_FORCE_INLINE float float4_x(float4_t _a) - { - return __builtin_neon_vget_lanev4sf(_a, 0, 3); - } - - BX_FLOAT4_FORCE_INLINE float float4_y(float4_t _a) - { - return __builtin_neon_vget_lanev4sf(_a, 1, 3); - } - - BX_FLOAT4_FORCE_INLINE float float4_z(float4_t _a) - { - return __builtin_neon_vget_lanev4sf(_a, 2, 3); - } - - BX_FLOAT4_FORCE_INLINE float float4_w(float4_t _a) - { - return __builtin_neon_vget_lanev4sf(_a, 3, 3); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_ld(const void* _ptr) - { - return __builtin_neon_vld1v4sf( (const __builtin_neon_sf*)_ptr); - } - - BX_FLOAT4_FORCE_INLINE void float4_st(void* _ptr, float4_t _a) - { - __builtin_neon_vst1v4sf( (__builtin_neon_sf*)_ptr, _a); - } - - BX_FLOAT4_FORCE_INLINE void float4_stx(void* _ptr, float4_t _a) - { - __builtin_neon_vst1_lanev4sf( (__builtin_neon_sf*)_ptr, _a, 0); - } - - BX_FLOAT4_FORCE_INLINE void float4_stream(void* _ptr, float4_t _a) - { - __builtin_neon_vst1v4sf( (__builtin_neon_sf*)_ptr, _a); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_ld(float _x, float _y, float _z, float _w) - { - const float4_t val[4] = {_x, _y, _z, _w}; - return float4_ld(val); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w) - { - const uint32_t val[4] = {_x, _y, _z, _w}; - const _i32x4_t tmp = __builtin_neon_vld1v4si( (const __builtin_neon_si*)val); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_splat(const void* _ptr) - { - const float4_t tmp0 = __builtin_neon_vld1v4sf( (const __builtin_neon_sf *)_ptr); - const _f32x2_t tmp1 = __builtin_neon_vget_lowv4sf(tmp0); - const float4_t result = __builtin_neon_vdup_lanev4sf(tmp1, 0); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_splat(float _a) - { - return __builtin_neon_vdup_nv4sf(_a); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_isplat(uint32_t _a) - { - const _i32x4_t tmp = __builtin_neon_vdup_nv4si( (__builtin_neon_si)_a); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_zero() - { - return float4_isplat(0); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_itof(float4_t _a) - { - const _i32x4_t itof = __builtin_neon_vreinterpretv4siv4sf(_a); - const float4_t result = __builtin_neon_vcvtv4si(itof, 1); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_ftoi(float4_t _a) - { - const _i32x4_t ftoi = __builtin_neon_vcvtv4sf(_a, 1); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(ftoi); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_add(float4_t _a, float4_t _b) - { - return __builtin_neon_vaddv4sf(_a, _b, 3); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_sub(float4_t _a, float4_t _b) - { - return __builtin_neon_vsubv4sf(_a, _b, 3); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_mul(float4_t _a, float4_t _b) - { - return __builtin_neon_vmulv4sf(_a, _b, 3); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_rcp_est(float4_t _a) - { - return __builtin_neon_vrecpev4sf(_a, 3); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_rsqrt_est(float4_t _a) - { - return __builtin_neon_vrsqrtev4sf(_a, 3); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_cmpeq(float4_t _a, float4_t _b) - { - const _i32x4_t tmp = __builtin_neon_vceqv4sf(_a, _b, 3); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_cmplt(float4_t _a, float4_t _b) - { - const _i32x4_t tmp = __builtin_neon_vcgtv4sf(_b, _a, 3); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_cmple(float4_t _a, float4_t _b) - { - const _i32x4_t tmp = __builtin_neon_vcgev4sf(_b, _a, 3); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_cmpgt(float4_t _a, float4_t _b) - { - const _i32x4_t tmp = __builtin_neon_vcgtv4sf(_a, _b, 3); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_cmpge(float4_t _a, float4_t _b) - { - const _i32x4_t tmp = __builtin_neon_vcgev4sf(_a, _b, 3); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_min(float4_t _a, float4_t _b) - { - return __builtin_neon_vminv4sf(_a, _b, 3); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_max(float4_t _a, float4_t _b) - { - return __builtin_neon_vmaxv4sf(_a, _b, 3); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_and(float4_t _a, float4_t _b) - { - const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a); - const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b); - const _i32x4_t tmp2 = __builtin_neon_vandv4si(tmp0, tmp1, 0); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_andc(float4_t _a, float4_t _b) - { - const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a); - const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b); - const _i32x4_t tmp2 = __builtin_neon_vbicv4si(tmp0, tmp1, 0); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_or(float4_t _a, float4_t _b) - { - const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a); - const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b); - const _i32x4_t tmp2 = __builtin_neon_vorrv4si(tmp0, tmp1, 0); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_xor(float4_t _a, float4_t _b) - { - const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a); - const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b); - const _i32x4_t tmp2 = __builtin_neon_veorv4si(tmp0, tmp1, 0); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_sll(float4_t _a, int _count) - { - if (__builtin_constant_p(_count) ) - { - const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a); - const _i32x4_t tmp1 = __builtin_neon_vshl_nv4si(tmp0, _count, 0); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp1); - - return result; - } - - const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a); - const _i32x4_t shift = __builtin_neon_vdup_nv4si( (__builtin_neon_si)_count); - const _i32x4_t tmp1 = __builtin_neon_vshlv4si(tmp0, shift, 1); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp1); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_srl(float4_t _a, int _count) - { - if (__builtin_constant_p(_count) ) - { - const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a); - const _i32x4_t tmp1 = __builtin_neon_vshr_nv4si(tmp0, _count, 0); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp1); - - return result; - } - - const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a); - const _i32x4_t shift = __builtin_neon_vdup_nv4si( (__builtin_neon_si)-_count); - const _i32x4_t tmp1 = __builtin_neon_vshlv4si(tmp0, shift, 1); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp1); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_sra(float4_t _a, int _count) - { - if (__builtin_constant_p(_count) ) - { - const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a); - const _i32x4_t tmp1 = __builtin_neon_vshr_nv4si(tmp0, _count, 1); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp1); - - return result; - } - - const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a); - const _i32x4_t shift = __builtin_neon_vdup_nv4si( (__builtin_neon_si)-_count); - const _i32x4_t tmp1 = __builtin_neon_vshlv4si(tmp0, shift, 1); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp1); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_madd(float4_t _a, float4_t _b, float4_t _c) - { - return __builtin_neon_vmlav4sf(_c, _a, _b, 3); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_nmsub(float4_t _a, float4_t _b, float4_t _c) - { - return __builtin_neon_vmlsv4sf(_c, _a, _b, 3); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_icmpeq(float4_t _a, float4_t _b) - { - const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a); - const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b); - const _i32x4_t tmp2 = __builtin_neon_vceqv4si(tmp0, tmp1, 1); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_icmplt(float4_t _a, float4_t _b) - { - const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a); - const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b); - const _i32x4_t tmp2 = __builtin_neon_vcgtv4si(tmp1, tmp0, 1); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_icmpgt(float4_t _a, float4_t _b) - { - const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a); - const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b); - const _i32x4_t tmp2 = __builtin_neon_vcgtv4si(tmp0, tmp1, 1); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_imin(float4_t _a, float4_t _b) - { - const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a); - const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b); - const _i32x4_t tmp2 = __builtin_neon_vminv4si(tmp0, tmp1, 1); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_imax(float4_t _a, float4_t _b) - { - const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a); - const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b); - const _i32x4_t tmp2 = __builtin_neon_vmaxv4si(tmp0, tmp1, 1); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_iadd(float4_t _a, float4_t _b) - { - const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a); - const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b); - const _i32x4_t tmp2 = __builtin_neon_vaddv4si(tmp0, tmp1, 1); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_isub(float4_t _a, float4_t _b) - { - const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a); - const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b); - const _i32x4_t tmp2 = __builtin_neon_vsubv4si(tmp0, tmp1, 1); - const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2); - - return result; - } - -} // namespace bx - -#define float4_shuf_xAzC float4_shuf_xAzC_ni -#define float4_shuf_yBwD float4_shuf_yBwD_ni -#define float4_rcp float4_rcp_ni -#define float4_orx float4_orx_ni -#define float4_orc float4_orc_ni -#define float4_neg float4_neg_ni -#define float4_madd float4_madd_ni -#define float4_nmsub float4_nmsub_ni -#define float4_div_nr float4_div_nr_ni -#define float4_div float4_div_nr_ni -#define float4_selb float4_selb_ni -#define float4_sels float4_sels_ni -#define float4_not float4_not_ni -#define float4_abs float4_abs_ni -#define float4_clamp float4_clamp_ni -#define float4_lerp float4_lerp_ni -#define float4_rsqrt float4_rsqrt_ni -#define float4_rsqrt_nr float4_rsqrt_nr_ni -#define float4_rsqrt_carmack float4_rsqrt_carmack_ni -#define float4_sqrt_nr float4_sqrt_nr_ni -#define float4_sqrt float4_sqrt_nr_ni -#define float4_log2 float4_log2_ni -#define float4_exp2 float4_exp2_ni -#define float4_pow float4_pow_ni -#define float4_cross3 float4_cross3_ni -#define float4_normalize3 float4_normalize3_ni -#define float4_dot3 float4_dot3_ni -#define float4_dot float4_dot_ni -#define float4_ceil float4_ceil_ni -#define float4_floor float4_floor_ni - -#include "float4_ni.h" - -namespace bx -{ -#define IMPLEMENT_TEST(_xyzw, _swizzle) \ - BX_FLOAT4_FORCE_INLINE bool float4_test_any_##_xyzw(float4_t _test) \ - { \ - const float4_t tmp0 = float4_swiz_##_swizzle(_test); \ - return float4_test_any_ni(tmp0); \ - } \ - \ - BX_FLOAT4_FORCE_INLINE bool float4_test_all_##_xyzw(float4_t _test) \ - { \ - const float4_t tmp0 = float4_swiz_##_swizzle(_test); \ - return float4_test_all_ni(tmp0); \ - } - -IMPLEMENT_TEST(x , xxxx); -IMPLEMENT_TEST(y , yyyy); -IMPLEMENT_TEST(xy , xyyy); -IMPLEMENT_TEST(z , zzzz); -IMPLEMENT_TEST(xz , xzzz); -IMPLEMENT_TEST(yz , yzzz); -IMPLEMENT_TEST(xyz , xyzz); -IMPLEMENT_TEST(w , wwww); -IMPLEMENT_TEST(xw , xwww); -IMPLEMENT_TEST(yw , ywww); -IMPLEMENT_TEST(xyw , xyww); -IMPLEMENT_TEST(zw , zwww); -IMPLEMENT_TEST(xzw , xzww); -IMPLEMENT_TEST(yzw , yzww); - - BX_FLOAT4_FORCE_INLINE bool float4_test_any_xyzw(float4_t _test) - { - return float4_test_any_ni(_test); - } - - BX_FLOAT4_FORCE_INLINE bool float4_test_all_xyzw(float4_t _test) - { - return float4_test_all_ni(_test); - } - -#undef IMPLEMENT_TEST -} // namespace bx - -#endif // BX_FLOAT4_NEON_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/float4_ni.h b/3rdparty/bx/include/bx/float4_ni.h deleted file mode 100644 index 644fa6eb386..00000000000 --- a/3rdparty/bx/include/bx/float4_ni.h +++ /dev/null @@ -1,509 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#ifndef BX_FLOAT4_NI_H_HEADER_GUARD -#define BX_FLOAT4_NI_H_HEADER_GUARD - -namespace bx -{ - BX_FLOAT4_INLINE float4_t float4_rcp_ni(float4_t _a); - - BX_FLOAT4_INLINE float4_t float4_shuf_xAzC_ni(float4_t _a, float4_t _b) - { - const float4_t xAyB = float4_shuf_xAyB(_a, _b); - const float4_t zCwD = float4_shuf_zCwD(_a, _b); - const float4_t result = float4_shuf_xyAB(xAyB, zCwD); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_shuf_yBwD_ni(float4_t _a, float4_t _b) - { - const float4_t xAyB = float4_shuf_xAyB(_a, _b); - const float4_t zCwD = float4_shuf_zCwD(_a, _b); - const float4_t result = float4_shuf_zwCD(xAyB, zCwD); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_madd_ni(float4_t _a, float4_t _b, float4_t _c) - { - const float4_t mul = float4_mul(_a, _b); - const float4_t result = float4_add(mul, _c); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_nmsub_ni(float4_t _a, float4_t _b, float4_t _c) - { - const float4_t mul = float4_mul(_a, _b); - const float4_t result = float4_sub(_c, mul); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_div_nr_ni(float4_t _a, float4_t _b) - { - const float4_t oneish = float4_isplat(0x3f800001); - const float4_t est = float4_rcp_est(_b); - const float4_t iter0 = float4_mul(_a, est); - const float4_t tmp1 = float4_nmsub(_b, est, oneish); - const float4_t result = float4_madd(tmp1, iter0, iter0); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_rcp_ni(float4_t _a) - { - const float4_t one = float4_splat(1.0f); - const float4_t result = float4_div(one, _a); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_orx_ni(float4_t _a) - { - const float4_t zwxy = float4_swiz_zwxy(_a); - const float4_t tmp0 = float4_or(_a, zwxy); - const float4_t tmp1 = float4_swiz_yyyy(_a); - const float4_t tmp2 = float4_or(tmp0, tmp1); - const float4_t mf000 = float4_ild(UINT32_MAX, 0, 0, 0); - const float4_t result = float4_and(tmp2, mf000); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_orc_ni(float4_t _a, float4_t _b) - { - const float4_t aorb = float4_or(_a, _b); - const float4_t mffff = float4_isplat(UINT32_MAX); - const float4_t result = float4_xor(aorb, mffff); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_neg_ni(float4_t _a) - { - const float4_t zero = float4_zero(); - const float4_t result = float4_sub(zero, _a); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_selb_ni(float4_t _mask, float4_t _a, float4_t _b) - { - const float4_t sel_a = float4_and(_a, _mask); - const float4_t sel_b = float4_andc(_b, _mask); - const float4_t result = float4_or(sel_a, sel_b); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_sels_ni(float4_t _test, float4_t _a, float4_t _b) - { - const float4_t mask = float4_sra(_test, 31); - const float4_t result = float4_selb(mask, _a, _b); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_not_ni(float4_t _a) - { - const float4_t mffff = float4_isplat(UINT32_MAX); - const float4_t result = float4_xor(_a, mffff); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_min_ni(float4_t _a, float4_t _b) - { - const float4_t mask = float4_cmplt(_a, _b); - const float4_t result = float4_selb(mask, _a, _b); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_max_ni(float4_t _a, float4_t _b) - { - const float4_t mask = float4_cmpgt(_a, _b); - const float4_t result = float4_selb(mask, _a, _b); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_abs_ni(float4_t _a) - { - const float4_t a_neg = float4_neg(_a); - const float4_t result = float4_max(a_neg, _a); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_imin_ni(float4_t _a, float4_t _b) - { - const float4_t mask = float4_icmplt(_a, _b); - const float4_t result = float4_selb(mask, _a, _b); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_imax_ni(float4_t _a, float4_t _b) - { - const float4_t mask = float4_icmpgt(_a, _b); - const float4_t result = float4_selb(mask, _a, _b); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_clamp_ni(float4_t _a, float4_t _min, float4_t _max) - { - const float4_t tmp = float4_min(_a, _max); - const float4_t result = float4_max(tmp, _min); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_lerp_ni(float4_t _a, float4_t _b, float4_t _s) - { - const float4_t ba = float4_sub(_b, _a); - const float4_t result = float4_madd(_s, ba, _a); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_sqrt_nr_ni(float4_t _a) - { - const float4_t half = float4_splat(0.5f); - const float4_t one = float4_splat(1.0f); - const float4_t tmp0 = float4_rsqrt_est(_a); - const float4_t tmp1 = float4_mul(tmp0, _a); - const float4_t tmp2 = float4_mul(tmp1, half); - const float4_t tmp3 = float4_nmsub(tmp0, tmp1, one); - const float4_t result = float4_madd(tmp3, tmp2, tmp1); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_sqrt_nr1_ni(float4_t _a) - { - const float4_t half = float4_splat(0.5f); - - float4_t result = _a; - for (uint32_t ii = 0; ii < 11; ++ii) - { - const float4_t tmp1 = float4_div(_a, result); - const float4_t tmp2 = float4_add(tmp1, result); - result = float4_mul(tmp2, half); - } - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_rsqrt_ni(float4_t _a) - { - const float4_t one = float4_splat(1.0f); - const float4_t sqrt = float4_sqrt(_a); - const float4_t result = float4_div(one, sqrt); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_rsqrt_nr_ni(float4_t _a) - { - const float4_t rsqrt = float4_rsqrt_est(_a); - const float4_t iter0 = float4_mul(_a, rsqrt); - const float4_t iter1 = float4_mul(iter0, rsqrt); - const float4_t half = float4_splat(0.5f); - const float4_t half_rsqrt = float4_mul(half, rsqrt); - const float4_t three = float4_splat(3.0f); - const float4_t three_sub_iter1 = float4_sub(three, iter1); - const float4_t result = float4_mul(half_rsqrt, three_sub_iter1); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_rsqrt_carmack_ni(float4_t _a) - { - const float4_t half = float4_splat(0.5f); - const float4_t ah = float4_mul(half, _a); - const float4_t ashift = float4_sra(_a, 1); - const float4_t magic = float4_isplat(0x5f3759df); - const float4_t msuba = float4_isub(magic, ashift); - const float4_t msubasq = float4_mul(msuba, msuba); - const float4_t tmp0 = float4_splat(1.5f); - const float4_t tmp1 = float4_mul(ah, msubasq); - const float4_t tmp2 = float4_sub(tmp0, tmp1); - const float4_t result = float4_mul(msuba, tmp2); - - return result; - } - - namespace float4_logexp_detail - { - BX_FLOAT4_INLINE float4_t float4_poly1(float4_t _a, float _b, float _c) - { - const float4_t bbbb = float4_splat(_b); - const float4_t cccc = float4_splat(_c); - const float4_t result = float4_madd(cccc, _a, bbbb); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_poly2(float4_t _a, float _b, float _c, float _d) - { - const float4_t bbbb = float4_splat(_b); - const float4_t poly = float4_poly1(_a, _c, _d); - const float4_t result = float4_madd(poly, _a, bbbb); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_poly3(float4_t _a, float _b, float _c, float _d, float _e) - { - const float4_t bbbb = float4_splat(_b); - const float4_t poly = float4_poly2(_a, _c, _d, _e); - const float4_t result = float4_madd(poly, _a, bbbb); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_poly4(float4_t _a, float _b, float _c, float _d, float _e, float _f) - { - const float4_t bbbb = float4_splat(_b); - const float4_t poly = float4_poly3(_a, _c, _d, _e, _f); - const float4_t result = float4_madd(poly, _a, bbbb); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_poly5(float4_t _a, float _b, float _c, float _d, float _e, float _f, float _g) - { - const float4_t bbbb = float4_splat(_b); - const float4_t poly = float4_poly4(_a, _c, _d, _e, _f, _g); - const float4_t result = float4_madd(poly, _a, bbbb); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_logpoly(float4_t _a) - { -#if 1 - const float4_t result = float4_poly5(_a - , 3.11578814719469302614f, -3.32419399085241980044f - , 2.59883907202499966007f, -1.23152682416275988241f - , 0.318212422185251071475f, -0.0344359067839062357313f - ); -#elif 0 - const float4_t result = float4_poly4(_a - , 2.8882704548164776201f, -2.52074962577807006663f - , 1.48116647521213171641f, -0.465725644288844778798f - , 0.0596515482674574969533f - ); -#elif 0 - const float4_t result = float4_poly3(_a - , 2.61761038894603480148f, -1.75647175389045657003f - , 0.688243882994381274313f, -0.107254423828329604454f - ); -#else - const float4_t result = float4_poly2(_a - , 2.28330284476918490682f, -1.04913055217340124191f - , 0.204446009836232697516f - ); -#endif - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_exppoly(float4_t _a) - { -#if 1 - const float4_t result = float4_poly5(_a - , 9.9999994e-1f, 6.9315308e-1f - , 2.4015361e-1f, 5.5826318e-2f - , 8.9893397e-3f, 1.8775767e-3f - ); -#elif 0 - const float4_t result = float4_poly4(_a - , 1.0000026f, 6.9300383e-1f - , 2.4144275e-1f, 5.2011464e-2f - , 1.3534167e-2f - ); -#elif 0 - const float4_t result = float4_poly3(_a - , 9.9992520e-1f, 6.9583356e-1f - , 2.2606716e-1f, 7.8024521e-2f - ); -#else - const float4_t result = float4_poly2(_a - , 1.0017247f, 6.5763628e-1f - , 3.3718944e-1f - ); -#endif // 0 - - return result; - } - } // namespace float4_internal - - BX_FLOAT4_INLINE float4_t float4_log2_ni(float4_t _a) - { - const float4_t expmask = float4_isplat(0x7f800000); - const float4_t mantmask = float4_isplat(0x007fffff); - const float4_t one = float4_splat(1.0f); - - const float4_t c127 = float4_isplat(127); - const float4_t aexp = float4_and(_a, expmask); - const float4_t aexpsr = float4_srl(aexp, 23); - const float4_t tmp0 = float4_isub(aexpsr, c127); - const float4_t exp = float4_itof(tmp0); - - const float4_t amask = float4_and(_a, mantmask); - const float4_t mant = float4_or(amask, one); - - const float4_t poly = float4_logexp_detail::float4_logpoly(mant); - - const float4_t mandiff = float4_sub(mant, one); - const float4_t result = float4_madd(poly, mandiff, exp); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_exp2_ni(float4_t _a) - { - const float4_t min = float4_splat( 129.0f); - const float4_t max = float4_splat(-126.99999f); - const float4_t tmp0 = float4_min(_a, min); - const float4_t aaaa = float4_max(tmp0, max); - - const float4_t half = float4_splat(0.5f); - const float4_t tmp2 = float4_sub(aaaa, half); - const float4_t ipart = float4_ftoi(tmp2); - const float4_t iround = float4_itof(ipart); - const float4_t fpart = float4_sub(aaaa, iround); - - const float4_t c127 = float4_isplat(127); - const float4_t tmp5 = float4_iadd(ipart, c127); - const float4_t expipart = float4_sll(tmp5, 23); - - const float4_t expfpart = float4_logexp_detail::float4_exppoly(fpart); - - const float4_t result = float4_mul(expipart, expfpart); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_pow_ni(float4_t _a, float4_t _b) - { - const float4_t alog2 = float4_log2(_a); - const float4_t alog2b = float4_mul(alog2, _b); - const float4_t result = float4_exp2(alog2b); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_dot3_ni(float4_t _a, float4_t _b) - { - const float4_t xyzw = float4_mul(_a, _b); - const float4_t xxxx = float4_swiz_xxxx(xyzw); - const float4_t yyyy = float4_swiz_yyyy(xyzw); - const float4_t zzzz = float4_swiz_zzzz(xyzw); - const float4_t tmp1 = float4_add(xxxx, yyyy); - const float4_t result = float4_add(zzzz, tmp1); - return result; - } - - BX_FLOAT4_INLINE float4_t float4_cross3_ni(float4_t _a, float4_t _b) - { - // a.yzx * b.zxy - a.zxy * b.yzx == (a * b.yzx - a.yzx * b).yzx -#if 0 - const float4_t a_yzxw = float4_swiz_yzxw(_a); - const float4_t a_zxyw = float4_swiz_zxyw(_a); - const float4_t b_zxyw = float4_swiz_zxyw(_b); - const float4_t b_yzxw = float4_swiz_yzxw(_b); - const float4_t tmp = float4_mul(a_yzxw, b_zxyw); - const float4_t result = float4_nmsub(a_zxyw, b_yzxw, tmp); -#else - const float4_t a_yzxw = float4_swiz_yzxw(_a); - const float4_t b_yzxw = float4_swiz_yzxw(_b); - const float4_t tmp0 = float4_mul(_a, b_yzxw); - const float4_t tmp1 = float4_nmsub(a_yzxw, _b, tmp0); - const float4_t result = float4_swiz_yzxw(tmp1); -#endif - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_normalize3_ni(float4_t _a) - { - const float4_t dot3 = float4_dot3(_a, _a); - const float4_t invSqrt = float4_rsqrt(dot3); - const float4_t result = float4_mul(_a, invSqrt); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_dot_ni(float4_t _a, float4_t _b) - { - const float4_t xyzw = float4_mul(_a, _b); - const float4_t yzwx = float4_swiz_yzwx(xyzw); - const float4_t tmp0 = float4_add(xyzw, yzwx); - const float4_t zwxy = float4_swiz_zwxy(tmp0); - const float4_t result = float4_add(tmp0, zwxy); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_ceil_ni(float4_t _a) - { - const float4_t tmp0 = float4_ftoi(_a); - const float4_t tmp1 = float4_itof(tmp0); - const float4_t mask = float4_cmplt(tmp1, _a); - const float4_t one = float4_splat(1.0f); - const float4_t tmp2 = float4_and(one, mask); - const float4_t result = float4_add(tmp1, tmp2); - - return result; - } - - BX_FLOAT4_INLINE float4_t float4_floor_ni(float4_t _a) - { - const float4_t tmp0 = float4_ftoi(_a); - const float4_t tmp1 = float4_itof(tmp0); - const float4_t mask = float4_cmpgt(tmp1, _a); - const float4_t one = float4_splat(1.0f); - const float4_t tmp2 = float4_and(one, mask); - const float4_t result = float4_sub(tmp1, tmp2); - - return result; - } - - BX_FLOAT4_INLINE bool float4_test_any_ni(float4_t _a) - { - const float4_t mask = float4_sra(_a, 31); - const float4_t zwxy = float4_swiz_zwxy(mask); - const float4_t tmp0 = float4_or(mask, zwxy); - const float4_t tmp1 = float4_swiz_yyyy(tmp0); - const float4_t tmp2 = float4_or(tmp0, tmp1); - int res; - float4_stx(&res, tmp2); - return 0 != res; - } - - BX_FLOAT4_INLINE bool float4_test_all_ni(float4_t _a) - { - const float4_t bits = float4_sra(_a, 31); - const float4_t m1248 = float4_ild(1, 2, 4, 8); - const float4_t mask = float4_and(bits, m1248); - const float4_t zwxy = float4_swiz_zwxy(mask); - const float4_t tmp0 = float4_or(mask, zwxy); - const float4_t tmp1 = float4_swiz_yyyy(tmp0); - const float4_t tmp2 = float4_or(tmp0, tmp1); - int res; - float4_stx(&res, tmp2); - return 0xf == res; - } - -} // namespace bx - -#endif // BX_FLOAT4_NI_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/float4_sse.h b/3rdparty/bx/include/bx/float4_sse.h deleted file mode 100644 index 73272518efe..00000000000 --- a/3rdparty/bx/include/bx/float4_sse.h +++ /dev/null @@ -1,461 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#ifndef BX_FLOAT4_SSE_H_HEADER_GUARD -#define BX_FLOAT4_SSE_H_HEADER_GUARD - -#include // __m128i -#if defined(__SSE4_1__) -# include -#endif // defined(__SSE4_1__) -#include // __m128 - -namespace bx -{ - typedef __m128 float4_t; - -#define ELEMx 0 -#define ELEMy 1 -#define ELEMz 2 -#define ELEMw 3 -#define IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ - BX_FLOAT4_FORCE_INLINE float4_t float4_swiz_##_x##_y##_z##_w(float4_t _a) \ - { \ - return _mm_shuffle_ps( _a, _a, _MM_SHUFFLE(ELEM##_w, ELEM##_z, ELEM##_y, ELEM##_x ) ); \ - } - -#include "float4_swizzle.inl" - -#undef IMPLEMENT_SWIZZLE -#undef ELEMw -#undef ELEMz -#undef ELEMy -#undef ELEMx - -#define IMPLEMENT_TEST(_xyzw, _mask) \ - BX_FLOAT4_FORCE_INLINE bool float4_test_any_##_xyzw(float4_t _test) \ - { \ - return 0x0 != (_mm_movemask_ps(_test)&(_mask) ); \ - } \ - \ - BX_FLOAT4_FORCE_INLINE bool float4_test_all_##_xyzw(float4_t _test) \ - { \ - return (_mask) == (_mm_movemask_ps(_test)&(_mask) ); \ - } - -IMPLEMENT_TEST(x , 0x1); -IMPLEMENT_TEST(y , 0x2); -IMPLEMENT_TEST(xy , 0x3); -IMPLEMENT_TEST(z , 0x4); -IMPLEMENT_TEST(xz , 0x5); -IMPLEMENT_TEST(yz , 0x6); -IMPLEMENT_TEST(xyz , 0x7); -IMPLEMENT_TEST(w , 0x8); -IMPLEMENT_TEST(xw , 0x9); -IMPLEMENT_TEST(yw , 0xa); -IMPLEMENT_TEST(xyw , 0xb); -IMPLEMENT_TEST(zw , 0xc); -IMPLEMENT_TEST(xzw , 0xd); -IMPLEMENT_TEST(yzw , 0xe); -IMPLEMENT_TEST(xyzw , 0xf); - -#undef IMPLEMENT_TEST - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_xyAB(float4_t _a, float4_t _b) - { - return _mm_movelh_ps(_a, _b); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_ABxy(float4_t _a, float4_t _b) - { - return _mm_movelh_ps(_b, _a); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_CDzw(float4_t _a, float4_t _b) - { - return _mm_movehl_ps(_a, _b); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_zwCD(float4_t _a, float4_t _b) - { - return _mm_movehl_ps(_b, _a); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_xAyB(float4_t _a, float4_t _b) - { - return _mm_unpacklo_ps(_a, _b); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_yBxA(float4_t _a, float4_t _b) - { - return _mm_unpacklo_ps(_b, _a); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_zCwD(float4_t _a, float4_t _b) - { - return _mm_unpackhi_ps(_a, _b); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_CzDw(float4_t _a, float4_t _b) - { - return _mm_unpackhi_ps(_b, _a); - } - - BX_FLOAT4_FORCE_INLINE float float4_x(float4_t _a) - { - return _mm_cvtss_f32(_a); - } - - BX_FLOAT4_FORCE_INLINE float float4_y(float4_t _a) - { - const float4_t yyyy = float4_swiz_yyyy(_a); - const float result = _mm_cvtss_f32(yyyy); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float float4_z(float4_t _a) - { - const float4_t zzzz = float4_swiz_zzzz(_a); - const float result = _mm_cvtss_f32(zzzz); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float float4_w(float4_t _a) - { - const float4_t wwww = float4_swiz_wwww(_a); - const float result = _mm_cvtss_f32(wwww); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_ld(const void* _ptr) - { - return _mm_load_ps(reinterpret_cast(_ptr) ); - } - - BX_FLOAT4_FORCE_INLINE void float4_st(void* _ptr, float4_t _a) - { - _mm_store_ps(reinterpret_cast(_ptr), _a); - } - - BX_FLOAT4_FORCE_INLINE void float4_stx(void* _ptr, float4_t _a) - { - _mm_store_ss(reinterpret_cast(_ptr), _a); - } - - BX_FLOAT4_FORCE_INLINE void float4_stream(void* _ptr, float4_t _a) - { - _mm_stream_ps(reinterpret_cast(_ptr), _a); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_ld(float _x, float _y, float _z, float _w) - { - return _mm_set_ps(_w, _z, _y, _x); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w) - { - const __m128i set = _mm_set_epi32(_w, _z, _y, _x); - const float4_t result = _mm_castsi128_ps(set); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_splat(const void* _ptr) - { - const float4_t x___ = _mm_load_ss(reinterpret_cast(_ptr) ); - const float4_t result = float4_swiz_xxxx(x___); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_splat(float _a) - { - return _mm_set1_ps(_a); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_isplat(uint32_t _a) - { - const __m128i splat = _mm_set1_epi32(_a); - const float4_t result = _mm_castsi128_ps(splat); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_zero() - { - return _mm_setzero_ps(); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_itof(float4_t _a) - { - const __m128i itof = _mm_castps_si128(_a); - const float4_t result = _mm_cvtepi32_ps(itof); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_ftoi(float4_t _a) - { - const __m128i ftoi = _mm_cvtps_epi32(_a); - const float4_t result = _mm_castsi128_ps(ftoi); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_round(float4_t _a) - { -#if defined(__SSE4_1__) - return _mm_round_ps(_a, _MM_FROUND_NINT); -#else - const __m128i round = _mm_cvtps_epi32(_a); - const float4_t result = _mm_cvtepi32_ps(round); - - return result; -#endif // defined(__SSE4_1__) - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_add(float4_t _a, float4_t _b) - { - return _mm_add_ps(_a, _b); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_sub(float4_t _a, float4_t _b) - { - return _mm_sub_ps(_a, _b); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_mul(float4_t _a, float4_t _b) - { - return _mm_mul_ps(_a, _b); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_div(float4_t _a, float4_t _b) - { - return _mm_div_ps(_a, _b); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_rcp_est(float4_t _a) - { - return _mm_rcp_ps(_a); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_sqrt(float4_t _a) - { - return _mm_sqrt_ps(_a); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_rsqrt_est(float4_t _a) - { - return _mm_rsqrt_ps(_a); - } - -#if defined(__SSE4_1__) - BX_FLOAT4_FORCE_INLINE float4_t float4_dot3(float4_t _a, float4_t _b) - { - return _mm_dp_ps(_a, _b, 0x77); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_dot(float4_t _a, float4_t _b) - { - return _mm_dp_ps(_a, _b, 0xFF); - } -#endif // defined(__SSE4__) - - BX_FLOAT4_FORCE_INLINE float4_t float4_cmpeq(float4_t _a, float4_t _b) - { - return _mm_cmpeq_ps(_a, _b); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_cmplt(float4_t _a, float4_t _b) - { - return _mm_cmplt_ps(_a, _b); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_cmple(float4_t _a, float4_t _b) - { - return _mm_cmple_ps(_a, _b); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_cmpgt(float4_t _a, float4_t _b) - { - return _mm_cmpgt_ps(_a, _b); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_cmpge(float4_t _a, float4_t _b) - { - return _mm_cmpge_ps(_a, _b); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_min(float4_t _a, float4_t _b) - { - return _mm_min_ps(_a, _b); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_max(float4_t _a, float4_t _b) - { - return _mm_max_ps(_a, _b); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_and(float4_t _a, float4_t _b) - { - return _mm_and_ps(_a, _b); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_andc(float4_t _a, float4_t _b) - { - return _mm_andnot_ps(_b, _a); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_or(float4_t _a, float4_t _b) - { - return _mm_or_ps(_a, _b); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_xor(float4_t _a, float4_t _b) - { - return _mm_xor_ps(_a, _b); - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_sll(float4_t _a, int _count) - { - const __m128i a = _mm_castps_si128(_a); - const __m128i shift = _mm_slli_epi32(a, _count); - const float4_t result = _mm_castsi128_ps(shift); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_srl(float4_t _a, int _count) - { - const __m128i a = _mm_castps_si128(_a); - const __m128i shift = _mm_srli_epi32(a, _count); - const float4_t result = _mm_castsi128_ps(shift); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_sra(float4_t _a, int _count) - { - const __m128i a = _mm_castps_si128(_a); - const __m128i shift = _mm_srai_epi32(a, _count); - const float4_t result = _mm_castsi128_ps(shift); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_icmpeq(float4_t _a, float4_t _b) - { - const __m128i tmp0 = _mm_castps_si128(_a); - const __m128i tmp1 = _mm_castps_si128(_b); - const __m128i tmp2 = _mm_cmpeq_epi32(tmp0, tmp1); - const float4_t result = _mm_castsi128_ps(tmp2); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_icmplt(float4_t _a, float4_t _b) - { - const __m128i tmp0 = _mm_castps_si128(_a); - const __m128i tmp1 = _mm_castps_si128(_b); - const __m128i tmp2 = _mm_cmplt_epi32(tmp0, tmp1); - const float4_t result = _mm_castsi128_ps(tmp2); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_icmpgt(float4_t _a, float4_t _b) - { - const __m128i tmp0 = _mm_castps_si128(_a); - const __m128i tmp1 = _mm_castps_si128(_b); - const __m128i tmp2 = _mm_cmpgt_epi32(tmp0, tmp1); - const float4_t result = _mm_castsi128_ps(tmp2); - - return result; - } - -#if defined(__SSE4_1__) - BX_FLOAT4_FORCE_INLINE float4_t float4_imin(float4_t _a, float4_t _b) - { - const __m128i tmp0 = _mm_castps_si128(_a); - const __m128i tmp1 = _mm_castps_si128(_b); - const __m128i tmp2 = _mm_min_epi32(tmp0, tmp1); - const float4_t result = _mm_castsi128_ps(tmp2); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_imax(float4_t _a, float4_t _b) - { - const __m128i tmp0 = _mm_castps_si128(_a); - const __m128i tmp1 = _mm_castps_si128(_b); - const __m128i tmp2 = _mm_max_epi32(tmp0, tmp1); - const float4_t result = _mm_castsi128_ps(tmp2); - - return result; - } -#endif // defined(__SSE4_1__) - - BX_FLOAT4_FORCE_INLINE float4_t float4_iadd(float4_t _a, float4_t _b) - { - const __m128i a = _mm_castps_si128(_a); - const __m128i b = _mm_castps_si128(_b); - const __m128i add = _mm_add_epi32(a, b); - const float4_t result = _mm_castsi128_ps(add); - - return result; - } - - BX_FLOAT4_FORCE_INLINE float4_t float4_isub(float4_t _a, float4_t _b) - { - const __m128i a = _mm_castps_si128(_a); - const __m128i b = _mm_castps_si128(_b); - const __m128i sub = _mm_sub_epi32(a, b); - const float4_t result = _mm_castsi128_ps(sub); - - return result; - } - -} // namespace bx - -#define float4_shuf_xAzC float4_shuf_xAzC_ni -#define float4_shuf_yBwD float4_shuf_yBwD_ni -#define float4_rcp float4_rcp_ni -#define float4_orx float4_orx_ni -#define float4_orc float4_orc_ni -#define float4_neg float4_neg_ni -#define float4_madd float4_madd_ni -#define float4_nmsub float4_nmsub_ni -#define float4_div_nr float4_div_nr_ni -#define float4_selb float4_selb_ni -#define float4_sels float4_sels_ni -#define float4_not float4_not_ni -#define float4_abs float4_abs_ni -#define float4_clamp float4_clamp_ni -#define float4_lerp float4_lerp_ni -#define float4_rsqrt float4_rsqrt_ni -#define float4_rsqrt_nr float4_rsqrt_nr_ni -#define float4_rsqrt_carmack float4_rsqrt_carmack_ni -#define float4_sqrt_nr float4_sqrt_nr_ni -#define float4_log2 float4_log2_ni -#define float4_exp2 float4_exp2_ni -#define float4_pow float4_pow_ni -#define float4_cross3 float4_cross3_ni -#define float4_normalize3 float4_normalize3_ni -#define float4_ceil float4_ceil_ni -#define float4_floor float4_floor_ni - -#if !defined(__SSE4_1__) -# define float4_dot3 float4_dot3_ni -# define float4_dot float4_dot_ni -# define float4_imin float4_imin_ni -# define float4_imax float4_imax_ni -#endif // defined(__SSE4_1__) - -#include "float4_ni.h" - -#endif // BX_FLOAT4_SSE_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/float4_swizzle.inl b/3rdparty/bx/include/bx/float4_swizzle.inl deleted file mode 100644 index e53b8f020b2..00000000000 --- a/3rdparty/bx/include/bx/float4_swizzle.inl +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright 2010-2015 Branimir Karadzic. All rights reserved. - * License: http://www.opensource.org/licenses/BSD-2-Clause - */ - -#ifndef BX_FLOAT4_T_H_HEADER_GUARD -# error "xmacro file, must be included from float4_*.h" -#endif // BX_FLOAT4_T_H_HEADER_GUARD - -// included from float4_t.h -IMPLEMENT_SWIZZLE(x, x, x, x) -IMPLEMENT_SWIZZLE(x, x, x, y) -IMPLEMENT_SWIZZLE(x, x, x, z) -IMPLEMENT_SWIZZLE(x, x, x, w) -IMPLEMENT_SWIZZLE(x, x, y, x) -IMPLEMENT_SWIZZLE(x, x, y, y) -IMPLEMENT_SWIZZLE(x, x, y, z) -IMPLEMENT_SWIZZLE(x, x, y, w) -IMPLEMENT_SWIZZLE(x, x, z, x) -IMPLEMENT_SWIZZLE(x, x, z, y) -IMPLEMENT_SWIZZLE(x, x, z, z) -IMPLEMENT_SWIZZLE(x, x, z, w) -IMPLEMENT_SWIZZLE(x, x, w, x) -IMPLEMENT_SWIZZLE(x, x, w, y) -IMPLEMENT_SWIZZLE(x, x, w, z) -IMPLEMENT_SWIZZLE(x, x, w, w) -IMPLEMENT_SWIZZLE(x, y, x, x) -IMPLEMENT_SWIZZLE(x, y, x, y) -IMPLEMENT_SWIZZLE(x, y, x, z) -IMPLEMENT_SWIZZLE(x, y, x, w) -IMPLEMENT_SWIZZLE(x, y, y, x) -IMPLEMENT_SWIZZLE(x, y, y, y) -IMPLEMENT_SWIZZLE(x, y, y, z) -IMPLEMENT_SWIZZLE(x, y, y, w) -IMPLEMENT_SWIZZLE(x, y, z, x) -IMPLEMENT_SWIZZLE(x, y, z, y) -IMPLEMENT_SWIZZLE(x, y, z, z) -// IMPLEMENT_SWIZZLE(x, y, z, w) -IMPLEMENT_SWIZZLE(x, y, w, x) -IMPLEMENT_SWIZZLE(x, y, w, y) -IMPLEMENT_SWIZZLE(x, y, w, z) -IMPLEMENT_SWIZZLE(x, y, w, w) -IMPLEMENT_SWIZZLE(x, z, x, x) -IMPLEMENT_SWIZZLE(x, z, x, y) -IMPLEMENT_SWIZZLE(x, z, x, z) -IMPLEMENT_SWIZZLE(x, z, x, w) -IMPLEMENT_SWIZZLE(x, z, y, x) -IMPLEMENT_SWIZZLE(x, z, y, y) -IMPLEMENT_SWIZZLE(x, z, y, z) -IMPLEMENT_SWIZZLE(x, z, y, w) -IMPLEMENT_SWIZZLE(x, z, z, x) -IMPLEMENT_SWIZZLE(x, z, z, y) -IMPLEMENT_SWIZZLE(x, z, z, z) -IMPLEMENT_SWIZZLE(x, z, z, w) -IMPLEMENT_SWIZZLE(x, z, w, x) -IMPLEMENT_SWIZZLE(x, z, w, y) -IMPLEMENT_SWIZZLE(x, z, w, z) -IMPLEMENT_SWIZZLE(x, z, w, w) -IMPLEMENT_SWIZZLE(x, w, x, x) -IMPLEMENT_SWIZZLE(x, w, x, y) -IMPLEMENT_SWIZZLE(x, w, x, z) -IMPLEMENT_SWIZZLE(x, w, x, w) -IMPLEMENT_SWIZZLE(x, w, y, x) -IMPLEMENT_SWIZZLE(x, w, y, y) -IMPLEMENT_SWIZZLE(x, w, y, z) -IMPLEMENT_SWIZZLE(x, w, y, w) -IMPLEMENT_SWIZZLE(x, w, z, x) -IMPLEMENT_SWIZZLE(x, w, z, y) -IMPLEMENT_SWIZZLE(x, w, z, z) -IMPLEMENT_SWIZZLE(x, w, z, w) -IMPLEMENT_SWIZZLE(x, w, w, x) -IMPLEMENT_SWIZZLE(x, w, w, y) -IMPLEMENT_SWIZZLE(x, w, w, z) -IMPLEMENT_SWIZZLE(x, w, w, w) -IMPLEMENT_SWIZZLE(y, x, x, x) -IMPLEMENT_SWIZZLE(y, x, x, y) -IMPLEMENT_SWIZZLE(y, x, x, z) -IMPLEMENT_SWIZZLE(y, x, x, w) -IMPLEMENT_SWIZZLE(y, x, y, x) -IMPLEMENT_SWIZZLE(y, x, y, y) -IMPLEMENT_SWIZZLE(y, x, y, z) -IMPLEMENT_SWIZZLE(y, x, y, w) -IMPLEMENT_SWIZZLE(y, x, z, x) -IMPLEMENT_SWIZZLE(y, x, z, y) -IMPLEMENT_SWIZZLE(y, x, z, z) -IMPLEMENT_SWIZZLE(y, x, z, w) -IMPLEMENT_SWIZZLE(y, x, w, x) -IMPLEMENT_SWIZZLE(y, x, w, y) -IMPLEMENT_SWIZZLE(y, x, w, z) -IMPLEMENT_SWIZZLE(y, x, w, w) -IMPLEMENT_SWIZZLE(y, y, x, x) -IMPLEMENT_SWIZZLE(y, y, x, y) -IMPLEMENT_SWIZZLE(y, y, x, z) -IMPLEMENT_SWIZZLE(y, y, x, w) -IMPLEMENT_SWIZZLE(y, y, y, x) -IMPLEMENT_SWIZZLE(y, y, y, y) -IMPLEMENT_SWIZZLE(y, y, y, z) -IMPLEMENT_SWIZZLE(y, y, y, w) -IMPLEMENT_SWIZZLE(y, y, z, x) -IMPLEMENT_SWIZZLE(y, y, z, y) -IMPLEMENT_SWIZZLE(y, y, z, z) -IMPLEMENT_SWIZZLE(y, y, z, w) -IMPLEMENT_SWIZZLE(y, y, w, x) -IMPLEMENT_SWIZZLE(y, y, w, y) -IMPLEMENT_SWIZZLE(y, y, w, z) -IMPLEMENT_SWIZZLE(y, y, w, w) -IMPLEMENT_SWIZZLE(y, z, x, x) -IMPLEMENT_SWIZZLE(y, z, x, y) -IMPLEMENT_SWIZZLE(y, z, x, z) -IMPLEMENT_SWIZZLE(y, z, x, w) -IMPLEMENT_SWIZZLE(y, z, y, x) -IMPLEMENT_SWIZZLE(y, z, y, y) -IMPLEMENT_SWIZZLE(y, z, y, z) -IMPLEMENT_SWIZZLE(y, z, y, w) -IMPLEMENT_SWIZZLE(y, z, z, x) -IMPLEMENT_SWIZZLE(y, z, z, y) -IMPLEMENT_SWIZZLE(y, z, z, z) -IMPLEMENT_SWIZZLE(y, z, z, w) -IMPLEMENT_SWIZZLE(y, z, w, x) -IMPLEMENT_SWIZZLE(y, z, w, y) -IMPLEMENT_SWIZZLE(y, z, w, z) -IMPLEMENT_SWIZZLE(y, z, w, w) -IMPLEMENT_SWIZZLE(y, w, x, x) -IMPLEMENT_SWIZZLE(y, w, x, y) -IMPLEMENT_SWIZZLE(y, w, x, z) -IMPLEMENT_SWIZZLE(y, w, x, w) -IMPLEMENT_SWIZZLE(y, w, y, x) -IMPLEMENT_SWIZZLE(y, w, y, y) -IMPLEMENT_SWIZZLE(y, w, y, z) -IMPLEMENT_SWIZZLE(y, w, y, w) -IMPLEMENT_SWIZZLE(y, w, z, x) -IMPLEMENT_SWIZZLE(y, w, z, y) -IMPLEMENT_SWIZZLE(y, w, z, z) -IMPLEMENT_SWIZZLE(y, w, z, w) -IMPLEMENT_SWIZZLE(y, w, w, x) -IMPLEMENT_SWIZZLE(y, w, w, y) -IMPLEMENT_SWIZZLE(y, w, w, z) -IMPLEMENT_SWIZZLE(y, w, w, w) -IMPLEMENT_SWIZZLE(z, x, x, x) -IMPLEMENT_SWIZZLE(z, x, x, y) -IMPLEMENT_SWIZZLE(z, x, x, z) -IMPLEMENT_SWIZZLE(z, x, x, w) -IMPLEMENT_SWIZZLE(z, x, y, x) -IMPLEMENT_SWIZZLE(z, x, y, y) -IMPLEMENT_SWIZZLE(z, x, y, z) -IMPLEMENT_SWIZZLE(z, x, y, w) -IMPLEMENT_SWIZZLE(z, x, z, x) -IMPLEMENT_SWIZZLE(z, x, z, y) -IMPLEMENT_SWIZZLE(z, x, z, z) -IMPLEMENT_SWIZZLE(z, x, z, w) -IMPLEMENT_SWIZZLE(z, x, w, x) -IMPLEMENT_SWIZZLE(z, x, w, y) -IMPLEMENT_SWIZZLE(z, x, w, z) -IMPLEMENT_SWIZZLE(z, x, w, w) -IMPLEMENT_SWIZZLE(z, y, x, x) -IMPLEMENT_SWIZZLE(z, y, x, y) -IMPLEMENT_SWIZZLE(z, y, x, z) -IMPLEMENT_SWIZZLE(z, y, x, w) -IMPLEMENT_SWIZZLE(z, y, y, x) -IMPLEMENT_SWIZZLE(z, y, y, y) -IMPLEMENT_SWIZZLE(z, y, y, z) -IMPLEMENT_SWIZZLE(z, y, y, w) -IMPLEMENT_SWIZZLE(z, y, z, x) -IMPLEMENT_SWIZZLE(z, y, z, y) -IMPLEMENT_SWIZZLE(z, y, z, z) -IMPLEMENT_SWIZZLE(z, y, z, w) -IMPLEMENT_SWIZZLE(z, y, w, x) -IMPLEMENT_SWIZZLE(z, y, w, y) -IMPLEMENT_SWIZZLE(z, y, w, z) -IMPLEMENT_SWIZZLE(z, y, w, w) -IMPLEMENT_SWIZZLE(z, z, x, x) -IMPLEMENT_SWIZZLE(z, z, x, y) -IMPLEMENT_SWIZZLE(z, z, x, z) -IMPLEMENT_SWIZZLE(z, z, x, w) -IMPLEMENT_SWIZZLE(z, z, y, x) -IMPLEMENT_SWIZZLE(z, z, y, y) -IMPLEMENT_SWIZZLE(z, z, y, z) -IMPLEMENT_SWIZZLE(z, z, y, w) -IMPLEMENT_SWIZZLE(z, z, z, x) -IMPLEMENT_SWIZZLE(z, z, z, y) -IMPLEMENT_SWIZZLE(z, z, z, z) -IMPLEMENT_SWIZZLE(z, z, z, w) -IMPLEMENT_SWIZZLE(z, z, w, x) -IMPLEMENT_SWIZZLE(z, z, w, y) -IMPLEMENT_SWIZZLE(z, z, w, z) -IMPLEMENT_SWIZZLE(z, z, w, w) -IMPLEMENT_SWIZZLE(z, w, x, x) -IMPLEMENT_SWIZZLE(z, w, x, y) -IMPLEMENT_SWIZZLE(z, w, x, z) -IMPLEMENT_SWIZZLE(z, w, x, w) -IMPLEMENT_SWIZZLE(z, w, y, x) -IMPLEMENT_SWIZZLE(z, w, y, y) -IMPLEMENT_SWIZZLE(z, w, y, z) -IMPLEMENT_SWIZZLE(z, w, y, w) -IMPLEMENT_SWIZZLE(z, w, z, x) -IMPLEMENT_SWIZZLE(z, w, z, y) -IMPLEMENT_SWIZZLE(z, w, z, z) -IMPLEMENT_SWIZZLE(z, w, z, w) -IMPLEMENT_SWIZZLE(z, w, w, x) -IMPLEMENT_SWIZZLE(z, w, w, y) -IMPLEMENT_SWIZZLE(z, w, w, z) -IMPLEMENT_SWIZZLE(z, w, w, w) -IMPLEMENT_SWIZZLE(w, x, x, x) -IMPLEMENT_SWIZZLE(w, x, x, y) -IMPLEMENT_SWIZZLE(w, x, x, z) -IMPLEMENT_SWIZZLE(w, x, x, w) -IMPLEMENT_SWIZZLE(w, x, y, x) -IMPLEMENT_SWIZZLE(w, x, y, y) -IMPLEMENT_SWIZZLE(w, x, y, z) -IMPLEMENT_SWIZZLE(w, x, y, w) -IMPLEMENT_SWIZZLE(w, x, z, x) -IMPLEMENT_SWIZZLE(w, x, z, y) -IMPLEMENT_SWIZZLE(w, x, z, z) -IMPLEMENT_SWIZZLE(w, x, z, w) -IMPLEMENT_SWIZZLE(w, x, w, x) -IMPLEMENT_SWIZZLE(w, x, w, y) -IMPLEMENT_SWIZZLE(w, x, w, z) -IMPLEMENT_SWIZZLE(w, x, w, w) -IMPLEMENT_SWIZZLE(w, y, x, x) -IMPLEMENT_SWIZZLE(w, y, x, y) -IMPLEMENT_SWIZZLE(w, y, x, z) -IMPLEMENT_SWIZZLE(w, y, x, w) -IMPLEMENT_SWIZZLE(w, y, y, x) -IMPLEMENT_SWIZZLE(w, y, y, y) -IMPLEMENT_SWIZZLE(w, y, y, z) -IMPLEMENT_SWIZZLE(w, y, y, w) -IMPLEMENT_SWIZZLE(w, y, z, x) -IMPLEMENT_SWIZZLE(w, y, z, y) -IMPLEMENT_SWIZZLE(w, y, z, z) -IMPLEMENT_SWIZZLE(w, y, z, w) -IMPLEMENT_SWIZZLE(w, y, w, x) -IMPLEMENT_SWIZZLE(w, y, w, y) -IMPLEMENT_SWIZZLE(w, y, w, z) -IMPLEMENT_SWIZZLE(w, y, w, w) -IMPLEMENT_SWIZZLE(w, z, x, x) -IMPLEMENT_SWIZZLE(w, z, x, y) -IMPLEMENT_SWIZZLE(w, z, x, z) -IMPLEMENT_SWIZZLE(w, z, x, w) -IMPLEMENT_SWIZZLE(w, z, y, x) -IMPLEMENT_SWIZZLE(w, z, y, y) -IMPLEMENT_SWIZZLE(w, z, y, z) -IMPLEMENT_SWIZZLE(w, z, y, w) -IMPLEMENT_SWIZZLE(w, z, z, x) -IMPLEMENT_SWIZZLE(w, z, z, y) -IMPLEMENT_SWIZZLE(w, z, z, z) -IMPLEMENT_SWIZZLE(w, z, z, w) -IMPLEMENT_SWIZZLE(w, z, w, x) -IMPLEMENT_SWIZZLE(w, z, w, y) -IMPLEMENT_SWIZZLE(w, z, w, z) -IMPLEMENT_SWIZZLE(w, z, w, w) -IMPLEMENT_SWIZZLE(w, w, x, x) -IMPLEMENT_SWIZZLE(w, w, x, y) -IMPLEMENT_SWIZZLE(w, w, x, z) -IMPLEMENT_SWIZZLE(w, w, x, w) -IMPLEMENT_SWIZZLE(w, w, y, x) -IMPLEMENT_SWIZZLE(w, w, y, y) -IMPLEMENT_SWIZZLE(w, w, y, z) -IMPLEMENT_SWIZZLE(w, w, y, w) -IMPLEMENT_SWIZZLE(w, w, z, x) -IMPLEMENT_SWIZZLE(w, w, z, y) -IMPLEMENT_SWIZZLE(w, w, z, z) -IMPLEMENT_SWIZZLE(w, w, z, w) -IMPLEMENT_SWIZZLE(w, w, w, x) -IMPLEMENT_SWIZZLE(w, w, w, y) -IMPLEMENT_SWIZZLE(w, w, w, z) -IMPLEMENT_SWIZZLE(w, w, w, w) diff --git a/3rdparty/bx/include/bx/float4_t.h b/3rdparty/bx/include/bx/float4_t.h deleted file mode 100644 index 78fd4e8ebb5..00000000000 --- a/3rdparty/bx/include/bx/float4_t.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#ifndef BX_FLOAT4_T_H_HEADER_GUARD -#define BX_FLOAT4_T_H_HEADER_GUARD - -#include "bx.h" - -#define BX_FLOAT4_FORCE_INLINE BX_FORCE_INLINE -#define BX_FLOAT4_INLINE static inline - -#if defined(__SSE2__) || (BX_COMPILER_MSVC && (BX_ARCH_64BIT || _M_IX86_FP >= 2) ) -# include "float4_sse.h" -#elif defined(__ARM_NEON__) && !BX_COMPILER_CLANG -# include "float4_neon.h" -#elif BX_COMPILER_CLANG \ - && !BX_PLATFORM_EMSCRIPTEN \ - && !BX_PLATFORM_IOS \ - && BX_CLANG_HAS_EXTENSION(attribute_ext_vector_type) -# include "float4_langext.h" -#else -# ifndef BX_FLOAT4_WARN_REFERENCE_IMPL -# define BX_FLOAT4_WARN_REFERENCE_IMPL 0 -# endif // BX_FLOAT4_WARN_REFERENCE_IMPL - -# if BX_FLOAT4_WARN_REFERENCE_IMPL -# pragma message("************************************\nUsing SIMD reference implementation!\n************************************") -# endif // BX_FLOAT4_WARN_REFERENCE_IMPL - -# include "float4_ref.h" -#endif // - -#endif // BX_FLOAT4_T_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/float4x4_t.h b/3rdparty/bx/include/bx/float4x4_t.h index e1bc4e1ca61..269dd633d3d 100644 --- a/3rdparty/bx/include/bx/float4x4_t.h +++ b/3rdparty/bx/include/bx/float4x4_t.h @@ -6,151 +6,151 @@ #ifndef BX_FLOAT4X4_H_HEADER_GUARD #define BX_FLOAT4X4_H_HEADER_GUARD -#include "float4_t.h" +#include "simd_t.h" namespace bx { BX_ALIGN_DECL_16(struct) float4x4_t { - float4_t col[4]; + simd128_t col[4]; }; - BX_FLOAT4_FORCE_INLINE float4_t float4_mul_xyz1(float4_t _a, const float4x4_t* _b) + BX_SIMD_FORCE_INLINE simd128_t simd_mul_xyz1(simd128_t _a, const float4x4_t* _b) { - const float4_t xxxx = float4_swiz_xxxx(_a); - const float4_t yyyy = float4_swiz_yyyy(_a); - const float4_t zzzz = float4_swiz_zzzz(_a); - const float4_t col0 = float4_mul(_b->col[0], xxxx); - const float4_t col1 = float4_mul(_b->col[1], yyyy); - const float4_t col2 = float4_madd(_b->col[2], zzzz, col0); - const float4_t col3 = float4_add(_b->col[3], col1); - const float4_t result = float4_add(col2, col3); + const simd128_t xxxx = simd_swiz_xxxx(_a); + const simd128_t yyyy = simd_swiz_yyyy(_a); + const simd128_t zzzz = simd_swiz_zzzz(_a); + const simd128_t col0 = simd_mul(_b->col[0], xxxx); + const simd128_t col1 = simd_mul(_b->col[1], yyyy); + const simd128_t col2 = simd_madd(_b->col[2], zzzz, col0); + const simd128_t col3 = simd_add(_b->col[3], col1); + const simd128_t result = simd_add(col2, col3); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_mul(float4_t _a, const float4x4_t* _b) + BX_SIMD_FORCE_INLINE simd128_t simd_mul(simd128_t _a, const float4x4_t* _b) { - const float4_t xxxx = float4_swiz_xxxx(_a); - const float4_t yyyy = float4_swiz_yyyy(_a); - const float4_t zzzz = float4_swiz_zzzz(_a); - const float4_t wwww = float4_swiz_wwww(_a); - const float4_t col0 = float4_mul(_b->col[0], xxxx); - const float4_t col1 = float4_mul(_b->col[1], yyyy); - const float4_t col2 = float4_madd(_b->col[2], zzzz, col0); - const float4_t col3 = float4_madd(_b->col[3], wwww, col1); - const float4_t result = float4_add(col2, col3); + const simd128_t xxxx = simd_swiz_xxxx(_a); + const simd128_t yyyy = simd_swiz_yyyy(_a); + const simd128_t zzzz = simd_swiz_zzzz(_a); + const simd128_t wwww = simd_swiz_wwww(_a); + const simd128_t col0 = simd_mul(_b->col[0], xxxx); + const simd128_t col1 = simd_mul(_b->col[1], yyyy); + const simd128_t col2 = simd_madd(_b->col[2], zzzz, col0); + const simd128_t col3 = simd_madd(_b->col[3], wwww, col1); + const simd128_t result = simd_add(col2, col3); return result; } - BX_FLOAT4_INLINE void float4x4_mul(float4x4_t* __restrict _result, const float4x4_t* __restrict _a, const float4x4_t* __restrict _b) + BX_SIMD_INLINE void float4x4_mul(float4x4_t* __restrict _result, const float4x4_t* __restrict _a, const float4x4_t* __restrict _b) { - _result->col[0] = float4_mul(_a->col[0], _b); - _result->col[1] = float4_mul(_a->col[1], _b); - _result->col[2] = float4_mul(_a->col[2], _b); - _result->col[3] = float4_mul(_a->col[3], _b); + _result->col[0] = simd_mul(_a->col[0], _b); + _result->col[1] = simd_mul(_a->col[1], _b); + _result->col[2] = simd_mul(_a->col[2], _b); + _result->col[3] = simd_mul(_a->col[3], _b); } - BX_FLOAT4_FORCE_INLINE void float4x4_transpose(float4x4_t* __restrict _result, const float4x4_t* __restrict _mtx) + BX_SIMD_FORCE_INLINE void float4x4_transpose(float4x4_t* __restrict _result, const float4x4_t* __restrict _mtx) { - const float4_t aibj = float4_shuf_xAyB(_mtx->col[0], _mtx->col[2]); // aibj - const float4_t emfn = float4_shuf_xAyB(_mtx->col[1], _mtx->col[3]); // emfn - const float4_t ckdl = float4_shuf_zCwD(_mtx->col[0], _mtx->col[2]); // ckdl - const float4_t gohp = float4_shuf_zCwD(_mtx->col[1], _mtx->col[3]); // gohp - _result->col[0] = float4_shuf_xAyB(aibj, emfn); // aeim - _result->col[1] = float4_shuf_zCwD(aibj, emfn); // bfjn - _result->col[2] = float4_shuf_xAyB(ckdl, gohp); // cgko - _result->col[3] = float4_shuf_zCwD(ckdl, gohp); // dhlp + const simd128_t aibj = simd_shuf_xAyB(_mtx->col[0], _mtx->col[2]); // aibj + const simd128_t emfn = simd_shuf_xAyB(_mtx->col[1], _mtx->col[3]); // emfn + const simd128_t ckdl = simd_shuf_zCwD(_mtx->col[0], _mtx->col[2]); // ckdl + const simd128_t gohp = simd_shuf_zCwD(_mtx->col[1], _mtx->col[3]); // gohp + _result->col[0] = simd_shuf_xAyB(aibj, emfn); // aeim + _result->col[1] = simd_shuf_zCwD(aibj, emfn); // bfjn + _result->col[2] = simd_shuf_xAyB(ckdl, gohp); // cgko + _result->col[3] = simd_shuf_zCwD(ckdl, gohp); // dhlp } - BX_FLOAT4_INLINE void float4x4_inverse(float4x4_t* __restrict _result, const float4x4_t* __restrict _a) + BX_SIMD_INLINE void float4x4_inverse(float4x4_t* __restrict _result, const float4x4_t* __restrict _a) { - const float4_t tmp0 = float4_shuf_xAzC(_a->col[0], _a->col[1]); - const float4_t tmp1 = float4_shuf_xAzC(_a->col[2], _a->col[3]); - const float4_t tmp2 = float4_shuf_yBwD(_a->col[0], _a->col[1]); - const float4_t tmp3 = float4_shuf_yBwD(_a->col[2], _a->col[3]); - const float4_t t0 = float4_shuf_xyAB(tmp0, tmp1); - const float4_t t1 = float4_shuf_xyAB(tmp3, tmp2); - const float4_t t2 = float4_shuf_zwCD(tmp0, tmp1); - const float4_t t3 = float4_shuf_zwCD(tmp3, tmp2); + const simd128_t tmp0 = simd_shuf_xAzC(_a->col[0], _a->col[1]); + const simd128_t tmp1 = simd_shuf_xAzC(_a->col[2], _a->col[3]); + const simd128_t tmp2 = simd_shuf_yBwD(_a->col[0], _a->col[1]); + const simd128_t tmp3 = simd_shuf_yBwD(_a->col[2], _a->col[3]); + const simd128_t t0 = simd_shuf_xyAB(tmp0, tmp1); + const simd128_t t1 = simd_shuf_xyAB(tmp3, tmp2); + const simd128_t t2 = simd_shuf_zwCD(tmp0, tmp1); + const simd128_t t3 = simd_shuf_zwCD(tmp3, tmp2); - const float4_t t23 = float4_mul(t2, t3); - const float4_t t23_yxwz = float4_swiz_yxwz(t23); - const float4_t t23_wzyx = float4_swiz_wzyx(t23); + const simd128_t t23 = simd_mul(t2, t3); + const simd128_t t23_yxwz = simd_swiz_yxwz(t23); + const simd128_t t23_wzyx = simd_swiz_wzyx(t23); - float4_t cof0, cof1, cof2, cof3; + simd128_t cof0, cof1, cof2, cof3; - const float4_t zero = float4_zero(); - cof0 = float4_nmsub(t1, t23_yxwz, zero); - cof0 = float4_madd(t1, t23_wzyx, cof0); + const simd128_t zero = simd_zero(); + cof0 = simd_nmsub(t1, t23_yxwz, zero); + cof0 = simd_madd(t1, t23_wzyx, cof0); - cof1 = float4_nmsub(t0, t23_yxwz, zero); - cof1 = float4_madd(t0, t23_wzyx, cof1); - cof1 = float4_swiz_zwxy(cof1); - - const float4_t t12 = float4_mul(t1, t2); - const float4_t t12_yxwz = float4_swiz_yxwz(t12); - const float4_t t12_wzyx = float4_swiz_wzyx(t12); - - cof0 = float4_madd(t3, t12_yxwz, cof0); - cof0 = float4_nmsub(t3, t12_wzyx, cof0); + cof1 = simd_nmsub(t0, t23_yxwz, zero); + cof1 = simd_madd(t0, t23_wzyx, cof1); + cof1 = simd_swiz_zwxy(cof1); - cof3 = float4_mul(t0, t12_yxwz); - cof3 = float4_nmsub(t0, t12_wzyx, cof3); - cof3 = float4_swiz_zwxy(cof3); + const simd128_t t12 = simd_mul(t1, t2); + const simd128_t t12_yxwz = simd_swiz_yxwz(t12); + const simd128_t t12_wzyx = simd_swiz_wzyx(t12); - const float4_t t1_zwxy = float4_swiz_zwxy(t1); - const float4_t t2_zwxy = float4_swiz_zwxy(t2); + cof0 = simd_madd(t3, t12_yxwz, cof0); + cof0 = simd_nmsub(t3, t12_wzyx, cof0); - const float4_t t13 = float4_mul(t1_zwxy, t3); - const float4_t t13_yxwz = float4_swiz_yxwz(t13); - const float4_t t13_wzyx = float4_swiz_wzyx(t13); + cof3 = simd_mul(t0, t12_yxwz); + cof3 = simd_nmsub(t0, t12_wzyx, cof3); + cof3 = simd_swiz_zwxy(cof3); - cof0 = float4_madd(t2_zwxy, t13_yxwz, cof0); - cof0 = float4_nmsub(t2_zwxy, t13_wzyx, cof0); + const simd128_t t1_zwxy = simd_swiz_zwxy(t1); + const simd128_t t2_zwxy = simd_swiz_zwxy(t2); - cof2 = float4_mul(t0, t13_yxwz); - cof2 = float4_nmsub(t0, t13_wzyx, cof2); - cof2 = float4_swiz_zwxy(cof2); + const simd128_t t13 = simd_mul(t1_zwxy, t3); + const simd128_t t13_yxwz = simd_swiz_yxwz(t13); + const simd128_t t13_wzyx = simd_swiz_wzyx(t13); - const float4_t t01 = float4_mul(t0, t1); - const float4_t t01_yxwz = float4_swiz_yxwz(t01); - const float4_t t01_wzyx = float4_swiz_wzyx(t01); + cof0 = simd_madd(t2_zwxy, t13_yxwz, cof0); + cof0 = simd_nmsub(t2_zwxy, t13_wzyx, cof0); - cof2 = float4_nmsub(t3, t01_yxwz, cof2); - cof2 = float4_madd(t3, t01_wzyx, cof2); + cof2 = simd_mul(t0, t13_yxwz); + cof2 = simd_nmsub(t0, t13_wzyx, cof2); + cof2 = simd_swiz_zwxy(cof2); - cof3 = float4_madd(t2_zwxy, t01_yxwz, cof3); - cof3 = float4_nmsub(t2_zwxy, t01_wzyx, cof3); + const simd128_t t01 = simd_mul(t0, t1); + const simd128_t t01_yxwz = simd_swiz_yxwz(t01); + const simd128_t t01_wzyx = simd_swiz_wzyx(t01); - const float4_t t03 = float4_mul(t0, t3); - const float4_t t03_yxwz = float4_swiz_yxwz(t03); - const float4_t t03_wzyx = float4_swiz_wzyx(t03); + cof2 = simd_nmsub(t3, t01_yxwz, cof2); + cof2 = simd_madd(t3, t01_wzyx, cof2); - cof1 = float4_nmsub(t2_zwxy, t03_yxwz, cof1); - cof1 = float4_madd(t2_zwxy, t03_wzyx, cof1); + cof3 = simd_madd(t2_zwxy, t01_yxwz, cof3); + cof3 = simd_nmsub(t2_zwxy, t01_wzyx, cof3); - cof2 = float4_madd(t1, t03_yxwz, cof2); - cof2 = float4_nmsub(t1, t03_wzyx, cof2); + const simd128_t t03 = simd_mul(t0, t3); + const simd128_t t03_yxwz = simd_swiz_yxwz(t03); + const simd128_t t03_wzyx = simd_swiz_wzyx(t03); - const float4_t t02 = float4_mul(t0, t2_zwxy); - const float4_t t02_yxwz = float4_swiz_yxwz(t02); - const float4_t t02_wzyx = float4_swiz_wzyx(t02); + cof1 = simd_nmsub(t2_zwxy, t03_yxwz, cof1); + cof1 = simd_madd(t2_zwxy, t03_wzyx, cof1); - cof1 = float4_madd(t3, t02_yxwz, cof1); - cof1 = float4_nmsub(t3, t02_wzyx, cof1); + cof2 = simd_madd(t1, t03_yxwz, cof2); + cof2 = simd_nmsub(t1, t03_wzyx, cof2); - cof3 = float4_nmsub(t1, t02_yxwz, cof3); - cof3 = float4_madd(t1, t02_wzyx, cof3); + const simd128_t t02 = simd_mul(t0, t2_zwxy); + const simd128_t t02_yxwz = simd_swiz_yxwz(t02); + const simd128_t t02_wzyx = simd_swiz_wzyx(t02); - const float4_t det = float4_dot(t0, cof0); - const float4_t invdet = float4_rcp(det); + cof1 = simd_madd(t3, t02_yxwz, cof1); + cof1 = simd_nmsub(t3, t02_wzyx, cof1); - _result->col[0] = float4_mul(cof0, invdet); - _result->col[1] = float4_mul(cof1, invdet); - _result->col[2] = float4_mul(cof2, invdet); - _result->col[3] = float4_mul(cof3, invdet); + cof3 = simd_nmsub(t1, t02_yxwz, cof3); + cof3 = simd_madd(t1, t02_wzyx, cof3); + + const simd128_t det = simd_dot(t0, cof0); + const simd128_t invdet = simd_rcp(det); + + _result->col[0] = simd_mul(cof0, invdet); + _result->col[1] = simd_mul(cof1, invdet); + _result->col[2] = simd_mul(cof2, invdet); + _result->col[3] = simd_mul(cof3, invdet); } } // namespace bx diff --git a/3rdparty/bx/include/bx/fpumath.h b/3rdparty/bx/include/bx/fpumath.h index 5f64564f688..7d7a2671bb2 100644 --- a/3rdparty/bx/include/bx/fpumath.h +++ b/3rdparty/bx/include/bx/fpumath.h @@ -341,7 +341,7 @@ namespace bx _result[2] = 1.0f / _a[2]; } - inline void vec3TangentFrame(const float* _n, float* _t, float* _b) + inline void vec3TangentFrame(const float* __restrict _n, float* __restrict _t, float* __restrict _b) { const float nx = _n[0]; const float ny = _n[1]; @@ -550,6 +550,30 @@ namespace bx _result[15] = 1.0f; } + inline void mtxScale(float* _result, float _scale) + { + mtxScale(_result, _scale, _scale, _scale); + } + + inline void mtxFromNormal(float* __restrict _result, const float* __restrict _normal, float _scale, const float* __restrict _pos) + { + float tangent[3]; + float bitangent[3]; + vec3TangentFrame(_normal, tangent, bitangent); + + vec3Mul(&_result[ 0], bitangent, _scale); + vec3Mul(&_result[ 4], _normal, _scale); + vec3Mul(&_result[ 8], tangent, _scale); + + _result[ 3] = 0.0f; + _result[ 7] = 0.0f; + _result[11] = 0.0f; + _result[12] = _pos[0]; + _result[13] = _pos[1]; + _result[14] = _pos[2]; + _result[15] = 1.0f; + } + inline void mtxQuat(float* __restrict _result, const float* __restrict _quat) { const float x = _quat[0]; diff --git a/3rdparty/bx/include/bx/handlealloc.h b/3rdparty/bx/include/bx/handlealloc.h index 7b10209ab2d..aad39cdd6f3 100644 --- a/3rdparty/bx/include/bx/handlealloc.h +++ b/3rdparty/bx/include/bx/handlealloc.h @@ -151,8 +151,6 @@ namespace bx static const uint16_t invalid = UINT16_MAX; HandleListT() - : m_front(invalid) - , m_back(invalid) { reset(); } @@ -250,6 +248,8 @@ namespace bx void reset() { memset(m_links, 0xff, sizeof(m_links) ); + m_front = invalid; + m_back = invalid; } private: diff --git a/3rdparty/bx/include/bx/macros.h b/3rdparty/bx/include/bx/macros.h index b4eaeae9287..870f8726738 100644 --- a/3rdparty/bx/include/bx/macros.h +++ b/3rdparty/bx/include/bx/macros.h @@ -63,7 +63,7 @@ #if BX_COMPILER_GCC || BX_COMPILER_CLANG # define BX_ALIGN_DECL(_align, _decl) _decl __attribute__( (aligned(_align) ) ) # define BX_ALLOW_UNUSED __attribute__( (unused) ) -# define BX_FORCE_INLINE __extension__ static __inline __attribute__( (__always_inline__) ) +# define BX_FORCE_INLINE inline __attribute__( (__always_inline__) ) # define BX_FUNCTION __PRETTY_FUNCTION__ # define BX_LIKELY(_x) __builtin_expect(!!(_x), 1) # define BX_UNLIKELY(_x) __builtin_expect(!!(_x), 0) @@ -71,7 +71,7 @@ # define BX_NO_RETURN __attribute__( (noreturn) ) # define BX_NO_VTABLE # define BX_OVERRIDE -# define BX_PRINTF_ARGS(_format, _args) __attribute__ ( (format(__printf__, _format, _args) ) ) +# define BX_PRINTF_ARGS(_format, _args) __attribute__( (format(__printf__, _format, _args) ) ) # if BX_CLANG_HAS_FEATURE(cxx_thread_local) # define BX_THREAD_LOCAL __thread # endif // BX_COMPILER_CLANG @@ -79,9 +79,9 @@ # define BX_THREAD_LOCAL __thread # endif // BX_COMPILER_GCC # define BX_ATTRIBUTE(_x) __attribute__( (_x) ) -# if BX_COMPILER_MSVC_COMPATIBLE +# if BX_CRT_MSVC # define __stdcall -# endif // BX_COMPILER_MSVC_COMPATIBLE +# endif // BX_CRT_MSVC #elif BX_COMPILER_MSVC # define BX_ALIGN_DECL(_align, _decl) __declspec(align(_align) ) _decl # define BX_ALLOW_UNUSED diff --git a/3rdparty/bx/include/bx/os.h b/3rdparty/bx/include/bx/os.h index 80ce4d5c5f9..0bdeb3c1eba 100644 --- a/3rdparty/bx/include/bx/os.h +++ b/3rdparty/bx/include/bx/os.h @@ -53,17 +53,17 @@ # elif BX_PLATFORM_OSX # include // mach_task_basic_info # elif BX_PLATFORM_HURD -# include // pthread_self +# include // getpid # elif BX_PLATFORM_ANDROID # include "debug.h" // getTid is not implemented... # endif // BX_PLATFORM_ANDROID #endif // BX_PLATFORM_ -#if BX_COMPILER_MSVC_COMPATIBLE +#if BX_CRT_MSVC # include // _getcwd #else # include // getcwd -#endif // BX_COMPILER_MSVC +#endif // BX_CRT_MSVC #if BX_PLATFORM_OSX # define BX_DL_EXT "dylib" @@ -259,7 +259,7 @@ namespace bx || BX_PLATFORM_WINRT BX_UNUSED(_path); return -1; -#elif BX_COMPILER_MSVC_COMPATIBLE +#elif BX_CRT_MSVC return ::_chdir(_path); #else return ::chdir(_path); @@ -273,7 +273,7 @@ namespace bx || BX_PLATFORM_WINRT BX_UNUSED(_buffer, _size); return NULL; -#elif BX_COMPILER_MSVC_COMPATIBLE +#elif BX_CRT_MSVC return ::_getcwd(_buffer, (int)_size); #else return ::getcwd(_buffer, _size); diff --git a/3rdparty/bx/include/bx/platform.h b/3rdparty/bx/include/bx/platform.h index 1c7b7d01414..02a80045285 100644 --- a/3rdparty/bx/include/bx/platform.h +++ b/3rdparty/bx/include/bx/platform.h @@ -15,7 +15,6 @@ #define BX_COMPILER_CLANG_ANALYZER 0 #define BX_COMPILER_GCC 0 #define BX_COMPILER_MSVC 0 -#define BX_COMPILER_MSVC_COMPATIBLE (BX_CRT_MSVC) // Endianess #define BX_CPU_ENDIAN_BIG 0 diff --git a/3rdparty/bx/include/bx/readerwriter.h b/3rdparty/bx/include/bx/readerwriter.h index 5460505a42e..47c5899d3f1 100644 --- a/3rdparty/bx/include/bx/readerwriter.h +++ b/3rdparty/bx/include/bx/readerwriter.h @@ -16,7 +16,7 @@ #include "error.h" #include "uint32_t.h" -#if BX_COMPILER_MSVC_COMPATIBLE +#if BX_CRT_MSVC # define fseeko64 _fseeki64 # define ftello64 _ftelli64 #elif BX_PLATFORM_ANDROID || BX_PLATFORM_BSD || BX_PLATFORM_IOS || BX_PLATFORM_OSX || BX_PLATFORM_QNX @@ -401,7 +401,7 @@ namespace bx } int64_t remainder = m_top-m_pos; - int32_t size = uint32_min(_size, int32_t(remainder > INT32_MAX ? INT32_MAX : remainder) ); + int32_t size = uint32_min(_size, uint32_t(int64_min(remainder, INT32_MAX) ) ); m_pos += size; if (size != _size) { @@ -454,7 +454,7 @@ namespace bx BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); int64_t remainder = m_top-m_pos; - int32_t size = uint32_min(_size, int32_t(remainder > INT32_MAX ? INT32_MAX : remainder) ); + int32_t size = uint32_min(_size, uint32_t(int64_min(remainder, INT32_MAX) ) ); memcpy(_data, &m_data[m_pos], size); m_pos += size; if (size != _size) @@ -535,7 +535,7 @@ namespace bx } int64_t remainder = m_size-m_pos; - int32_t size = uint32_min(_size, int32_t(remainder > INT32_MAX ? INT32_MAX : remainder) ); + int32_t size = uint32_min(_size, uint32_t(int64_min(remainder, INT32_MAX) ) ); memcpy(&m_data[m_pos], _data, size); m_pos += size; m_top = int64_max(m_top, m_pos); diff --git a/3rdparty/bx/include/bx/simd128_langext.inl b/3rdparty/bx/include/bx/simd128_langext.inl new file mode 100644 index 00000000000..c89e6123349 --- /dev/null +++ b/3rdparty/bx/include/bx/simd128_langext.inl @@ -0,0 +1,515 @@ +/* + * Copyright 2010-2016 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#ifndef BX_SIMD128_LANGEXT_H_HEADER_GUARD +#define BX_SIMD128_LANGEXT_H_HEADER_GUARD + +#define simd_rcp simd_rcp_ni +#define simd_orx simd_orx_ni +#define simd_orc simd_orc_ni +#define simd_neg simd_neg_ni +#define simd_madd simd_madd_ni +#define simd_nmsub simd_nmsub_ni +#define simd_div_nr simd_div_nr_ni +#define simd_selb simd_selb_ni +#define simd_sels simd_sels_ni +#define simd_not simd_not_ni +#define simd_abs simd_abs_ni +#define simd_clamp simd_clamp_ni +#define simd_lerp simd_lerp_ni +#define simd_rcp_est simd_rcp_ni +#define simd_rsqrt simd_rsqrt_ni +#define simd_rsqrt_nr simd_rsqrt_nr_ni +#define simd_rsqrt_carmack simd_rsqrt_carmack_ni +#define simd_sqrt_nr simd_sqrt_nr_ni +#define simd_log2 simd_log2_ni +#define simd_exp2 simd_exp2_ni +#define simd_pow simd_pow_ni +#define simd_cross3 simd_cross3_ni +#define simd_normalize3 simd_normalize3_ni +#define simd_dot3 simd_dot3_ni +#define simd_dot simd_dot_ni +#define simd_ceil simd_ceil_ni +#define simd_floor simd_floor_ni +#define simd_min simd_min_ni +#define simd_max simd_max_ni +#define simd_imin simd_imin_ni +#define simd_imax simd_imax_ni + +#include "simd_ni.inl" + +namespace bx +{ +#define ELEMx 0 +#define ELEMy 1 +#define ELEMz 2 +#define ELEMw 3 +#define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ + template<> \ + BX_SIMD_FORCE_INLINE simd128_langext_t simd_swiz_##_x##_y##_z##_w(simd128_langext_t _a) \ + { \ + simd128_langext_t result; \ + result.vf = __builtin_shufflevector(_a.vf, _a.vf, ELEM##_x, ELEM##_y, ELEM##_z, ELEM##_w); \ + return result; \ + } + +#include "simd128_swizzle.inl" + +#undef BX_SIMD128_IMPLEMENT_SWIZZLE +#undef ELEMw +#undef ELEMz +#undef ELEMy +#undef ELEMx + +#define BX_SIMD128_IMPLEMENT_TEST(_xyzw, _mask) \ + template<> \ + BX_SIMD_FORCE_INLINE bool simd_test_any_##_xyzw(simd128_langext_t _test) \ + { \ + uint32_t tmp = ( (_test.uxyzw[3]>>31)<<3) \ + | ( (_test.uxyzw[2]>>31)<<2) \ + | ( (_test.uxyzw[1]>>31)<<1) \ + | ( _test.uxyzw[0]>>31) \ + ; \ + return 0 != (tmp&(_mask) ); \ + } \ + \ + template<> \ + BX_SIMD_FORCE_INLINE bool simd_test_all_##_xyzw(simd128_langext_t _test) \ + { \ + uint32_t tmp = ( (_test.uxyzw[3]>>31)<<3) \ + | ( (_test.uxyzw[2]>>31)<<2) \ + | ( (_test.uxyzw[1]>>31)<<1) \ + | ( _test.uxyzw[0]>>31) \ + ; \ + return (_mask) == (tmp&(_mask) ); \ + } + +BX_SIMD128_IMPLEMENT_TEST(x , 0x1); +BX_SIMD128_IMPLEMENT_TEST(y , 0x2); +BX_SIMD128_IMPLEMENT_TEST(xy , 0x3); +BX_SIMD128_IMPLEMENT_TEST(z , 0x4); +BX_SIMD128_IMPLEMENT_TEST(xz , 0x5); +BX_SIMD128_IMPLEMENT_TEST(yz , 0x6); +BX_SIMD128_IMPLEMENT_TEST(xyz , 0x7); +BX_SIMD128_IMPLEMENT_TEST(w , 0x8); +BX_SIMD128_IMPLEMENT_TEST(xw , 0x9); +BX_SIMD128_IMPLEMENT_TEST(yw , 0xa); +BX_SIMD128_IMPLEMENT_TEST(xyw , 0xb); +BX_SIMD128_IMPLEMENT_TEST(zw , 0xc); +BX_SIMD128_IMPLEMENT_TEST(xzw , 0xd); +BX_SIMD128_IMPLEMENT_TEST(yzw , 0xe); +BX_SIMD128_IMPLEMENT_TEST(xyzw , 0xf); + +#undef BX_SIMD128_IMPLEMENT_TEST + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_xyAB(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vf = __builtin_shufflevector(_a.vf, _b.vf, 0, 1, 4, 5); + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_ABxy(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vf = __builtin_shufflevector(_a.vf, _b.vf, 4, 5, 0, 1); + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_CDzw(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vf = __builtin_shufflevector(_a.vf, _b.vf, 6, 7, 2, 3); + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_zwCD(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vf = __builtin_shufflevector(_a.vf, _b.vf, 2, 3, 6, 7); + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_xAyB(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vf = __builtin_shufflevector(_a.vf, _b.vf, 0, 4, 1, 5); + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_yBxA(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vf = __builtin_shufflevector(_a.vf, _b.vf, 1, 5, 0, 4); + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_zCwD(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vf = __builtin_shufflevector(_a.vf, _b.vf, 2, 6, 3, 7); + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_CzDw(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vf = __builtin_shufflevector(_a.vf, _b.vf, 6, 2, 7, 3); + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_xAzC(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vf = __builtin_shufflevector(_a.vf, _b.vf, 0, 4, 2, 6); + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_yBwD(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vf = __builtin_shufflevector(_a.vf, _b.vf, 1, 5, 3, 7); + return result; + } + + template<> + BX_SIMD_FORCE_INLINE float simd_x(simd128_langext_t _a) + { + return _a.fxyzw[0]; + } + + template<> + BX_SIMD_FORCE_INLINE float simd_y(simd128_langext_t _a) + { + return _a.fxyzw[1]; + } + + template<> + BX_SIMD_FORCE_INLINE float simd_z(simd128_langext_t _a) + { + return _a.fxyzw[2]; + } + + template<> + BX_SIMD_FORCE_INLINE float simd_w(simd128_langext_t _a) + { + return _a.fxyzw[3]; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_ld(const void* _ptr) + { + const uint32_t* input = reinterpret_cast(_ptr); + simd128_langext_t result; + result.uxyzw[0] = input[0]; + result.uxyzw[1] = input[1]; + result.uxyzw[2] = input[2]; + result.uxyzw[3] = input[3]; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE void simd_st(void* _ptr, simd128_langext_t _a) + { + uint32_t* result = reinterpret_cast(_ptr); + result[0] = _a.uxyzw[0]; + result[1] = _a.uxyzw[1]; + result[2] = _a.uxyzw[2]; + result[3] = _a.uxyzw[3]; + } + + template<> + BX_SIMD_FORCE_INLINE void simd_stx(void* _ptr, simd128_langext_t _a) + { + uint32_t* result = reinterpret_cast(_ptr); + result[0] = _a.uxyzw[0]; + } + + template<> + BX_SIMD_FORCE_INLINE void simd_stream(void* _ptr, simd128_langext_t _a) + { + uint32_t* result = reinterpret_cast(_ptr); + result[0] = _a.uxyzw[0]; + result[1] = _a.uxyzw[1]; + result[2] = _a.uxyzw[2]; + result[3] = _a.uxyzw[3]; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_ld(float _x, float _y, float _z, float _w) + { + simd128_langext_t result; + result.vf = (float __attribute__((vector_size(16)))){ _x, _y, _z, _w }; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w) + { + simd128_langext_t result; + result.vu = (uint32_t __attribute__((vector_size(16)))){ _x, _y, _z, _w }; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_splat(const void* _ptr) + { + const uint32_t val = *reinterpret_cast(_ptr); + simd128_langext_t result; + result.vu = (uint32_t __attribute__((vector_size(16)))){ val, val, val, val }; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_splat(float _a) + { + return simd_ld(_a, _a, _a, _a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_isplat(uint32_t _a) + { + return simd_ild(_a, _a, _a, _a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_zero() + { + return simd_ild(0, 0, 0, 0); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_itof(simd128_langext_t _a) + { + simd128_langext_t result; + result.vf = __builtin_convertvector(_a.vi, float __attribute__((vector_size(16))) ); + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_ftoi(simd128_langext_t _a) + { + simd128_langext_t result; + result.vi = __builtin_convertvector(_a.vf, int32_t __attribute__((vector_size(16))) ); + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_round(simd128_langext_t _a) + { + const simd128_langext_t tmp = simd_ftoi(_a); + const simd128_langext_t result = simd_itof(tmp); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_add(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vf = _a.vf + _b.vf; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_sub(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vf = _a.vf - _b.vf; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_mul(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vf = _a.vf * _b.vf; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_div(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vf = _a.vf / _b.vf; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_sqrt(simd128_langext_t _a) + { + simd128_langext_t result; + result.vf[0] = sqrtf(_a.vf[0]); + result.vf[1] = sqrtf(_a.vf[1]); + result.vf[2] = sqrtf(_a.vf[2]); + result.vf[3] = sqrtf(_a.vf[3]); + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_rsqrt_est(simd128_langext_t _a) + { + simd128_langext_t result; + result.vf[0] = 1.0f / sqrtf(_a.vf[0]); + result.vf[1] = 1.0f / sqrtf(_a.vf[1]); + result.vf[2] = 1.0f / sqrtf(_a.vf[2]); + result.vf[3] = 1.0f / sqrtf(_a.vf[3]); + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_cmpeq(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vi = _a.vf == _b.vf; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_cmplt(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vi = _a.vf < _b.vf; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_cmple(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vi = _a.vf <= _b.vf; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_cmpgt(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vi = _a.vf > _b.vf; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_cmpge(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vi = _a.vf >= _b.vf; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_and(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vu = _a.vu & _b.vu; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_andc(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vu = _a.vu & ~_b.vu; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_or(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vu = _a.vu | _b.vu; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_xor(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vu = _a.vu ^ _b.vu; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_sll(simd128_langext_t _a, int _count) + { + simd128_langext_t result; + const simd128_langext_t count = simd_isplat(_count); + result.vu = _a.vu << count.vi; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_srl(simd128_langext_t _a, int _count) + { + simd128_langext_t result; + const simd128_langext_t count = simd_isplat(_count); + result.vu = _a.vu >> count.vi; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_sra(simd128_langext_t _a, int _count) + { + simd128_langext_t result; + const simd128_langext_t count = simd_isplat(_count); + result.vi = _a.vi >> count.vi; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_icmpeq(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vi = _a.vi == _b.vi; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_icmplt(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vi = _a.vi < _b.vi; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_icmpgt(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vi = _a.vi > _b.vi; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_iadd(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vi = _a.vi + _b.vi; + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_isub(simd128_langext_t _a, simd128_langext_t _b) + { + simd128_langext_t result; + result.vi = _a.vi - _b.vi; + return result; + } + + typedef simd128_langext_t simd128_t; + +} // namespace bx + +#endif // BX_SIMD128_LANGEXT_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/simd128_neon.inl b/3rdparty/bx/include/bx/simd128_neon.inl new file mode 100644 index 00000000000..1dd0d1f12b2 --- /dev/null +++ b/3rdparty/bx/include/bx/simd128_neon.inl @@ -0,0 +1,562 @@ +/* + * Copyright 2010-2016 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#ifndef BX_SIMD128_NEON_H_HEADER_GUARD +#define BX_SIMD128_NEON_H_HEADER_GUARD + +#define simd_rcp simd_rcp_ni +#define simd_orx simd_orx_ni +#define simd_orc simd_orc_ni +#define simd_neg simd_neg_ni +#define simd_madd simd_madd_ni +#define simd_nmsub simd_nmsub_ni +#define simd_div_nr simd_div_nr_ni +#define simd_div simd_div_nr_ni +#define simd_selb simd_selb_ni +#define simd_sels simd_sels_ni +#define simd_not simd_not_ni +#define simd_abs simd_abs_ni +#define simd_clamp simd_clamp_ni +#define simd_lerp simd_lerp_ni +#define simd_rsqrt simd_rsqrt_ni +#define simd_rsqrt_nr simd_rsqrt_nr_ni +#define simd_rsqrt_carmack simd_rsqrt_carmack_ni +#define simd_sqrt_nr simd_sqrt_nr_ni +#define simd_sqrt simd_sqrt_nr_ni +#define simd_log2 simd_log2_ni +#define simd_exp2 simd_exp2_ni +#define simd_pow simd_pow_ni +#define simd_cross3 simd_cross3_ni +#define simd_normalize3 simd_normalize3_ni +#define simd_dot3 simd_dot3_ni +#define simd_dot simd_dot_ni +#define simd_ceil simd_ceil_ni +#define simd_floor simd_floor_ni + +#include "simd_ni.inl" + +namespace bx +{ +#define ELEMx 0 +#define ELEMy 1 +#define ELEMz 2 +#define ELEMw 3 +#define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ + template<> \ + BX_SIMD_FORCE_INLINE simd128_neon_t simd_swiz_##_x##_y##_z##_w(simd128_neon_t _a) \ + { \ + return __builtin_shuffle(_a, (uint32x4_t){ ELEM##_x, ELEM##_y, ELEM##_z, ELEM##_w }); \ + } + +#include "simd128_swizzle.inl" + +#undef BX_SIMD128_IMPLEMENT_SWIZZLE +#undef ELEMw +#undef ELEMz +#undef ELEMy +#undef ELEMx + +#define BX_SIMD128_IMPLEMENT_TEST(_xyzw, _swizzle) \ + template<> \ + BX_SIMD_FORCE_INLINE bool simd_test_any_##_xyzw(simd128_neon_t _test) \ + { \ + const simd128_neon_t tmp0 = simd_swiz_##_swizzle(_test); \ + return simd_test_any_ni(tmp0); \ + } \ + \ + template<> \ + BX_SIMD_FORCE_INLINE bool simd_test_all_##_xyzw(simd128_neon_t _test) \ + { \ + const simd128_neon_t tmp0 = simd_swiz_##_swizzle(_test); \ + return simd_test_all_ni(tmp0); \ + } + +BX_SIMD128_IMPLEMENT_TEST(x, xxxx); +BX_SIMD128_IMPLEMENT_TEST(y, yyyy); +BX_SIMD128_IMPLEMENT_TEST(xy, xyyy); +BX_SIMD128_IMPLEMENT_TEST(z, zzzz); +BX_SIMD128_IMPLEMENT_TEST(xz, xzzz); +BX_SIMD128_IMPLEMENT_TEST(yz, yzzz); +BX_SIMD128_IMPLEMENT_TEST(xyz, xyzz); +BX_SIMD128_IMPLEMENT_TEST(w, wwww); +BX_SIMD128_IMPLEMENT_TEST(xw, xwww); +BX_SIMD128_IMPLEMENT_TEST(yw, ywww); +BX_SIMD128_IMPLEMENT_TEST(xyw, xyww); +BX_SIMD128_IMPLEMENT_TEST(zw, zwww); +BX_SIMD128_IMPLEMENT_TEST(xzw, xzww); +BX_SIMD128_IMPLEMENT_TEST(yzw, yzww); +#undef BX_SIMD128_IMPLEMENT_TEST + + template<> + BX_SIMD_FORCE_INLINE bool simd_test_any_xyzw(simd128_neon_t _test) + { + return simd_test_any_ni(_test); + } + + template<> + BX_SIMD_FORCE_INLINE bool simd_test_all_xyzw(simd128_neon_t _test) + { + return simd_test_all_ni(_test); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_shuf_xyAB(simd128_neon_t _a, simd128_neon_t _b) + { + return __builtin_shuffle(_a, _b, (uint32x4_t){ 0, 1, 4, 5 }); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_shuf_ABxy(simd128_neon_t _a, simd128_neon_t _b) + { + return __builtin_shuffle(_a, _b, (uint32x4_t){ 4, 5, 0, 1 }); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_shuf_CDzw(simd128_neon_t _a, simd128_neon_t _b) + { + return __builtin_shuffle(_a, _b, (uint32x4_t){ 6, 7, 2, 3 }); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_shuf_zwCD(simd128_neon_t _a, simd128_neon_t _b) + { + return __builtin_shuffle(_a, _b, (uint32x4_t){ 2, 3, 6, 7 }); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_shuf_xAyB(simd128_neon_t _a, simd128_neon_t _b) + { + return __builtin_shuffle(_a, _b, (uint32x4_t){ 0, 4, 1, 5 }); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_shuf_yBxA(simd128_neon_t _a, simd128_neon_t _b) + { + return __builtin_shuffle(_a, _b, (uint32x4_t){ 1, 5, 0, 4 }); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_shuf_zCwD(simd128_neon_t _a, simd128_neon_t _b) + { + return __builtin_shuffle(_a, _b, (uint32x4_t){ 2, 6, 3, 7 }); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_shuf_CzDw(simd128_neon_t _a, simd128_neon_t _b) + { + return __builtin_shuffle(_a, _b, (uint32x4_t){ 6, 2, 7, 3 }); + } + + template<> + BX_SIMD_FORCE_INLINE float simd_x(simd128_neon_t _a) + { + return vgetq_lane_f32(_a, 0); + } + + template<> + BX_SIMD_FORCE_INLINE float simd_y(simd128_neon_t _a) + { + return vgetq_lane_f32(_a, 1); + } + + template<> + BX_SIMD_FORCE_INLINE float simd_z(simd128_neon_t _a) + { + return vgetq_lane_f32(_a, 2); + } + + template<> + BX_SIMD_FORCE_INLINE float simd_w(simd128_neon_t _a) + { + return vgetq_lane_f32(_a, 3); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_ld(const void* _ptr) + { + return vld1q_f32( (const float32_t*)_ptr); + } + + template<> + BX_SIMD_FORCE_INLINE void simd_st(void* _ptr, simd128_neon_t _a) + { + vst1q_f32( (float32_t*)_ptr, _a); + } + + template<> + BX_SIMD_FORCE_INLINE void simd_stx(void* _ptr, simd128_neon_t _a) + { + vst1q_lane_f32( (float32_t*)_ptr, _a, 0); + } + + template<> + BX_SIMD_FORCE_INLINE void simd_stream(void* _ptr, simd128_neon_t _a) + { + vst1q_f32( (float32_t*)_ptr, _a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_ld(float _x, float _y, float _z, float _w) + { + const float32_t val[4] = {_x, _y, _z, _w}; + return simd_ld(val); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w) + { + const uint32_t val[4] = {_x, _y, _z, _w}; + const uint32x4_t tmp = vld1q_u32(val); + const simd128_neon_t result = vreinterpretq_f32_u32(tmp); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_splat(const void* _ptr) + { + const simd128_neon_t tmp0 = vld1q_f32( (const float32_t*)_ptr); + const float32x2_t tmp1 = vget_low_f32(tmp0); + const simd128_neon_t result = vdupq_lane_f32(tmp1, 0); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_splat(float _a) + { + return vdupq_n_f32(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_isplat(uint32_t _a) + { + const int32x4_t tmp = vdupq_n_s32(_a); + const simd128_neon_t result = vreinterpretq_f32_s32(tmp); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_zero() + { + return simd_isplat(0); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_itof(simd128_neon_t _a) + { + const int32x4_t itof = vreinterpretq_s32_f32(_a); + const simd128_neon_t result = vcvtq_f32_s32(itof); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_ftoi(simd128_neon_t _a) + { + const int32x4_t ftoi = vcvtq_s32_f32(_a); + const simd128_neon_t result = vreinterpretq_f32_s32(ftoi); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_add(simd128_neon_t _a, simd128_neon_t _b) + { + return vaddq_f32(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_sub(simd128_neon_t _a, simd128_neon_t _b) + { + return vsubq_f32(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_mul(simd128_neon_t _a, simd128_neon_t _b) + { + return vmulq_f32(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_rcp_est(simd128_neon_t _a) + { + return vrecpeq_f32(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_rsqrt_est(simd128_neon_t _a) + { + return vrsqrteq_f32(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_cmpeq(simd128_neon_t _a, simd128_neon_t _b) + { + const uint32x4_t tmp = vceqq_f32(_a, _b); + const simd128_neon_t result = vreinterpretq_f32_u32(tmp); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_cmplt(simd128_neon_t _a, simd128_neon_t _b) + { + const uint32x4_t tmp = vcltq_f32(_a, _b); + const simd128_neon_t result = vreinterpretq_f32_u32(tmp); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_cmple(simd128_neon_t _a, simd128_neon_t _b) + { + const uint32x4_t tmp = vcleq_f32(_a, _b); + const simd128_neon_t result = vreinterpretq_f32_u32(tmp); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_cmpgt(simd128_neon_t _a, simd128_neon_t _b) + { + const uint32x4_t tmp = vcgtq_f32(_a, _b); + const simd128_neon_t result = vreinterpretq_f32_u32(tmp); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_cmpge(simd128_neon_t _a, simd128_neon_t _b) + { + const uint32x4_t tmp = vcgeq_f32(_a, _b); + const simd128_neon_t result = vreinterpretq_f32_u32(tmp); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_min(simd128_neon_t _a, simd128_neon_t _b) + { + return vminq_f32(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_max(simd128_neon_t _a, simd128_neon_t _b) + { + return vmaxq_f32(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_and(simd128_neon_t _a, simd128_neon_t _b) + { + const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); + const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); + const int32x4_t tmp2 = vandq_s32(tmp0, tmp1); + const simd128_neon_t result = vreinterpretq_f32_s32(tmp2); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_andc(simd128_neon_t _a, simd128_neon_t _b) + { + const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); + const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); + const int32x4_t tmp2 = vbicq_s32(tmp0, tmp1); + const simd128_neon_t result = vreinterpretq_f32_s32(tmp2); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_or(simd128_neon_t _a, simd128_neon_t _b) + { + const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); + const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); + const int32x4_t tmp2 = vorrq_s32(tmp0, tmp1); + const simd128_neon_t result = vreinterpretq_f32_s32(tmp2); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_xor(simd128_neon_t _a, simd128_neon_t _b) + { + const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); + const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); + const int32x4_t tmp2 = veorq_s32(tmp0, tmp1); + const simd128_neon_t result = vreinterpretq_f32_s32(tmp2); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_sll(simd128_neon_t _a, int _count) + { + if (__builtin_constant_p(_count) ) + { + const uint32x4_t tmp0 = vreinterpretq_u32_f32(_a); + const uint32x4_t tmp1 = vshlq_n_u32(tmp0, _count); + const simd128_neon_t result = vreinterpretq_f32_u32(tmp1); + + return result; + } + + const uint32x4_t tmp0 = vreinterpretq_u32_f32(_a); + const int32x4_t shift = vdupq_n_s32(_count); + const uint32x4_t tmp1 = vshlq_u32(tmp0, shift); + const simd128_neon_t result = vreinterpretq_f32_u32(tmp1); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_srl(simd128_neon_t _a, int _count) + { + if (__builtin_constant_p(_count) ) + { + const uint32x4_t tmp0 = vreinterpretq_u32_f32(_a); + const uint32x4_t tmp1 = vshrq_n_u32(tmp0, _count); + const simd128_neon_t result = vreinterpretq_f32_u32(tmp1); + + return result; + } + + const uint32x4_t tmp0 = vreinterpretq_u32_f32(_a); + const int32x4_t shift = vdupq_n_s32(-_count); + const uint32x4_t tmp1 = vshlq_u32(tmp0, shift); + const simd128_neon_t result = vreinterpretq_f32_u32(tmp1); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_sra(simd128_neon_t _a, int _count) + { + if (__builtin_constant_p(_count) ) + { + const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); + const int32x4_t tmp1 = vshrq_n_s32(tmp0, _count); + const simd128_neon_t result = vreinterpretq_f32_s32(tmp1); + + return result; + } + + const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); + const int32x4_t shift = vdupq_n_s32(-_count); + const int32x4_t tmp1 = vshlq_s32(tmp0, shift); + const simd128_neon_t result = vreinterpretq_f32_s32(tmp1); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_madd(simd128_neon_t _a, simd128_neon_t _b, simd128_neon_t _c) + { + return vmlaq_f32(_c, _a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_nmsub(simd128_neon_t _a, simd128_neon_t _b, simd128_neon_t _c) + { + return vmlsq_f32(_c, _a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_icmpeq(simd128_neon_t _a, simd128_neon_t _b) + { + const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); + const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); + const uint32x4_t tmp2 = vceqq_s32(tmp0, tmp1); + const simd128_neon_t result = vreinterpretq_f32_u32(tmp2); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_icmplt(simd128_neon_t _a, simd128_neon_t _b) + { + const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); + const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); + const uint32x4_t tmp2 = vcltq_s32(tmp0, tmp1); + const simd128_neon_t result = vreinterpretq_f32_u32(tmp2); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_icmpgt(simd128_neon_t _a, simd128_neon_t _b) + { + const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); + const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); + const uint32x4_t tmp2 = vcgtq_s32(tmp0, tmp1); + const simd128_neon_t result = vreinterpretq_f32_u32(tmp2); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_imin(simd128_neon_t _a, simd128_neon_t _b) + { + const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); + const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); + const int32x4_t tmp2 = vminq_s32(tmp0, tmp1); + const simd128_neon_t result = vreinterpretq_f32_s32(tmp2); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_imax(simd128_neon_t _a, simd128_neon_t _b) + { + const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); + const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); + const int32x4_t tmp2 = vmaxq_s32(tmp0, tmp1); + const simd128_neon_t result = vreinterpretq_f32_s32(tmp2); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_iadd(simd128_neon_t _a, simd128_neon_t _b) + { + const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); + const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); + const int32x4_t tmp2 = vaddq_s32(tmp0, tmp1); + const simd128_neon_t result = vreinterpretq_f32_s32(tmp2); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_isub(simd128_neon_t _a, simd128_neon_t _b) + { + const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); + const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); + const int32x4_t tmp2 = vsubq_s32(tmp0, tmp1); + const simd128_neon_t result = vreinterpretq_f32_s32(tmp2); + + return result; + } + + template<> + BX_SIMD_INLINE simd128_neon_t simd_shuf_xAzC(simd128_neon_t _a, simd128_neon_t _b) + { + return simd_shuf_xAzC_ni(_a, _b); + } + + template<> + BX_SIMD_INLINE simd128_neon_t simd_shuf_yBwD(simd128_neon_t _a, simd128_neon_t _b) + { + return simd_shuf_yBwD_ni(_a, _b); + } + + typedef simd128_neon_t simd128_t; + +} // namespace bx + +#endif // BX_SIMD128_NEON_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/float4_ref.h b/3rdparty/bx/include/bx/simd128_ref.inl similarity index 57% rename from 3rdparty/bx/include/bx/float4_ref.h rename to 3rdparty/bx/include/bx/simd128_ref.inl index e54862ca371..da08f5088b6 100644 --- a/3rdparty/bx/include/bx/float4_ref.h +++ b/3rdparty/bx/include/bx/simd128_ref.inl @@ -3,29 +3,53 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ -#ifndef BX_FLOAT4_REF_H_HEADER_GUARD -#define BX_FLOAT4_REF_H_HEADER_GUARD +#ifndef BX_SIMD128_REF_H_HEADER_GUARD +#define BX_SIMD128_REF_H_HEADER_GUARD #include // sqrtf +#define simd_shuf_xAzC simd_shuf_xAzC_ni +#define simd_shuf_yBwD simd_shuf_yBwD_ni +#define simd_rcp simd_rcp_ni +#define simd_orx simd_orx_ni +#define simd_orc simd_orc_ni +#define simd_neg simd_neg_ni +#define simd_madd simd_madd_ni +#define simd_nmsub simd_nmsub_ni +#define simd_div_nr simd_div_nr_ni +#define simd_selb simd_selb_ni +#define simd_sels simd_sels_ni +#define simd_not simd_not_ni +#define simd_abs simd_abs_ni +#define simd_clamp simd_clamp_ni +#define simd_lerp simd_lerp_ni +#define simd_rsqrt simd_rsqrt_ni +#define simd_rsqrt_nr simd_rsqrt_nr_ni +#define simd_rsqrt_carmack simd_rsqrt_carmack_ni +#define simd_sqrt_nr simd_sqrt_nr_ni +#define simd_log2 simd_log2_ni +#define simd_exp2 simd_exp2_ni +#define simd_pow simd_pow_ni +#define simd_cross3 simd_cross3_ni +#define simd_normalize3 simd_normalize3_ni +#define simd_dot3 simd_dot3_ni +#define simd_dot simd_dot_ni +#define simd_ceil simd_ceil_ni +#define simd_floor simd_floor_ni + +#include "simd_ni.inl" + namespace bx { - typedef union float4_t - { - float fxyzw[4]; - int32_t ixyzw[4]; - uint32_t uxyzw[4]; - - } float4_t; - #define ELEMx 0 #define ELEMy 1 #define ELEMz 2 #define ELEMw 3 -#define IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ - BX_FLOAT4_FORCE_INLINE float4_t float4_swiz_##_x##_y##_z##_w(float4_t _a) \ +#define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ + template<> \ + BX_SIMD_FORCE_INLINE simd128_ref_t simd_swiz_##_x##_y##_z##_w(simd128_ref_t _a) \ { \ - float4_t result; \ + simd128_ref_t result; \ result.ixyzw[0] = _a.ixyzw[ELEM##_x]; \ result.ixyzw[1] = _a.ixyzw[ELEM##_y]; \ result.ixyzw[2] = _a.ixyzw[ELEM##_z]; \ @@ -33,16 +57,17 @@ namespace bx return result; \ } -#include "float4_swizzle.inl" +#include "simd128_swizzle.inl" -#undef IMPLEMENT_SWIZZLE +#undef BX_SIMD128_IMPLEMENT_SWIZZLE #undef ELEMw #undef ELEMz #undef ELEMy #undef ELEMx -#define IMPLEMENT_TEST(_xyzw, _mask) \ - BX_FLOAT4_FORCE_INLINE bool float4_test_any_##_xyzw(float4_t _test) \ +#define BX_SIMD128_IMPLEMENT_TEST(_xyzw, _mask) \ + template<> \ + BX_SIMD_FORCE_INLINE bool simd_test_any_##_xyzw(simd128_ref_t _test) \ { \ uint32_t tmp = ( (_test.uxyzw[3]>>31)<<3) \ | ( (_test.uxyzw[2]>>31)<<2) \ @@ -52,7 +77,8 @@ namespace bx return 0 != (tmp&(_mask) ); \ } \ \ - BX_FLOAT4_FORCE_INLINE bool float4_test_all_##_xyzw(float4_t _test) \ + template<> \ + BX_SIMD_FORCE_INLINE bool simd_test_all_##_xyzw(simd128_ref_t _test) \ { \ uint32_t tmp = ( (_test.uxyzw[3]>>31)<<3) \ | ( (_test.uxyzw[2]>>31)<<2) \ @@ -62,27 +88,28 @@ namespace bx return (_mask) == (tmp&(_mask) ); \ } -IMPLEMENT_TEST(x , 0x1); -IMPLEMENT_TEST(y , 0x2); -IMPLEMENT_TEST(xy , 0x3); -IMPLEMENT_TEST(z , 0x4); -IMPLEMENT_TEST(xz , 0x5); -IMPLEMENT_TEST(yz , 0x6); -IMPLEMENT_TEST(xyz , 0x7); -IMPLEMENT_TEST(w , 0x8); -IMPLEMENT_TEST(xw , 0x9); -IMPLEMENT_TEST(yw , 0xa); -IMPLEMENT_TEST(xyw , 0xb); -IMPLEMENT_TEST(zw , 0xc); -IMPLEMENT_TEST(xzw , 0xd); -IMPLEMENT_TEST(yzw , 0xe); -IMPLEMENT_TEST(xyzw , 0xf); +BX_SIMD128_IMPLEMENT_TEST(x , 0x1); +BX_SIMD128_IMPLEMENT_TEST(y , 0x2); +BX_SIMD128_IMPLEMENT_TEST(xy , 0x3); +BX_SIMD128_IMPLEMENT_TEST(z , 0x4); +BX_SIMD128_IMPLEMENT_TEST(xz , 0x5); +BX_SIMD128_IMPLEMENT_TEST(yz , 0x6); +BX_SIMD128_IMPLEMENT_TEST(xyz , 0x7); +BX_SIMD128_IMPLEMENT_TEST(w , 0x8); +BX_SIMD128_IMPLEMENT_TEST(xw , 0x9); +BX_SIMD128_IMPLEMENT_TEST(yw , 0xa); +BX_SIMD128_IMPLEMENT_TEST(xyw , 0xb); +BX_SIMD128_IMPLEMENT_TEST(zw , 0xc); +BX_SIMD128_IMPLEMENT_TEST(xzw , 0xd); +BX_SIMD128_IMPLEMENT_TEST(yzw , 0xe); +BX_SIMD128_IMPLEMENT_TEST(xyzw , 0xf); -#undef IMPLEMENT_TEST +#undef BX_SIMD128_IMPLEMENT_TEST - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_xyAB(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_xyAB(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.uxyzw[0] = _a.uxyzw[0]; result.uxyzw[1] = _a.uxyzw[1]; result.uxyzw[2] = _b.uxyzw[0]; @@ -90,9 +117,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_ABxy(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_ABxy(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.uxyzw[0] = _b.uxyzw[0]; result.uxyzw[1] = _b.uxyzw[1]; result.uxyzw[2] = _a.uxyzw[0]; @@ -100,9 +128,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_CDzw(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_CDzw(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.uxyzw[0] = _b.uxyzw[2]; result.uxyzw[1] = _b.uxyzw[3]; result.uxyzw[2] = _a.uxyzw[2]; @@ -110,9 +139,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_zwCD(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_zwCD(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.uxyzw[0] = _a.uxyzw[2]; result.uxyzw[1] = _a.uxyzw[3]; result.uxyzw[2] = _b.uxyzw[2]; @@ -120,9 +150,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_xAyB(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_xAyB(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.uxyzw[0] = _a.uxyzw[0]; result.uxyzw[1] = _b.uxyzw[0]; result.uxyzw[2] = _a.uxyzw[1]; @@ -130,9 +161,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_yBxA(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_yBxA(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.uxyzw[0] = _a.uxyzw[1]; result.uxyzw[1] = _b.uxyzw[1]; result.uxyzw[2] = _a.uxyzw[0]; @@ -140,9 +172,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_zCwD(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_zCwD(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.uxyzw[0] = _a.uxyzw[2]; result.uxyzw[1] = _b.uxyzw[2]; result.uxyzw[2] = _a.uxyzw[3]; @@ -150,9 +183,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_shuf_CzDw(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_CzDw(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.uxyzw[0] = _b.uxyzw[2]; result.uxyzw[1] = _a.uxyzw[2]; result.uxyzw[2] = _b.uxyzw[3]; @@ -160,30 +194,35 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float float4_x(float4_t _a) + template<> + BX_SIMD_FORCE_INLINE float simd_x(simd128_ref_t _a) { return _a.fxyzw[0]; } - BX_FLOAT4_FORCE_INLINE float float4_y(float4_t _a) + template<> + BX_SIMD_FORCE_INLINE float simd_y(simd128_ref_t _a) { return _a.fxyzw[1]; } - BX_FLOAT4_FORCE_INLINE float float4_z(float4_t _a) + template<> + BX_SIMD_FORCE_INLINE float simd_z(simd128_ref_t _a) { return _a.fxyzw[2]; } - BX_FLOAT4_FORCE_INLINE float float4_w(float4_t _a) + template<> + BX_SIMD_FORCE_INLINE float simd_w(simd128_ref_t _a) { return _a.fxyzw[3]; } - BX_FLOAT4_FORCE_INLINE float4_t float4_ld(const void* _ptr) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_ld(const void* _ptr) { const uint32_t* input = reinterpret_cast(_ptr); - float4_t result; + simd128_ref_t result; result.uxyzw[0] = input[0]; result.uxyzw[1] = input[1]; result.uxyzw[2] = input[2]; @@ -191,7 +230,8 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE void float4_st(void* _ptr, float4_t _a) + template<> + BX_SIMD_FORCE_INLINE void simd_st(void* _ptr, simd128_ref_t _a) { uint32_t* result = reinterpret_cast(_ptr); result[0] = _a.uxyzw[0]; @@ -200,13 +240,15 @@ IMPLEMENT_TEST(xyzw , 0xf); result[3] = _a.uxyzw[3]; } - BX_FLOAT4_FORCE_INLINE void float4_stx(void* _ptr, float4_t _a) + template<> + BX_SIMD_FORCE_INLINE void simd_stx(void* _ptr, simd128_ref_t _a) { uint32_t* result = reinterpret_cast(_ptr); result[0] = _a.uxyzw[0]; } - BX_FLOAT4_FORCE_INLINE void float4_stream(void* _ptr, float4_t _a) + template<> + BX_SIMD_FORCE_INLINE void simd_stream(void* _ptr, simd128_ref_t _a) { uint32_t* result = reinterpret_cast(_ptr); result[0] = _a.uxyzw[0]; @@ -215,9 +257,10 @@ IMPLEMENT_TEST(xyzw , 0xf); result[3] = _a.uxyzw[3]; } - BX_FLOAT4_FORCE_INLINE float4_t float4_ld(float _x, float _y, float _z, float _w) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_ld(float _x, float _y, float _z, float _w) { - float4_t result; + simd128_ref_t result; result.fxyzw[0] = _x; result.fxyzw[1] = _y; result.fxyzw[2] = _z; @@ -225,9 +268,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w) { - float4_t result; + simd128_ref_t result; result.uxyzw[0] = _x; result.uxyzw[1] = _y; result.uxyzw[2] = _z; @@ -235,10 +279,11 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_splat(const void* _ptr) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_splat(const void* _ptr) { const uint32_t val = *reinterpret_cast(_ptr); - float4_t result; + simd128_ref_t result; result.uxyzw[0] = val; result.uxyzw[1] = val; result.uxyzw[2] = val; @@ -246,24 +291,28 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_splat(float _a) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_splat(float _a) { - return float4_ld(_a, _a, _a, _a); + return simd_ld(_a, _a, _a, _a); } - BX_FLOAT4_FORCE_INLINE float4_t float4_isplat(uint32_t _a) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_isplat(uint32_t _a) { - return float4_ild(_a, _a, _a, _a); + return simd_ild(_a, _a, _a, _a); } - BX_FLOAT4_FORCE_INLINE float4_t float4_zero() + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_zero() { - return float4_ild(0, 0, 0, 0); + return simd_ild(0, 0, 0, 0); } - BX_FLOAT4_FORCE_INLINE float4_t float4_itof(float4_t _a) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_itof(simd128_ref_t _a) { - float4_t result; + simd128_ref_t result; result.fxyzw[0] = (float)_a.ixyzw[0]; result.fxyzw[1] = (float)_a.ixyzw[1]; result.fxyzw[2] = (float)_a.ixyzw[2]; @@ -271,9 +320,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_ftoi(float4_t _a) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_ftoi(simd128_ref_t _a) { - float4_t result; + simd128_ref_t result; result.ixyzw[0] = (int)_a.fxyzw[0]; result.ixyzw[1] = (int)_a.fxyzw[1]; result.ixyzw[2] = (int)_a.fxyzw[2]; @@ -281,17 +331,16 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_round(float4_t _a) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_round(simd128_ref_t _a) { - const float4_t tmp = float4_ftoi(_a); - const float4_t result = float4_itof(tmp); - - return result; + return simd_round_ni(_a); } - BX_FLOAT4_FORCE_INLINE float4_t float4_add(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_add(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.fxyzw[0] = _a.fxyzw[0] + _b.fxyzw[0]; result.fxyzw[1] = _a.fxyzw[1] + _b.fxyzw[1]; result.fxyzw[2] = _a.fxyzw[2] + _b.fxyzw[2]; @@ -299,9 +348,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_sub(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_sub(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.fxyzw[0] = _a.fxyzw[0] - _b.fxyzw[0]; result.fxyzw[1] = _a.fxyzw[1] - _b.fxyzw[1]; result.fxyzw[2] = _a.fxyzw[2] - _b.fxyzw[2]; @@ -309,9 +359,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_mul(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_mul(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.fxyzw[0] = _a.fxyzw[0] * _b.fxyzw[0]; result.fxyzw[1] = _a.fxyzw[1] * _b.fxyzw[1]; result.fxyzw[2] = _a.fxyzw[2] * _b.fxyzw[2]; @@ -319,9 +370,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_div(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_div(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.fxyzw[0] = _a.fxyzw[0] / _b.fxyzw[0]; result.fxyzw[1] = _a.fxyzw[1] / _b.fxyzw[1]; result.fxyzw[2] = _a.fxyzw[2] / _b.fxyzw[2]; @@ -329,9 +381,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_rcp_est(float4_t _a) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_rcp_est(simd128_ref_t _a) { - float4_t result; + simd128_ref_t result; result.fxyzw[0] = 1.0f / _a.fxyzw[0]; result.fxyzw[1] = 1.0f / _a.fxyzw[1]; result.fxyzw[2] = 1.0f / _a.fxyzw[2]; @@ -339,9 +392,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_sqrt(float4_t _a) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_sqrt(simd128_ref_t _a) { - float4_t result; + simd128_ref_t result; result.fxyzw[0] = sqrtf(_a.fxyzw[0]); result.fxyzw[1] = sqrtf(_a.fxyzw[1]); result.fxyzw[2] = sqrtf(_a.fxyzw[2]); @@ -349,9 +403,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_rsqrt_est(float4_t _a) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_rsqrt_est(simd128_ref_t _a) { - float4_t result; + simd128_ref_t result; result.fxyzw[0] = 1.0f / sqrtf(_a.fxyzw[0]); result.fxyzw[1] = 1.0f / sqrtf(_a.fxyzw[1]); result.fxyzw[2] = 1.0f / sqrtf(_a.fxyzw[2]); @@ -359,9 +414,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_cmpeq(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_cmpeq(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.ixyzw[0] = _a.fxyzw[0] == _b.fxyzw[0] ? 0xffffffff : 0x0; result.ixyzw[1] = _a.fxyzw[1] == _b.fxyzw[1] ? 0xffffffff : 0x0; result.ixyzw[2] = _a.fxyzw[2] == _b.fxyzw[2] ? 0xffffffff : 0x0; @@ -369,9 +425,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_cmplt(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_cmplt(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.ixyzw[0] = _a.fxyzw[0] < _b.fxyzw[0] ? 0xffffffff : 0x0; result.ixyzw[1] = _a.fxyzw[1] < _b.fxyzw[1] ? 0xffffffff : 0x0; result.ixyzw[2] = _a.fxyzw[2] < _b.fxyzw[2] ? 0xffffffff : 0x0; @@ -379,9 +436,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_cmple(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_cmple(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.ixyzw[0] = _a.fxyzw[0] <= _b.fxyzw[0] ? 0xffffffff : 0x0; result.ixyzw[1] = _a.fxyzw[1] <= _b.fxyzw[1] ? 0xffffffff : 0x0; result.ixyzw[2] = _a.fxyzw[2] <= _b.fxyzw[2] ? 0xffffffff : 0x0; @@ -389,9 +447,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_cmpgt(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_cmpgt(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.ixyzw[0] = _a.fxyzw[0] > _b.fxyzw[0] ? 0xffffffff : 0x0; result.ixyzw[1] = _a.fxyzw[1] > _b.fxyzw[1] ? 0xffffffff : 0x0; result.ixyzw[2] = _a.fxyzw[2] > _b.fxyzw[2] ? 0xffffffff : 0x0; @@ -399,9 +458,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_cmpge(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_cmpge(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.ixyzw[0] = _a.fxyzw[0] >= _b.fxyzw[0] ? 0xffffffff : 0x0; result.ixyzw[1] = _a.fxyzw[1] >= _b.fxyzw[1] ? 0xffffffff : 0x0; result.ixyzw[2] = _a.fxyzw[2] >= _b.fxyzw[2] ? 0xffffffff : 0x0; @@ -409,9 +469,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_min(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_min(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.fxyzw[0] = _a.fxyzw[0] < _b.fxyzw[0] ? _a.fxyzw[0] : _b.fxyzw[0]; result.fxyzw[1] = _a.fxyzw[1] < _b.fxyzw[1] ? _a.fxyzw[1] : _b.fxyzw[1]; result.fxyzw[2] = _a.fxyzw[2] < _b.fxyzw[2] ? _a.fxyzw[2] : _b.fxyzw[2]; @@ -419,9 +480,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_max(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_max(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.fxyzw[0] = _a.fxyzw[0] > _b.fxyzw[0] ? _a.fxyzw[0] : _b.fxyzw[0]; result.fxyzw[1] = _a.fxyzw[1] > _b.fxyzw[1] ? _a.fxyzw[1] : _b.fxyzw[1]; result.fxyzw[2] = _a.fxyzw[2] > _b.fxyzw[2] ? _a.fxyzw[2] : _b.fxyzw[2]; @@ -429,9 +491,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_and(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_and(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.uxyzw[0] = _a.uxyzw[0] & _b.uxyzw[0]; result.uxyzw[1] = _a.uxyzw[1] & _b.uxyzw[1]; result.uxyzw[2] = _a.uxyzw[2] & _b.uxyzw[2]; @@ -439,9 +502,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_andc(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_andc(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.uxyzw[0] = _a.uxyzw[0] & ~_b.uxyzw[0]; result.uxyzw[1] = _a.uxyzw[1] & ~_b.uxyzw[1]; result.uxyzw[2] = _a.uxyzw[2] & ~_b.uxyzw[2]; @@ -449,9 +513,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_or(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_or(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.uxyzw[0] = _a.uxyzw[0] | _b.uxyzw[0]; result.uxyzw[1] = _a.uxyzw[1] | _b.uxyzw[1]; result.uxyzw[2] = _a.uxyzw[2] | _b.uxyzw[2]; @@ -459,9 +524,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_xor(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_xor(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.uxyzw[0] = _a.uxyzw[0] ^ _b.uxyzw[0]; result.uxyzw[1] = _a.uxyzw[1] ^ _b.uxyzw[1]; result.uxyzw[2] = _a.uxyzw[2] ^ _b.uxyzw[2]; @@ -469,9 +535,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_sll(float4_t _a, int _count) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_sll(simd128_ref_t _a, int _count) { - float4_t result; + simd128_ref_t result; result.uxyzw[0] = _a.uxyzw[0] << _count; result.uxyzw[1] = _a.uxyzw[1] << _count; result.uxyzw[2] = _a.uxyzw[2] << _count; @@ -479,9 +546,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_srl(float4_t _a, int _count) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_srl(simd128_ref_t _a, int _count) { - float4_t result; + simd128_ref_t result; result.uxyzw[0] = _a.uxyzw[0] >> _count; result.uxyzw[1] = _a.uxyzw[1] >> _count; result.uxyzw[2] = _a.uxyzw[2] >> _count; @@ -489,9 +557,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_sra(float4_t _a, int _count) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_sra(simd128_ref_t _a, int _count) { - float4_t result; + simd128_ref_t result; result.ixyzw[0] = _a.ixyzw[0] >> _count; result.ixyzw[1] = _a.ixyzw[1] >> _count; result.ixyzw[2] = _a.ixyzw[2] >> _count; @@ -499,9 +568,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_icmpeq(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_icmpeq(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.ixyzw[0] = _a.ixyzw[0] == _b.ixyzw[0] ? 0xffffffff : 0x0; result.ixyzw[1] = _a.ixyzw[1] == _b.ixyzw[1] ? 0xffffffff : 0x0; result.ixyzw[2] = _a.ixyzw[2] == _b.ixyzw[2] ? 0xffffffff : 0x0; @@ -509,9 +579,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_icmplt(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_icmplt(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.ixyzw[0] = _a.ixyzw[0] < _b.ixyzw[0] ? 0xffffffff : 0x0; result.ixyzw[1] = _a.ixyzw[1] < _b.ixyzw[1] ? 0xffffffff : 0x0; result.ixyzw[2] = _a.ixyzw[2] < _b.ixyzw[2] ? 0xffffffff : 0x0; @@ -519,9 +590,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_icmpgt(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_icmpgt(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.ixyzw[0] = _a.ixyzw[0] > _b.ixyzw[0] ? 0xffffffff : 0x0; result.ixyzw[1] = _a.ixyzw[1] > _b.ixyzw[1] ? 0xffffffff : 0x0; result.ixyzw[2] = _a.ixyzw[2] > _b.ixyzw[2] ? 0xffffffff : 0x0; @@ -529,9 +601,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_imin(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_imin(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.ixyzw[0] = _a.ixyzw[0] < _b.ixyzw[0] ? _a.ixyzw[0] : _b.ixyzw[0]; result.ixyzw[1] = _a.ixyzw[1] < _b.ixyzw[1] ? _a.ixyzw[1] : _b.ixyzw[1]; result.ixyzw[2] = _a.ixyzw[2] < _b.ixyzw[2] ? _a.ixyzw[2] : _b.ixyzw[2]; @@ -539,9 +612,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_imax(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_imax(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.ixyzw[0] = _a.ixyzw[0] > _b.ixyzw[0] ? _a.ixyzw[0] : _b.ixyzw[0]; result.ixyzw[1] = _a.ixyzw[1] > _b.ixyzw[1] ? _a.ixyzw[1] : _b.ixyzw[1]; result.ixyzw[2] = _a.ixyzw[2] > _b.ixyzw[2] ? _a.ixyzw[2] : _b.ixyzw[2]; @@ -549,9 +623,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_iadd(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_iadd(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.ixyzw[0] = _a.ixyzw[0] + _b.ixyzw[0]; result.ixyzw[1] = _a.ixyzw[1] + _b.ixyzw[1]; result.ixyzw[2] = _a.ixyzw[2] + _b.ixyzw[2]; @@ -559,9 +634,10 @@ IMPLEMENT_TEST(xyzw , 0xf); return result; } - BX_FLOAT4_FORCE_INLINE float4_t float4_isub(float4_t _a, float4_t _b) + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_isub(simd128_ref_t _a, simd128_ref_t _b) { - float4_t result; + simd128_ref_t result; result.ixyzw[0] = _a.ixyzw[0] - _b.ixyzw[0]; result.ixyzw[1] = _a.ixyzw[1] - _b.ixyzw[1]; result.ixyzw[2] = _a.ixyzw[2] - _b.ixyzw[2]; @@ -571,34 +647,4 @@ IMPLEMENT_TEST(xyzw , 0xf); } // namespace bx -#define float4_shuf_xAzC float4_shuf_xAzC_ni -#define float4_shuf_yBwD float4_shuf_yBwD_ni -#define float4_rcp float4_rcp_ni -#define float4_orx float4_orx_ni -#define float4_orc float4_orc_ni -#define float4_neg float4_neg_ni -#define float4_madd float4_madd_ni -#define float4_nmsub float4_nmsub_ni -#define float4_div_nr float4_div_nr_ni -#define float4_selb float4_selb_ni -#define float4_sels float4_sels_ni -#define float4_not float4_not_ni -#define float4_abs float4_abs_ni -#define float4_clamp float4_clamp_ni -#define float4_lerp float4_lerp_ni -#define float4_rsqrt float4_rsqrt_ni -#define float4_rsqrt_nr float4_rsqrt_nr_ni -#define float4_rsqrt_carmack float4_rsqrt_carmack_ni -#define float4_sqrt_nr float4_sqrt_nr_ni -#define float4_log2 float4_log2_ni -#define float4_exp2 float4_exp2_ni -#define float4_pow float4_pow_ni -#define float4_cross3 float4_cross3_ni -#define float4_normalize3 float4_normalize3_ni -#define float4_dot3 float4_dot3_ni -#define float4_dot float4_dot_ni -#define float4_ceil float4_ceil_ni -#define float4_floor float4_floor_ni -#include "float4_ni.h" - -#endif // BX_FLOAT4_REF_H_HEADER_GUARD +#endif // BX_SIMD128_REF_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/simd128_sse.inl b/3rdparty/bx/include/bx/simd128_sse.inl new file mode 100644 index 00000000000..b0ed8520ab4 --- /dev/null +++ b/3rdparty/bx/include/bx/simd128_sse.inl @@ -0,0 +1,647 @@ +/* + * Copyright 2010-2016 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#ifndef BX_SIMD128_SSE_H_HEADER_GUARD +#define BX_SIMD128_SSE_H_HEADER_GUARD + +#include "simd_ni.inl" + +namespace bx +{ +#define ELEMx 0 +#define ELEMy 1 +#define ELEMz 2 +#define ELEMw 3 +#define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ + template<> \ + BX_SIMD_FORCE_INLINE simd128_sse_t simd_swiz_##_x##_y##_z##_w(simd128_sse_t _a) \ + { \ + return _mm_shuffle_ps( _a, _a, _MM_SHUFFLE(ELEM##_w, ELEM##_z, ELEM##_y, ELEM##_x ) ); \ + } + +#include "simd128_swizzle.inl" + +#undef BX_SIMD128_IMPLEMENT_SWIZZLE +#undef ELEMw +#undef ELEMz +#undef ELEMy +#undef ELEMx + +#define BX_SIMD128_IMPLEMENT_TEST(_xyzw, _mask) \ + template<> \ + BX_SIMD_FORCE_INLINE bool simd_test_any_##_xyzw(simd128_sse_t _test) \ + { \ + return 0x0 != (_mm_movemask_ps(_test)&(_mask) ); \ + } \ + \ + template<> \ + BX_SIMD_FORCE_INLINE bool simd_test_all_##_xyzw(simd128_sse_t _test) \ + { \ + return (_mask) == (_mm_movemask_ps(_test)&(_mask) ); \ + } + +BX_SIMD128_IMPLEMENT_TEST(x , 0x1); +BX_SIMD128_IMPLEMENT_TEST(y , 0x2); +BX_SIMD128_IMPLEMENT_TEST(xy , 0x3); +BX_SIMD128_IMPLEMENT_TEST(z , 0x4); +BX_SIMD128_IMPLEMENT_TEST(xz , 0x5); +BX_SIMD128_IMPLEMENT_TEST(yz , 0x6); +BX_SIMD128_IMPLEMENT_TEST(xyz , 0x7); +BX_SIMD128_IMPLEMENT_TEST(w , 0x8); +BX_SIMD128_IMPLEMENT_TEST(xw , 0x9); +BX_SIMD128_IMPLEMENT_TEST(yw , 0xa); +BX_SIMD128_IMPLEMENT_TEST(xyw , 0xb); +BX_SIMD128_IMPLEMENT_TEST(zw , 0xc); +BX_SIMD128_IMPLEMENT_TEST(xzw , 0xd); +BX_SIMD128_IMPLEMENT_TEST(yzw , 0xe); +BX_SIMD128_IMPLEMENT_TEST(xyzw , 0xf); + +#undef BX_SIMD128_IMPLEMENT_TEST + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_shuf_xyAB(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_movelh_ps(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_shuf_ABxy(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_movelh_ps(_b, _a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_shuf_CDzw(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_movehl_ps(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_shuf_zwCD(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_movehl_ps(_b, _a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_shuf_xAyB(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_unpacklo_ps(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_shuf_yBxA(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_unpacklo_ps(_b, _a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_shuf_zCwD(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_unpackhi_ps(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_shuf_CzDw(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_unpackhi_ps(_b, _a); + } + + template<> + BX_SIMD_FORCE_INLINE float simd_x(simd128_sse_t _a) + { + return _mm_cvtss_f32(_a); + } + + template<> + BX_SIMD_FORCE_INLINE float simd_y(simd128_sse_t _a) + { + const simd128_sse_t yyyy = simd_swiz_yyyy(_a); + const float result = _mm_cvtss_f32(yyyy); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE float simd_z(simd128_sse_t _a) + { + const simd128_sse_t zzzz = simd_swiz_zzzz(_a); + const float result = _mm_cvtss_f32(zzzz); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE float simd_w(simd128_sse_t _a) + { + const simd128_sse_t wwww = simd_swiz_wwww(_a); + const float result = _mm_cvtss_f32(wwww); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_ld(const void* _ptr) + { + return _mm_load_ps(reinterpret_cast(_ptr) ); + } + + template<> + BX_SIMD_FORCE_INLINE void simd_st(void* _ptr, simd128_sse_t _a) + { + _mm_store_ps(reinterpret_cast(_ptr), _a); + } + + template<> + BX_SIMD_FORCE_INLINE void simd_stx(void* _ptr, simd128_sse_t _a) + { + _mm_store_ss(reinterpret_cast(_ptr), _a); + } + + template<> + BX_SIMD_FORCE_INLINE void simd_stream(void* _ptr, simd128_sse_t _a) + { + _mm_stream_ps(reinterpret_cast(_ptr), _a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_ld(float _x, float _y, float _z, float _w) + { + return _mm_set_ps(_w, _z, _y, _x); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w) + { + const __m128i set = _mm_set_epi32(_w, _z, _y, _x); + const simd128_sse_t result = _mm_castsi128_ps(set); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_splat(const void* _ptr) + { + const simd128_sse_t x___ = _mm_load_ss(reinterpret_cast(_ptr) ); + const simd128_sse_t result = simd_swiz_xxxx(x___); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_splat(float _a) + { + return _mm_set1_ps(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_isplat(uint32_t _a) + { + const __m128i splat = _mm_set1_epi32(_a); + const simd128_sse_t result = _mm_castsi128_ps(splat); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_zero() + { + return _mm_setzero_ps(); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_itof(simd128_sse_t _a) + { + const __m128i itof = _mm_castps_si128(_a); + const simd128_sse_t result = _mm_cvtepi32_ps(itof); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_ftoi(simd128_sse_t _a) + { + const __m128i ftoi = _mm_cvtps_epi32(_a); + const simd128_sse_t result = _mm_castsi128_ps(ftoi); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_round(simd128_sse_t _a) + { +#if defined(__SSE4_1__) + return _mm_round_ps(_a, _MM_FROUND_NINT); +#else + const __m128i round = _mm_cvtps_epi32(_a); + const simd128_sse_t result = _mm_cvtepi32_ps(round); + + return result; +#endif // defined(__SSE4_1__) + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_add(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_add_ps(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_sub(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_sub_ps(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_mul(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_mul_ps(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_div(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_div_ps(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_rcp_est(simd128_sse_t _a) + { + return _mm_rcp_ps(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_sqrt(simd128_sse_t _a) + { + return _mm_sqrt_ps(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_rsqrt_est(simd128_sse_t _a) + { + return _mm_rsqrt_ps(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_dot3(simd128_sse_t _a, simd128_sse_t _b) + { +#if defined(__SSE4_1__) + return _mm_dp_ps(_a, _b, 0x77); +#else + return simd_dot3_ni(_a, _b); +#endif // defined(__SSE4__) + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_dot(simd128_sse_t _a, simd128_sse_t _b) + { +#if defined(__SSE4_1__) + return _mm_dp_ps(_a, _b, 0xFF); +#else + return simd_dot_ni(_a, _b); +#endif // defined(__SSE4__) + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_cmpeq(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_cmpeq_ps(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_cmplt(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_cmplt_ps(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_cmple(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_cmple_ps(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_cmpgt(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_cmpgt_ps(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_cmpge(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_cmpge_ps(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_min(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_min_ps(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_max(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_max_ps(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_and(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_and_ps(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_andc(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_andnot_ps(_b, _a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_or(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_or_ps(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_xor(simd128_sse_t _a, simd128_sse_t _b) + { + return _mm_xor_ps(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_sll(simd128_sse_t _a, int _count) + { + const __m128i a = _mm_castps_si128(_a); + const __m128i shift = _mm_slli_epi32(a, _count); + const simd128_sse_t result = _mm_castsi128_ps(shift); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_srl(simd128_sse_t _a, int _count) + { + const __m128i a = _mm_castps_si128(_a); + const __m128i shift = _mm_srli_epi32(a, _count); + const simd128_sse_t result = _mm_castsi128_ps(shift); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_sra(simd128_sse_t _a, int _count) + { + const __m128i a = _mm_castps_si128(_a); + const __m128i shift = _mm_srai_epi32(a, _count); + const simd128_sse_t result = _mm_castsi128_ps(shift); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_icmpeq(simd128_sse_t _a, simd128_sse_t _b) + { + const __m128i tmp0 = _mm_castps_si128(_a); + const __m128i tmp1 = _mm_castps_si128(_b); + const __m128i tmp2 = _mm_cmpeq_epi32(tmp0, tmp1); + const simd128_sse_t result = _mm_castsi128_ps(tmp2); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_icmplt(simd128_sse_t _a, simd128_sse_t _b) + { + const __m128i tmp0 = _mm_castps_si128(_a); + const __m128i tmp1 = _mm_castps_si128(_b); + const __m128i tmp2 = _mm_cmplt_epi32(tmp0, tmp1); + const simd128_sse_t result = _mm_castsi128_ps(tmp2); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_icmpgt(simd128_sse_t _a, simd128_sse_t _b) + { + const __m128i tmp0 = _mm_castps_si128(_a); + const __m128i tmp1 = _mm_castps_si128(_b); + const __m128i tmp2 = _mm_cmpgt_epi32(tmp0, tmp1); + const simd128_sse_t result = _mm_castsi128_ps(tmp2); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_imin(simd128_sse_t _a, simd128_sse_t _b) + { +#if defined(__SSE4_1__) + const __m128i tmp0 = _mm_castps_si128(_a); + const __m128i tmp1 = _mm_castps_si128(_b); + const __m128i tmp2 = _mm_min_epi32(tmp0, tmp1); + const simd128_sse_t result = _mm_castsi128_ps(tmp2); + + return result; +#else + return simd_imin_ni(_a, _b); +#endif // defined(__SSE4_1__) + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_imax(simd128_sse_t _a, simd128_sse_t _b) + { +#if defined(__SSE4_1__) + const __m128i tmp0 = _mm_castps_si128(_a); + const __m128i tmp1 = _mm_castps_si128(_b); + const __m128i tmp2 = _mm_max_epi32(tmp0, tmp1); + const simd128_sse_t result = _mm_castsi128_ps(tmp2); + + return result; +#else + return simd_imax_ni(_a, _b); +#endif // defined(__SSE4_1__) + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_iadd(simd128_sse_t _a, simd128_sse_t _b) + { + const __m128i a = _mm_castps_si128(_a); + const __m128i b = _mm_castps_si128(_b); + const __m128i add = _mm_add_epi32(a, b); + const simd128_sse_t result = _mm_castsi128_ps(add); + + return result; + } + + template<> + BX_SIMD_FORCE_INLINE simd128_sse_t simd_isub(simd128_sse_t _a, simd128_sse_t _b) + { + const __m128i a = _mm_castps_si128(_a); + const __m128i b = _mm_castps_si128(_b); + const __m128i sub = _mm_sub_epi32(a, b); + const simd128_sse_t result = _mm_castsi128_ps(sub); + + return result; + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_shuf_xAzC(simd128_sse_t _a, simd128_sse_t _b) + { + return simd_shuf_xAzC_ni(_a, _b); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_shuf_yBwD(simd128_sse_t _a, simd128_sse_t _b) + { + return simd_shuf_yBwD_ni(_a, _b); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_rcp(simd128_sse_t _a) + { + return simd_rcp_ni(_a); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_orx(simd128_sse_t _a) + { + return simd_orx_ni(_a); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_orc(simd128_sse_t _a, simd128_sse_t _b) + { + return simd_orc_ni(_a, _b); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_neg(simd128_sse_t _a) + { + return simd_neg_ni(_a); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_madd(simd128_sse_t _a, simd128_sse_t _b, simd128_sse_t _c) + { + return simd_madd_ni(_a, _b, _c); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_nmsub(simd128_sse_t _a, simd128_sse_t _b, simd128_sse_t _c) + { + return simd_nmsub_ni(_a, _b, _c); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_div_nr(simd128_sse_t _a, simd128_sse_t _b) + { + return simd_div_nr_ni(_a, _b); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_selb(simd128_sse_t _mask, simd128_sse_t _a, simd128_sse_t _b) + { + return simd_selb_ni(_mask, _a, _b); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_sels(simd128_sse_t _test, simd128_sse_t _a, simd128_sse_t _b) + { + return simd_sels_ni(_test, _a, _b); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_not(simd128_sse_t _a) + { + return simd_not_ni(_a); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_abs(simd128_sse_t _a) + { + return simd_abs_ni(_a); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_clamp(simd128_sse_t _a, simd128_sse_t _min, simd128_sse_t _max) + { + return simd_clamp_ni(_a, _min, _max); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_lerp(simd128_sse_t _a, simd128_sse_t _b, simd128_sse_t _s) + { + return simd_lerp_ni(_a, _b, _s); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_rsqrt(simd128_sse_t _a) + { + return simd_rsqrt_ni(_a); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_rsqrt_nr(simd128_sse_t _a) + { + return simd_rsqrt_nr_ni(_a); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_rsqrt_carmack(simd128_sse_t _a) + { + return simd_rsqrt_carmack_ni(_a); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_sqrt_nr(simd128_sse_t _a) + { + return simd_sqrt_nr_ni(_a); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_log2(simd128_sse_t _a) + { + return simd_log2_ni(_a); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_exp2(simd128_sse_t _a) + { + return simd_exp2_ni(_a); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_pow(simd128_sse_t _a, simd128_sse_t _b) + { + return simd_pow_ni(_a, _b); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_cross3(simd128_sse_t _a, simd128_sse_t _b) + { + return simd_cross3_ni(_a, _b); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_normalize3(simd128_sse_t _a) + { + return simd_normalize3_ni(_a); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_ceil(simd128_sse_t _a) + { + return simd_ceil_ni(_a); + } + + template<> + BX_SIMD_INLINE simd128_sse_t simd_floor(simd128_sse_t _a) + { + return simd_floor_ni(_a); + } + + typedef simd128_sse_t simd128_t; + +} // namespace bx + +#endif // BX_SIMD128_SSE_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/simd128_swizzle.inl b/3rdparty/bx/include/bx/simd128_swizzle.inl new file mode 100644 index 00000000000..4185be81b60 --- /dev/null +++ b/3rdparty/bx/include/bx/simd128_swizzle.inl @@ -0,0 +1,266 @@ +/* + * Copyright 2010-2015 Branimir Karadzic. All rights reserved. + * License: http://www.opensource.org/licenses/BSD-2-Clause + */ + +#ifndef BX_SIMD_T_H_HEADER_GUARD +# error "xmacro file, must be included from simd_*.h" +#endif // BX_FLOAT4_T_H_HEADER_GUARD + +// included from float4_t.h +BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, x, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, x, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, x, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, x, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, y, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, y, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, y, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, y, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, z, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, z, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, z, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, z, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, w, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, w, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, w, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, w, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, x, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, x, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, x, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, x, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, y, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, y, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, y, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, y, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, z, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, z, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, z, z) +// BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, z, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, w, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, w, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, w, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, w, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, x, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, x, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, x, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, x, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, y, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, y, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, y, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, y, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, z, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, z, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, z, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, z, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, w, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, w, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, w, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, w, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, x, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, x, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, x, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, x, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, y, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, y, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, y, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, y, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, z, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, z, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, z, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, z, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, w, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, w, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, w, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, w, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, x, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, x, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, x, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, x, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, y, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, y, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, y, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, y, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, z, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, z, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, z, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, z, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, w, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, w, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, w, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, w, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, x, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, x, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, x, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, x, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, y, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, y, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, y, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, y, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, z, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, z, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, z, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, z, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, w, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, w, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, w, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, w, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, x, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, x, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, x, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, x, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, y, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, y, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, y, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, y, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, z, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, z, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, z, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, z, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, w, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, w, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, w, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, w, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, x, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, x, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, x, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, x, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, y, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, y, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, y, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, y, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, z, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, z, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, z, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, z, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, w, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, w, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, w, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, w, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, x, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, x, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, x, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, x, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, y, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, y, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, y, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, y, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, z, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, z, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, z, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, z, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, w, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, w, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, w, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, w, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, x, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, x, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, x, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, x, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, y, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, y, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, y, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, y, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, z, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, z, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, z, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, z, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, w, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, w, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, w, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, w, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, x, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, x, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, x, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, x, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, y, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, y, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, y, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, y, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, z, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, z, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, z, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, z, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, w, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, w, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, w, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, w, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, x, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, x, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, x, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, x, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, y, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, y, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, y, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, y, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, z, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, z, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, z, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, z, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, w, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, w, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, w, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, w, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, x, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, x, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, x, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, x, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, y, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, y, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, y, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, y, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, z, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, z, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, z, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, z, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, w, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, w, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, w, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, w, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, x, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, x, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, x, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, x, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, y, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, y, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, y, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, y, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, z, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, z, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, z, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, z, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, w, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, w, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, w, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, w, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, x, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, x, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, x, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, x, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, y, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, y, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, y, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, y, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, z, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, z, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, z, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, z, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, w, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, w, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, w, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, w, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, x, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, x, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, x, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, x, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, y, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, y, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, y, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, y, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, z, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, z, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, z, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, z, w) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, w, x) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, w, y) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, w, z) +BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, w, w) diff --git a/3rdparty/bx/include/bx/simd256_avx.inl b/3rdparty/bx/include/bx/simd256_avx.inl new file mode 100644 index 00000000000..c0f925e4160 --- /dev/null +++ b/3rdparty/bx/include/bx/simd256_avx.inl @@ -0,0 +1,9 @@ +/* + * Copyright 2010-2016 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#ifndef BX_SIMD256_AVX_H_HEADER_GUARD +#define BX_SIMD256_AVX_H_HEADER_GUARD + +#endif // BX_SIMD256_AVX_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/simd256_ref.inl b/3rdparty/bx/include/bx/simd256_ref.inl new file mode 100644 index 00000000000..84ecd6e5f9f --- /dev/null +++ b/3rdparty/bx/include/bx/simd256_ref.inl @@ -0,0 +1,9 @@ +/* + * Copyright 2010-2016 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#ifndef BX_SIMD256_REF_H_HEADER_GUARD +#define BX_SIMD256_REF_H_HEADER_GUARD + +#endif // BX_SIMD256_REF_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/simd_ni.inl b/3rdparty/bx/include/bx/simd_ni.inl new file mode 100644 index 00000000000..cab10861e5e --- /dev/null +++ b/3rdparty/bx/include/bx/simd_ni.inl @@ -0,0 +1,558 @@ +/* + * Copyright 2010-2016 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#ifndef BX_SIMD_NI_H_HEADER_GUARD +#define BX_SIMD_NI_H_HEADER_GUARD + +namespace bx +{ + template + BX_SIMD_INLINE Ty simd_shuf_xAzC_ni(Ty _a, Ty _b) + { + const Ty xAyB = simd_shuf_xAyB(_a, _b); + const Ty zCwD = simd_shuf_zCwD(_a, _b); + const Ty result = simd_shuf_xyAB(xAyB, zCwD); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_shuf_yBwD_ni(Ty _a, Ty _b) + { + const Ty xAyB = simd_shuf_xAyB(_a, _b); + const Ty zCwD = simd_shuf_zCwD(_a, _b); + const Ty result = simd_shuf_zwCD(xAyB, zCwD); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_madd_ni(Ty _a, Ty _b, Ty _c) + { + const Ty mul = simd_mul(_a, _b); + const Ty result = simd_add(mul, _c); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_nmsub_ni(Ty _a, Ty _b, Ty _c) + { + const Ty mul = simd_mul(_a, _b); + const Ty result = simd_sub(_c, mul); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_div_nr_ni(Ty _a, Ty _b) + { + const Ty oneish = simd_isplat(0x3f800001); + const Ty est = simd_rcp_est(_b); + const Ty iter0 = simd_mul(_a, est); + const Ty tmp1 = simd_nmsub(_b, est, oneish); + const Ty result = simd_madd(tmp1, iter0, iter0); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_rcp_ni(Ty _a) + { + const Ty one = simd_splat(1.0f); + const Ty result = simd_div(one, _a); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_orx_ni(Ty _a) + { + const Ty zwxy = simd_swiz_zwxy(_a); + const Ty tmp0 = simd_or(_a, zwxy); + const Ty tmp1 = simd_swiz_yyyy(_a); + const Ty tmp2 = simd_or(tmp0, tmp1); + const Ty mf000 = simd_ild(UINT32_MAX, 0, 0, 0); + const Ty result = simd_and(tmp2, mf000); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_orc_ni(Ty _a, Ty _b) + { + const Ty aorb = simd_or(_a, _b); + const Ty mffff = simd_isplat(UINT32_MAX); + const Ty result = simd_xor(aorb, mffff); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_neg_ni(Ty _a) + { + const Ty zero = simd_zero(); + const Ty result = simd_sub(zero, _a); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_selb_ni(Ty _mask, Ty _a, Ty _b) + { + const Ty sel_a = simd_and(_a, _mask); + const Ty sel_b = simd_andc(_b, _mask); + const Ty result = simd_or(sel_a, sel_b); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_sels_ni(Ty _test, Ty _a, Ty _b) + { + const Ty mask = simd_sra(_test, 31); + const Ty result = simd_selb(mask, _a, _b); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_not_ni(Ty _a) + { + const Ty mffff = simd_isplat(UINT32_MAX); + const Ty result = simd_xor(_a, mffff); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_min_ni(Ty _a, Ty _b) + { + const Ty mask = simd_cmplt(_a, _b); + const Ty result = simd_selb(mask, _a, _b); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_max_ni(Ty _a, Ty _b) + { + const Ty mask = simd_cmpgt(_a, _b); + const Ty result = simd_selb(mask, _a, _b); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_abs_ni(Ty _a) + { + const Ty a_neg = simd_neg(_a); + const Ty result = simd_max(a_neg, _a); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_imin_ni(Ty _a, Ty _b) + { + const Ty mask = simd_icmplt(_a, _b); + const Ty result = simd_selb(mask, _a, _b); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_imax_ni(Ty _a, Ty _b) + { + const Ty mask = simd_icmpgt(_a, _b); + const Ty result = simd_selb(mask, _a, _b); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_clamp_ni(Ty _a, Ty _min, Ty _max) + { + const Ty tmp = simd_min(_a, _max); + const Ty result = simd_max(tmp, _min); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_lerp_ni(Ty _a, Ty _b, Ty _s) + { + const Ty ba = simd_sub(_b, _a); + const Ty result = simd_madd(_s, ba, _a); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_sqrt_nr_ni(Ty _a) + { + const Ty half = simd_splat(0.5f); + const Ty one = simd_splat(1.0f); + const Ty tmp0 = simd_rsqrt_est(_a); + const Ty tmp1 = simd_mul(tmp0, _a); + const Ty tmp2 = simd_mul(tmp1, half); + const Ty tmp3 = simd_nmsub(tmp0, tmp1, one); + const Ty result = simd_madd(tmp3, tmp2, tmp1); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_sqrt_nr1_ni(Ty _a) + { + const Ty half = simd_splat(0.5f); + + Ty result = _a; + for (uint32_t ii = 0; ii < 11; ++ii) + { + const Ty tmp1 = simd_div(_a, result); + const Ty tmp2 = simd_add(tmp1, result); + result = simd_mul(tmp2, half); + } + + return result; + } + + template + BX_SIMD_INLINE Ty simd_rsqrt_ni(Ty _a) + { + const Ty one = simd_splat(1.0f); + const Ty sqrt = simd_sqrt(_a); + const Ty result = simd_div(one, sqrt); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_rsqrt_nr_ni(Ty _a) + { + const Ty rsqrt = simd_rsqrt_est(_a); + const Ty iter0 = simd_mul(_a, rsqrt); + const Ty iter1 = simd_mul(iter0, rsqrt); + const Ty half = simd_splat(0.5f); + const Ty half_rsqrt = simd_mul(half, rsqrt); + const Ty three = simd_splat(3.0f); + const Ty three_sub_iter1 = simd_sub(three, iter1); + const Ty result = simd_mul(half_rsqrt, three_sub_iter1); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_rsqrt_carmack_ni(Ty _a) + { + const Ty half = simd_splat(0.5f); + const Ty ah = simd_mul(half, _a); + const Ty ashift = simd_sra(_a, 1); + const Ty magic = simd_isplat(0x5f3759df); + const Ty msuba = simd_isub(magic, ashift); + const Ty msubasq = simd_mul(msuba, msuba); + const Ty tmp0 = simd_splat(1.5f); + const Ty tmp1 = simd_mul(ah, msubasq); + const Ty tmp2 = simd_sub(tmp0, tmp1); + const Ty result = simd_mul(msuba, tmp2); + + return result; + } + + namespace simd_logexp_detail + { + template + BX_SIMD_INLINE Ty simd_poly1(Ty _a, float _b, float _c) + { + const Ty bbbb = simd_splat(_b); + const Ty cccc = simd_splat(_c); + const Ty result = simd_madd(cccc, _a, bbbb); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_poly2(Ty _a, float _b, float _c, float _d) + { + const Ty bbbb = simd_splat(_b); + const Ty poly = simd_poly1(_a, _c, _d); + const Ty result = simd_madd(poly, _a, bbbb); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_poly3(Ty _a, float _b, float _c, float _d, float _e) + { + const Ty bbbb = simd_splat(_b); + const Ty poly = simd_poly2(_a, _c, _d, _e); + const Ty result = simd_madd(poly, _a, bbbb); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_poly4(Ty _a, float _b, float _c, float _d, float _e, float _f) + { + const Ty bbbb = simd_splat(_b); + const Ty poly = simd_poly3(_a, _c, _d, _e, _f); + const Ty result = simd_madd(poly, _a, bbbb); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_poly5(Ty _a, float _b, float _c, float _d, float _e, float _f, float _g) + { + const Ty bbbb = simd_splat(_b); + const Ty poly = simd_poly4(_a, _c, _d, _e, _f, _g); + const Ty result = simd_madd(poly, _a, bbbb); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_logpoly(Ty _a) + { +#if 1 + const Ty result = simd_poly5(_a + , 3.11578814719469302614f, -3.32419399085241980044f + , 2.59883907202499966007f, -1.23152682416275988241f + , 0.318212422185251071475f, -0.0344359067839062357313f + ); +#elif 0 + const Ty result = simd_poly4(_a + , 2.8882704548164776201f, -2.52074962577807006663f + , 1.48116647521213171641f, -0.465725644288844778798f + , 0.0596515482674574969533f + ); +#elif 0 + const Ty result = simd_poly3(_a + , 2.61761038894603480148f, -1.75647175389045657003f + , 0.688243882994381274313f, -0.107254423828329604454f + ); +#else + const Ty result = simd_poly2(_a + , 2.28330284476918490682f, -1.04913055217340124191f + , 0.204446009836232697516f + ); +#endif + + return result; + } + + template + BX_SIMD_INLINE Ty simd_exppoly(Ty _a) + { +#if 1 + const Ty result = simd_poly5(_a + , 9.9999994e-1f, 6.9315308e-1f + , 2.4015361e-1f, 5.5826318e-2f + , 8.9893397e-3f, 1.8775767e-3f + ); +#elif 0 + const Ty result = simd_poly4(_a + , 1.0000026f, 6.9300383e-1f + , 2.4144275e-1f, 5.2011464e-2f + , 1.3534167e-2f + ); +#elif 0 + const Ty result = simd_poly3(_a + , 9.9992520e-1f, 6.9583356e-1f + , 2.2606716e-1f, 7.8024521e-2f + ); +#else + const Ty result = simd_poly2(_a + , 1.0017247f, 6.5763628e-1f + , 3.3718944e-1f + ); +#endif // 0 + + return result; + } + } // namespace simd_internal + + template + BX_SIMD_INLINE Ty simd_log2_ni(Ty _a) + { + const Ty expmask = simd_isplat(0x7f800000); + const Ty mantmask = simd_isplat(0x007fffff); + const Ty one = simd_splat(1.0f); + + const Ty c127 = simd_isplat(127); + const Ty aexp = simd_and(_a, expmask); + const Ty aexpsr = simd_srl(aexp, 23); + const Ty tmp0 = simd_isub(aexpsr, c127); + const Ty exp = simd_itof(tmp0); + + const Ty amask = simd_and(_a, mantmask); + const Ty mant = simd_or(amask, one); + + const Ty poly = simd_logexp_detail::simd_logpoly(mant); + + const Ty mandiff = simd_sub(mant, one); + const Ty result = simd_madd(poly, mandiff, exp); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_exp2_ni(Ty _a) + { + const Ty min = simd_splat( 129.0f); + const Ty max = simd_splat(-126.99999f); + const Ty tmp0 = simd_min(_a, min); + const Ty aaaa = simd_max(tmp0, max); + + const Ty half = simd_splat(0.5f); + const Ty tmp2 = simd_sub(aaaa, half); + const Ty ipart = simd_ftoi(tmp2); + const Ty iround = simd_itof(ipart); + const Ty fpart = simd_sub(aaaa, iround); + + const Ty c127 = simd_isplat(127); + const Ty tmp5 = simd_iadd(ipart, c127); + const Ty expipart = simd_sll(tmp5, 23); + + const Ty expfpart = simd_logexp_detail::simd_exppoly(fpart); + + const Ty result = simd_mul(expipart, expfpart); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_pow_ni(Ty _a, Ty _b) + { + const Ty alog2 = simd_log2(_a); + const Ty alog2b = simd_mul(alog2, _b); + const Ty result = simd_exp2(alog2b); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_dot3_ni(Ty _a, Ty _b) + { + const Ty xyzw = simd_mul(_a, _b); + const Ty xxxx = simd_swiz_xxxx(xyzw); + const Ty yyyy = simd_swiz_yyyy(xyzw); + const Ty zzzz = simd_swiz_zzzz(xyzw); + const Ty tmp1 = simd_add(xxxx, yyyy); + const Ty result = simd_add(zzzz, tmp1); + return result; + } + + template + BX_SIMD_INLINE Ty simd_cross3_ni(Ty _a, Ty _b) + { + // a.yzx * b.zxy - a.zxy * b.yzx == (a * b.yzx - a.yzx * b).yzx +#if 0 + const Ty a_yzxw = simd_swiz_yzxw(_a); + const Ty a_zxyw = simd_swiz_zxyw(_a); + const Ty b_zxyw = simd_swiz_zxyw(_b); + const Ty b_yzxw = simd_swiz_yzxw(_b); + const Ty tmp = simd_mul(a_yzxw, b_zxyw); + const Ty result = simd_nmsub(a_zxyw, b_yzxw, tmp); +#else + const Ty a_yzxw = simd_swiz_yzxw(_a); + const Ty b_yzxw = simd_swiz_yzxw(_b); + const Ty tmp0 = simd_mul(_a, b_yzxw); + const Ty tmp1 = simd_nmsub(a_yzxw, _b, tmp0); + const Ty result = simd_swiz_yzxw(tmp1); +#endif + + return result; + } + + template + BX_SIMD_INLINE Ty simd_normalize3_ni(Ty _a) + { + const Ty dot3 = simd_dot3(_a, _a); + const Ty invSqrt = simd_rsqrt(dot3); + const Ty result = simd_mul(_a, invSqrt); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_dot_ni(Ty _a, Ty _b) + { + const Ty xyzw = simd_mul(_a, _b); + const Ty yzwx = simd_swiz_yzwx(xyzw); + const Ty tmp0 = simd_add(xyzw, yzwx); + const Ty zwxy = simd_swiz_zwxy(tmp0); + const Ty result = simd_add(tmp0, zwxy); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_ceil_ni(Ty _a) + { + const Ty tmp0 = simd_ftoi(_a); + const Ty tmp1 = simd_itof(tmp0); + const Ty mask = simd_cmplt(tmp1, _a); + const Ty one = simd_splat(1.0f); + const Ty tmp2 = simd_and(one, mask); + const Ty result = simd_add(tmp1, tmp2); + + return result; + } + + template + BX_SIMD_INLINE Ty simd_floor_ni(Ty _a) + { + const Ty tmp0 = simd_ftoi(_a); + const Ty tmp1 = simd_itof(tmp0); + const Ty mask = simd_cmpgt(tmp1, _a); + const Ty one = simd_splat(1.0f); + const Ty tmp2 = simd_and(one, mask); + const Ty result = simd_sub(tmp1, tmp2); + + return result; + } + + template + BX_SIMD_FORCE_INLINE Ty simd_round_ni(Ty _a) + { + const Ty tmp = simd_ftoi(_a); + const Ty result = simd_itof(tmp); + + return result; + } + + template + BX_SIMD_INLINE bool simd_test_any_ni(Ty _a) + { + const Ty mask = simd_sra(_a, 31); + const Ty zwxy = simd_swiz_zwxy(mask); + const Ty tmp0 = simd_or(mask, zwxy); + const Ty tmp1 = simd_swiz_yyyy(tmp0); + const Ty tmp2 = simd_or(tmp0, tmp1); + int res; + simd_stx(&res, tmp2); + return 0 != res; + } + + template + BX_SIMD_INLINE bool simd_test_all_ni(Ty _a) + { + const Ty bits = simd_sra(_a, 31); + const Ty m1248 = simd_ild(1, 2, 4, 8); + const Ty mask = simd_and(bits, m1248); + const Ty zwxy = simd_swiz_zwxy(mask); + const Ty tmp0 = simd_or(mask, zwxy); + const Ty tmp1 = simd_swiz_yyyy(tmp0); + const Ty tmp2 = simd_or(tmp0, tmp1); + int res; + simd_stx(&res, tmp2); + return 0xf == res; + } + +} // namespace bx + +#endif // BX_SIMD_NI_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/simd_t.h b/3rdparty/bx/include/bx/simd_t.h new file mode 100644 index 00000000000..a2884f6e734 --- /dev/null +++ b/3rdparty/bx/include/bx/simd_t.h @@ -0,0 +1,438 @@ +/* + * Copyright 2010-2016 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#ifndef BX_SIMD_T_H_HEADER_GUARD +#define BX_SIMD_T_H_HEADER_GUARD + +#include "bx.h" + +#define BX_SIMD_FORCE_INLINE BX_FORCE_INLINE +#define BX_SIMD_INLINE inline + +#define BX_SIMD_AVX 0 +#define BX_SIMD_LANGEXT 0 +#define BX_SIMD_NEON 0 +#define BX_SIMD_SSE 0 + +#if defined(__AVX__) || defined(__AVX2__) +# include +# undef BX_SIMD_AVX +# define BX_SIMD_AVX 1 +#endif // + +#if defined(__SSE2__) || (BX_COMPILER_MSVC && (BX_ARCH_64BIT || _M_IX86_FP >= 2) ) +# include // __m128i +# if defined(__SSE4_1__) +# include +# endif // defined(__SSE4_1__) +# include // __m128 +# undef BX_SIMD_SSE +# define BX_SIMD_SSE 1 +#elif defined(__ARM_NEON__) && !BX_COMPILER_CLANG +# include +# undef BX_SIMD_NEON +# define BX_SIMD_NEON 1 +#elif BX_COMPILER_CLANG \ + && !BX_PLATFORM_EMSCRIPTEN \ + && !BX_PLATFORM_IOS \ + && BX_CLANG_HAS_EXTENSION(attribute_ext_vector_type) +# include +# undef BX_SIMD_LANGEXT +# define BX_SIMD_LANGEXT 1 +#endif // + +namespace bx +{ +#define ELEMx 0 +#define ELEMy 1 +#define ELEMz 2 +#define ELEMw 3 +#define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ + template \ + BX_SIMD_FORCE_INLINE Ty simd_swiz_##_x##_y##_z##_w(Ty _a); +#include "simd128_swizzle.inl" + +#undef BX_SIMD128_IMPLEMENT_SWIZZLE +#undef ELEMw +#undef ELEMz +#undef ELEMy +#undef ELEMx + +#define BX_SIMD128_IMPLEMENT_TEST(_xyzw) \ + template \ + BX_SIMD_FORCE_INLINE bool simd_test_any_##_xyzw(Ty _test); \ + \ + template \ + BX_SIMD_FORCE_INLINE bool simd_test_all_##_xyzw(Ty _test) + +BX_SIMD128_IMPLEMENT_TEST(x ); +BX_SIMD128_IMPLEMENT_TEST(y ); +BX_SIMD128_IMPLEMENT_TEST(xy ); +BX_SIMD128_IMPLEMENT_TEST(z ); +BX_SIMD128_IMPLEMENT_TEST(xz ); +BX_SIMD128_IMPLEMENT_TEST(yz ); +BX_SIMD128_IMPLEMENT_TEST(xyz ); +BX_SIMD128_IMPLEMENT_TEST(w ); +BX_SIMD128_IMPLEMENT_TEST(xw ); +BX_SIMD128_IMPLEMENT_TEST(yw ); +BX_SIMD128_IMPLEMENT_TEST(xyw ); +BX_SIMD128_IMPLEMENT_TEST(zw ); +BX_SIMD128_IMPLEMENT_TEST(xzw ); +BX_SIMD128_IMPLEMENT_TEST(yzw ); +BX_SIMD128_IMPLEMENT_TEST(xyzw); +#undef BX_SIMD128_IMPLEMENT_TEST + + template + BX_SIMD_FORCE_INLINE Ty simd_shuf_xyAB(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_shuf_ABxy(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_shuf_CDzw(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_shuf_zwCD(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_shuf_xAyB(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_shuf_yBxA(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_shuf_zCwD(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_shuf_CzDw(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE float simd_x(Ty _a); + + template + BX_SIMD_FORCE_INLINE float simd_y(Ty _a); + + template + BX_SIMD_FORCE_INLINE float simd_z(Ty _a); + + template + BX_SIMD_FORCE_INLINE float simd_w(Ty _a); + + template + BX_SIMD_FORCE_INLINE Ty simd_ld(const void* _ptr); + + template + BX_SIMD_FORCE_INLINE void simd_st(void* _ptr, Ty _a); + + template + BX_SIMD_FORCE_INLINE void simd_stx(void* _ptr, Ty _a); + + template + BX_SIMD_FORCE_INLINE void simd_stream(void* _ptr, Ty _a); + + template + BX_SIMD_FORCE_INLINE Ty simd_ld(float _x, float _y, float _z, float _w); + + template + BX_SIMD_FORCE_INLINE Ty simd_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w); + + template + BX_SIMD_FORCE_INLINE Ty simd_splat(const void* _ptr); + + template + BX_SIMD_FORCE_INLINE Ty simd_splat(float _a); + + template + BX_SIMD_FORCE_INLINE Ty simd_isplat(uint32_t _a); + + template + BX_SIMD_FORCE_INLINE Ty simd_zero(); + + template + BX_SIMD_FORCE_INLINE Ty simd_itof(Ty _a); + + template + BX_SIMD_FORCE_INLINE Ty simd_ftoi(Ty _a); + + template + BX_SIMD_FORCE_INLINE Ty simd_round(Ty _a); + + template + BX_SIMD_FORCE_INLINE Ty simd_add(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_sub(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_mul(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_div(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_rcp_est(Ty _a); + + template + BX_SIMD_FORCE_INLINE Ty simd_sqrt(Ty _a); + + template + BX_SIMD_FORCE_INLINE Ty simd_rsqrt_est(Ty _a); + + template + BX_SIMD_FORCE_INLINE Ty simd_dot3(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_dot(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_cmpeq(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_cmplt(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_cmple(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_cmpgt(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_cmpge(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_min(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_max(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_and(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_andc(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_or(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_xor(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_sll(Ty _a, int _count); + + template + BX_SIMD_FORCE_INLINE Ty simd_srl(Ty _a, int _count); + + template + BX_SIMD_FORCE_INLINE Ty simd_sra(Ty _a, int _count); + + template + BX_SIMD_FORCE_INLINE Ty simd_icmpeq(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_icmplt(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_icmpgt(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_imin(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_imax(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_iadd(Ty _a, Ty _b); + + template + BX_SIMD_FORCE_INLINE Ty simd_isub(Ty _a, Ty _b); + + template + BX_SIMD_INLINE Ty simd_shuf_xAzC(Ty _a, Ty _b); + + template + BX_SIMD_INLINE Ty simd_shuf_yBwD(Ty _a, Ty _b); + + template + BX_SIMD_INLINE Ty simd_rcp(Ty _a); + + template + BX_SIMD_INLINE Ty simd_orx(Ty _a); + + template + BX_SIMD_INLINE Ty simd_orc(Ty _a, Ty _b); + + template + BX_SIMD_INLINE Ty simd_neg(Ty _a); + + template + BX_SIMD_INLINE Ty simd_madd(Ty _a, Ty _b, Ty _c); + + template + BX_SIMD_INLINE Ty simd_nmsub(Ty _a, Ty _b, Ty _c); + + template + BX_SIMD_INLINE Ty simd_div_nr(Ty _a, Ty _b); + + template + BX_SIMD_INLINE Ty simd_selb(Ty _mask, Ty _a, Ty _b); + + template + BX_SIMD_INLINE Ty simd_sels(Ty _test, Ty _a, Ty _b); + + template + BX_SIMD_INLINE Ty simd_not(Ty _a); + + template + BX_SIMD_INLINE Ty simd_abs(Ty _a); + + template + BX_SIMD_INLINE Ty simd_clamp(Ty _a, Ty _min, Ty _max); + + template + BX_SIMD_INLINE Ty simd_lerp(Ty _a, Ty _b, Ty _s); + + template + BX_SIMD_INLINE Ty simd_rsqrt(Ty _a); + + template + BX_SIMD_INLINE Ty simd_rsqrt_nr(Ty _a); + + template + BX_SIMD_INLINE Ty simd_rsqrt_carmack(Ty _a); + + template + BX_SIMD_INLINE Ty simd_sqrt_nr(Ty _a); + + template + BX_SIMD_INLINE Ty simd_log2(Ty _a); + + template + BX_SIMD_INLINE Ty simd_exp2(Ty _a); + + template + BX_SIMD_INLINE Ty simd_pow(Ty _a, Ty _b); + + template + BX_SIMD_INLINE Ty simd_cross3(Ty _a, Ty _b); + + template + BX_SIMD_INLINE Ty simd_normalize3(Ty _a); + + template + BX_SIMD_INLINE Ty simd_ceil(Ty _a); + + template + BX_SIMD_INLINE Ty simd_floor(Ty _a); + +#if BX_SIMD_AVX + typedef __m256 simd256_avx_t; +#endif // BX_SIMD_SSE + +#if BX_SIMD_LANGEXT + union simd128_langext_t + { + float __attribute__((vector_size(16))) vf; + int32_t __attribute__((vector_size(16))) vi; + uint32_t __attribute__((vector_size(16))) vu; + float fxyzw[4]; + int32_t ixyzw[4]; + uint32_t uxyzw[4]; + + }; +#endif // BX_SIMD_LANGEXT + +#if BX_SIMD_NEON + typedef float32x4_t simd128_neon_t; +#endif // BX_SIMD_NEON + +#if BX_SIMD_SSE + typedef __m128 simd128_sse_t; +#endif // BX_SIMD_SSE + + union simd128_ref_t + { + float fxyzw[4]; + int32_t ixyzw[4]; + uint32_t uxyzw[4]; + + }; + +} // namespace bx + +#if BX_SIMD_AVX +# include "simd256_avx.inl" +#endif // BX_SIMD_AVX + +#if BX_SIMD_LANGEXT +# include "simd128_langext.inl" +#endif // BX_SIMD_LANGEXT + +#if BX_SIMD_NEON +# include "simd128_neon.inl" +#endif // BX_SIMD_NEON + +#if BX_SIMD_SSE +# include "simd128_sse.inl" +#endif // BX_SIMD_SSE + +#include "simd128_ref.inl" +#include "simd256_ref.inl" + +namespace bx +{ +#if !( BX_SIMD_AVX \ + || BX_SIMD_LANGEXT \ + || BX_SIMD_NEON \ + || BX_SIMD_SSE \ + ) +# ifndef BX_SIMD_WARN_REFERENCE_IMPL +# define BX_SIMD_WARN_REFERENCE_IMPL 0 +# endif // BX_SIMD_WARN_REFERENCE_IMPL + +# if BX_SIMD_WARN_REFERENCE_IMPL +# pragma message("************************************\nUsing SIMD reference implementation!\n************************************") +# endif // BX_SIMD_WARN_REFERENCE_IMPL + + typedef simd128_ref_t simd128_t; +#endif // + + BX_SIMD_FORCE_INLINE simd128_t simd_zero() + { + return simd_zero(); + } + + BX_SIMD_FORCE_INLINE simd128_t simd_ld(const void* _ptr) + { + return simd_ld(_ptr); + } + + BX_SIMD_FORCE_INLINE simd128_t simd_ld(float _x, float _y, float _z, float _w) + { + return simd_ld(_x, _y, _z, _w); + } + + BX_SIMD_FORCE_INLINE simd128_t simd_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w) + { + return simd_ild(_x, _y, _z, _w); + } + + BX_SIMD_FORCE_INLINE simd128_t simd_splat(const void* _ptr) + { + return simd_splat(_ptr); + } + + BX_SIMD_FORCE_INLINE simd128_t simd_splat(float _a) + { + return simd_splat(_a); + } + + BX_SIMD_FORCE_INLINE simd128_t simd_isplat(uint32_t _a) + { + return simd_isplat(_a); + } +} // namespace bx + +#endif // BX_SIMD_T_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/string.h b/3rdparty/bx/include/bx/string.h index 937f15d1def..1bd322528b3 100644 --- a/3rdparty/bx/include/bx/string.h +++ b/3rdparty/bx/include/bx/string.h @@ -30,7 +30,7 @@ namespace bx /// Case insensitive string compare. inline int32_t stricmp(const char* _a, const char* _b) { -#if BX_COMPILER_MSVC_COMPATIBLE +#if BX_CRT_MSVC return ::_stricmp(_a, _b); #else return ::strcasecmp(_a, _b); diff --git a/3rdparty/bx/scripts/bx.lua b/3rdparty/bx/scripts/bx.lua index aa09b050f8a..8cae8b419e8 100644 --- a/3rdparty/bx/scripts/bx.lua +++ b/3rdparty/bx/scripts/bx.lua @@ -21,4 +21,5 @@ project "bx" files { "../include/**.h", + "../include/**.inl", } diff --git a/3rdparty/bx/scripts/toolchain.lua b/3rdparty/bx/scripts/toolchain.lua index 5ff98ccf8c1..0f751dd3aa4 100644 --- a/3rdparty/bx/scripts/toolchain.lua +++ b/3rdparty/bx/scripts/toolchain.lua @@ -717,7 +717,7 @@ function toolchain(_buildDir, _libDir) "NoImportLib", } includedirs { - "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/include", + "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/include", "$(ANDROID_NDK_ROOT)/sources/android/native_app_glue", } linkoptions { @@ -811,10 +811,10 @@ function toolchain(_buildDir, _libDir) objdir (path.join(_buildDir, "android-mips/obj")) libdirs { path.join(_libDir, "lib/android-mips"), - "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/mips", + "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/mips", } includedirs { - "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/mips/include", + "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/mips/include", } buildoptions { "--sysroot=" .. path.join("$(ANDROID_NDK_ROOT)/platforms", androidPlatform, "arch-mips"), @@ -832,10 +832,10 @@ function toolchain(_buildDir, _libDir) objdir (path.join(_buildDir, "android-x86/obj")) libdirs { path.join(_libDir, "lib/android-x86"), - "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86", + "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86", } includedirs { - "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86/include", + "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/include", } buildoptions { "--sysroot=" .. path.join("$(ANDROID_NDK_ROOT)/platforms", androidPlatform, "arch-x86"), diff --git a/3rdparty/bx/tests/float4_t.cpp b/3rdparty/bx/tests/float4_t.cpp deleted file mode 100644 index 3bdfb1976b1..00000000000 --- a/3rdparty/bx/tests/float4_t.cpp +++ /dev/null @@ -1,309 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#include "test.h" -#include -#include -#include - -using namespace bx; - -union float4_cast -{ - bx::float4_t f4; - float f[4]; - uint32_t ui[4]; - int32_t i[4]; - char c[16]; -}; - -void float4_check_bool(const char* _str, bool _a, bool _0) -{ - DBG("%s %d == %d" - , _str - , _a - , _0 - ); - - CHECK_EQUAL(_a, _0); -} - -void float4_check_int32(const char* _str, bx::float4_t _a, int32_t _0, int32_t _1, int32_t _2, int32_t _3) -{ - float4_cast c; c.f4 = _a; - DBG("%s (%d, %d, %d, %d) == (%d, %d, %d, %d)" - , _str - , c.i[0], c.i[1], c.i[2], c.i[3] - , _0, _1, _2, _3 - ); - - CHECK_EQUAL(c.i[0], _0); - CHECK_EQUAL(c.i[1], _1); - CHECK_EQUAL(c.i[2], _2); - CHECK_EQUAL(c.i[3], _3); -} - -void float4_check_uint32(const char* _str, bx::float4_t _a, uint32_t _0, uint32_t _1, uint32_t _2, uint32_t _3) -{ - float4_cast c; c.f4 = _a; - - DBG("%s (0x%08x, 0x%08x, 0x%08x, 0x%08x) == (0x%08x, 0x%08x, 0x%08x, 0x%08x)" - , _str - , c.ui[0], c.ui[1], c.ui[2], c.ui[3] - , _0, _1, _2, _3 - ); - - CHECK_EQUAL(c.ui[0], _0); - CHECK_EQUAL(c.ui[1], _1); - CHECK_EQUAL(c.ui[2], _2); - CHECK_EQUAL(c.ui[3], _3); -} - -void float4_check_float(const char* _str, bx::float4_t _a, float _0, float _1, float _2, float _3) -{ - float4_cast c; c.f4 = _a; - - DBG("%s (%f, %f, %f, %f) == (%f, %f, %f, %f)" - , _str - , c.f[0], c.f[1], c.f[2], c.f[3] - , _0, _1, _2, _3 - ); - - CHECK(bx::fequal(c.f[0], _0, 0.0001f) ); - CHECK(bx::fequal(c.f[1], _1, 0.0001f) ); - CHECK(bx::fequal(c.f[2], _2, 0.0001f) ); - CHECK(bx::fequal(c.f[3], _3, 0.0001f) ); -} - -void float4_check_string(const char* _str, bx::float4_t _a) -{ - float4_cast c; c.f4 = _a; - const char test[5] = { c.c[0], c.c[4], c.c[8], c.c[12], '\0' }; - - DBG("%s %s", _str, test); - - CHECK(0 == strcmp(_str, test) ); -} - -TEST(float4_swizzle) -{ - const float4_t xyzw = float4_ild(0x78787878, 0x79797979, 0x7a7a7a7a, 0x77777777); - -#define ELEMx 0 -#define ELEMy 1 -#define ELEMz 2 -#define ELEMw 3 -#define IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ - float4_check_string("" #_x #_y #_z #_w "", float4_swiz_##_x##_y##_z##_w(xyzw) ); \ - -#include - -#undef IMPLEMENT_SWIZZLE -#undef ELEMw -#undef ELEMz -#undef ELEMy -#undef ELEMx -} - -TEST(float4_shuffle) -{ - const float4_t xyzw = float4_ild(0x78787878, 0x79797979, 0x7a7a7a7a, 0x77777777); - const float4_t ABCD = float4_ild(0x41414141, 0x42424242, 0x43434343, 0x44444444); - float4_check_string("xyAB", float4_shuf_xyAB(xyzw, ABCD) ); - float4_check_string("ABxy", float4_shuf_ABxy(xyzw, ABCD) ); - float4_check_string("zwCD", float4_shuf_zwCD(xyzw, ABCD) ); - float4_check_string("CDzw", float4_shuf_CDzw(xyzw, ABCD) ); - float4_check_string("xAyB", float4_shuf_xAyB(xyzw, ABCD) ); - float4_check_string("zCwD", float4_shuf_zCwD(xyzw, ABCD) ); - float4_check_string("xAzC", float4_shuf_xAzC(xyzw, ABCD) ); - float4_check_string("yBwD", float4_shuf_yBwD(xyzw, ABCD) ); - float4_check_string("CzDw", float4_shuf_CzDw(xyzw, ABCD) ); -} - -TEST(float4_compare) -{ - float4_check_uint32("cmpeq" - , float4_cmpeq(float4_ld(1.0f, 2.0f, 3.0f, 4.0f), float4_ld(0.0f, 2.0f, 0.0f, 3.0f) ) - , 0, 0xffffffff, 0, 0 - ); - - float4_check_uint32("cmplt" - , float4_cmplt(float4_ld(1.0f, 2.0f, 3.0f, 4.0f), float4_ld(0.0f, 2.0f, 0.0f, 3.0f) ) - , 0, 0, 0, 0 - ); - - float4_check_uint32("cmple" - , float4_cmple(float4_ld(1.0f, 2.0f, 3.0f, 4.0f), float4_ld(0.0f, 2.0f, 0.0f, 3.0f) ) - , 0, 0xffffffff, 0, 0 - ); - - float4_check_uint32("cmpgt" - , float4_cmpgt(float4_ld(1.0f, 2.0f, 3.0f, 4.0f), float4_ld(0.0f, 2.0f, 0.0f, 3.0f) ) - , 0xffffffff, 0, 0xffffffff, 0xffffffff - ); - - float4_check_uint32("cmpge" - , float4_cmpge(float4_ld(1.0f, 2.0f, 3.0f, 4.0f), float4_ld(0.0f, 2.0f, 0.0f, 3.0f) ) - , 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff - ); - - float4_check_uint32("icmpeq" - , float4_icmpeq(float4_ild(0, 1, 2, 3), float4_ild(0, uint32_t(-2), 1, 3) ) - , 0xffffffff, 0, 0, 0xffffffff - ); - - float4_check_uint32("icmplt" - , float4_icmplt(float4_ild(0, 1, 2, 3), float4_ild(0, uint32_t(-2), 1, 3) ) - , 0, 0, 0, 0 - ); - - float4_check_uint32("icmpgt" - , float4_icmpgt(float4_ild(0, 1, 2, 3), float4_ild(0, uint32_t(-2), 1, 3) ) - , 0, 0xffffffff, 0xffffffff, 0 - ); -} - -TEST(float4_test) -{ - float4_check_bool("test_any_xyzw" - , float4_test_any_xyzw(float4_ild(0xffffffff, 0, 0, 0) ) - , true - ); - - float4_check_bool("test_all_xyzw" - , float4_test_all_xyzw(float4_ild(0xffffffff, 0, 0xffffffff, 0) ) - , false - ); - - float4_check_bool("test_all_xyzw" - , float4_test_all_xyzw(float4_ild(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff) ) - , true - ); - - float4_check_bool("test_all_xw" - , float4_test_all_xw(float4_ild(0xffffffff, 0, 0, 0xffffffff) ) - , true - ); - - float4_check_bool("test_all_xzw" - , float4_test_all_xzw(float4_ild(0xffffffff, 0, 0, 0xffffffff) ) - , false - ); -} - -TEST(float4_load) -{ - float4_check_float("ld" - , float4_ld(0.0f, 1.0f, 2.0f, 3.0f) - , 0.0f, 1.0f, 2.0f, 3.0f - ); - - float4_check_int32("ild" - , float4_ild(uint32_t(-1), 0, 1, 2) - , uint32_t(-1), 0, 1, 2 - ); - - float4_check_int32("ild" - , float4_ild(uint32_t(-1), uint32_t(-2), uint32_t(-3), uint32_t(-4) ) - , uint32_t(-1), uint32_t(-2), uint32_t(-3), uint32_t(-4) - ); - - float4_check_uint32("zero", float4_zero() - , 0, 0, 0, 0 - ); - - float4_check_uint32("isplat", float4_isplat(0x80000001) - , 0x80000001, 0x80000001, 0x80000001, 0x80000001 - ); - - float4_check_float("isplat", float4_splat(1.0f) - , 1.0f, 1.0f, 1.0f, 1.0f - ); -} - -TEST(float4_arithmetic) -{ - float4_check_float("madd" - , float4_madd(float4_ld(0.0f, 1.0f, 2.0f, 3.0f), float4_ld(4.0f, 5.0f, 6.0f, 7.0f), float4_ld(8.0f, 9.0f, 10.0f, 11.0f) ) - , 8.0f, 14.0f, 22.0f, 32.0f - ); - - float4_check_float("cross3" - , float4_cross3(float4_ld(1.0f, 0.0f, 0.0f, 0.0f), float4_ld(0.0f, 1.0f, 0.0f, 0.0f) ) - , 0.0f, 0.0f, 1.0f, 0.0f - ); -} - -TEST(float4_sqrt) -{ - float4_check_float("float4_sqrt" - , float4_sqrt(float4_ld(1.0f, 16.0f, 65536.0f, 123456.0f) ) - , 1.0f, 4.0f, 256.0f, 351.363060096f - ); - - float4_check_float("float4_sqrt_nr_ni" - , float4_sqrt_nr_ni(float4_ld(1.0f, 16.0f, 65536.0f, 123456.0f) ) - , 1.0f, 4.0f, 256.0f, 351.363060096f - ); - - float4_check_float("float4_sqrt_nr1_ni" - , float4_sqrt_nr1_ni(float4_ld(1.0f, 16.0f, 65536.0f, 123456.0f) ) - , 1.0f, 4.0f, 256.0f, 351.363060096f - ); -} - -TEST(float4) -{ - const float4_t isplat = float4_isplat(0x80000001); - float4_check_uint32("sll" - , float4_sll(isplat, 1) - , 0x00000002, 0x00000002, 0x00000002, 0x00000002 - ); - - float4_check_uint32("srl" - , float4_srl(isplat, 1) - , 0x40000000, 0x40000000, 0x40000000, 0x40000000 - ); - - float4_check_uint32("sra" - , float4_sra(isplat, 1) - , 0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000 - ); - - float4_check_uint32("and" - , float4_and(float4_isplat(0x55555555), float4_isplat(0xaaaaaaaa) ) - , 0, 0, 0, 0 - ); - - float4_check_uint32("or " - , float4_or(float4_isplat(0x55555555), float4_isplat(0xaaaaaaaa) ) - , uint32_t(-1), uint32_t(-1), uint32_t(-1), uint32_t(-1) - ); - - float4_check_uint32("xor" - , float4_or(float4_isplat(0x55555555), float4_isplat(0xaaaaaaaa) ) - , uint32_t(-1), uint32_t(-1), uint32_t(-1), uint32_t(-1) - ); - - float4_check_int32("imin" - , float4_imin(float4_ild(0, 1, 2, 3), float4_ild(uint32_t(-1), 2, uint32_t(-2), 1) ) - , uint32_t(-1), 1, uint32_t(-2), 1 - ); - - float4_check_float("min" - , float4_min(float4_ld(0.0f, 1.0f, 2.0f, 3.0f), float4_ld(-1.0f, 2.0f, -2.0f, 1.0f) ) - , -1.0f, 1.0f, -2.0f, 1.0f - ); - - float4_check_int32("imax" - , float4_imax(float4_ild(0, 1, 2, 3), float4_ild(uint32_t(-1), 2, uint32_t(-2), 1) ) - , 0, 2, 2, 3 - ); - - float4_check_float("max" - , float4_max(float4_ld(0.0f, 1.0f, 2.0f, 3.0f), float4_ld(-1.0f, 2.0f, -2.0f, 1.0f) ) - , 0.0f, 2.0f, 2.0f, 3.0f - ); -} diff --git a/3rdparty/bx/tests/simd_t.cpp b/3rdparty/bx/tests/simd_t.cpp new file mode 100644 index 00000000000..999438a234a --- /dev/null +++ b/3rdparty/bx/tests/simd_t.cpp @@ -0,0 +1,309 @@ +/* + * Copyright 2010-2016 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "test.h" +#include +#include +#include + +using namespace bx; + +union simd_cast +{ + bx::simd128_t f4; + float f[4]; + uint32_t ui[4]; + int32_t i[4]; + char c[16]; +}; + +void simd_check_bool(const char* _str, bool _a, bool _0) +{ + DBG("%s %d == %d" + , _str + , _a + , _0 + ); + + CHECK_EQUAL(_a, _0); +} + +void simd_check_int32(const char* _str, bx::simd128_t _a, int32_t _0, int32_t _1, int32_t _2, int32_t _3) +{ + simd_cast c; c.f4 = _a; + DBG("%s (%d, %d, %d, %d) == (%d, %d, %d, %d)" + , _str + , c.i[0], c.i[1], c.i[2], c.i[3] + , _0, _1, _2, _3 + ); + + CHECK_EQUAL(c.i[0], _0); + CHECK_EQUAL(c.i[1], _1); + CHECK_EQUAL(c.i[2], _2); + CHECK_EQUAL(c.i[3], _3); +} + +void simd_check_uint32(const char* _str, bx::simd128_t _a, uint32_t _0, uint32_t _1, uint32_t _2, uint32_t _3) +{ + simd_cast c; c.f4 = _a; + + DBG("%s (0x%08x, 0x%08x, 0x%08x, 0x%08x) == (0x%08x, 0x%08x, 0x%08x, 0x%08x)" + , _str + , c.ui[0], c.ui[1], c.ui[2], c.ui[3] + , _0, _1, _2, _3 + ); + + CHECK_EQUAL(c.ui[0], _0); + CHECK_EQUAL(c.ui[1], _1); + CHECK_EQUAL(c.ui[2], _2); + CHECK_EQUAL(c.ui[3], _3); +} + +void simd_check_float(const char* _str, bx::simd128_t _a, float _0, float _1, float _2, float _3) +{ + simd_cast c; c.f4 = _a; + + DBG("%s (%f, %f, %f, %f) == (%f, %f, %f, %f)" + , _str + , c.f[0], c.f[1], c.f[2], c.f[3] + , _0, _1, _2, _3 + ); + + CHECK(bx::fequal(c.f[0], _0, 0.0001f) ); + CHECK(bx::fequal(c.f[1], _1, 0.0001f) ); + CHECK(bx::fequal(c.f[2], _2, 0.0001f) ); + CHECK(bx::fequal(c.f[3], _3, 0.0001f) ); +} + +void simd_check_string(const char* _str, bx::simd128_t _a) +{ + simd_cast c; c.f4 = _a; + const char test[5] = { c.c[0], c.c[4], c.c[8], c.c[12], '\0' }; + + DBG("%s %s", _str, test); + + CHECK(0 == strcmp(_str, test) ); +} + +TEST(simd_swizzle) +{ + const simd128_t xyzw = simd_ild(0x78787878, 0x79797979, 0x7a7a7a7a, 0x77777777); + +#define ELEMx 0 +#define ELEMy 1 +#define ELEMz 2 +#define ELEMw 3 +#define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ + simd_check_string("" #_x #_y #_z #_w "", simd_swiz_##_x##_y##_z##_w(xyzw) ); \ + +#include + +#undef BX_SIMD128_IMPLEMENT_SWIZZLE +#undef ELEMw +#undef ELEMz +#undef ELEMy +#undef ELEMx +} + +TEST(simd_shuffle) +{ + const simd128_t xyzw = simd_ild(0x78787878, 0x79797979, 0x7a7a7a7a, 0x77777777); + const simd128_t ABCD = simd_ild(0x41414141, 0x42424242, 0x43434343, 0x44444444); + simd_check_string("xyAB", simd_shuf_xyAB(xyzw, ABCD) ); + simd_check_string("ABxy", simd_shuf_ABxy(xyzw, ABCD) ); + simd_check_string("zwCD", simd_shuf_zwCD(xyzw, ABCD) ); + simd_check_string("CDzw", simd_shuf_CDzw(xyzw, ABCD) ); + simd_check_string("xAyB", simd_shuf_xAyB(xyzw, ABCD) ); + simd_check_string("zCwD", simd_shuf_zCwD(xyzw, ABCD) ); + simd_check_string("xAzC", simd_shuf_xAzC(xyzw, ABCD) ); + simd_check_string("yBwD", simd_shuf_yBwD(xyzw, ABCD) ); + simd_check_string("CzDw", simd_shuf_CzDw(xyzw, ABCD) ); +} + +TEST(simd_compare) +{ + simd_check_uint32("cmpeq" + , simd_cmpeq(simd_ld(1.0f, 2.0f, 3.0f, 4.0f), simd_ld(0.0f, 2.0f, 0.0f, 3.0f) ) + , 0, 0xffffffff, 0, 0 + ); + + simd_check_uint32("cmplt" + , simd_cmplt(simd_ld(1.0f, 2.0f, 3.0f, 4.0f), simd_ld(0.0f, 2.0f, 0.0f, 3.0f) ) + , 0, 0, 0, 0 + ); + + simd_check_uint32("cmple" + , simd_cmple(simd_ld(1.0f, 2.0f, 3.0f, 4.0f), simd_ld(0.0f, 2.0f, 0.0f, 3.0f) ) + , 0, 0xffffffff, 0, 0 + ); + + simd_check_uint32("cmpgt" + , simd_cmpgt(simd_ld(1.0f, 2.0f, 3.0f, 4.0f), simd_ld(0.0f, 2.0f, 0.0f, 3.0f) ) + , 0xffffffff, 0, 0xffffffff, 0xffffffff + ); + + simd_check_uint32("cmpge" + , simd_cmpge(simd_ld(1.0f, 2.0f, 3.0f, 4.0f), simd_ld(0.0f, 2.0f, 0.0f, 3.0f) ) + , 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff + ); + + simd_check_uint32("icmpeq" + , simd_icmpeq(simd_ild(0, 1, 2, 3), simd_ild(0, uint32_t(-2), 1, 3) ) + , 0xffffffff, 0, 0, 0xffffffff + ); + + simd_check_uint32("icmplt" + , simd_icmplt(simd_ild(0, 1, 2, 3), simd_ild(0, uint32_t(-2), 1, 3) ) + , 0, 0, 0, 0 + ); + + simd_check_uint32("icmpgt" + , simd_icmpgt(simd_ild(0, 1, 2, 3), simd_ild(0, uint32_t(-2), 1, 3) ) + , 0, 0xffffffff, 0xffffffff, 0 + ); +} + +TEST(simd_test) +{ + simd_check_bool("test_any_xyzw" + , simd_test_any_xyzw(simd_ild(0xffffffff, 0, 0, 0) ) + , true + ); + + simd_check_bool("test_all_xyzw" + , simd_test_all_xyzw(simd_ild(0xffffffff, 0, 0xffffffff, 0) ) + , false + ); + + simd_check_bool("test_all_xyzw" + , simd_test_all_xyzw(simd_ild(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff) ) + , true + ); + + simd_check_bool("test_all_xw" + , simd_test_all_xw(simd_ild(0xffffffff, 0, 0, 0xffffffff) ) + , true + ); + + simd_check_bool("test_all_xzw" + , simd_test_all_xzw(simd_ild(0xffffffff, 0, 0, 0xffffffff) ) + , false + ); +} + +TEST(simd_load) +{ + simd_check_float("ld" + , simd_ld(0.0f, 1.0f, 2.0f, 3.0f) + , 0.0f, 1.0f, 2.0f, 3.0f + ); + + simd_check_int32("ild" + , simd_ild(uint32_t(-1), 0, 1, 2) + , uint32_t(-1), 0, 1, 2 + ); + + simd_check_int32("ild" + , simd_ild(uint32_t(-1), uint32_t(-2), uint32_t(-3), uint32_t(-4) ) + , uint32_t(-1), uint32_t(-2), uint32_t(-3), uint32_t(-4) + ); + + simd_check_uint32("zero", simd_zero() + , 0, 0, 0, 0 + ); + + simd_check_uint32("isplat", simd_isplat(0x80000001) + , 0x80000001, 0x80000001, 0x80000001, 0x80000001 + ); + + simd_check_float("isplat", simd_splat(1.0f) + , 1.0f, 1.0f, 1.0f, 1.0f + ); +} + +TEST(simd_arithmetic) +{ + simd_check_float("madd" + , simd_madd(simd_ld(0.0f, 1.0f, 2.0f, 3.0f), simd_ld(4.0f, 5.0f, 6.0f, 7.0f), simd_ld(8.0f, 9.0f, 10.0f, 11.0f) ) + , 8.0f, 14.0f, 22.0f, 32.0f + ); + + simd_check_float("cross3" + , simd_cross3(simd_ld(1.0f, 0.0f, 0.0f, 0.0f), simd_ld(0.0f, 1.0f, 0.0f, 0.0f) ) + , 0.0f, 0.0f, 1.0f, 0.0f + ); +} + +TEST(simd_sqrt) +{ + simd_check_float("simd_sqrt" + , simd_sqrt(simd_ld(1.0f, 16.0f, 65536.0f, 123456.0f) ) + , 1.0f, 4.0f, 256.0f, 351.363060096f + ); + + simd_check_float("simd_sqrt_nr_ni" + , simd_sqrt_nr_ni(simd_ld(1.0f, 16.0f, 65536.0f, 123456.0f) ) + , 1.0f, 4.0f, 256.0f, 351.363060096f + ); + + simd_check_float("simd_sqrt_nr1_ni" + , simd_sqrt_nr1_ni(simd_ld(1.0f, 16.0f, 65536.0f, 123456.0f) ) + , 1.0f, 4.0f, 256.0f, 351.363060096f + ); +} + +TEST(float4) +{ + const simd128_t isplat = simd_isplat(0x80000001); + simd_check_uint32("sll" + , simd_sll(isplat, 1) + , 0x00000002, 0x00000002, 0x00000002, 0x00000002 + ); + + simd_check_uint32("srl" + , simd_srl(isplat, 1) + , 0x40000000, 0x40000000, 0x40000000, 0x40000000 + ); + + simd_check_uint32("sra" + , simd_sra(isplat, 1) + , 0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000 + ); + + simd_check_uint32("and" + , simd_and(simd_isplat(0x55555555), simd_isplat(0xaaaaaaaa) ) + , 0, 0, 0, 0 + ); + + simd_check_uint32("or " + , simd_or(simd_isplat(0x55555555), simd_isplat(0xaaaaaaaa) ) + , uint32_t(-1), uint32_t(-1), uint32_t(-1), uint32_t(-1) + ); + + simd_check_uint32("xor" + , simd_or(simd_isplat(0x55555555), simd_isplat(0xaaaaaaaa) ) + , uint32_t(-1), uint32_t(-1), uint32_t(-1), uint32_t(-1) + ); + + simd_check_int32("imin" + , simd_imin(simd_ild(0, 1, 2, 3), simd_ild(uint32_t(-1), 2, uint32_t(-2), 1) ) + , uint32_t(-1), 1, uint32_t(-2), 1 + ); + + simd_check_float("min" + , simd_min(simd_ld(0.0f, 1.0f, 2.0f, 3.0f), simd_ld(-1.0f, 2.0f, -2.0f, 1.0f) ) + , -1.0f, 1.0f, -2.0f, 1.0f + ); + + simd_check_int32("imax" + , simd_imax(simd_ild(0, 1, 2, 3), simd_ild(uint32_t(-1), 2, uint32_t(-2), 1) ) + , 0, 2, 2, 3 + ); + + simd_check_float("max" + , simd_max(simd_ld(0.0f, 1.0f, 2.0f, 3.0f), simd_ld(-1.0f, 2.0f, -2.0f, 1.0f) ) + , 0.0f, 2.0f, 2.0f, 3.0f + ); +} diff --git a/3rdparty/bx/tests/vector_nodefault.cpp b/3rdparty/bx/tests/vector_nodefault.cpp index 4a8bc8cf1dd..1340b0c0b3d 100644 --- a/3rdparty/bx/tests/vector_nodefault.cpp +++ b/3rdparty/bx/tests/vector_nodefault.cpp @@ -33,10 +33,14 @@ #include #include +#if !BX_CRT_MSVC +# define _strdup strdup +#endif // !BX_CRT_MSVC + struct nodefault { - nodefault(const char* s) { data = strdup(s); } + nodefault(const char* s) { data = _strdup(s); } ~nodefault() { free(data); } - nodefault(const nodefault& other) { data = 0; if (other.data) data = strdup(other.data); } + nodefault(const nodefault& other) { data = 0; if (other.data) data = _strdup(other.data); } nodefault& operator=(const nodefault& other) { nodefault(other).swap(*this); return *this; } void swap(nodefault& other) { std::swap(data, other.data); } @@ -148,7 +152,7 @@ TEST(vector_nodefault_popback) { v.push_back("24"); CHECK(v.back() == "24"); - + v.pop_back(); CHECK(v.back() == "12"); diff --git a/3rdparty/bx/tools/bin/darwin/genie b/3rdparty/bx/tools/bin/darwin/genie index a092d05c1d2..ca02eb91450 100755 Binary files a/3rdparty/bx/tools/bin/darwin/genie and b/3rdparty/bx/tools/bin/darwin/genie differ diff --git a/3rdparty/bx/tools/bin/linux/genie b/3rdparty/bx/tools/bin/linux/genie index b497f5dc9b1..7b68c735e1b 100755 Binary files a/3rdparty/bx/tools/bin/linux/genie and b/3rdparty/bx/tools/bin/linux/genie differ diff --git a/3rdparty/bx/tools/bin/windows/genie.exe b/3rdparty/bx/tools/bin/windows/genie.exe index 8111412afcf..1fd05d21798 100644 Binary files a/3rdparty/bx/tools/bin/windows/genie.exe and b/3rdparty/bx/tools/bin/windows/genie.exe differ diff --git a/3rdparty/rapidjson/.gitignore b/3rdparty/rapidjson/.gitignore index 2c412c2bba9..e7e8fba9bb3 100644 --- a/3rdparty/rapidjson/.gitignore +++ b/3rdparty/rapidjson/.gitignore @@ -20,5 +20,6 @@ Testing /googletest install_manifest.txt Doxyfile +Doxyfile.zh-cn DartConfiguration.tcl *.nupkg diff --git a/3rdparty/rapidjson/.gitmodules b/3rdparty/rapidjson/.gitmodules index 8e9d1f376c2..5e41f7c9751 100644 --- a/3rdparty/rapidjson/.gitmodules +++ b/3rdparty/rapidjson/.gitmodules @@ -1,3 +1,3 @@ [submodule "thirdparty/gtest"] path = thirdparty/gtest - url = https://chromium.googlesource.com/external/googletest.git + url = https://github.com/google/googletest.git diff --git a/3rdparty/rapidjson/.travis.yml b/3rdparty/rapidjson/.travis.yml index 9266277b606..f9319f2edb9 100644 --- a/3rdparty/rapidjson/.travis.yml +++ b/3rdparty/rapidjson/.travis.yml @@ -1,16 +1,12 @@ +sudo: required +dist: precise + language: cpp -sudo: false cache: - ccache -addons: - apt: - packages: &default_packages - - cmake - - valgrind - env: -global: + global: - USE_CCACHE=1 - CCACHE_SLOPPINESS=pch_defines,time_macros - CCACHE_COMPRESS=1 @@ -20,108 +16,41 @@ global: - GITHUB_REPO='miloyip/rapidjson' - secure: "HrsaCb+N66EG1HR+LWH1u51SjaJyRwJEDzqJGYMB7LJ/bfqb9mWKF1fLvZGk46W5t7TVaXRDD5KHFx9DPWvKn4gRUVkwTHEy262ah5ORh8M6n/6VVVajeV/AYt2C0sswdkDBDO4Xq+xy5gdw3G8s1A4Inbm73pUh+6vx+7ltBbk=" +before_install: + - sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test + - sudo apt-get update -qq + - sudo apt-get install -y cmake valgrind g++-multilib libc6-dbg:i386 + matrix: include: # gcc - env: CONF=release ARCH=x86 CXX11=ON compiler: gcc - addons: - apt: - packages: - - *default_packages - - g++-multilib - - libc6-dbg:i386 - env: CONF=release ARCH=x86_64 CXX11=ON compiler: gcc - env: CONF=debug ARCH=x86 CXX11=OFF compiler: gcc - addons: - apt: - packages: - - *default_packages - - g++-multilib - - libc6-dbg:i386 - env: CONF=debug ARCH=x86_64 CXX11=OFF compiler: gcc # clang - env: CONF=debug ARCH=x86 CXX11=ON CCACHE_CPP2=yes compiler: clang - addons: - apt: - sources: - - llvm-toolchain-precise-3.7 - - ubuntu-toolchain-r-test - packages: - - *default_packages - - g++-multilib - - libc6-dbg:i386 - - clang-3.7 - env: CONF=debug ARCH=x86_64 CXX11=ON CCACHE_CPP2=yes compiler: clang - addons: - apt: - sources: - - llvm-toolchain-precise-3.7 - - ubuntu-toolchain-r-test - packages: - - *default_packages - - clang-3.7 - env: CONF=debug ARCH=x86 CXX11=OFF CCACHE_CPP2=yes compiler: clang - addons: - apt: - sources: - - llvm-toolchain-precise-3.7 - - ubuntu-toolchain-r-test - packages: - - *default_packages - - g++-multilib - - libc6-dbg:i386 - - clang-3.7 - env: CONF=debug ARCH=x86_64 CXX11=OFF CCACHE_CPP2=yes compiler: clang - addons: - apt: - sources: - - llvm-toolchain-precise-3.7 - - ubuntu-toolchain-r-test - packages: - - *default_packages - - clang-3.7 - env: CONF=release ARCH=x86 CXX11=ON CCACHE_CPP2=yes compiler: clang - addons: - apt: - sources: - - llvm-toolchain-precise-3.7 - - ubuntu-toolchain-r-test - packages: - - *default_packages - - g++-multilib - - libc6-dbg:i386 - - clang-3.7 - env: CONF=release ARCH=x86_64 CXX11=ON CCACHE_CPP2=yes compiler: clang - addons: - apt: - sources: - - llvm-toolchain-precise-3.7 - - ubuntu-toolchain-r-test - packages: - - *default_packages - - clang-3.7 # coverage report - env: CONF=debug ARCH=x86 CXX11=ON GCOV_FLAGS='--coverage' compiler: gcc cache: - ccache - pip - addons: - apt: - packages: - - *default_packages - - g++-multilib - - libc6-dbg:i386 after_success: - pip install --user cpp-coveralls - coveralls -r .. --gcov-options '\-lp' -e thirdparty -e example -e test -e build/CMakeFiles -e include/rapidjson/msinttypes -e include/rapidjson/internal/meta.h -e include/rapidjson/error/en.h @@ -130,12 +59,6 @@ matrix: cache: - ccache - pip - addons: - apt: - packages: - - *default_packages - - g++-multilib - - libc6-dbg:i386 after_success: - pip install --user cpp-coveralls - coveralls -r .. --gcov-options '\-lp' -e thirdparty -e example -e test -e build/CMakeFiles -e include/rapidjson/msinttypes -e include/rapidjson/internal/meta.h -e include/rapidjson/error/en.h @@ -158,7 +81,7 @@ before_script: - mkdir build script: - - if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.7" CC="clang-3.7"; fi + - if [ "$CXX" = "clang++" ]; then export CXXFLAGS="-stdlib=libc++ ${CXXFLAGS}"; fi - > eval "ARCH_FLAGS=\${ARCH_FLAGS_${ARCH}}" ; (cd build && cmake diff --git a/3rdparty/rapidjson/CMakeLists.txt b/3rdparty/rapidjson/CMakeLists.txt index d315b749b96..96bfdc2aebe 100644 --- a/3rdparty/rapidjson/CMakeLists.txt +++ b/3rdparty/rapidjson/CMakeLists.txt @@ -1,4 +1,8 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +if(POLICY CMP0025) + # detect Apple's Clang + cmake_policy(SET CMP0025 NEW) +endif() if(POLICY CMP0054) cmake_policy(SET CMP0054 NEW) endif() @@ -28,6 +32,9 @@ option(RAPIDJSON_BUILD_THIRDPARTY_GTEST option(RAPIDJSON_BUILD_CXX11 "Build rapidjson with C++11 (gcc/clang)" ON) +option(RAPIDJSON_BUILD_ASAN "Build rapidjson with address sanitizer (gcc/clang)" OFF) +option(RAPIDJSON_BUILD_UBSAN "Build rapidjson with undefined behavior sanitizer (gcc/clang)" OFF) + option(RAPIDJSON_HAS_STDSTRING "" OFF) if(RAPIDJSON_HAS_STDSTRING) add_definitions(-DRAPIDJSON_HAS_STDSTRING) @@ -51,11 +58,35 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") endif() endif() + if (RAPIDJSON_BUILD_ASAN) + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8.0") + message(FATAL_ERROR "GCC < 4.8 doesn't support the address sanitizer") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") + endif() + endif() + if (RAPIDJSON_BUILD_UBSAN) + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9.0") + message(FATAL_ERROR "GCC < 4.9 doesn't support the undefined behavior sanitizer") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined") + endif() + endif() elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra -Werror -Wno-missing-field-initializers") if (RAPIDJSON_BUILD_CXX11) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") endif() + if (RAPIDJSON_BUILD_ASAN) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") + endif() + if (RAPIDJSON_BUILD_UBSAN) + if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined") + endif() + endif() elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") add_definitions(-D_CRT_SECURE_NO_WARNINGS=1) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc") diff --git a/3rdparty/rapidjson/CMakeModules/FindGTestSrc.cmake b/3rdparty/rapidjson/CMakeModules/FindGTestSrc.cmake index f942a8dafcd..f3cb8c99089 100644 --- a/3rdparty/rapidjson/CMakeModules/FindGTestSrc.cmake +++ b/3rdparty/rapidjson/CMakeModules/FindGTestSrc.cmake @@ -1,7 +1,7 @@ SET(GTEST_SEARCH_PATH "${GTEST_SOURCE_DIR}" - "${CMAKE_CURRENT_LIST_DIR}/../thirdparty/gtest") + "${CMAKE_CURRENT_LIST_DIR}/../thirdparty/gtest/googletest") IF(UNIX) IF(RAPIDJSON_BUILD_THIRDPARTY_GTEST) diff --git a/3rdparty/rapidjson/doc/dom.md b/3rdparty/rapidjson/doc/dom.md index 60480c318ca..6c541fe93c6 100644 --- a/3rdparty/rapidjson/doc/dom.md +++ b/3rdparty/rapidjson/doc/dom.md @@ -118,6 +118,7 @@ Parse flags | Meaning `kParseCommentsFlag` | Allow one-line `// ...` and multi-line `/* ... */` comments (relaxed JSON syntax). `kParseNumbersAsStringsFlag` | Parse numerical type values as strings. `kParseTrailingCommasFlag` | Allow trailing commas at the end of objects and arrays (relaxed JSON syntax). +`kParseNanAndInfFlag` | Allow parsing `NaN`, `Inf`, `Infinity`, `-Inf` and `-Infinity` as `double` values (relaxed JSON syntax). By using a non-type template parameter, instead of a function parameter, C++ compiler can generate code which is optimized for specified combinations, improving speed, and reducing code size (if only using a single specialization). The downside is the flags needed to be determined in compile-time. diff --git a/3rdparty/rapidjson/doc/features.md b/3rdparty/rapidjson/doc/features.md index f092cf1fade..984c6abaee0 100644 --- a/3rdparty/rapidjson/doc/features.md +++ b/3rdparty/rapidjson/doc/features.md @@ -26,6 +26,7 @@ * Support optional relaxed syntax. * Single line (`// ...`) and multiple line (`/* ... */`) comments (`kParseCommentsFlag`). * Trailing commas at the end of objects and arrays (`kParseTrailingCommasFlag`). +* [NPM compliant](doc/npm.md). ## Unicode diff --git a/3rdparty/rapidjson/doc/misc/footer.html b/3rdparty/rapidjson/doc/misc/footer.html index 843aa110448..77f11311880 100644 --- a/3rdparty/rapidjson/doc/misc/footer.html +++ b/3rdparty/rapidjson/doc/misc/footer.html @@ -7,21 +7,5 @@ - - diff --git a/3rdparty/rapidjson/doc/misc/header.html b/3rdparty/rapidjson/doc/misc/header.html index d43f2aaff9a..2dbe7214658 100644 --- a/3rdparty/rapidjson/doc/misc/header.html +++ b/3rdparty/rapidjson/doc/misc/header.html @@ -16,15 +16,6 @@ $mathjax $extrastylesheet -
diff --git a/3rdparty/rapidjson/doc/npm.md b/3rdparty/rapidjson/doc/npm.md new file mode 100644 index 00000000000..5efa7682137 --- /dev/null +++ b/3rdparty/rapidjson/doc/npm.md @@ -0,0 +1,31 @@ +## NPM + +# package.json {#package} + +~~~~~~~~~~js +{ + ... + "dependencies": { + ... + "rapidjson": "git@github.com:miloyip/rapidjson.git" + }, + ... + "gypfile": true +} +~~~~~~~~~~ + +# binding.gyp {#binding} + +~~~~~~~~~~js +{ + ... + 'targets': [ + { + ... + 'include_dirs': [ + ', MyHandler> { bool Null() { cout << "Null()" << endl; return true; } bool Bool(bool b) { cout << "Bool(" << boolalpha << b << ")" << endl; return true; } bool Int(int i) { cout << "Int(" << i << ")" << endl; return true; } diff --git a/3rdparty/rapidjson/doc/sax.zh-cn.md b/3rdparty/rapidjson/doc/sax.zh-cn.md index b66957c3ea3..7b8aabe4345 100644 --- a/3rdparty/rapidjson/doc/sax.zh-cn.md +++ b/3rdparty/rapidjson/doc/sax.zh-cn.md @@ -59,7 +59,7 @@ EndObject(7) using namespace rapidjson; using namespace std; -struct MyHandler { +struct MyHandler : public BaseReaderHandler, MyHandler> { bool Null() { cout << "Null()" << endl; return true; } bool Bool(bool b) { cout << "Bool(" << boolalpha << b << ")" << endl; return true; } bool Int(int i) { cout << "Int(" << i << ")" << endl; return true; } @@ -106,6 +106,7 @@ class Handler { bool Int64(int64_t i); bool Uint64(uint64_t i); bool Double(double d); + bool RawNumber(const Ch* str, SizeType length, bool copy); bool String(const Ch* str, SizeType length, bool copy); bool StartObject(); bool Key(const Ch* str, SizeType length, bool copy); diff --git a/3rdparty/rapidjson/doc/schema.md b/3rdparty/rapidjson/doc/schema.md index 6d66fa5dd04..1fad5fbce34 100644 --- a/3rdparty/rapidjson/doc/schema.md +++ b/3rdparty/rapidjson/doc/schema.md @@ -152,7 +152,7 @@ JSON Schema supports [`$ref` keyword](http://spacetelescope.github.io/understand { "$ref": "definitions.json#/address" } ~~~ -As `SchemaValidator` does not know how to resolve such URI, it needs a user-provided `IRemoteSchemaDocumentProvider` instance to do so. +As `SchemaDocument` does not know how to resolve such URI, it needs a user-provided `IRemoteSchemaDocumentProvider` instance to do so. ~~~ class MyRemoteSchemaDocumentProvider : public IRemoteSchemaDocumentProvider { @@ -165,7 +165,7 @@ public: // ... MyRemoteSchemaDocumentProvider provider; -SchemaValidator validator(schema, &provider); +SchemaDocument schema(sd, &provider); ~~~ ## Conformance diff --git a/3rdparty/rapidjson/doc/schema.zh-cn.md b/3rdparty/rapidjson/doc/schema.zh-cn.md index 95f5a6956f7..345b7c54f7a 100644 --- a/3rdparty/rapidjson/doc/schema.zh-cn.md +++ b/3rdparty/rapidjson/doc/schema.zh-cn.md @@ -152,7 +152,7 @@ JSON Schema æ”¯æŒ [`$ref` 关键字](http://spacetelescope.github.io/understand { "$ref": "definitions.json#/address" } ~~~ -由于 `SchemaValidator` å¹¶ä¸çŸ¥é“如何处ç†é‚£äº› URI,它需è¦ä½¿ç”¨è€…æä¾›ä¸€ä¸ª `IRemoteSchemaDocumentProvider` 的实例去处ç†ã€‚ +由于 `SchemaDocument` å¹¶ä¸çŸ¥é“如何处ç†é‚£äº› URI,它需è¦ä½¿ç”¨è€…æä¾›ä¸€ä¸ª `IRemoteSchemaDocumentProvider` 的实例去处ç†ã€‚ ~~~ class MyRemoteSchemaDocumentProvider : public IRemoteSchemaDocumentProvider { @@ -165,7 +165,7 @@ public: // ... MyRemoteSchemaDocumentProvider provider; -SchemaValidator validator(schema, &provider); +SchemaDocument schema(sd, &provider); ~~~ ## 标准的符åˆç¨‹åº¦ diff --git a/3rdparty/rapidjson/doc/tutorial.md b/3rdparty/rapidjson/doc/tutorial.md index 121102345b4..0da07dc5d91 100644 --- a/3rdparty/rapidjson/doc/tutorial.md +++ b/3rdparty/rapidjson/doc/tutorial.md @@ -166,7 +166,7 @@ If we are unsure whether a member exists, we need to call `HasMember()` before c ~~~~~~~~~~cpp Value::ConstMemberIterator itr = document.FindMember("hello"); if (itr != document.MemberEnd()) - printf("%s %s\n", itr->value.GetString()); + printf("%s\n", itr->value.GetString()); ~~~~~~~~~~ ## Querying Number {#QueryNumber} diff --git a/3rdparty/rapidjson/doc/tutorial.zh-cn.md b/3rdparty/rapidjson/doc/tutorial.zh-cn.md index 7a0e6e504c7..f5db1ca6fa4 100644 --- a/3rdparty/rapidjson/doc/tutorial.zh-cn.md +++ b/3rdparty/rapidjson/doc/tutorial.zh-cn.md @@ -166,7 +166,7 @@ Type of member a is Array ~~~~~~~~~~cpp Value::ConstMemberIterator itr = document.FindMember("hello"); if (itr != document.MemberEnd()) - printf("%s %s\n", itr->value.GetString()); + printf("%s\n", itr->value.GetString()); ~~~~~~~~~~ ## 查询 Number {#QueryNumber} @@ -379,7 +379,7 @@ const char * cstr = getenv("USER"); size_t cstr_len = ...; // 如果有长度 Value s; // s.SetString(cstr); // è¿™ä¸èƒ½é€šè¿‡ç¼–译 -s.SetString(StringRef(cstr)); // å¯ä»¥ï¼Œå‡è®¾å®ƒçš„生命周期案全,并且是以空字符结尾的 +s.SetString(StringRef(cstr)); // å¯ä»¥ï¼Œå‡è®¾å®ƒçš„生命周期安全,并且是以空字符结尾的 s = StringRef(cstr); // 上行的缩写 s.SetString(StringRef(cstr, cstr_len));// 更快,å¯å¤„ç†ç©ºå­—符 s = StringRef(cstr, cstr_len); // 上行的缩写 diff --git a/3rdparty/rapidjson/example/parsebyparts/parsebyparts.cpp b/3rdparty/rapidjson/example/parsebyparts/parsebyparts.cpp index 919d9083458..57eed005dea 100644 --- a/3rdparty/rapidjson/example/parsebyparts/parsebyparts.cpp +++ b/3rdparty/rapidjson/example/parsebyparts/parsebyparts.cpp @@ -1,7 +1,8 @@ // Example of parsing JSON to document by parts. // Using C++11 threads -#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1700) +// Temporarily disable for clang (older version) due to incompatibility with libstdc++ +#if (__cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1700)) && !defined(__clang__) #include "rapidjson/document.h" #include "rapidjson/error/en.h" diff --git a/3rdparty/rapidjson/include/rapidjson/allocators.h b/3rdparty/rapidjson/include/rapidjson/allocators.h index c705969729a..98affe03fbf 100644 --- a/3rdparty/rapidjson/include/rapidjson/allocators.h +++ b/3rdparty/rapidjson/include/rapidjson/allocators.h @@ -179,7 +179,8 @@ public: size = RAPIDJSON_ALIGN(size); if (chunkHead_ == 0 || chunkHead_->size + size > chunkHead_->capacity) - AddChunk(chunk_capacity_ > size ? chunk_capacity_ : size); + if (!AddChunk(chunk_capacity_ > size ? chunk_capacity_ : size)) + return NULL; void *buffer = reinterpret_cast(chunkHead_) + RAPIDJSON_ALIGN(sizeof(ChunkHeader)) + chunkHead_->size; chunkHead_->size += size; @@ -211,11 +212,13 @@ public: } // Realloc process: allocate and copy memory, do not free original buffer. - void* newBuffer = Malloc(newSize); - RAPIDJSON_ASSERT(newBuffer != 0); // Do not handle out-of-memory explicitly. - if (originalSize) - std::memcpy(newBuffer, originalPtr, originalSize); - return newBuffer; + if (void* newBuffer = Malloc(newSize)) { + if (originalSize) + std::memcpy(newBuffer, originalPtr, originalSize); + return newBuffer; + } + else + return NULL; } //! Frees a memory block (concept Allocator) @@ -229,15 +232,20 @@ private: //! Creates a new chunk. /*! \param capacity Capacity of the chunk in bytes. + \return true if success. */ - void AddChunk(size_t capacity) { + bool AddChunk(size_t capacity) { if (!baseAllocator_) ownBaseAllocator_ = baseAllocator_ = RAPIDJSON_NEW(BaseAllocator()); - ChunkHeader* chunk = reinterpret_cast(baseAllocator_->Malloc(RAPIDJSON_ALIGN(sizeof(ChunkHeader)) + capacity)); - chunk->capacity = capacity; - chunk->size = 0; - chunk->next = chunkHead_; - chunkHead_ = chunk; + if (ChunkHeader* chunk = reinterpret_cast(baseAllocator_->Malloc(RAPIDJSON_ALIGN(sizeof(ChunkHeader)) + capacity))) { + chunk->capacity = capacity; + chunk->size = 0; + chunk->next = chunkHead_; + chunkHead_ = chunk; + return true; + } + else + return false; } static const int kDefaultChunkCapacity = 64 * 1024; //!< Default chunk capacity. diff --git a/3rdparty/rapidjson/include/rapidjson/document.h b/3rdparty/rapidjson/include/rapidjson/document.h index d286eb1e51a..e3e20dfbdc9 100644 --- a/3rdparty/rapidjson/include/rapidjson/document.h +++ b/3rdparty/rapidjson/include/rapidjson/document.h @@ -23,24 +23,26 @@ #include "memorystream.h" #include "encodedstream.h" #include // placement new +#include -#ifdef _MSC_VER RAPIDJSON_DIAG_PUSH +#ifdef _MSC_VER RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant RAPIDJSON_DIAG_OFF(4244) // conversion from kXxxFlags to 'uint16_t', possible loss of data #endif #ifdef __clang__ -RAPIDJSON_DIAG_PUSH RAPIDJSON_DIAG_OFF(padded) RAPIDJSON_DIAG_OFF(switch-enum) RAPIDJSON_DIAG_OFF(c++98-compat) #endif #ifdef __GNUC__ -RAPIDJSON_DIAG_PUSH RAPIDJSON_DIAG_OFF(effc++) +#if __GNUC__ >= 6 +RAPIDJSON_DIAG_OFF(terminate) // ignore throwing RAPIDJSON_ASSERT in RAPIDJSON_NOEXCEPT functions #endif +#endif // __GNUC__ #ifndef RAPIDJSON_NOMEMBERITERATORCLASS #include // std::iterator, std::random_access_iterator_tag @@ -478,7 +480,7 @@ template struct TypeHelper > { typedef std::basic_string StringType; static bool Is(const ValueType& v) { return v.IsString(); } - static StringType Get(const ValueType& v) { return v.GetString(); } + static StringType Get(const ValueType& v) { return StringType(v.GetString(), v.GetStringLength()); } static ValueType& Set(ValueType& v, const StringType& data, typename ValueType::AllocatorType& a) { return v.SetString(data, a); } }; #endif @@ -952,12 +954,16 @@ public: if (IsUint64()) { uint64_t u = GetUint64(); volatile double d = static_cast(u); - return static_cast(d) == u; + return (d >= 0.0) + && (d < static_cast(std::numeric_limits::max())) + && (u == static_cast(d)); } if (IsInt64()) { int64_t i = GetInt64(); volatile double d = static_cast(i); - return static_cast< int64_t>(d) == i; + return (d >= static_cast(std::numeric_limits::min())) + && (d < static_cast(std::numeric_limits::max())) + && (i == static_cast(d)); } return true; // double, int, uint are always lossless } @@ -973,6 +979,9 @@ public: bool IsLosslessFloat() const { if (!IsNumber()) return false; double a = GetDouble(); + if (a < static_cast(-std::numeric_limits::max()) + || a > static_cast(std::numeric_limits::max())) + return false; double b = static_cast(static_cast(a)); return a >= b && a <= b; // Prevent -Wfloat-equal } @@ -1160,8 +1169,8 @@ public: \return Iterator to member, if it exists. Otherwise returns \ref MemberEnd(). */ - MemberIterator FindMember(const std::basic_string& name) { return FindMember(StringRef(name)); } - ConstMemberIterator FindMember(const std::basic_string& name) const { return FindMember(StringRef(name)); } + MemberIterator FindMember(const std::basic_string& name) { return FindMember(GenericValue(StringRef(name))); } + ConstMemberIterator FindMember(const std::basic_string& name) const { return FindMember(GenericValue(StringRef(name))); } #endif //! Add a member (name-value pair) to the object. @@ -2561,17 +2570,6 @@ private: }; RAPIDJSON_NAMESPACE_END - -#ifdef _MSC_VER RAPIDJSON_DIAG_POP -#endif - -#ifdef __clang__ -RAPIDJSON_DIAG_POP -#endif - -#ifdef __GNUC__ -RAPIDJSON_DIAG_POP -#endif #endif // RAPIDJSON_DOCUMENT_H_ diff --git a/3rdparty/rapidjson/include/rapidjson/encodings.h b/3rdparty/rapidjson/include/rapidjson/encodings.h index edfc9901615..baa7c2b17f8 100644 --- a/3rdparty/rapidjson/include/rapidjson/encodings.h +++ b/3rdparty/rapidjson/include/rapidjson/encodings.h @@ -154,7 +154,11 @@ struct UTF8 { } unsigned char type = GetRange(static_cast(c)); - *codepoint = (0xFF >> type) & static_cast(c); + if (type >= 32) { + *codepoint = 0; + } else { + *codepoint = (0xFF >> type) & static_cast(c); + } bool result = true; switch (type) { case 2: TAIL(); return result; diff --git a/3rdparty/rapidjson/include/rapidjson/internal/dtoa.h b/3rdparty/rapidjson/include/rapidjson/internal/dtoa.h index bc454960f11..8d6350e626d 100644 --- a/3rdparty/rapidjson/include/rapidjson/internal/dtoa.h +++ b/3rdparty/rapidjson/include/rapidjson/internal/dtoa.h @@ -102,7 +102,8 @@ inline void DigitGen(const DiyFp& W, const DiyFp& Mp, uint64_t delta, char* buff kappa--; if (p2 < delta) { *K += kappa; - GrisuRound(buffer, *len, delta, p2, one.f, wp_w.f * kPow10[-static_cast(kappa)]); + int index = -static_cast(kappa); + GrisuRound(buffer, *len, delta, p2, one.f, wp_w.f * (index < 9 ? kPow10[-static_cast(kappa)] : 0)); return; } } diff --git a/3rdparty/rapidjson/include/rapidjson/internal/strtod.h b/3rdparty/rapidjson/include/rapidjson/internal/strtod.h index fd4b01e8dde..289c413b07b 100644 --- a/3rdparty/rapidjson/include/rapidjson/internal/strtod.h +++ b/3rdparty/rapidjson/include/rapidjson/internal/strtod.h @@ -142,7 +142,7 @@ inline bool StrtodDiyFp(const char* decimals, size_t length, size_t decimalPosit size_t remaining = length - i; const unsigned kUlpShift = 3; const unsigned kUlp = 1 << kUlpShift; - int error = (remaining == 0) ? 0 : kUlp / 2; + int64_t error = (remaining == 0) ? 0 : kUlp / 2; DiyFp v(significand, 0); v = v.Normalize(); diff --git a/3rdparty/rapidjson/include/rapidjson/pointer.h b/3rdparty/rapidjson/include/rapidjson/pointer.h index c9852779fb9..0206ac1c8b6 100644 --- a/3rdparty/rapidjson/include/rapidjson/pointer.h +++ b/3rdparty/rapidjson/include/rapidjson/pointer.h @@ -767,8 +767,12 @@ private: tokenCount_ = rhs.tokenCount_ + extraToken; tokens_ = static_cast(allocator_->Malloc(tokenCount_ * sizeof(Token) + (nameBufferSize + extraNameBufferSize) * sizeof(Ch))); nameBuffer_ = reinterpret_cast(tokens_ + tokenCount_); - std::memcpy(tokens_, rhs.tokens_, rhs.tokenCount_ * sizeof(Token)); - std::memcpy(nameBuffer_, rhs.nameBuffer_, nameBufferSize * sizeof(Ch)); + if (rhs.tokenCount_ > 0) { + std::memcpy(tokens_, rhs.tokens_, rhs.tokenCount_ * sizeof(Token)); + } + if (nameBufferSize > 0) { + std::memcpy(nameBuffer_, rhs.nameBuffer_, nameBufferSize * sizeof(Ch)); + } // Adjust pointers to name buffer std::ptrdiff_t diff = nameBuffer_ - rhs.nameBuffer_; diff --git a/3rdparty/rapidjson/include/rapidjson/prettywriter.h b/3rdparty/rapidjson/include/rapidjson/prettywriter.h index 75dc474f4c1..0dcb0fee923 100644 --- a/3rdparty/rapidjson/include/rapidjson/prettywriter.h +++ b/3rdparty/rapidjson/include/rapidjson/prettywriter.h @@ -115,6 +115,12 @@ public: } bool Key(const Ch* str, SizeType length, bool copy = false) { return String(str, length, copy); } + +#if RAPIDJSON_HAS_STDSTRING + bool Key(const std::basic_string& str) { + return Key(str.data(), SizeType(str.size())); + } +#endif bool EndObject(SizeType memberCount = 0) { (void)memberCount; diff --git a/3rdparty/rapidjson/include/rapidjson/rapidjson.h b/3rdparty/rapidjson/include/rapidjson/rapidjson.h index 062e25e1132..4bdaed611ee 100644 --- a/3rdparty/rapidjson/include/rapidjson/rapidjson.h +++ b/3rdparty/rapidjson/include/rapidjson/rapidjson.h @@ -250,7 +250,7 @@ //! Whether using 64-bit architecture #ifndef RAPIDJSON_64BIT -#if defined(__LP64__) || defined(_WIN64) || defined(__EMSCRIPTEN__) +#if defined(__LP64__) || (defined(__x86_64__) && defined(__ILP32__)) || defined(_WIN64) || defined(__EMSCRIPTEN__) #define RAPIDJSON_64BIT 1 #else #define RAPIDJSON_64BIT 0 diff --git a/3rdparty/rapidjson/include/rapidjson/reader.h b/3rdparty/rapidjson/include/rapidjson/reader.h index 16e2d073ce1..19f8849b14c 100644 --- a/3rdparty/rapidjson/include/rapidjson/reader.h +++ b/3rdparty/rapidjson/include/rapidjson/reader.h @@ -23,6 +23,7 @@ #include "internal/meta.h" #include "internal/stack.h" #include "internal/strtod.h" +#include #if defined(RAPIDJSON_SIMD) && defined(_MSC_VER) #include @@ -42,6 +43,7 @@ RAPIDJSON_DIAG_OFF(4702) // unreachable code #ifdef __clang__ RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(old-style-cast) RAPIDJSON_DIAG_OFF(padded) RAPIDJSON_DIAG_OFF(switch-enum) #endif @@ -150,6 +152,7 @@ enum ParseFlag { kParseCommentsFlag = 32, //!< Allow one-line (//) and multi-line (/**/) comments. kParseNumbersAsStringsFlag = 64, //!< Parse all numbers (ints/doubles) as strings. kParseTrailingCommasFlag = 128, //!< Allow trailing commas at the end of objects and arrays. + kParseNanAndInfFlag = 256, //!< Allow parsing NaN, Inf, Infinity, -Inf and -Infinity as doubles. kParseDefaultFlags = RAPIDJSON_PARSE_DEFAULT_FLAGS //!< Default parse flags. Can be customized by defining RAPIDJSON_PARSE_DEFAULT_FLAGS }; @@ -1137,6 +1140,8 @@ private: (parseFlags & kParseInsituFlag) == 0> s(*this, copy.s); size_t startOffset = s.Tell(); + double d = 0.0; + bool useNanOrInf = false; // Parse minus bool minus = Consume(s, '-'); @@ -1178,12 +1183,26 @@ private: significandDigit++; } } + // Parse NaN or Infinity here + else if ((parseFlags & kParseNanAndInfFlag) && RAPIDJSON_LIKELY((s.Peek() == 'I' || s.Peek() == 'N'))) { + useNanOrInf = true; + if (RAPIDJSON_LIKELY(Consume(s, 'N') && Consume(s, 'a') && Consume(s, 'N'))) { + d = std::numeric_limits::quiet_NaN(); + } + else if (RAPIDJSON_LIKELY(Consume(s, 'I') && Consume(s, 'n') && Consume(s, 'f'))) { + d = (minus ? -std::numeric_limits::infinity() : std::numeric_limits::infinity()); + if (RAPIDJSON_UNLIKELY(s.Peek() == 'i' && !(Consume(s, 'i') && Consume(s, 'n') + && Consume(s, 'i') && Consume(s, 't') && Consume(s, 'y')))) + RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, s.Tell()); + } + else + RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, s.Tell()); + } else RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, s.Tell()); // Parse 64bit int bool useDouble = false; - double d = 0.0; if (use64bit) { if (minus) while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) { @@ -1346,6 +1365,9 @@ private: cont = handler.Double(minus ? -d : d); } + else if (useNanOrInf) { + cont = handler.Double(d); + } else { if (use64bit) { if (minus) diff --git a/3rdparty/rapidjson/include/rapidjson/schema.h b/3rdparty/rapidjson/include/rapidjson/schema.h index 0a8bb7c5f14..b182aa27f0b 100644 --- a/3rdparty/rapidjson/include/rapidjson/schema.h +++ b/3rdparty/rapidjson/include/rapidjson/schema.h @@ -19,13 +19,6 @@ #include "pointer.h" #include // abs, floor -#ifdef __clang__ -RAPIDJSON_DIAG_PUSH -RAPIDJSON_DIAG_OFF(weak-vtables) -RAPIDJSON_DIAG_OFF(exit-time-destructors) -RAPIDJSON_DIAG_OFF(c++98-compat-pedantic) -#endif - #if !defined(RAPIDJSON_SCHEMA_USE_INTERNALREGEX) #define RAPIDJSON_SCHEMA_USE_INTERNALREGEX 1 #else @@ -58,18 +51,20 @@ RAPIDJSON_DIAG_OFF(c++98-compat-pedantic) #include "stringbuffer.h" #endif -#if defined(__GNUC__) RAPIDJSON_DIAG_PUSH + +#if defined(__GNUC__) RAPIDJSON_DIAG_OFF(effc++) #endif #ifdef __clang__ -RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(weak-vtables) +RAPIDJSON_DIAG_OFF(exit-time-destructors) +RAPIDJSON_DIAG_OFF(c++98-compat-pedantic) RAPIDJSON_DIAG_OFF(variadic-macros) #endif #ifdef _MSC_VER -RAPIDJSON_DIAG_PUSH RAPIDJSON_DIAG_OFF(4512) // assignment operator could not be generated #endif @@ -413,9 +408,11 @@ public: } } - AssignIfExist(allOf_, *schemaDocument, p, value, GetAllOfString(), document); - AssignIfExist(anyOf_, *schemaDocument, p, value, GetAnyOfString(), document); - AssignIfExist(oneOf_, *schemaDocument, p, value, GetOneOfString(), document); + if (schemaDocument) { + AssignIfExist(allOf_, *schemaDocument, p, value, GetAllOfString(), document); + AssignIfExist(anyOf_, *schemaDocument, p, value, GetAnyOfString(), document); + AssignIfExist(oneOf_, *schemaDocument, p, value, GetOneOfString(), document); + } if (const ValueType* v = GetMember(value, GetNotString())) { schemaDocument->CreateSchema(¬_, p.Append(GetNotString(), allocator_), *v, document); @@ -578,7 +575,9 @@ public: } ~Schema() { - allocator_->Free(enum_); + if (allocator_) { + allocator_->Free(enum_); + } if (properties_) { for (SizeType i = 0; i < propertyCount_; i++) properties_[i].~Property(); @@ -1339,7 +1338,7 @@ public: \param remoteProvider An optional remote schema document provider for resolving remote reference. Can be null. \param allocator An optional allocator instance for allocating memory. Can be null. */ - GenericSchemaDocument(const ValueType& document, IRemoteSchemaDocumentProviderType* remoteProvider = 0, Allocator* allocator = 0) RAPIDJSON_NOEXCEPT : + explicit GenericSchemaDocument(const ValueType& document, IRemoteSchemaDocumentProviderType* remoteProvider = 0, Allocator* allocator = 0) : remoteProvider_(remoteProvider), allocator_(allocator), ownAllocator_(), @@ -2002,17 +2001,6 @@ private: }; RAPIDJSON_NAMESPACE_END - -#if defined(__GNUC__) RAPIDJSON_DIAG_POP -#endif - -#ifdef __clang__ -RAPIDJSON_DIAG_POP -#endif - -#ifdef _MSC_VER -RAPIDJSON_DIAG_POP -#endif #endif // RAPIDJSON_SCHEMA_H_ diff --git a/3rdparty/rapidjson/include/rapidjson/stream.h b/3rdparty/rapidjson/include/rapidjson/stream.h index dd2783b4134..fef82c252ff 100644 --- a/3rdparty/rapidjson/include/rapidjson/stream.h +++ b/3rdparty/rapidjson/include/rapidjson/stream.h @@ -95,7 +95,7 @@ inline void PutUnsafe(Stream& stream, typename Stream::Ch c) { //! Put N copies of a character to a stream. template inline void PutN(Stream& stream, Ch c, size_t n) { - PutReserve(stream, n); + PutReserve(stream, n); for (size_t i = 0; i < n; i++) PutUnsafe(stream, c); } diff --git a/3rdparty/rapidjson/include/rapidjson/writer.h b/3rdparty/rapidjson/include/rapidjson/writer.h index 2809f705841..112d767ef8a 100644 --- a/3rdparty/rapidjson/include/rapidjson/writer.h +++ b/3rdparty/rapidjson/include/rapidjson/writer.h @@ -41,6 +41,7 @@ RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant #ifdef __clang__ RAPIDJSON_DIAG_PUSH RAPIDJSON_DIAG_OFF(padded) +RAPIDJSON_DIAG_OFF(unreachable-code) #endif RAPIDJSON_NAMESPACE_BEGIN @@ -62,6 +63,7 @@ RAPIDJSON_NAMESPACE_BEGIN enum WriteFlag { kWriteNoFlags = 0, //!< No flags are set. kWriteValidateEncodingFlag = 1, //!< Validate encoding of JSON strings. + kWriteNanAndInfFlag = 2, //!< Allow writing of Inf, -Inf and NaN. kWriteDefaultFlags = RAPIDJSON_WRITE_DEFAULT_FLAGS //!< Default write flags. Can be customized by defining RAPIDJSON_WRITE_DEFAULT_FLAGS }; @@ -167,30 +169,30 @@ public: */ //@{ - bool Null() { Prefix(kNullType); return WriteNull(); } - bool Bool(bool b) { Prefix(b ? kTrueType : kFalseType); return WriteBool(b); } - bool Int(int i) { Prefix(kNumberType); return WriteInt(i); } - bool Uint(unsigned u) { Prefix(kNumberType); return WriteUint(u); } - bool Int64(int64_t i64) { Prefix(kNumberType); return WriteInt64(i64); } - bool Uint64(uint64_t u64) { Prefix(kNumberType); return WriteUint64(u64); } + bool Null() { Prefix(kNullType); return EndValue(WriteNull()); } + bool Bool(bool b) { Prefix(b ? kTrueType : kFalseType); return EndValue(WriteBool(b)); } + bool Int(int i) { Prefix(kNumberType); return EndValue(WriteInt(i)); } + bool Uint(unsigned u) { Prefix(kNumberType); return EndValue(WriteUint(u)); } + bool Int64(int64_t i64) { Prefix(kNumberType); return EndValue(WriteInt64(i64)); } + bool Uint64(uint64_t u64) { Prefix(kNumberType); return EndValue(WriteUint64(u64)); } //! Writes the given \c double value to the stream /*! \param d The value to be written. \return Whether it is succeed. */ - bool Double(double d) { Prefix(kNumberType); return WriteDouble(d); } + bool Double(double d) { Prefix(kNumberType); return EndValue(WriteDouble(d)); } bool RawNumber(const Ch* str, SizeType length, bool copy = false) { (void)copy; Prefix(kNumberType); - return WriteString(str, length); + return EndValue(WriteString(str, length)); } bool String(const Ch* str, SizeType length, bool copy = false) { (void)copy; Prefix(kStringType); - return WriteString(str, length); + return EndValue(WriteString(str, length)); } #if RAPIDJSON_HAS_STDSTRING @@ -212,10 +214,7 @@ public: RAPIDJSON_ASSERT(level_stack_.GetSize() >= sizeof(Level)); RAPIDJSON_ASSERT(!level_stack_.template Top()->inArray); level_stack_.template Pop(1); - bool ret = WriteEndObject(); - if (RAPIDJSON_UNLIKELY(level_stack_.Empty())) // end of json text - os_->Flush(); - return ret; + return EndValue(WriteEndObject()); } bool StartArray() { @@ -229,10 +228,7 @@ public: RAPIDJSON_ASSERT(level_stack_.GetSize() >= sizeof(Level)); RAPIDJSON_ASSERT(level_stack_.template Top()->inArray); level_stack_.template Pop(1); - bool ret = WriteEndArray(); - if (RAPIDJSON_UNLIKELY(level_stack_.Empty())) // end of json text - os_->Flush(); - return ret; + return EndValue(WriteEndArray()); } //@} @@ -253,7 +249,7 @@ public: \param length Length of the json. \param type Type of the root of json. */ - bool RawValue(const Ch* json, size_t length, Type type) { Prefix(type); return WriteRawValue(json, length); } + bool RawValue(const Ch* json, size_t length, Type type) { Prefix(type); return EndValue(WriteRawValue(json, length)); } protected: //! Information for each nested level @@ -319,9 +315,25 @@ protected: } bool WriteDouble(double d) { - if (internal::Double(d).IsNanOrInf()) - return false; - + if (internal::Double(d).IsNanOrInf()) { + if (!(writeFlags & kWriteNanAndInfFlag)) + return false; + if (internal::Double(d).IsNan()) { + PutReserve(*os_, 3); + PutUnsafe(*os_, 'N'); PutUnsafe(*os_, 'a'); PutUnsafe(*os_, 'N'); + return true; + } + if (internal::Double(d).Sign()) { + PutReserve(*os_, 9); + PutUnsafe(*os_, '-'); + } + else + PutReserve(*os_, 8); + PutUnsafe(*os_, 'I'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'f'); + PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 't'); PutUnsafe(*os_, 'y'); + return true; + } + char buffer[25]; char* end = internal::dtoa(d, buffer, maxDecimalPlaces_); PutReserve(*os_, static_cast(end - buffer)); @@ -442,6 +454,13 @@ protected: } } + // Flush the value if it is the top level one. + bool EndValue(bool ret) { + if (RAPIDJSON_UNLIKELY(level_stack_.Empty())) // end of json text + os_->Flush(); + return ret; + } + OutputStream* os_; internal::Stack level_stack_; int maxDecimalPlaces_; @@ -489,8 +508,25 @@ inline bool Writer::WriteUint64(uint64_t u) { template<> inline bool Writer::WriteDouble(double d) { - if (internal::Double(d).IsNanOrInf()) - return false; + if (internal::Double(d).IsNanOrInf()) { + // Note: This code path can only be reached if (RAPIDJSON_WRITE_DEFAULT_FLAGS & kWriteNanAndInfFlag). + if (!(kWriteDefaultFlags & kWriteNanAndInfFlag)) + return false; + if (internal::Double(d).IsNan()) { + PutReserve(*os_, 3); + PutUnsafe(*os_, 'N'); PutUnsafe(*os_, 'a'); PutUnsafe(*os_, 'N'); + return true; + } + if (internal::Double(d).Sign()) { + PutReserve(*os_, 9); + PutUnsafe(*os_, '-'); + } + else + PutReserve(*os_, 8); + PutUnsafe(*os_, 'I'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'f'); + PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 't'); PutUnsafe(*os_, 'y'); + return true; + } char *buffer = os_->Push(25); char* end = internal::dtoa(d, buffer, maxDecimalPlaces_); diff --git a/3rdparty/rapidjson/package.json b/3rdparty/rapidjson/package.json index 9e5e4f23ce6..cc6087a5ca3 100644 --- a/3rdparty/rapidjson/package.json +++ b/3rdparty/rapidjson/package.json @@ -1,8 +1,8 @@ { "name": "rapidjson", - "version": "1.0.3", + "version": "1.0.4", "description": "![](doc/logo/rapidjson.png)", - "main": "index.js", + "main": "include_dirs.js", "directories": { "doc": "doc", "example": "example", @@ -20,6 +20,5 @@ "bugs": { "url": "https://github.com/miloyip/rapidjson/issues" }, - "homepage": "https://github.com/miloyip/rapidjson#readme", - "main": "include_dirs.js" + "homepage": "https://github.com/miloyip/rapidjson#readme" } diff --git a/3rdparty/rapidjson/test/unittest/CMakeLists.txt b/3rdparty/rapidjson/test/unittest/CMakeLists.txt index 4e3b0714761..b3204d6c8d6 100644 --- a/3rdparty/rapidjson/test/unittest/CMakeLists.txt +++ b/3rdparty/rapidjson/test/unittest/CMakeLists.txt @@ -1,3 +1,5 @@ +include(CheckCXXCompilerFlag) + set(UNITTEST_SOURCES allocatorstest.cpp bigintegertest.cpp @@ -38,11 +40,14 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Weffc++ -Wswitch-default -Wfloat-equal") elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Weffc++ -Wswitch-default -Wfloat-equal -Wimplicit-fallthrough -Weverything") - # If the user is running a newer version of Clang that includes the - # -Wdouble-promotion, we will ignore that warning. - # if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.7) - # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-double-promotion") - # endif() + # If the user is running a newer version of Clang that includes the + # -Wdouble-promotion, we will ignore that warning. + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.7) + CHECK_CXX_COMPILER_FLAG("-Wno-double-promotion" HAS_NO_DOUBLE_PROMOTION) + if (HAS_NO_DOUBLE_PROMOTION) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-double-promotion") + endif() + endif() elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") # Force to always compile with /W4 if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") diff --git a/3rdparty/rapidjson/test/unittest/dtoatest.cpp b/3rdparty/rapidjson/test/unittest/dtoatest.cpp index fe28271f976..afd76eb09ab 100644 --- a/3rdparty/rapidjson/test/unittest/dtoatest.cpp +++ b/3rdparty/rapidjson/test/unittest/dtoatest.cpp @@ -37,6 +37,7 @@ TEST(dtoa, normal) { TEST_DTOA(1.2345678, "1.2345678"); TEST_DTOA(0.123456789012, "0.123456789012"); TEST_DTOA(1234567.8, "1234567.8"); + TEST_DTOA(-79.39773355813419, "-79.39773355813419"); TEST_DTOA(0.000001, "0.000001"); TEST_DTOA(0.0000001, "1e-7"); TEST_DTOA(1e30, "1e30"); diff --git a/3rdparty/rapidjson/test/unittest/encodingstest.cpp b/3rdparty/rapidjson/test/unittest/encodingstest.cpp index 4104880015e..67b0391ed06 100644 --- a/3rdparty/rapidjson/test/unittest/encodingstest.cpp +++ b/3rdparty/rapidjson/test/unittest/encodingstest.cpp @@ -302,8 +302,9 @@ TEST(EncodingsTest, UTF8) { decodedCount++; } - if (*encodedStr) // This decoder cannot handle U+0000 + if (*encodedStr) { // This decoder cannot handle U+0000 EXPECT_EQ(1u, decodedCount); // Should only contain one code point + } EXPECT_EQ(UTF8_ACCEPT, state); if (UTF8_ACCEPT != state) diff --git a/3rdparty/rapidjson/test/unittest/istreamwrappertest.cpp b/3rdparty/rapidjson/test/unittest/istreamwrappertest.cpp index 28c756cc9c9..9d6fbcff0de 100644 --- a/3rdparty/rapidjson/test/unittest/istreamwrappertest.cpp +++ b/3rdparty/rapidjson/test/unittest/istreamwrappertest.cpp @@ -50,8 +50,9 @@ static void TestStringStream() { StringStreamType iss(s); BasicIStreamWrapper is(iss); EXPECT_EQ(0, is.Tell()); - if (sizeof(Ch) == 1) + if (sizeof(Ch) == 1) { EXPECT_EQ(0, is.Peek4()); // less than 4 bytes + } for (int i = 0; i < 3; i++) { EXPECT_EQ(static_cast(i), is.Tell()); EXPECT_EQ('A' + i, is.Peek()); diff --git a/3rdparty/rapidjson/test/unittest/itoatest.cpp b/3rdparty/rapidjson/test/unittest/itoatest.cpp index 79db1c71dcd..b752a6a26ee 100644 --- a/3rdparty/rapidjson/test/unittest/itoatest.cpp +++ b/3rdparty/rapidjson/test/unittest/itoatest.cpp @@ -84,6 +84,8 @@ static void Verify(void(*f)(T, char*), char* (*g)(T, char*)) { VerifyValue(Traits::Negate(i + 1), f, g); } last = i; + if (i > static_cast(std::numeric_limits::max() / static_cast(power))) + break; i *= power; } while (last < i); } diff --git a/3rdparty/rapidjson/test/unittest/readertest.cpp b/3rdparty/rapidjson/test/unittest/readertest.cpp index 329af2a7ea4..64a1f9c3cf4 100644 --- a/3rdparty/rapidjson/test/unittest/readertest.cpp +++ b/3rdparty/rapidjson/test/unittest/readertest.cpp @@ -19,17 +19,21 @@ #include "rapidjson/internal/itoa.h" #include "rapidjson/memorystream.h" +#include + using namespace rapidjson; -#ifdef __GNUC__ RAPIDJSON_DIAG_PUSH +#ifdef __GNUC__ RAPIDJSON_DIAG_OFF(effc++) RAPIDJSON_DIAG_OFF(float-equal) RAPIDJSON_DIAG_OFF(missing-noreturn) +#if __GNUC__ >= 7 +RAPIDJSON_DIAG_OFF(dangling-else) #endif +#endif // __GNUC__ #ifdef __clang__ -RAPIDJSON_DIAG_PUSH RAPIDJSON_DIAG_OFF(variadic-macros) RAPIDJSON_DIAG_OFF(c++98-compat-pedantic) #endif @@ -1774,10 +1778,67 @@ TEST(Reader, TrailingCommaHandlerTerminationIterative) { TestTrailingCommaHandlerTermination(); } -#ifdef __GNUC__ -RAPIDJSON_DIAG_POP -#endif +TEST(Reader, ParseNanAndInfinity) { +#define TEST_NAN_INF(str, x) \ + { \ + { \ + StringStream s(str); \ + ParseDoubleHandler h; \ + Reader reader; \ + ASSERT_EQ(kParseErrorNone, reader.Parse(s, h).Code()); \ + EXPECT_EQ(1u, h.step_); \ + internal::Double e(x), a(h.actual_); \ + EXPECT_EQ(e.IsNan(), a.IsNan()); \ + EXPECT_EQ(e.IsInf(), a.IsInf()); \ + if (!e.IsNan()) \ + EXPECT_EQ(e.Sign(), a.Sign()); \ + } \ + { \ + const char* json = "{ \"naninfdouble\": " str " } "; \ + StringStream s(json); \ + NumbersAsStringsHandler h(str); \ + Reader reader; \ + EXPECT_TRUE(reader.Parse(s, h)); \ + } \ + { \ + char* json = StrDup("{ \"naninfdouble\": " str " } "); \ + InsituStringStream s(json); \ + NumbersAsStringsHandler h(str); \ + Reader reader; \ + EXPECT_TRUE(reader.Parse(s, h)); \ + free(json); \ + } \ + } +#define TEST_NAN_INF_ERROR(errorCode, str, errorOffset) \ + { \ + int streamPos = errorOffset; \ + char buffer[1001]; \ + strncpy(buffer, str, 1000); \ + InsituStringStream s(buffer); \ + BaseReaderHandler<> h; \ + Reader reader; \ + EXPECT_FALSE(reader.Parse(s, h)); \ + EXPECT_EQ(errorCode, reader.GetParseErrorCode());\ + EXPECT_EQ(errorOffset, reader.GetErrorOffset());\ + EXPECT_EQ(streamPos, s.Tell());\ + } + + double nan = std::numeric_limits::quiet_NaN(); + double inf = std::numeric_limits::infinity(); + + TEST_NAN_INF("NaN", nan); + TEST_NAN_INF("-NaN", nan); + TEST_NAN_INF("Inf", inf); + TEST_NAN_INF("Infinity", inf); + TEST_NAN_INF("-Inf", -inf); + TEST_NAN_INF("-Infinity", -inf); + TEST_NAN_INF_ERROR(kParseErrorValueInvalid, "nan", 1); + TEST_NAN_INF_ERROR(kParseErrorValueInvalid, "-nan", 1); + TEST_NAN_INF_ERROR(kParseErrorValueInvalid, "NAN", 1); + TEST_NAN_INF_ERROR(kParseErrorValueInvalid, "-Infinty", 6); + +#undef TEST_NAN_INF_ERROR +#undef TEST_NAN_INF +} -#ifdef __clang__ RAPIDJSON_DIAG_POP -#endif diff --git a/3rdparty/rapidjson/test/unittest/schematest.cpp b/3rdparty/rapidjson/test/unittest/schematest.cpp index d1027ad51c5..d75b1e593e0 100644 --- a/3rdparty/rapidjson/test/unittest/schematest.cpp +++ b/3rdparty/rapidjson/test/unittest/schematest.cpp @@ -111,7 +111,7 @@ TEST(SchemaValidator, Hasher) { EXPECT_FALSE(d.HasParseError());\ EXPECT_TRUE(expected == d.Accept(validator));\ EXPECT_TRUE(expected == validator.IsValid());\ - if (expected && !validator.IsValid()) {\ + if ((expected) && !validator.IsValid()) {\ StringBuffer sb;\ validator.GetInvalidSchemaPointer().StringifyUriFragment(sb);\ printf("Invalid schema: %s\n", sb.GetString());\ diff --git a/3rdparty/rapidjson/test/unittest/stringbuffertest.cpp b/3rdparty/rapidjson/test/unittest/stringbuffertest.cpp index 9be98fce268..ded513cddcf 100644 --- a/3rdparty/rapidjson/test/unittest/stringbuffertest.cpp +++ b/3rdparty/rapidjson/test/unittest/stringbuffertest.cpp @@ -37,6 +37,13 @@ TEST(StringBuffer, Put) { EXPECT_STREQ("A", buffer.GetString()); } +TEST(StringBuffer, PutN_Issue672) { + GenericStringBuffer, MemoryPoolAllocator<> > buffer; + EXPECT_EQ(0, buffer.GetSize()); + rapidjson::PutN(buffer, ' ', 1); + EXPECT_EQ(1, buffer.GetSize()); +} + TEST(StringBuffer, Clear) { StringBuffer buffer; buffer.Put('A'); diff --git a/3rdparty/rapidjson/test/unittest/valuetest.cpp b/3rdparty/rapidjson/test/unittest/valuetest.cpp index feec049d09d..fefc001d45d 100644 --- a/3rdparty/rapidjson/test/unittest/valuetest.cpp +++ b/3rdparty/rapidjson/test/unittest/valuetest.cpp @@ -545,8 +545,10 @@ TEST(Value, Int64) { // Templated functions EXPECT_TRUE(z.Is()); EXPECT_EQ(i, z.Get()); +#if 0 // signed integer underflow is undefined behaviour EXPECT_EQ(i - 1, z.Set(i - 1).Get()); EXPECT_EQ(i - 2, z.Set(i - 2).Get()); +#endif } TEST(Value, Uint64) { @@ -671,6 +673,7 @@ TEST(Value, Float) { } TEST(Value, IsLosslessDouble) { + EXPECT_TRUE(Value(0.0).IsLosslessDouble()); EXPECT_TRUE(Value(12.34).IsLosslessDouble()); EXPECT_TRUE(Value(-123).IsLosslessDouble()); EXPECT_TRUE(Value(2147483648u).IsLosslessDouble()); @@ -679,8 +682,19 @@ TEST(Value, IsLosslessDouble) { EXPECT_TRUE(Value(RAPIDJSON_UINT64_C2(0xA0000000, 0x00000000)).IsLosslessDouble()); #endif - EXPECT_FALSE(Value(-static_cast(RAPIDJSON_UINT64_C2(0x7FFFFFFF, 0xFFFFFFFF))).IsLosslessDouble()); - EXPECT_FALSE(Value(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFFF)).IsLosslessDouble()); + EXPECT_FALSE(Value(static_cast(RAPIDJSON_UINT64_C2(0x7FFFFFFF, 0xFFFFFFFF))).IsLosslessDouble()); // INT64_MAX + EXPECT_FALSE(Value(-static_cast(RAPIDJSON_UINT64_C2(0x7FFFFFFF, 0xFFFFFFFF))).IsLosslessDouble()); // -INT64_MAX + EXPECT_TRUE(Value(-static_cast(RAPIDJSON_UINT64_C2(0x7FFFFFFF, 0xFFFFFFFF)) - 1).IsLosslessDouble()); // INT64_MIN + EXPECT_FALSE(Value(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFFF)).IsLosslessDouble()); // UINT64_MAX + + EXPECT_TRUE(Value(3.4028234e38f).IsLosslessDouble()); // FLT_MAX + EXPECT_TRUE(Value(-3.4028234e38f).IsLosslessDouble()); // -FLT_MAX + EXPECT_TRUE(Value(1.17549435e-38f).IsLosslessDouble()); // FLT_MIN + EXPECT_TRUE(Value(-1.17549435e-38f).IsLosslessDouble()); // -FLT_MIN + EXPECT_TRUE(Value(1.7976931348623157e+308).IsLosslessDouble()); // DBL_MAX + EXPECT_TRUE(Value(-1.7976931348623157e+308).IsLosslessDouble()); // -DBL_MAX + EXPECT_TRUE(Value(2.2250738585072014e-308).IsLosslessDouble()); // DBL_MIN + EXPECT_TRUE(Value(-2.2250738585072014e-308).IsLosslessDouble()); // -DBL_MIN } TEST(Value, IsLosslessFloat) { @@ -1119,14 +1133,18 @@ TEST(Value, ArrayHelperRangeFor) { { int i = 0; - for (auto& v : x.GetArray()) - EXPECT_EQ(i++, v.GetInt()); + for (auto& v : x.GetArray()) { + EXPECT_EQ(i, v.GetInt()); + i++; + } EXPECT_EQ(i, 10); } { int i = 0; - for (const auto& v : const_cast(x).GetArray()) - EXPECT_EQ(i++, v.GetInt()); + for (const auto& v : const_cast(x).GetArray()) { + EXPECT_EQ(i, v.GetInt()); + i++; + } EXPECT_EQ(i, 10); } diff --git a/3rdparty/rapidjson/test/unittest/writertest.cpp b/3rdparty/rapidjson/test/unittest/writertest.cpp index 9c68c539a83..29f7626092c 100644 --- a/3rdparty/rapidjson/test/unittest/writertest.cpp +++ b/3rdparty/rapidjson/test/unittest/writertest.cpp @@ -439,33 +439,47 @@ TEST(Writer, InvalidEventSequence) { } } -extern double zero; // clang -Wmissing-variable-declarations -double zero = 0.0; // Use global variable to prevent compiler warning - TEST(Writer, NaN) { - double nan = zero / zero; + double nan = std::numeric_limits::quiet_NaN(); + EXPECT_TRUE(internal::Double(nan).IsNan()); StringBuffer buffer; - Writer writer(buffer); - EXPECT_FALSE(writer.Double(nan)); - + { + Writer writer(buffer); + EXPECT_FALSE(writer.Double(nan)); + } + { + Writer, UTF8<>, CrtAllocator, kWriteNanAndInfFlag> writer(buffer); + EXPECT_TRUE(writer.Double(nan)); + EXPECT_STREQ("NaN", buffer.GetString()); + } GenericStringBuffer > buffer2; Writer > > writer2(buffer2); EXPECT_FALSE(writer2.Double(nan)); } TEST(Writer, Inf) { - double inf = 1.0 / zero; + double inf = std::numeric_limits::infinity(); + EXPECT_TRUE(internal::Double(inf).IsInf()); StringBuffer buffer; { Writer writer(buffer); - EXPECT_FALSE(writer.Double(inf)); + EXPECT_FALSE(writer.Double(inf)); } { Writer writer(buffer); EXPECT_FALSE(writer.Double(-inf)); } + { + Writer, UTF8<>, CrtAllocator, kWriteNanAndInfFlag> writer(buffer); + EXPECT_TRUE(writer.Double(inf)); + } + { + Writer, UTF8<>, CrtAllocator, kWriteNanAndInfFlag> writer(buffer); + EXPECT_TRUE(writer.Double(-inf)); + } + EXPECT_STREQ("Infinity-Infinity", buffer.GetString()); } TEST(Writer, RawValue) { diff --git a/3rdparty/rapidjson/travis-doxygen.sh b/3rdparty/rapidjson/travis-doxygen.sh index e9eb6b9c2b9..31a50cfa921 100644 --- a/3rdparty/rapidjson/travis-doxygen.sh +++ b/3rdparty/rapidjson/travis-doxygen.sh @@ -42,8 +42,8 @@ abort() { skip "Running Doxygen only for updates on 'master' branch (current: ${TRAVIS_BRANCH})." # check for job number -[ "${TRAVIS_JOB_NUMBER}" = "${TRAVIS_BUILD_NUMBER}.1" ] || \ - skip "Running Doxygen only on first job of build ${TRAVIS_BUILD_NUMBER} (current: ${TRAVIS_JOB_NUMBER})." +# [ "${TRAVIS_JOB_NUMBER}" = "${TRAVIS_BUILD_NUMBER}.1" ] || \ +# skip "Running Doxygen only on first job of build ${TRAVIS_BUILD_NUMBER} (current: ${TRAVIS_JOB_NUMBER})." # install doxygen binary distribution doxygen_install() diff --git a/hash/pofo.xml b/hash/pofo.xml index e12a0b04cdc..b2555d919df 100644 --- a/hash/pofo.xml +++ b/hash/pofo.xml @@ -7,7 +7,6 @@ Utility-Card HPC-701 Finance-Card HPC-702 Science-Card HPC-703 - File Manager / Tutorial HPC-704 PowerBASIC HPC-705 Instant Spell HPC-709 Hyperlist HPC-713 @@ -50,4 +49,18 @@ Timekeeper TIMEPAC-5 --> + + + File Manager/Tutorial + 1990 + Atari + + + + + + + + + diff --git a/plugins/dummy/init.lua b/plugins/dummy/init.lua index 1f78851a936..e13e6c4cf79 100644 --- a/plugins/dummy/init.lua +++ b/plugins/dummy/init.lua @@ -19,7 +19,7 @@ function dummy.startplugin() end) local function menu_populate() - return {{ "This is a", "test", 32 }, { "Also a", "test", 0 }} -- 32 is MENU_FLAG_DISABLE + return {{ "This is a", "test", "off" }, { "Also a", "test", 0 }} end local function menu_callback(index, event) diff --git a/plugins/hiscore/hiscore.dat b/plugins/hiscore/hiscore.dat index d5c77537b69..79422978fa1 100644 --- a/plugins/hiscore/hiscore.dat +++ b/plugins/hiscore/hiscore.dat @@ -3947,6 +3947,10 @@ deadang: ;@s:dec0.cpp +ffantasyj: +@:maincpu,program,ffbe00,50,08,01 + + hbarrelw: @:maincpu,program,ffbe78,58,00,26 @@ -4763,6 +4767,12 @@ candy: ;@s:epos.cpp +;beastf:******beastie feastie (fixed) +beastf: +@:maincpu,program,7010,f0,00,00 +@:maincpu,program,798a,1,fc,fc + + ;suprglob:******super glob * suprglob: @:maincpu,program,7c20,3c,00,00 @@ -4801,13 +4811,6 @@ theglob3: @:maincpu,program,7ab7,1,80,80 -;beastf:******beastie feastie -beastf: -@:maincpu,program,4c46,3c,4d,00 -@:maincpu,program,4c8a,1,01,01 -@:maincpu,program,4cb0,1,15,15 - - ;@s:eprom.cpp ;guts:******Guts n' Glory (prototype) @@ -9246,6 +9249,14 @@ aquarush: ;@s:namcos2.cpp +bubbletr: +@:maincpu,program,106970,278,01,01 + + +bubbletrj: +@:maincpu,program,10698c,278,01,01 + + ;(phelios (japan)) phelios: pheliosj: @@ -10041,11 +10052,9 @@ opwolfu: ;(operation thunderbolt) ;othunderj:******Operation Thunderbolt (Japan) -;othunderuo:******Operation Thunderbolt (us,older) othunder: othunderj: othunderu: -othunderuo: @:maincpu,program,839ca,438,4e,00 @:maincpu,program,83dd9,1,01,01 @@ -12369,6 +12378,10 @@ glocu: ;@s:seibuspi.cpp +rdft2jb: +@:maincpu,program,285dc,1ab,01,2e + + ;rfjet:******raiden fighters jet (all versions fixed) rfjet: rfjet2kc: diff --git a/plugins/hiscore/init.lua b/plugins/hiscore/init.lua index c4276514f62..c26c25ae21c 100644 --- a/plugins/hiscore/init.lua +++ b/plugins/hiscore/init.lua @@ -5,7 +5,6 @@ -- high-score saving with hiscore.dat infom just as older -- builds did in the past. -- -require('lfs') local exports = {} exports.name = "hiscore" exports.version = "1.0.0" @@ -24,16 +23,37 @@ function hiscore.startplugin() local hiscoredata_path = "hiscore.dat"; local hiscore_path = "hi"; - + local config_path = lfs.env_replace(manager:options().entries.inipath:value():match("[^;]+") .. "/hiscore.ini"); + local current_checksum = 0; local default_checksum = 0; + local config_read = false; local scores_have_been_read = false; local mem_check_passed = false; local found_hiscore_entry = false; local positions = {}; - + -- Configuration file will be searched in the first path defined + -- in mame inipath option. + local function read_config() + if config_read then return true end; + local file = io.open( config_path, "r" ); + if file then + file:close() + emu.print_verbose( "hiscore: config found" ); + local _conf = {} + for line in io.lines(config_path) do + token, value = string.match(line, '([^ ]+) ([^ ]+)'); + _conf[token] = lfs.env_replace(value); + end + hiscore_path = _conf["hi_path"]; + -- hiscoredata_path = _conf["dat_path"]; -- don't know if I should do it, but wathever + return true + end + return false + end + local function parse_table ( dsting ) local _table = {}; for line in string.gmatch(dsting, '([^\n]+)') do @@ -247,6 +267,7 @@ function hiscore.startplugin() scores_have_been_read = false; last_write_time = -10 emu.print_verbose("Starting " .. emu.gamename()) + config_read = read_config(); local dat = read_hiscore_dat() if dat and dat ~= "" then emu.print_verbose( "hiscore: found hiscore.dat entry for " .. emu.romname() ); diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index e3c29933220..2dacc9b8b81 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -735,8 +735,16 @@ end configuration { } + local version = str_to_version(_OPTIONS["gcc_version"]) + if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "gcc") then + if version >= 60000 then + buildoptions_cpp { + "-Wno-misleading-indentation", + } + end + end + 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", @@ -747,7 +755,6 @@ end end if _OPTIONS["targetos"]=="macosx" then - local version = str_to_version(_OPTIONS["gcc_version"]) if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "clang") then buildoptions { "-Wno-switch", diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index 083cd2d46d1..d15d71fee78 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -1174,6 +1174,14 @@ if (BUSES["POFO"]~=null) then MAME_DIR .. "src/devices/bus/pofo/hpc101.h", MAME_DIR .. "src/devices/bus/pofo/hpc102.cpp", MAME_DIR .. "src/devices/bus/pofo/hpc102.h", + MAME_DIR .. "src/devices/bus/pofo/hpc104.cpp", + MAME_DIR .. "src/devices/bus/pofo/hpc104.h", + MAME_DIR .. "src/devices/bus/pofo/ccm.cpp", + MAME_DIR .. "src/devices/bus/pofo/ccm.h", + MAME_DIR .. "src/devices/bus/pofo/ram.cpp", + MAME_DIR .. "src/devices/bus/pofo/ram.h", + MAME_DIR .. "src/devices/bus/pofo/rom.cpp", + MAME_DIR .. "src/devices/bus/pofo/rom.h", } end diff --git a/scripts/src/emu.lua b/scripts/src/emu.lua index 2302811a058..78b61d03d54 100644 --- a/scripts/src/emu.lua +++ b/scripts/src/emu.lua @@ -158,6 +158,8 @@ files { MAME_DIR .. "src/emu/screen.h", MAME_DIR .. "src/emu/softlist.cpp", MAME_DIR .. "src/emu/softlist.h", + MAME_DIR .. "src/emu/softlist_dev.cpp", + MAME_DIR .. "src/emu/softlist_dev.h", MAME_DIR .. "src/emu/sound.cpp", MAME_DIR .. "src/emu/sound.h", MAME_DIR .. "src/emu/speaker.cpp", diff --git a/scripts/src/lib.lua b/scripts/src/lib.lua index 7353c87c1d9..1549084c918 100644 --- a/scripts/src/lib.lua +++ b/scripts/src/lib.lua @@ -48,8 +48,6 @@ project "utils" MAME_DIR .. "src/lib/util/corestr.h", MAME_DIR .. "src/lib/util/coreutil.cpp", MAME_DIR .. "src/lib/util/coreutil.h", - MAME_DIR .. "src/lib/util/cstrpool.cpp", - MAME_DIR .. "src/lib/util/cstrpool.h", MAME_DIR .. "src/lib/util/delegate.cpp", MAME_DIR .. "src/lib/util/delegate.h", MAME_DIR .. "src/lib/util/flac.cpp", diff --git a/scripts/src/machine.lua b/scripts/src/machine.lua index fd9fd3d8ee4..16388610870 100644 --- a/scripts/src/machine.lua +++ b/scripts/src/machine.lua @@ -1201,6 +1201,18 @@ if (MACHINES["LDP1000"]~=null) then } end +--------------------------------------------------- +-- +--@src/devices/machine/ldp1000.h,MACHINES["LDP1450"] = true +--------------------------------------------------- + +if (MACHINES["LDP1450"]~=null) then + files { + MAME_DIR .. "src/devices/machine/ldp1450.cpp", + MAME_DIR .. "src/devices/machine/ldp1450.h", + } +end + --------------------------------------------------- -- --@src/devices/machine/ldvp931.h,MACHINES["LDVP931"] = true diff --git a/scripts/src/sound.lua b/scripts/src/sound.lua index bf1e87ebc7e..30d049c72e1 100644 --- a/scripts/src/sound.lua +++ b/scripts/src/sound.lua @@ -1352,6 +1352,7 @@ if (SOUNDS["UPD1771"]~=null) then MAME_DIR .. "src/devices/sound/upd1771.h", } end + --------------------------------------------------- -- GB_SOUND --@src/devices/sound/gb.h,SOUNDS["GB_SOUND"] = true @@ -1363,3 +1364,15 @@ if (SOUNDS["GB_SOUND"]~=null) then MAME_DIR .. "src/devices/sound/gb.h", } end + +--------------------------------------------------- +-- PCD3311 +--@src/devices/sound/gb.h,SOUNDS["PCD3311"] = true +--------------------------------------------------- + +if (SOUNDS["PCD3311"]~=null) then + files { + MAME_DIR .. "src/devices/sound/pcd3311.cpp", + MAME_DIR .. "src/devices/sound/pcd3311.h", + } +end diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index 136f01b063b..a119c3f18e7 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -431,6 +431,7 @@ MACHINES["LDPR8210"] = true MACHINES["LDSTUB"] = true MACHINES["LDV1000"] = true MACHINES["LDP1000"] = true +MACHINES["LDP1450"] = true MACHINES["LDVP931"] = true --MACHINES["LH5810"] = true MACHINES["LINFLASH"] = true @@ -3240,7 +3241,7 @@ files { MAME_DIR .. "src/mame/drivers/cabal.cpp", MAME_DIR .. "src/mame/includes/cabal.h", MAME_DIR .. "src/mame/video/cabal.cpp", - MAME_DIR .. "src/mame/drivers/cshooter.cpp", + MAME_DIR .. "src/mame/drivers/airraid.cpp", MAME_DIR .. "src/mame/drivers/dcon.cpp", MAME_DIR .. "src/mame/includes/dcon.h", MAME_DIR .. "src/mame/video/dcon.cpp", @@ -3284,9 +3285,12 @@ files { MAME_DIR .. "src/mame/video/seibuspi.cpp", MAME_DIR .. "src/mame/drivers/sengokmj.cpp", MAME_DIR .. "src/mame/drivers/stfight.cpp", + MAME_DIR .. "src/mame/video/stfight_dev.cpp", + MAME_DIR .. "src/mame/video/stfight_dev.h", + MAME_DIR .. "src/mame/video/airraid_dev.cpp", + MAME_DIR .. "src/mame/video/airraid_dev.h", MAME_DIR .. "src/mame/includes/stfight.h", MAME_DIR .. "src/mame/machine/stfight.cpp", - MAME_DIR .. "src/mame/video/stfight.cpp", MAME_DIR .. "src/mame/drivers/toki.cpp", MAME_DIR .. "src/mame/includes/toki.h", MAME_DIR .. "src/mame/video/toki.cpp", diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index e78baadfdc6..3554b86e213 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -260,6 +260,8 @@ SOUNDS["ESQPUMP"] = true SOUNDS["VRC6"] = true SOUNDS["UPD1771"] = true SOUNDS["GB_SOUND"] = true +SOUNDS["PCD3311"] = true + -------------------------------------------------- -- specify available video cores -------------------------------------------------- diff --git a/src/devices/bus/a1bus/a1cassette.cpp b/src/devices/bus/a1bus/a1cassette.cpp index 94eab958858..9a33b667fa9 100644 --- a/src/devices/bus/a1bus/a1cassette.cpp +++ b/src/devices/bus/a1bus/a1cassette.cpp @@ -47,7 +47,7 @@ machine_config_constructor a1bus_cassette_device::device_mconfig_additions() con return MACHINE_CONFIG_NAME( cassette ); } -const rom_entry *a1bus_cassette_device::device_rom_region() const +const tiny_rom_entry *a1bus_cassette_device::device_rom_region() const { return ROM_NAME( cassette ); } diff --git a/src/devices/bus/a1bus/a1cassette.h b/src/devices/bus/a1bus/a1cassette.h index 482704b31cf..b5391e680ff 100644 --- a/src/devices/bus/a1bus/a1cassette.h +++ b/src/devices/bus/a1bus/a1cassette.h @@ -29,7 +29,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; optional_device m_cassette; diff --git a/src/devices/bus/a1bus/a1cffa.cpp b/src/devices/bus/a1bus/a1cffa.cpp index fc0ff3da3a1..4edaf39c5d0 100644 --- a/src/devices/bus/a1bus/a1cffa.cpp +++ b/src/devices/bus/a1bus/a1cffa.cpp @@ -42,7 +42,7 @@ machine_config_constructor a1bus_cffa_device::device_mconfig_additions() const return MACHINE_CONFIG_NAME( cffa ); } -const rom_entry *a1bus_cffa_device::device_rom_region() const +const tiny_rom_entry *a1bus_cffa_device::device_rom_region() const { return ROM_NAME( cffa ); } diff --git a/src/devices/bus/a1bus/a1cffa.h b/src/devices/bus/a1bus/a1cffa.h index d395468891b..1a342c34b33 100644 --- a/src/devices/bus/a1bus/a1cffa.h +++ b/src/devices/bus/a1bus/a1cffa.h @@ -30,7 +30,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; required_device m_ata; diff --git a/src/devices/bus/a2bus/a2applicard.cpp b/src/devices/bus/a2bus/a2applicard.cpp index cb647b6476b..3075bd12ede 100644 --- a/src/devices/bus/a2bus/a2applicard.cpp +++ b/src/devices/bus/a2bus/a2applicard.cpp @@ -66,7 +66,7 @@ machine_config_constructor a2bus_applicard_device::device_mconfig_additions() co // device_rom_region - device-specific ROMs //------------------------------------------------- -const rom_entry *a2bus_applicard_device::device_rom_region() const +const tiny_rom_entry *a2bus_applicard_device::device_rom_region() const { return ROM_NAME( a2applicard ); } diff --git a/src/devices/bus/a2bus/a2applicard.h b/src/devices/bus/a2bus/a2applicard.h index e1bb4b4d685..fa0b11be8bf 100644 --- a/src/devices/bus/a2bus/a2applicard.h +++ b/src/devices/bus/a2bus/a2applicard.h @@ -38,7 +38,7 @@ public: protected: virtual void device_start() override; virtual void device_reset() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; // overrides of standard a2bus slot functions virtual UINT8 read_c0nx(address_space &space, UINT8 offset) override; diff --git a/src/devices/bus/a2bus/a2cffa.cpp b/src/devices/bus/a2bus/a2cffa.cpp index aa7f6336ce2..85eef339230 100644 --- a/src/devices/bus/a2bus/a2cffa.cpp +++ b/src/devices/bus/a2bus/a2cffa.cpp @@ -68,12 +68,12 @@ machine_config_constructor a2bus_cffa2000_device::device_mconfig_additions() con // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *a2bus_cffa2000_device::device_rom_region() const +const tiny_rom_entry *a2bus_cffa2000_device::device_rom_region() const { return ROM_NAME( cffa2 ); } -const rom_entry *a2bus_cffa2_6502_device::device_rom_region() const +const tiny_rom_entry *a2bus_cffa2_6502_device::device_rom_region() const { return ROM_NAME( cffa2_6502 ); } diff --git a/src/devices/bus/a2bus/a2cffa.h b/src/devices/bus/a2bus/a2cffa.h index 4215bde504f..b628fb16d1a 100644 --- a/src/devices/bus/a2bus/a2cffa.h +++ b/src/devices/bus/a2bus/a2cffa.h @@ -30,7 +30,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: virtual void device_start() override; @@ -70,7 +70,7 @@ class a2bus_cffa2_6502_device : public a2bus_cffa2000_device, public device_nvra { public: a2bus_cffa2_6502_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device_config_nvram_interface overrides diff --git a/src/devices/bus/a2bus/a2corvus.cpp b/src/devices/bus/a2bus/a2corvus.cpp index 6e33d0be8fa..cc95c3919cb 100644 --- a/src/devices/bus/a2bus/a2corvus.cpp +++ b/src/devices/bus/a2bus/a2corvus.cpp @@ -92,7 +92,7 @@ machine_config_constructor a2bus_corvus_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *a2bus_corvus_device::device_rom_region() const +const tiny_rom_entry *a2bus_corvus_device::device_rom_region() const { return ROM_NAME( corvus ); } diff --git a/src/devices/bus/a2bus/a2corvus.h b/src/devices/bus/a2bus/a2corvus.h index e7751089e33..2e64d8b9cdc 100644 --- a/src/devices/bus/a2bus/a2corvus.h +++ b/src/devices/bus/a2bus/a2corvus.h @@ -31,7 +31,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; required_device m_corvushd; diff --git a/src/devices/bus/a2bus/a2diskii.cpp b/src/devices/bus/a2bus/a2diskii.cpp index 488b675a5f9..cfda06bbdcb 100644 --- a/src/devices/bus/a2bus/a2diskii.cpp +++ b/src/devices/bus/a2bus/a2diskii.cpp @@ -81,7 +81,7 @@ machine_config_constructor a2bus_iwmflop_device::device_mconfig_additions() cons // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *a2bus_floppy_device::device_rom_region() const +const tiny_rom_entry *a2bus_floppy_device::device_rom_region() const { return ROM_NAME( diskii ); } diff --git a/src/devices/bus/a2bus/a2diskii.h b/src/devices/bus/a2bus/a2diskii.h index 9e01464893e..75363e244ed 100644 --- a/src/devices/bus/a2bus/a2diskii.h +++ b/src/devices/bus/a2bus/a2diskii.h @@ -29,7 +29,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: virtual void device_start() override; diff --git a/src/devices/bus/a2bus/a2diskiing.cpp b/src/devices/bus/a2bus/a2diskiing.cpp index 474e228b6fa..cf83f6d16df 100644 --- a/src/devices/bus/a2bus/a2diskiing.cpp +++ b/src/devices/bus/a2bus/a2diskiing.cpp @@ -59,7 +59,7 @@ machine_config_constructor a2bus_diskiing_device::device_mconfig_additions() con // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *a2bus_diskiing_device::device_rom_region() const +const tiny_rom_entry *a2bus_diskiing_device::device_rom_region() const { return ROM_NAME( diskiing ); } diff --git a/src/devices/bus/a2bus/a2diskiing.h b/src/devices/bus/a2bus/a2diskiing.h index 28cfa664be0..f1ac98cc8c0 100644 --- a/src/devices/bus/a2bus/a2diskiing.h +++ b/src/devices/bus/a2bus/a2diskiing.h @@ -32,7 +32,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_FLOPPY_FORMATS( floppy_formats ); diff --git a/src/devices/bus/a2bus/a2hsscsi.cpp b/src/devices/bus/a2bus/a2hsscsi.cpp index fa2744c995e..a9869d57f4d 100644 --- a/src/devices/bus/a2bus/a2hsscsi.cpp +++ b/src/devices/bus/a2bus/a2hsscsi.cpp @@ -104,7 +104,7 @@ machine_config_constructor a2bus_hsscsi_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *a2bus_hsscsi_device::device_rom_region() const +const tiny_rom_entry *a2bus_hsscsi_device::device_rom_region() const { return ROM_NAME( hsscsi ); } diff --git a/src/devices/bus/a2bus/a2hsscsi.h b/src/devices/bus/a2bus/a2hsscsi.h index d4d07ce04ea..11f2ae7a48a 100644 --- a/src/devices/bus/a2bus/a2hsscsi.h +++ b/src/devices/bus/a2bus/a2hsscsi.h @@ -30,7 +30,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; required_device m_ncr5380; required_device m_scsibus; diff --git a/src/devices/bus/a2bus/a2memexp.cpp b/src/devices/bus/a2bus/a2memexp.cpp index 9832b3160e2..d7177d645d1 100644 --- a/src/devices/bus/a2bus/a2memexp.cpp +++ b/src/devices/bus/a2bus/a2memexp.cpp @@ -59,12 +59,12 @@ machine_config_constructor a2bus_memexp_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *a2bus_memexp_device::device_rom_region() const +const tiny_rom_entry *a2bus_memexp_device::device_rom_region() const { return ROM_NAME( memexp ); } -const rom_entry *a2bus_ramfactor_device::device_rom_region() const +const tiny_rom_entry *a2bus_ramfactor_device::device_rom_region() const { return ROM_NAME( ramfactor ); } diff --git a/src/devices/bus/a2bus/a2memexp.h b/src/devices/bus/a2bus/a2memexp.h index 8ce49163db1..c953e0f7bf8 100644 --- a/src/devices/bus/a2bus/a2memexp.h +++ b/src/devices/bus/a2bus/a2memexp.h @@ -28,7 +28,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; bool m_isramfactor; UINT8 m_bankhior; @@ -62,7 +62,7 @@ class a2bus_ramfactor_device : public a2bus_memexp_device public: a2bus_ramfactor_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; // device type definition diff --git a/src/devices/bus/a2bus/a2pic.cpp b/src/devices/bus/a2bus/a2pic.cpp index c16ee6f2140..3592b2d582c 100644 --- a/src/devices/bus/a2bus/a2pic.cpp +++ b/src/devices/bus/a2bus/a2pic.cpp @@ -89,7 +89,7 @@ machine_config_constructor a2bus_pic_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *a2bus_pic_device::device_rom_region() const +const tiny_rom_entry *a2bus_pic_device::device_rom_region() const { return ROM_NAME( pic ); } diff --git a/src/devices/bus/a2bus/a2pic.h b/src/devices/bus/a2bus/a2pic.h index 997e4a342a6..9e5df928f9b 100644 --- a/src/devices/bus/a2bus/a2pic.h +++ b/src/devices/bus/a2bus/a2pic.h @@ -29,7 +29,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; required_ioport m_dsw1; diff --git a/src/devices/bus/a2bus/a2scsi.cpp b/src/devices/bus/a2bus/a2scsi.cpp index 50a715893bf..7b154901ec5 100644 --- a/src/devices/bus/a2bus/a2scsi.cpp +++ b/src/devices/bus/a2bus/a2scsi.cpp @@ -97,7 +97,7 @@ machine_config_constructor a2bus_scsi_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *a2bus_scsi_device::device_rom_region() const +const tiny_rom_entry *a2bus_scsi_device::device_rom_region() const { return ROM_NAME( scsi ); } diff --git a/src/devices/bus/a2bus/a2scsi.h b/src/devices/bus/a2bus/a2scsi.h index b6132577846..09b4ad18fe2 100644 --- a/src/devices/bus/a2bus/a2scsi.h +++ b/src/devices/bus/a2bus/a2scsi.h @@ -30,7 +30,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; required_device m_ncr5380; required_device m_scsibus; diff --git a/src/devices/bus/a2bus/a2ssc.cpp b/src/devices/bus/a2bus/a2ssc.cpp index d2765ebc557..b7189b77992 100644 --- a/src/devices/bus/a2bus/a2ssc.cpp +++ b/src/devices/bus/a2bus/a2ssc.cpp @@ -118,7 +118,7 @@ machine_config_constructor a2bus_ssc_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *a2bus_ssc_device::device_rom_region() const +const tiny_rom_entry *a2bus_ssc_device::device_rom_region() const { return ROM_NAME( ssc ); } diff --git a/src/devices/bus/a2bus/a2ssc.h b/src/devices/bus/a2bus/a2ssc.h index bca78273307..bdcaca2e900 100644 --- a/src/devices/bus/a2bus/a2ssc.h +++ b/src/devices/bus/a2bus/a2ssc.h @@ -29,7 +29,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; required_ioport m_dsw1, m_dsw2; diff --git a/src/devices/bus/a2bus/a2swyft.cpp b/src/devices/bus/a2bus/a2swyft.cpp index d47e7770937..b5f0d65c60d 100644 --- a/src/devices/bus/a2bus/a2swyft.cpp +++ b/src/devices/bus/a2bus/a2swyft.cpp @@ -36,7 +36,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *a2bus_swyft_device::device_rom_region() const +const tiny_rom_entry *a2bus_swyft_device::device_rom_region() const { return ROM_NAME( swyft ); } diff --git a/src/devices/bus/a2bus/a2swyft.h b/src/devices/bus/a2bus/a2swyft.h index 564a76ac6b9..a490d266ac9 100644 --- a/src/devices/bus/a2bus/a2swyft.h +++ b/src/devices/bus/a2bus/a2swyft.h @@ -27,7 +27,7 @@ public: a2bus_swyft_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); a2bus_swyft_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); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: virtual void device_start() override; diff --git a/src/devices/bus/a2bus/a2thunderclock.cpp b/src/devices/bus/a2bus/a2thunderclock.cpp index 8b378f238b6..e789b364a51 100644 --- a/src/devices/bus/a2bus/a2thunderclock.cpp +++ b/src/devices/bus/a2bus/a2thunderclock.cpp @@ -67,7 +67,7 @@ machine_config_constructor a2bus_thunderclock_device::device_mconfig_additions() // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *a2bus_thunderclock_device::device_rom_region() const +const tiny_rom_entry *a2bus_thunderclock_device::device_rom_region() const { return ROM_NAME( thunderclock ); } diff --git a/src/devices/bus/a2bus/a2thunderclock.h b/src/devices/bus/a2bus/a2thunderclock.h index 55ab8fe4389..324b6a30ea0 100644 --- a/src/devices/bus/a2bus/a2thunderclock.h +++ b/src/devices/bus/a2bus/a2thunderclock.h @@ -30,7 +30,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_WRITE_LINE_MEMBER( upd_dataout_w ); diff --git a/src/devices/bus/a2bus/a2ultraterm.cpp b/src/devices/bus/a2bus/a2ultraterm.cpp index 6f7722e46ea..3898e4be0c3 100644 --- a/src/devices/bus/a2bus/a2ultraterm.cpp +++ b/src/devices/bus/a2bus/a2ultraterm.cpp @@ -124,12 +124,12 @@ machine_config_constructor a2bus_videx160_device::device_mconfig_additions() con // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *a2bus_ultraterm_device::device_rom_region() const +const tiny_rom_entry *a2bus_ultraterm_device::device_rom_region() const { return ROM_NAME( a2ultraterm ); } -const rom_entry *a2bus_ultratermenh_device::device_rom_region() const +const tiny_rom_entry *a2bus_ultratermenh_device::device_rom_region() const { return ROM_NAME( a2ultratermenh ); } diff --git a/src/devices/bus/a2bus/a2ultraterm.h b/src/devices/bus/a2bus/a2ultraterm.h index cbd435106cf..3eadec62422 100644 --- a/src/devices/bus/a2bus/a2ultraterm.h +++ b/src/devices/bus/a2bus/a2ultraterm.h @@ -61,7 +61,7 @@ class a2bus_ultraterm_device : public a2bus_videx160_device public: a2bus_ultraterm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; class a2bus_ultratermenh_device : public a2bus_videx160_device @@ -69,7 +69,7 @@ class a2bus_ultratermenh_device : public a2bus_videx160_device public: a2bus_ultratermenh_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; // device type definition diff --git a/src/devices/bus/a2bus/a2videoterm.cpp b/src/devices/bus/a2bus/a2videoterm.cpp index 4fc271c604f..f6d00066321 100644 --- a/src/devices/bus/a2bus/a2videoterm.cpp +++ b/src/devices/bus/a2bus/a2videoterm.cpp @@ -138,32 +138,32 @@ machine_config_constructor a2bus_videx80_device::device_mconfig_additions() cons // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *a2bus_videoterm_device::device_rom_region() const +const tiny_rom_entry *a2bus_videoterm_device::device_rom_region() const { return ROM_NAME( a2videoterm ); } -const rom_entry *a2bus_ap16_device::device_rom_region() const +const tiny_rom_entry *a2bus_ap16_device::device_rom_region() const { return ROM_NAME( a2ap16 ); } -const rom_entry *a2bus_ap16alt_device::device_rom_region() const +const tiny_rom_entry *a2bus_ap16alt_device::device_rom_region() const { return ROM_NAME( a2ap16alt ); } -const rom_entry *a2bus_vtc1_device::device_rom_region() const +const tiny_rom_entry *a2bus_vtc1_device::device_rom_region() const { return ROM_NAME( vtc1 ); } -const rom_entry *a2bus_vtc2_device::device_rom_region() const +const tiny_rom_entry *a2bus_vtc2_device::device_rom_region() const { return ROM_NAME( vtc2 ); } -const rom_entry *a2bus_aevm80_device::device_rom_region() const +const tiny_rom_entry *a2bus_aevm80_device::device_rom_region() const { return ROM_NAME( a2aevm80 ); } diff --git a/src/devices/bus/a2bus/a2videoterm.h b/src/devices/bus/a2bus/a2videoterm.h index 654103879ec..23b29ca86d4 100644 --- a/src/devices/bus/a2bus/a2videoterm.h +++ b/src/devices/bus/a2bus/a2videoterm.h @@ -62,7 +62,7 @@ class a2bus_videoterm_device : public a2bus_videx80_device public: a2bus_videoterm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; class a2bus_ap16_device : public a2bus_videx80_device @@ -70,7 +70,7 @@ class a2bus_ap16_device : public a2bus_videx80_device public: a2bus_ap16_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual UINT8 read_cnxx(address_space &space, UINT8 offset) override; }; @@ -81,7 +81,7 @@ class a2bus_ap16alt_device : public a2bus_videx80_device public: a2bus_ap16alt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual UINT8 read_cnxx(address_space &space, UINT8 offset) override; }; @@ -91,7 +91,7 @@ class a2bus_vtc1_device : public a2bus_videx80_device public: a2bus_vtc1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; class a2bus_vtc2_device : public a2bus_videx80_device @@ -99,7 +99,7 @@ class a2bus_vtc2_device : public a2bus_videx80_device public: a2bus_vtc2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; class a2bus_aevm80_device : public a2bus_videx80_device @@ -107,7 +107,7 @@ class a2bus_aevm80_device : public a2bus_videx80_device public: a2bus_aevm80_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; // device type definition diff --git a/src/devices/bus/a2bus/a2vulcan.cpp b/src/devices/bus/a2bus/a2vulcan.cpp index f917d179ffd..c17631287c6 100644 --- a/src/devices/bus/a2bus/a2vulcan.cpp +++ b/src/devices/bus/a2bus/a2vulcan.cpp @@ -100,12 +100,12 @@ machine_config_constructor a2bus_vulcanbase_device::device_mconfig_additions() c // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *a2bus_vulcan_device::device_rom_region() const +const tiny_rom_entry *a2bus_vulcan_device::device_rom_region() const { return ROM_NAME( vulcan ); } -const rom_entry *a2bus_vulcangold_device::device_rom_region() const +const tiny_rom_entry *a2bus_vulcangold_device::device_rom_region() const { return ROM_NAME( vulcangold ); } diff --git a/src/devices/bus/a2bus/a2vulcan.h b/src/devices/bus/a2bus/a2vulcan.h index 25871c70fcb..03facf5dcbf 100644 --- a/src/devices/bus/a2bus/a2vulcan.h +++ b/src/devices/bus/a2bus/a2vulcan.h @@ -56,7 +56,7 @@ class a2bus_vulcan_device : public a2bus_vulcanbase_device { public: a2bus_vulcan_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: virtual void device_start() override; @@ -68,7 +68,7 @@ class a2bus_vulcangold_device : public a2bus_vulcanbase_device { public: a2bus_vulcangold_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; // device type definition diff --git a/src/devices/bus/a2bus/a2zipdrive.cpp b/src/devices/bus/a2bus/a2zipdrive.cpp index 8213a63e010..f7a78aa4223 100644 --- a/src/devices/bus/a2bus/a2zipdrive.cpp +++ b/src/devices/bus/a2bus/a2zipdrive.cpp @@ -60,7 +60,7 @@ machine_config_constructor a2bus_zipdrivebase_device::device_mconfig_additions() // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *a2bus_zipdrivebase_device::device_rom_region() const +const tiny_rom_entry *a2bus_zipdrivebase_device::device_rom_region() const { return ROM_NAME( zipdrive ); } diff --git a/src/devices/bus/a2bus/a2zipdrive.h b/src/devices/bus/a2bus/a2zipdrive.h index 43af97dd532..cdc4a15bca6 100644 --- a/src/devices/bus/a2bus/a2zipdrive.h +++ b/src/devices/bus/a2bus/a2zipdrive.h @@ -31,7 +31,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: virtual void device_start() override; diff --git a/src/devices/bus/a2bus/corvfdc01.cpp b/src/devices/bus/a2bus/corvfdc01.cpp index c8f93b725d1..335315e0022 100644 --- a/src/devices/bus/a2bus/corvfdc01.cpp +++ b/src/devices/bus/a2bus/corvfdc01.cpp @@ -101,7 +101,7 @@ machine_config_constructor a2bus_corvfdc01_device::device_mconfig_additions() co // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *a2bus_corvfdc01_device::device_rom_region() const +const tiny_rom_entry *a2bus_corvfdc01_device::device_rom_region() const { return ROM_NAME( fdc01 ); } diff --git a/src/devices/bus/a2bus/corvfdc01.h b/src/devices/bus/a2bus/corvfdc01.h index 256ebd45ca3..626a2ca145d 100644 --- a/src/devices/bus/a2bus/corvfdc01.h +++ b/src/devices/bus/a2bus/corvfdc01.h @@ -31,7 +31,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_WRITE_LINE_MEMBER(intrq_w); DECLARE_WRITE_LINE_MEMBER(drq_w); diff --git a/src/devices/bus/a2bus/corvfdc02.cpp b/src/devices/bus/a2bus/corvfdc02.cpp index 870fc194bfb..89201538f6a 100644 --- a/src/devices/bus/a2bus/corvfdc02.cpp +++ b/src/devices/bus/a2bus/corvfdc02.cpp @@ -71,7 +71,7 @@ machine_config_constructor a2bus_corvfdc02_device::device_mconfig_additions() co // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *a2bus_corvfdc02_device::device_rom_region() const +const tiny_rom_entry *a2bus_corvfdc02_device::device_rom_region() const { return ROM_NAME( fdc02 ); } diff --git a/src/devices/bus/a2bus/corvfdc02.h b/src/devices/bus/a2bus/corvfdc02.h index b47aba0b10f..d7a1d6a2a1e 100644 --- a/src/devices/bus/a2bus/corvfdc02.h +++ b/src/devices/bus/a2bus/corvfdc02.h @@ -31,7 +31,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_WRITE_LINE_MEMBER(intrq_w); DECLARE_WRITE_LINE_MEMBER(drq_w); diff --git a/src/devices/bus/a2bus/mouse.cpp b/src/devices/bus/a2bus/mouse.cpp index 3d4e11d3487..02eec429329 100644 --- a/src/devices/bus/a2bus/mouse.cpp +++ b/src/devices/bus/a2bus/mouse.cpp @@ -163,7 +163,7 @@ machine_config_constructor a2bus_mouse_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *a2bus_mouse_device::device_rom_region() const +const tiny_rom_entry *a2bus_mouse_device::device_rom_region() const { return ROM_NAME( mouse ); } diff --git a/src/devices/bus/a2bus/mouse.h b/src/devices/bus/a2bus/mouse.h index 669487f1ec4..a5bf3a5c831 100644 --- a/src/devices/bus/a2bus/mouse.h +++ b/src/devices/bus/a2bus/mouse.h @@ -31,7 +31,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; diff --git a/src/devices/bus/a2bus/timemasterho.cpp b/src/devices/bus/a2bus/timemasterho.cpp index 9b8543613f2..647dc774116 100644 --- a/src/devices/bus/a2bus/timemasterho.cpp +++ b/src/devices/bus/a2bus/timemasterho.cpp @@ -112,7 +112,7 @@ machine_config_constructor a2bus_timemasterho_device::device_mconfig_additions() // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *a2bus_timemasterho_device::device_rom_region() const +const tiny_rom_entry *a2bus_timemasterho_device::device_rom_region() const { return ROM_NAME( timemaster ); } diff --git a/src/devices/bus/a2bus/timemasterho.h b/src/devices/bus/a2bus/timemasterho.h index d1442593efc..87fa840bc8f 100644 --- a/src/devices/bus/a2bus/timemasterho.h +++ b/src/devices/bus/a2bus/timemasterho.h @@ -31,7 +31,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; DECLARE_WRITE8_MEMBER(pia_out_a); diff --git a/src/devices/bus/a7800/a78_slot.h b/src/devices/bus/a7800/a78_slot.h index d6a635b1a82..0f4fd9d2e92 100644 --- a/src/devices/bus/a7800/a78_slot.h +++ b/src/devices/bus/a7800/a78_slot.h @@ -3,6 +3,8 @@ #ifndef __A78_SLOT_H #define __A78_SLOT_H +#include "softlist_dev.h" + /*************************************************************************** TYPE DEFINITIONS diff --git a/src/devices/bus/a800/a800_slot.h b/src/devices/bus/a800/a800_slot.h index 0d1bf674bd5..d1cf620bdc4 100644 --- a/src/devices/bus/a800/a800_slot.h +++ b/src/devices/bus/a800/a800_slot.h @@ -3,6 +3,8 @@ #ifndef __A800_SLOT_H #define __A800_SLOT_H +#include "softlist_dev.h" + /*************************************************************************** TYPE DEFINITIONS diff --git a/src/devices/bus/abcbus/fd2.cpp b/src/devices/bus/abcbus/fd2.cpp index e967c3050cf..cc906c3e925 100644 --- a/src/devices/bus/abcbus/fd2.cpp +++ b/src/devices/bus/abcbus/fd2.cpp @@ -75,7 +75,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *abc_fd2_t::device_rom_region() const +const tiny_rom_entry *abc_fd2_t::device_rom_region() const { return ROM_NAME( abc_fd2 ); } diff --git a/src/devices/bus/abcbus/fd2.h b/src/devices/bus/abcbus/fd2.h index 752c97d818b..78d5bc0c767 100644 --- a/src/devices/bus/abcbus/fd2.h +++ b/src/devices/bus/abcbus/fd2.h @@ -35,7 +35,7 @@ public: abc_fd2_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_WRITE8_MEMBER( status_w ); diff --git a/src/devices/bus/abcbus/hdc.cpp b/src/devices/bus/abcbus/hdc.cpp index 4108daa85a3..28636376d3e 100644 --- a/src/devices/bus/abcbus/hdc.cpp +++ b/src/devices/bus/abcbus/hdc.cpp @@ -43,7 +43,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *abc_hdc_device::device_rom_region() const +const tiny_rom_entry *abc_hdc_device::device_rom_region() const { return ROM_NAME( abc_hdc ); } diff --git a/src/devices/bus/abcbus/hdc.h b/src/devices/bus/abcbus/hdc.h index 565a3302a88..d0417be0a31 100644 --- a/src/devices/bus/abcbus/hdc.h +++ b/src/devices/bus/abcbus/hdc.h @@ -33,7 +33,7 @@ public: abc_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; protected: diff --git a/src/devices/bus/abcbus/lux10828.cpp b/src/devices/bus/abcbus/lux10828.cpp index 4b9c074e193..7955b3135fd 100644 --- a/src/devices/bus/abcbus/lux10828.cpp +++ b/src/devices/bus/abcbus/lux10828.cpp @@ -172,7 +172,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *luxor_55_10828_device::device_rom_region() const +const tiny_rom_entry *luxor_55_10828_device::device_rom_region() const { return ROM_NAME( luxor_55_10828 ); } diff --git a/src/devices/bus/abcbus/lux10828.h b/src/devices/bus/abcbus/lux10828.h index 1d48f042013..4be7801b873 100644 --- a/src/devices/bus/abcbus/lux10828.h +++ b/src/devices/bus/abcbus/lux10828.h @@ -72,7 +72,7 @@ public: DECLARE_FLOPPY_FORMATS( floppy_formats ); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/abcbus/lux21046.cpp b/src/devices/bus/abcbus/lux21046.cpp index 1931cbad35a..a6187c278ed 100644 --- a/src/devices/bus/abcbus/lux21046.cpp +++ b/src/devices/bus/abcbus/lux21046.cpp @@ -126,7 +126,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *luxor_55_21046_device::device_rom_region() const +const tiny_rom_entry *luxor_55_21046_device::device_rom_region() const { return ROM_NAME( luxor_55_21046 ); } diff --git a/src/devices/bus/abcbus/lux21046.h b/src/devices/bus/abcbus/lux21046.h index da6a5ef5c66..d63d02d8ebb 100644 --- a/src/devices/bus/abcbus/lux21046.h +++ b/src/devices/bus/abcbus/lux21046.h @@ -57,7 +57,7 @@ public: luxor_55_21046_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/abcbus/lux21056.cpp b/src/devices/bus/abcbus/lux21056.cpp index f5227393a0a..f84d5b18414 100644 --- a/src/devices/bus/abcbus/lux21056.cpp +++ b/src/devices/bus/abcbus/lux21056.cpp @@ -122,7 +122,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *luxor_55_21056_device::device_rom_region() const +const tiny_rom_entry *luxor_55_21056_device::device_rom_region() const { return ROM_NAME( luxor_55_21056 ); } diff --git a/src/devices/bus/abcbus/lux21056.h b/src/devices/bus/abcbus/lux21056.h index c5fde193476..769bc9ad93e 100644 --- a/src/devices/bus/abcbus/lux21056.h +++ b/src/devices/bus/abcbus/lux21056.h @@ -34,7 +34,7 @@ public: luxor_55_21056_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/abcbus/memcard.cpp b/src/devices/bus/abcbus/memcard.cpp index c7fbd2f3f31..9195f3b135b 100644 --- a/src/devices/bus/abcbus/memcard.cpp +++ b/src/devices/bus/abcbus/memcard.cpp @@ -94,7 +94,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *abc_memory_card_t::device_rom_region() const +const tiny_rom_entry *abc_memory_card_t::device_rom_region() const { return ROM_NAME( abc_dos ); } diff --git a/src/devices/bus/abcbus/memcard.h b/src/devices/bus/abcbus/memcard.h index 7fb79f435fe..a9e0e349ca7 100644 --- a/src/devices/bus/abcbus/memcard.h +++ b/src/devices/bus/abcbus/memcard.h @@ -30,7 +30,7 @@ public: abc_memory_card_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/abcbus/sio.cpp b/src/devices/bus/abcbus/sio.cpp index fe4d93ac2e7..bf1c733281d 100644 --- a/src/devices/bus/abcbus/sio.cpp +++ b/src/devices/bus/abcbus/sio.cpp @@ -65,7 +65,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *abc_sio_device::device_rom_region() const +const tiny_rom_entry *abc_sio_device::device_rom_region() const { return ROM_NAME( abc_sio ); } diff --git a/src/devices/bus/abcbus/sio.h b/src/devices/bus/abcbus/sio.h index e76b4ad07a4..991de18f0ed 100644 --- a/src/devices/bus/abcbus/sio.h +++ b/src/devices/bus/abcbus/sio.h @@ -26,7 +26,7 @@ public: abc_sio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; protected: diff --git a/src/devices/bus/abcbus/slutprov.cpp b/src/devices/bus/abcbus/slutprov.cpp index bd1184c15c5..b10415badca 100644 --- a/src/devices/bus/abcbus/slutprov.cpp +++ b/src/devices/bus/abcbus/slutprov.cpp @@ -25,7 +25,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *abc_slutprov_device::device_rom_region() const +const tiny_rom_entry *abc_slutprov_device::device_rom_region() const { return ROM_NAME( abc_slutprov ); } diff --git a/src/devices/bus/abcbus/slutprov.h b/src/devices/bus/abcbus/slutprov.h index f5b7cf661fb..bb4c6262c43 100644 --- a/src/devices/bus/abcbus/slutprov.h +++ b/src/devices/bus/abcbus/slutprov.h @@ -24,7 +24,7 @@ public: abc_slutprov_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/abcbus/turbo.cpp b/src/devices/bus/abcbus/turbo.cpp index 1f16cadab96..ecf035d432f 100644 --- a/src/devices/bus/abcbus/turbo.cpp +++ b/src/devices/bus/abcbus/turbo.cpp @@ -44,7 +44,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *turbo_kontroller_device::device_rom_region() const +const tiny_rom_entry *turbo_kontroller_device::device_rom_region() const { return ROM_NAME( turbo_kontroller ); } diff --git a/src/devices/bus/abcbus/turbo.h b/src/devices/bus/abcbus/turbo.h index b4678c4b14c..9423f095f9f 100644 --- a/src/devices/bus/abcbus/turbo.h +++ b/src/devices/bus/abcbus/turbo.h @@ -32,7 +32,7 @@ public: turbo_kontroller_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; protected: diff --git a/src/devices/bus/abcbus/uni800.cpp b/src/devices/bus/abcbus/uni800.cpp index 9d22dc0a6cd..d3657841e90 100644 --- a/src/devices/bus/abcbus/uni800.cpp +++ b/src/devices/bus/abcbus/uni800.cpp @@ -56,7 +56,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *abc_uni800_device::device_rom_region() const +const tiny_rom_entry *abc_uni800_device::device_rom_region() const { return ROM_NAME( abc_uni800 ); } diff --git a/src/devices/bus/abcbus/uni800.h b/src/devices/bus/abcbus/uni800.h index be1d9086c4e..bc298f6d6c0 100644 --- a/src/devices/bus/abcbus/uni800.h +++ b/src/devices/bus/abcbus/uni800.h @@ -24,7 +24,7 @@ public: abc_uni800_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/abckb/abc77.cpp b/src/devices/bus/abckb/abc77.cpp index 315d678db8b..0fd9c53d7b8 100644 --- a/src/devices/bus/abckb/abc77.cpp +++ b/src/devices/bus/abckb/abc77.cpp @@ -77,7 +77,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *abc77_device::device_rom_region() const +const tiny_rom_entry *abc77_device::device_rom_region() const { return ROM_NAME( abc77 ); } diff --git a/src/devices/bus/abckb/abc77.h b/src/devices/bus/abckb/abc77.h index 0e8744ed6c2..f3521bfd0af 100644 --- a/src/devices/bus/abckb/abc77.h +++ b/src/devices/bus/abckb/abc77.h @@ -35,7 +35,7 @@ public: abc77_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/abckb/abc800kb.cpp b/src/devices/bus/abckb/abc800kb.cpp index 511b1fe7c91..aedd983e202 100644 --- a/src/devices/bus/abckb/abc800kb.cpp +++ b/src/devices/bus/abckb/abc800kb.cpp @@ -101,7 +101,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *abc800_keyboard_device::device_rom_region() const +const tiny_rom_entry *abc800_keyboard_device::device_rom_region() const { return ROM_NAME( abc800_keyboard ); } diff --git a/src/devices/bus/abckb/abc800kb.h b/src/devices/bus/abckb/abc800kb.h index 61e55826d54..9606706a08b 100644 --- a/src/devices/bus/abckb/abc800kb.h +++ b/src/devices/bus/abckb/abc800kb.h @@ -33,7 +33,7 @@ public: abc800_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/abckb/abc99.cpp b/src/devices/bus/abckb/abc99.cpp index 8dc4d9e75c7..eb3ed258968 100644 --- a/src/devices/bus/abckb/abc99.cpp +++ b/src/devices/bus/abckb/abc99.cpp @@ -94,7 +94,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *abc99_device::device_rom_region() const +const tiny_rom_entry *abc99_device::device_rom_region() const { return ROM_NAME( abc99 ); } diff --git a/src/devices/bus/abckb/abc99.h b/src/devices/bus/abckb/abc99.h index 5ca05436a0b..5002039cf93 100644 --- a/src/devices/bus/abckb/abc99.h +++ b/src/devices/bus/abckb/abc99.h @@ -32,7 +32,7 @@ public: abc99_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/adam/exp.h b/src/devices/bus/adam/exp.h index c7bd5abc12a..f1b004d67a8 100644 --- a/src/devices/bus/adam/exp.h +++ b/src/devices/bus/adam/exp.h @@ -12,7 +12,7 @@ #define __ADAM_EXPANSION_SLOT__ #include "emu.h" - +#include "softlist_dev.h" //************************************************************************** diff --git a/src/devices/bus/adam/ide.cpp b/src/devices/bus/adam/ide.cpp index 54d4240f7db..ad3f56159e3 100644 --- a/src/devices/bus/adam/ide.cpp +++ b/src/devices/bus/adam/ide.cpp @@ -51,7 +51,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *powermate_ide_device::device_rom_region() const +const tiny_rom_entry *powermate_ide_device::device_rom_region() const { return ROM_NAME( adam_ata ); } diff --git a/src/devices/bus/adam/ide.h b/src/devices/bus/adam/ide.h index f26f42a3c1d..4f29001b8d9 100644 --- a/src/devices/bus/adam/ide.h +++ b/src/devices/bus/adam/ide.h @@ -32,7 +32,7 @@ public: powermate_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; protected: diff --git a/src/devices/bus/adamnet/ddp.cpp b/src/devices/bus/adamnet/ddp.cpp index 2a2f674d0c3..6e82af0b985 100644 --- a/src/devices/bus/adamnet/ddp.cpp +++ b/src/devices/bus/adamnet/ddp.cpp @@ -39,7 +39,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *adam_digital_data_pack_device::device_rom_region() const +const tiny_rom_entry *adam_digital_data_pack_device::device_rom_region() const { return ROM_NAME( adam_ddp ); } diff --git a/src/devices/bus/adamnet/ddp.h b/src/devices/bus/adamnet/ddp.h index 1a2a2402d03..f5255317d6d 100644 --- a/src/devices/bus/adamnet/ddp.h +++ b/src/devices/bus/adamnet/ddp.h @@ -33,7 +33,7 @@ public: adam_digital_data_pack_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; // not really public diff --git a/src/devices/bus/adamnet/fdc.cpp b/src/devices/bus/adamnet/fdc.cpp index e83ac70766d..cf99e564b78 100644 --- a/src/devices/bus/adamnet/fdc.cpp +++ b/src/devices/bus/adamnet/fdc.cpp @@ -66,7 +66,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *adam_fdc_device::device_rom_region() const +const tiny_rom_entry *adam_fdc_device::device_rom_region() const { return ROM_NAME( adam_fdc ); } diff --git a/src/devices/bus/adamnet/fdc.h b/src/devices/bus/adamnet/fdc.h index a8cd3d17648..72838e385a7 100644 --- a/src/devices/bus/adamnet/fdc.h +++ b/src/devices/bus/adamnet/fdc.h @@ -33,7 +33,7 @@ public: adam_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/adamnet/kb.cpp b/src/devices/bus/adamnet/kb.cpp index a9cc31b8edf..0a2481bc7cd 100644 --- a/src/devices/bus/adamnet/kb.cpp +++ b/src/devices/bus/adamnet/kb.cpp @@ -39,7 +39,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *adam_keyboard_device::device_rom_region() const +const tiny_rom_entry *adam_keyboard_device::device_rom_region() const { return ROM_NAME( adam_kb ); } diff --git a/src/devices/bus/adamnet/kb.h b/src/devices/bus/adamnet/kb.h index a9cb98450dd..34885d083c9 100644 --- a/src/devices/bus/adamnet/kb.h +++ b/src/devices/bus/adamnet/kb.h @@ -31,7 +31,7 @@ public: adam_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/adamnet/printer.cpp b/src/devices/bus/adamnet/printer.cpp index 7de2db87b2e..9062b7aec52 100644 --- a/src/devices/bus/adamnet/printer.cpp +++ b/src/devices/bus/adamnet/printer.cpp @@ -39,7 +39,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *adam_printer_device::device_rom_region() const +const tiny_rom_entry *adam_printer_device::device_rom_region() const { return ROM_NAME( adam_prn ); } diff --git a/src/devices/bus/adamnet/printer.h b/src/devices/bus/adamnet/printer.h index 13025fe5393..1bb657e3d91 100644 --- a/src/devices/bus/adamnet/printer.h +++ b/src/devices/bus/adamnet/printer.h @@ -31,7 +31,7 @@ public: adam_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; // not really public diff --git a/src/devices/bus/adamnet/spi.cpp b/src/devices/bus/adamnet/spi.cpp index 29da38c0b7b..e15e7dd0d9f 100644 --- a/src/devices/bus/adamnet/spi.cpp +++ b/src/devices/bus/adamnet/spi.cpp @@ -42,7 +42,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *adam_spi_device::device_rom_region() const +const tiny_rom_entry *adam_spi_device::device_rom_region() const { return ROM_NAME( adam_spi ); } diff --git a/src/devices/bus/adamnet/spi.h b/src/devices/bus/adamnet/spi.h index 81abae409e3..47a26511a38 100644 --- a/src/devices/bus/adamnet/spi.h +++ b/src/devices/bus/adamnet/spi.h @@ -34,7 +34,7 @@ public: adam_spi_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; // not really public diff --git a/src/devices/bus/amiga/zorro/a590.cpp b/src/devices/bus/amiga/zorro/a590.cpp index 1d66ba99f6e..5cd5c0c9f6b 100644 --- a/src/devices/bus/amiga/zorro/a590.cpp +++ b/src/devices/bus/amiga/zorro/a590.cpp @@ -177,7 +177,7 @@ ROM_START( dmac_hdc ) ROM_LOAD("390333-03.u5", 0x000, 0x104, CRC(dc4a8d9b) SHA1(761a1318106e49057f95258699076ec1079967ad)) ROM_END -const rom_entry *dmac_hdc_device::device_rom_region() const +const tiny_rom_entry *dmac_hdc_device::device_rom_region() const { return ROM_NAME( dmac_hdc ); } diff --git a/src/devices/bus/amiga/zorro/a590.h b/src/devices/bus/amiga/zorro/a590.h index 488585fd0cb..252074a2e33 100644 --- a/src/devices/bus/amiga/zorro/a590.h +++ b/src/devices/bus/amiga/zorro/a590.h @@ -34,7 +34,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER( dmac_scsi_r ); DECLARE_WRITE8_MEMBER( dmac_scsi_w ); diff --git a/src/devices/bus/amiga/zorro/action_replay.cpp b/src/devices/bus/amiga/zorro/action_replay.cpp index 03711e56f1c..8fd4f7b0eeb 100644 --- a/src/devices/bus/amiga/zorro/action_replay.cpp +++ b/src/devices/bus/amiga/zorro/action_replay.cpp @@ -52,7 +52,7 @@ ROM_START( ar_mk1 ) ROMX_LOAD("ar1_v150.bin", 0x0000, 0x10000, BAD_DUMP CRC(f82c4258) SHA1(843b433b2c56640e045d5fdc854dc6b1a4964e7c), ROM_BIOS(2)) ROM_END -const rom_entry *action_replay_mk1_device::device_rom_region() const +const tiny_rom_entry *action_replay_mk1_device::device_rom_region() const { return ROM_NAME( ar_mk1 ); } @@ -68,7 +68,7 @@ ROM_START( ar_mk2 ) ROMX_LOAD("ar2_v214.bin", 0x0000, 0x20000, BAD_DUMP CRC(1bb3d0a8) SHA1(14b1f5a69efb6f4e2331970e6ca0f33c0f04ac91), ROM_BIOS(3)) ROM_END -const rom_entry *action_replay_mk2_device::device_rom_region() const +const tiny_rom_entry *action_replay_mk2_device::device_rom_region() const { return ROM_NAME( ar_mk2 ); } @@ -83,7 +83,7 @@ ROM_START( ar_mk3 ) ROMX_LOAD("ar3_v314.bin", 0x0000, 0x40000, BAD_DUMP CRC(009f7768) SHA1(0439d6ccc2a0e5c2e83fcf2389dc4d4a440a4c62), ROM_BIOS(2)) ROM_END -const rom_entry *action_replay_mk3_device::device_rom_region() const +const tiny_rom_entry *action_replay_mk3_device::device_rom_region() const { return ROM_NAME( ar_mk3 ); } diff --git a/src/devices/bus/amiga/zorro/action_replay.h b/src/devices/bus/amiga/zorro/action_replay.h index 7e1eb942796..cf73b5c602b 100644 --- a/src/devices/bus/amiga/zorro/action_replay.h +++ b/src/devices/bus/amiga/zorro/action_replay.h @@ -51,7 +51,7 @@ public: action_replay_mk1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; class action_replay_mk2_device : public action_replay_device @@ -61,7 +61,7 @@ public: action_replay_mk2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; class action_replay_mk3_device : public action_replay_device @@ -71,7 +71,7 @@ public: action_replay_mk3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; // device type definition diff --git a/src/devices/bus/amiga/zorro/buddha.cpp b/src/devices/bus/amiga/zorro/buddha.cpp index 6f21e86d9be..512802f39fc 100644 --- a/src/devices/bus/amiga/zorro/buddha.cpp +++ b/src/devices/bus/amiga/zorro/buddha.cpp @@ -53,7 +53,7 @@ ROM_START( buddha ) ROMX_LOAD("buddha_103-17.rom", 0x0000, 0x8000, CRC(2b7b24e0) SHA1(ec17a58962c373a2892090ec9b1722d2c326d631), ROM_SKIP(1) | ROM_BIOS(2)) ROM_END -const rom_entry *buddha_device::device_rom_region() const +const tiny_rom_entry *buddha_device::device_rom_region() const { return ROM_NAME( buddha ); } diff --git a/src/devices/bus/amiga/zorro/buddha.h b/src/devices/bus/amiga/zorro/buddha.h index f8e213db69d..be2d569c5de 100644 --- a/src/devices/bus/amiga/zorro/buddha.h +++ b/src/devices/bus/amiga/zorro/buddha.h @@ -56,7 +56,7 @@ public: protected: // device-level overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/apf/slot.h b/src/devices/bus/apf/slot.h index 076759e18b3..c2dba02fc08 100644 --- a/src/devices/bus/apf/slot.h +++ b/src/devices/bus/apf/slot.h @@ -3,6 +3,8 @@ #ifndef __APF_SLOT_H #define __APF_SLOT_H +#include "softlist_dev.h" + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/arcadia/slot.h b/src/devices/bus/arcadia/slot.h index abc95db625f..2f7f2dbc67a 100644 --- a/src/devices/bus/arcadia/slot.h +++ b/src/devices/bus/arcadia/slot.h @@ -3,6 +3,9 @@ #ifndef __ARCADIA_SLOT_H #define __ARCADIA_SLOT_H +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/astrocde/slot.h b/src/devices/bus/astrocde/slot.h index 6866f787655..edd94af5ca1 100644 --- a/src/devices/bus/astrocde/slot.h +++ b/src/devices/bus/astrocde/slot.h @@ -3,6 +3,9 @@ #ifndef __ASTROCADE_SLOT_H #define __ASTROCADE_SLOT_H +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/bml3/bml3kanji.cpp b/src/devices/bus/bml3/bml3kanji.cpp index 0b0d4f519e2..c2af2911e65 100644 --- a/src/devices/bus/bml3/bml3kanji.cpp +++ b/src/devices/bus/bml3/bml3kanji.cpp @@ -51,7 +51,7 @@ machine_config_constructor bml3bus_kanji_device::device_mconfig_additions() cons // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *bml3bus_kanji_device::device_rom_region() const +const tiny_rom_entry *bml3bus_kanji_device::device_rom_region() const { return ROM_NAME( kanji ); } diff --git a/src/devices/bus/bml3/bml3kanji.h b/src/devices/bus/bml3/bml3kanji.h index 8a1c8dd24df..c91ba3cca2e 100644 --- a/src/devices/bus/bml3/bml3kanji.h +++ b/src/devices/bus/bml3/bml3kanji.h @@ -28,7 +28,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(bml3_kanji_r); DECLARE_WRITE8_MEMBER(bml3_kanji_w); diff --git a/src/devices/bus/bml3/bml3mp1802.cpp b/src/devices/bus/bml3/bml3mp1802.cpp index 911d72c725e..d8d22c1467b 100644 --- a/src/devices/bus/bml3/bml3mp1802.cpp +++ b/src/devices/bus/bml3/bml3mp1802.cpp @@ -70,7 +70,7 @@ machine_config_constructor bml3bus_mp1802_device::device_mconfig_additions() con // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *bml3bus_mp1802_device::device_rom_region() const +const tiny_rom_entry *bml3bus_mp1802_device::device_rom_region() const { return ROM_NAME( mp1802 ); } diff --git a/src/devices/bus/bml3/bml3mp1802.h b/src/devices/bus/bml3/bml3mp1802.h index de42c95261a..60191295d36 100644 --- a/src/devices/bus/bml3/bml3mp1802.h +++ b/src/devices/bus/bml3/bml3mp1802.h @@ -32,7 +32,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(bml3_mp1802_r); DECLARE_WRITE8_MEMBER(bml3_mp1802_w); diff --git a/src/devices/bus/bml3/bml3mp1805.cpp b/src/devices/bus/bml3/bml3mp1805.cpp index e1b2317b7c6..23027eeffd0 100644 --- a/src/devices/bus/bml3/bml3mp1805.cpp +++ b/src/devices/bus/bml3/bml3mp1805.cpp @@ -69,7 +69,7 @@ machine_config_constructor bml3bus_mp1805_device::device_mconfig_additions() con // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *bml3bus_mp1805_device::device_rom_region() const +const tiny_rom_entry *bml3bus_mp1805_device::device_rom_region() const { return ROM_NAME( mp1805 ); } diff --git a/src/devices/bus/bml3/bml3mp1805.h b/src/devices/bus/bml3/bml3mp1805.h index 57ffdfefcaa..662eecfff6a 100644 --- a/src/devices/bus/bml3/bml3mp1805.h +++ b/src/devices/bus/bml3/bml3mp1805.h @@ -31,7 +31,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(bml3_mp1805_r); DECLARE_WRITE8_MEMBER(bml3_mp1805_w); diff --git a/src/devices/bus/bw2/ramcard.cpp b/src/devices/bus/bw2/ramcard.cpp index 16f5da689cc..bd8e6e76261 100644 --- a/src/devices/bus/bw2/ramcard.cpp +++ b/src/devices/bus/bw2/ramcard.cpp @@ -31,7 +31,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *bw2_ramcard_device::device_rom_region() const +const tiny_rom_entry *bw2_ramcard_device::device_rom_region() const { return ROM_NAME( bw2_ramcard ); } diff --git a/src/devices/bus/bw2/ramcard.h b/src/devices/bus/bw2/ramcard.h index da66c4d670d..de510eddb96 100644 --- a/src/devices/bus/bw2/ramcard.h +++ b/src/devices/bus/bw2/ramcard.h @@ -30,7 +30,7 @@ public: bw2_ramcard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/c64/currah_speech.cpp b/src/devices/bus/c64/currah_speech.cpp index 8e73f0801f1..1285730416c 100644 --- a/src/devices/bus/c64/currah_speech.cpp +++ b/src/devices/bus/c64/currah_speech.cpp @@ -100,7 +100,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c64_currah_speech_cartridge_device::device_rom_region() const +const tiny_rom_entry *c64_currah_speech_cartridge_device::device_rom_region() const { return ROM_NAME( c64_currah_speech ); } diff --git a/src/devices/bus/c64/currah_speech.h b/src/devices/bus/c64/currah_speech.h index 1ca31571bbd..03f684275d2 100644 --- a/src/devices/bus/c64/currah_speech.h +++ b/src/devices/bus/c64/currah_speech.h @@ -32,7 +32,7 @@ public: c64_currah_speech_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; protected: diff --git a/src/devices/bus/c64/exp.h b/src/devices/bus/c64/exp.h index 3522942e823..4e4555173fa 100644 --- a/src/devices/bus/c64/exp.h +++ b/src/devices/bus/c64/exp.h @@ -37,6 +37,7 @@ #define __C64_EXPANSION_SLOT__ #include "emu.h" +#include "softlist_dev.h" #include "formats/cbm_crt.h" diff --git a/src/devices/bus/c64/fcc.cpp b/src/devices/bus/c64/fcc.cpp index 0757ae94e76..93e5fe4ccc4 100644 --- a/src/devices/bus/c64/fcc.cpp +++ b/src/devices/bus/c64/fcc.cpp @@ -53,7 +53,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c64_final_chesscard_device::device_rom_region() const +const tiny_rom_entry *c64_final_chesscard_device::device_rom_region() const { return ROM_NAME( c64_fcc ); } diff --git a/src/devices/bus/c64/fcc.h b/src/devices/bus/c64/fcc.h index a2952e34c0f..29d22dde05c 100644 --- a/src/devices/bus/c64/fcc.h +++ b/src/devices/bus/c64/fcc.h @@ -32,7 +32,7 @@ public: c64_final_chesscard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/c64/multiscreen.cpp b/src/devices/bus/c64/multiscreen.cpp index 1c54b055986..d0848bf5a24 100644 --- a/src/devices/bus/c64/multiscreen.cpp +++ b/src/devices/bus/c64/multiscreen.cpp @@ -95,7 +95,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c64_multiscreen_cartridge_device::device_rom_region() const +const tiny_rom_entry *c64_multiscreen_cartridge_device::device_rom_region() const { return ROM_NAME( c64_multiscreen ); } diff --git a/src/devices/bus/c64/multiscreen.h b/src/devices/bus/c64/multiscreen.h index 1b56cdda70f..f68024d2267 100644 --- a/src/devices/bus/c64/multiscreen.h +++ b/src/devices/bus/c64/multiscreen.h @@ -33,7 +33,7 @@ public: c64_multiscreen_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; protected: diff --git a/src/devices/bus/c64/supercpu.cpp b/src/devices/bus/c64/supercpu.cpp index cb8a28e2198..f7d36540732 100644 --- a/src/devices/bus/c64/supercpu.cpp +++ b/src/devices/bus/c64/supercpu.cpp @@ -38,7 +38,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c64_supercpu_device::device_rom_region() const +const tiny_rom_entry *c64_supercpu_device::device_rom_region() const { return ROM_NAME( c64_supercpu ); } diff --git a/src/devices/bus/c64/supercpu.h b/src/devices/bus/c64/supercpu.h index df799261faf..ea3618fe6de 100644 --- a/src/devices/bus/c64/supercpu.h +++ b/src/devices/bus/c64/supercpu.h @@ -31,7 +31,7 @@ public: c64_supercpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/c64/xl80.cpp b/src/devices/bus/c64/xl80.cpp index 5f4a1eaa285..561ae033148 100644 --- a/src/devices/bus/c64/xl80.cpp +++ b/src/devices/bus/c64/xl80.cpp @@ -72,7 +72,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c64_xl80_device::device_rom_region() const +const tiny_rom_entry *c64_xl80_device::device_rom_region() const { return ROM_NAME( c64_xl80 ); } diff --git a/src/devices/bus/c64/xl80.h b/src/devices/bus/c64/xl80.h index b167b549265..22caa7a5042 100644 --- a/src/devices/bus/c64/xl80.h +++ b/src/devices/bus/c64/xl80.h @@ -32,7 +32,7 @@ public: c64_xl80_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; // not really public diff --git a/src/devices/bus/cbm2/exp.h b/src/devices/bus/cbm2/exp.h index 2a9fa80d051..ad66454a746 100644 --- a/src/devices/bus/cbm2/exp.h +++ b/src/devices/bus/cbm2/exp.h @@ -30,6 +30,7 @@ #define __CBM2_EXPANSION_SLOT__ #include "emu.h" +#include "softlist_dev.h" diff --git a/src/devices/bus/cbm2/hrg.cpp b/src/devices/bus/cbm2/hrg.cpp index 6bc88abdadb..ecc42220d80 100644 --- a/src/devices/bus/cbm2/hrg.cpp +++ b/src/devices/bus/cbm2/hrg.cpp @@ -54,7 +54,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *cbm2_hrg_t::device_rom_region() const +const tiny_rom_entry *cbm2_hrg_t::device_rom_region() const { return ROM_NAME( cbm2_hrg ); } diff --git a/src/devices/bus/cbm2/hrg.h b/src/devices/bus/cbm2/hrg.h index c93b806b3e1..d4c813a6d48 100644 --- a/src/devices/bus/cbm2/hrg.h +++ b/src/devices/bus/cbm2/hrg.h @@ -31,7 +31,7 @@ public: cbm2_hrg_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/cbmiec/c1526.cpp b/src/devices/bus/cbmiec/c1526.cpp index 61353ffeb62..c475eb79f08 100644 --- a/src/devices/bus/cbmiec/c1526.cpp +++ b/src/devices/bus/cbmiec/c1526.cpp @@ -48,7 +48,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c1526_t::device_rom_region() const +const tiny_rom_entry *c1526_t::device_rom_region() const { return ROM_NAME( c1526 ); } @@ -68,7 +68,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c4023_t::device_rom_region() const +const tiny_rom_entry *c4023_t::device_rom_region() const { return ROM_NAME( c4023 ); } diff --git a/src/devices/bus/cbmiec/c1526.h b/src/devices/bus/cbmiec/c1526.h index deba3be2ce7..d8ab0567905 100644 --- a/src/devices/bus/cbmiec/c1526.h +++ b/src/devices/bus/cbmiec/c1526.h @@ -49,7 +49,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device_cbm_iec_interface overrides @@ -71,7 +71,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device_ieee488_interface overrides diff --git a/src/devices/bus/cbmiec/c1541.cpp b/src/devices/bus/cbmiec/c1541.cpp index 6e1be701b64..3a763c1f53e 100644 --- a/src/devices/bus/cbmiec/c1541.cpp +++ b/src/devices/bus/cbmiec/c1541.cpp @@ -189,7 +189,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c1540_t::device_rom_region() const +const tiny_rom_entry *c1540_t::device_rom_region() const { return ROM_NAME( c1540 ); } @@ -233,7 +233,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c1541_t::device_rom_region() const +const tiny_rom_entry *c1541_t::device_rom_region() const { return ROM_NAME( c1541 ); } @@ -257,7 +257,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c1541c_t::device_rom_region() const +const tiny_rom_entry *c1541c_t::device_rom_region() const { return ROM_NAME( c1541c ); } @@ -283,7 +283,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c1541ii_t::device_rom_region() const +const tiny_rom_entry *c1541ii_t::device_rom_region() const { return ROM_NAME( c1541ii ); } @@ -311,7 +311,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *sx1541_t::device_rom_region() const +const tiny_rom_entry *sx1541_t::device_rom_region() const { return ROM_NAME( sx1541 ); } @@ -331,7 +331,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *fsd1_t::device_rom_region() const +const tiny_rom_entry *fsd1_t::device_rom_region() const { return ROM_NAME( fsd1 ); } @@ -359,7 +359,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *fsd2_t::device_rom_region() const +const tiny_rom_entry *fsd2_t::device_rom_region() const { return ROM_NAME( fsd2 ); } @@ -380,7 +380,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *csd1_t::device_rom_region() const +const tiny_rom_entry *csd1_t::device_rom_region() const { return ROM_NAME( csd1 ); } @@ -400,7 +400,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c1541_dolphin_dos_t::device_rom_region() const +const tiny_rom_entry *c1541_dolphin_dos_t::device_rom_region() const { return ROM_NAME( c1541dd ); } @@ -421,7 +421,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c1541_professional_dos_v1_t::device_rom_region() const +const tiny_rom_entry *c1541_professional_dos_v1_t::device_rom_region() const { return ROM_NAME( c1541pd ); } @@ -446,7 +446,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c1541_prologic_dos_classic_t::device_rom_region() const +const tiny_rom_entry *c1541_prologic_dos_classic_t::device_rom_region() const { return ROM_NAME( c1541pdc ); } @@ -470,7 +470,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *indus_gt_t::device_rom_region() const +const tiny_rom_entry *indus_gt_t::device_rom_region() const { return ROM_NAME( indusgt ); } diff --git a/src/devices/bus/cbmiec/c1541.h b/src/devices/bus/cbmiec/c1541.h index df03b9429af..7192089e65a 100644 --- a/src/devices/bus/cbmiec/c1541.h +++ b/src/devices/bus/cbmiec/c1541.h @@ -108,7 +108,7 @@ public: c1540_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -121,7 +121,7 @@ public: c1541_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -134,7 +134,7 @@ public: c1541c_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; // not really public @@ -151,7 +151,7 @@ public: c1541ii_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -164,7 +164,7 @@ public: sx1541_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -177,7 +177,7 @@ public: fsd1_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -190,7 +190,7 @@ public: fsd2_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; // device-level overrides virtual void device_start() override; @@ -206,7 +206,7 @@ public: csd1_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -219,7 +219,7 @@ public: c1541_dolphin_dos_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; }; @@ -233,7 +233,7 @@ public: c1541_professional_dos_v1_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; }; @@ -247,7 +247,7 @@ public: c1541_prologic_dos_classic_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; // not really public @@ -277,7 +277,7 @@ public: indus_gt_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; diff --git a/src/devices/bus/cbmiec/c1571.cpp b/src/devices/bus/cbmiec/c1571.cpp index 976455387ae..b7d98b8b15d 100644 --- a/src/devices/bus/cbmiec/c1571.cpp +++ b/src/devices/bus/cbmiec/c1571.cpp @@ -63,7 +63,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c1570_t::device_rom_region() const +const tiny_rom_entry *c1570_t::device_rom_region() const { return ROM_NAME( c1570 ); } @@ -89,7 +89,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c1571_t::device_rom_region() const +const tiny_rom_entry *c1571_t::device_rom_region() const { return ROM_NAME( c1571 ); } @@ -113,7 +113,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c1571cr_t::device_rom_region() const +const tiny_rom_entry *c1571cr_t::device_rom_region() const { return ROM_NAME( c1571cr ); } @@ -133,7 +133,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *mini_chief_t::device_rom_region() const +const tiny_rom_entry *mini_chief_t::device_rom_region() const { return ROM_NAME( minichief ); } diff --git a/src/devices/bus/cbmiec/c1571.h b/src/devices/bus/cbmiec/c1571.h index cd0da9a3a3d..74d90080615 100644 --- a/src/devices/bus/cbmiec/c1571.h +++ b/src/devices/bus/cbmiec/c1571.h @@ -48,7 +48,7 @@ public: c1571_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; @@ -134,7 +134,7 @@ public: c1570_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; }; @@ -148,7 +148,7 @@ public: c1571cr_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_WRITE8_MEMBER( via0_pa_w ); @@ -165,7 +165,7 @@ public: mini_chief_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_READ8_MEMBER( cia_pa_r ); diff --git a/src/devices/bus/cbmiec/c1581.cpp b/src/devices/bus/cbmiec/c1581.cpp index e13317654a2..1bfcad12218 100644 --- a/src/devices/bus/cbmiec/c1581.cpp +++ b/src/devices/bus/cbmiec/c1581.cpp @@ -58,7 +58,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c1581_t::device_rom_region() const +const tiny_rom_entry *c1581_t::device_rom_region() const { return ROM_NAME( c1581 ); } @@ -78,7 +78,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c1563_t::device_rom_region() const +const tiny_rom_entry *c1563_t::device_rom_region() const { return ROM_NAME( c1563 ); } diff --git a/src/devices/bus/cbmiec/c1581.h b/src/devices/bus/cbmiec/c1581.h index adcbaf63468..0694bc77ab8 100644 --- a/src/devices/bus/cbmiec/c1581.h +++ b/src/devices/bus/cbmiec/c1581.h @@ -43,7 +43,7 @@ public: c1581_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; @@ -99,7 +99,7 @@ public: c1563_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; diff --git a/src/devices/bus/cbmiec/c64_nl10.cpp b/src/devices/bus/cbmiec/c64_nl10.cpp index 970baa2f941..9ee058adf80 100644 --- a/src/devices/bus/cbmiec/c64_nl10.cpp +++ b/src/devices/bus/cbmiec/c64_nl10.cpp @@ -31,7 +31,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c64_nl10_interface_device::device_rom_region() const +const tiny_rom_entry *c64_nl10_interface_device::device_rom_region() const { return ROM_NAME( c64_nl10_interface ); } diff --git a/src/devices/bus/cbmiec/c64_nl10.h b/src/devices/bus/cbmiec/c64_nl10.h index 143758c98e4..99da4a2c141 100644 --- a/src/devices/bus/cbmiec/c64_nl10.h +++ b/src/devices/bus/cbmiec/c64_nl10.h @@ -30,7 +30,7 @@ public: c64_nl10_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/cbmiec/cmdhd.cpp b/src/devices/bus/cbmiec/cmdhd.cpp index d3025700fa7..ef26f7be706 100644 --- a/src/devices/bus/cbmiec/cmdhd.cpp +++ b/src/devices/bus/cbmiec/cmdhd.cpp @@ -49,7 +49,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *cmd_hd_device::device_rom_region() const +const tiny_rom_entry *cmd_hd_device::device_rom_region() const { return ROM_NAME( cmd_hd ); } diff --git a/src/devices/bus/cbmiec/cmdhd.h b/src/devices/bus/cbmiec/cmdhd.h index 2a1a244affe..9869531b05d 100644 --- a/src/devices/bus/cbmiec/cmdhd.h +++ b/src/devices/bus/cbmiec/cmdhd.h @@ -43,7 +43,7 @@ public: cmd_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_WRITE8_MEMBER( led_w ); diff --git a/src/devices/bus/cbmiec/fd2000.cpp b/src/devices/bus/cbmiec/fd2000.cpp index d31b9d97507..c9040a6c657 100644 --- a/src/devices/bus/cbmiec/fd2000.cpp +++ b/src/devices/bus/cbmiec/fd2000.cpp @@ -74,7 +74,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *fd2000_device::device_rom_region() const +const tiny_rom_entry *fd2000_device::device_rom_region() const { switch (m_variant) { diff --git a/src/devices/bus/cbmiec/fd2000.h b/src/devices/bus/cbmiec/fd2000.h index 90f6db128ca..4a660cd218d 100644 --- a/src/devices/bus/cbmiec/fd2000.h +++ b/src/devices/bus/cbmiec/fd2000.h @@ -49,7 +49,7 @@ public: }; // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_READ8_MEMBER( via_pa_r ); diff --git a/src/devices/bus/cbmiec/interpod.cpp b/src/devices/bus/cbmiec/interpod.cpp index f15d014a00a..ebf1a6b3776 100644 --- a/src/devices/bus/cbmiec/interpod.cpp +++ b/src/devices/bus/cbmiec/interpod.cpp @@ -98,7 +98,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *interpod_device::device_rom_region() const +const tiny_rom_entry *interpod_device::device_rom_region() const { return ROM_NAME( interpod ); } diff --git a/src/devices/bus/cbmiec/interpod.h b/src/devices/bus/cbmiec/interpod.h index 0de21651381..833bcd94a35 100644 --- a/src/devices/bus/cbmiec/interpod.h +++ b/src/devices/bus/cbmiec/interpod.h @@ -52,7 +52,7 @@ public: interpod_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; protected: diff --git a/src/devices/bus/cbmiec/serialbox.cpp b/src/devices/bus/cbmiec/serialbox.cpp index c3b653cb030..617a4c3eded 100644 --- a/src/devices/bus/cbmiec/serialbox.cpp +++ b/src/devices/bus/cbmiec/serialbox.cpp @@ -48,7 +48,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *serial_box_device::device_rom_region() const +const tiny_rom_entry *serial_box_device::device_rom_region() const { return ROM_NAME( serial_box ); } diff --git a/src/devices/bus/cbmiec/serialbox.h b/src/devices/bus/cbmiec/serialbox.h index 93c558b9512..090ebdfb091 100644 --- a/src/devices/bus/cbmiec/serialbox.h +++ b/src/devices/bus/cbmiec/serialbox.h @@ -39,7 +39,7 @@ public: serial_box_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; protected: diff --git a/src/devices/bus/cbmiec/vic1515.cpp b/src/devices/bus/cbmiec/vic1515.cpp index 61f19761d7a..c1ab23f427a 100644 --- a/src/devices/bus/cbmiec/vic1515.cpp +++ b/src/devices/bus/cbmiec/vic1515.cpp @@ -31,7 +31,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *vic1515_t::device_rom_region() const +const tiny_rom_entry *vic1515_t::device_rom_region() const { return ROM_NAME( vic1515 ); } diff --git a/src/devices/bus/cbmiec/vic1515.h b/src/devices/bus/cbmiec/vic1515.h index d726bdb4087..9cf6a53b3d1 100644 --- a/src/devices/bus/cbmiec/vic1515.h +++ b/src/devices/bus/cbmiec/vic1515.h @@ -31,7 +31,7 @@ public: vic1515_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/cbmiec/vic1520.cpp b/src/devices/bus/cbmiec/vic1520.cpp index 55cd372f385..9d62de41bb6 100644 --- a/src/devices/bus/cbmiec/vic1520.cpp +++ b/src/devices/bus/cbmiec/vic1520.cpp @@ -71,7 +71,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *vic1520_t::device_rom_region() const +const tiny_rom_entry *vic1520_t::device_rom_region() const { return ROM_NAME( vic1520 ); } diff --git a/src/devices/bus/cbmiec/vic1520.h b/src/devices/bus/cbmiec/vic1520.h index 61bd5e314ef..9f893766bf8 100644 --- a/src/devices/bus/cbmiec/vic1520.h +++ b/src/devices/bus/cbmiec/vic1520.h @@ -31,7 +31,7 @@ public: vic1520_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/centronics/comxpl80.cpp b/src/devices/bus/centronics/comxpl80.cpp index be2fc18e39d..2db0e42694a 100644 --- a/src/devices/bus/centronics/comxpl80.cpp +++ b/src/devices/bus/centronics/comxpl80.cpp @@ -51,7 +51,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *comx_pl80_device::device_rom_region() const +const tiny_rom_entry *comx_pl80_device::device_rom_region() const { return ROM_NAME( comxpl80 ); } diff --git a/src/devices/bus/centronics/comxpl80.h b/src/devices/bus/centronics/comxpl80.h index 96821d1f5eb..9301fcc5ef3 100644 --- a/src/devices/bus/centronics/comxpl80.h +++ b/src/devices/bus/centronics/comxpl80.h @@ -31,7 +31,7 @@ public: comx_pl80_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/centronics/epson_ex800.cpp b/src/devices/bus/centronics/epson_ex800.cpp index c09cc8f4af7..3e50493f6aa 100644 --- a/src/devices/bus/centronics/epson_ex800.cpp +++ b/src/devices/bus/centronics/epson_ex800.cpp @@ -186,7 +186,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *epson_ex800_t::device_rom_region() const +const tiny_rom_entry *epson_ex800_t::device_rom_region() const { return ROM_NAME( ex800 ); } diff --git a/src/devices/bus/centronics/epson_ex800.h b/src/devices/bus/centronics/epson_ex800.h index 2b28229c0df..e5dabd1cc42 100644 --- a/src/devices/bus/centronics/epson_ex800.h +++ b/src/devices/bus/centronics/epson_ex800.h @@ -32,7 +32,7 @@ public: epson_ex800_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/centronics/epson_lx800.cpp b/src/devices/bus/centronics/epson_lx800.cpp index 3898cd30bd9..3eb784999ba 100644 --- a/src/devices/bus/centronics/epson_lx800.cpp +++ b/src/devices/bus/centronics/epson_lx800.cpp @@ -40,7 +40,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *epson_lx800_t::device_rom_region() const +const tiny_rom_entry *epson_lx800_t::device_rom_region() const { return ROM_NAME( lx800 ); } diff --git a/src/devices/bus/centronics/epson_lx800.h b/src/devices/bus/centronics/epson_lx800.h index 89e88ceb6d9..a8cd3113749 100644 --- a/src/devices/bus/centronics/epson_lx800.h +++ b/src/devices/bus/centronics/epson_lx800.h @@ -34,7 +34,7 @@ public: epson_lx800_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/centronics/epson_lx810l.cpp b/src/devices/bus/centronics/epson_lx810l.cpp index 5b179fe2ad0..1ceeb810caf 100644 --- a/src/devices/bus/centronics/epson_lx810l.cpp +++ b/src/devices/bus/centronics/epson_lx810l.cpp @@ -71,7 +71,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *epson_lx810l_t::device_rom_region() const +const tiny_rom_entry *epson_lx810l_t::device_rom_region() const { return ROM_NAME( lx810l ); } @@ -81,7 +81,7 @@ const rom_entry *epson_lx810l_t::device_rom_region() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *epson_ap2000_t::device_rom_region() const +const tiny_rom_entry *epson_ap2000_t::device_rom_region() const { return ROM_NAME( ap2000 ); } diff --git a/src/devices/bus/centronics/epson_lx810l.h b/src/devices/bus/centronics/epson_lx810l.h index 072f30500bd..6a58929a405 100644 --- a/src/devices/bus/centronics/epson_lx810l.h +++ b/src/devices/bus/centronics/epson_lx810l.h @@ -47,7 +47,7 @@ public: UINT32 clock, const char *shortname, const char *source); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; @@ -147,7 +147,7 @@ public: device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; diff --git a/src/devices/bus/centronics/nec_p72.cpp b/src/devices/bus/centronics/nec_p72.cpp index 0c45018359d..45a0822ebac 100644 --- a/src/devices/bus/centronics/nec_p72.cpp +++ b/src/devices/bus/centronics/nec_p72.cpp @@ -25,7 +25,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *nec_p72_t::device_rom_region() const +const tiny_rom_entry *nec_p72_t::device_rom_region() const { return ROM_NAME( p72 ); } diff --git a/src/devices/bus/centronics/nec_p72.h b/src/devices/bus/centronics/nec_p72.h index ef7c67f85f1..3638170d4b5 100644 --- a/src/devices/bus/centronics/nec_p72.h +++ b/src/devices/bus/centronics/nec_p72.h @@ -28,7 +28,7 @@ public: UINT32 clock, const char *shortname, const char *source); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; protected: diff --git a/src/devices/bus/cgenie/expansion/floppy.cpp b/src/devices/bus/cgenie/expansion/floppy.cpp index fdd61b88855..676d73a0659 100644 --- a/src/devices/bus/cgenie/expansion/floppy.cpp +++ b/src/devices/bus/cgenie/expansion/floppy.cpp @@ -59,7 +59,7 @@ ROM_START( cgenie_fdc ) ROM_LOAD("cgdos.rom", 0x0000, 0x2000, CRC(2a96cf74) SHA1(6dcac110f87897e1ee7521aefbb3d77a14815893)) ROM_END -const rom_entry *cgenie_fdc_device::device_rom_region() const +const tiny_rom_entry *cgenie_fdc_device::device_rom_region() const { return ROM_NAME( cgenie_fdc ); } diff --git a/src/devices/bus/cgenie/expansion/floppy.h b/src/devices/bus/cgenie/expansion/floppy.h index 540b2febebe..8717371fc89 100644 --- a/src/devices/bus/cgenie/expansion/floppy.h +++ b/src/devices/bus/cgenie/expansion/floppy.h @@ -44,7 +44,7 @@ public: protected: - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/chanf/slot.h b/src/devices/bus/chanf/slot.h index 68599ffad1c..f1d3f0d2c88 100644 --- a/src/devices/bus/chanf/slot.h +++ b/src/devices/bus/chanf/slot.h @@ -3,6 +3,9 @@ #ifndef __CHANF_SLOT_H #define __CHANF_SLOT_H +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/coco/coco_dwsock.cpp b/src/devices/bus/coco/coco_dwsock.cpp index fb2e18a23fb..6525cbaa97b 100644 --- a/src/devices/bus/coco/coco_dwsock.cpp +++ b/src/devices/bus/coco/coco_dwsock.cpp @@ -203,6 +203,6 @@ WRITE8_MEMBER(beckerport_device::write) void beckerport_device::update_port(void) { device_stop(); - m_dwtcpport = read_safe(m_dwconfigport, 65504); + m_dwtcpport = m_dwconfigport.read_safe(65504); device_start(); } diff --git a/src/devices/bus/coco/coco_fdc.cpp b/src/devices/bus/coco/coco_fdc.cpp index a5ee7a6d689..ae66083b403 100644 --- a/src/devices/bus/coco/coco_fdc.cpp +++ b/src/devices/bus/coco/coco_fdc.cpp @@ -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(read_safe(machine().root_device().ioport("real_time_clock"), RTC_NONE)); + coco_rtc_type_t result = coco_rtc_type_t(m_rtc.read_safe(RTC_NONE)); /* check to make sure we don't have any invalid values */ if (((result == RTC_DISTO) && (m_disto_msm6242 == nullptr)) @@ -183,7 +183,8 @@ coco_fdc_device::coco_fdc_device(const machine_config &mconfig, device_type type m_wd17xx(*this, WD_TAG), m_wd2797(*this, WD2797_TAG), m_ds1315(*this, CLOUD9_TAG), - m_disto_msm6242(*this, DISTO_TAG), m_msm6242_rtc_address(0) + m_disto_msm6242(*this, DISTO_TAG), m_msm6242_rtc_address(0), + m_rtc(*this, ":real_time_clock") { } @@ -193,8 +194,9 @@ coco_fdc_device::coco_fdc_device(const machine_config &mconfig, const char *tag, m_wd17xx(*this, WD_TAG), m_wd2797(*this, WD2797_TAG), m_ds1315(*this, CLOUD9_TAG), - m_disto_msm6242(*this, DISTO_TAG), m_msm6242_rtc_address(0) - { + m_disto_msm6242(*this, DISTO_TAG), m_msm6242_rtc_address(0), + m_rtc(*this, ":real_time_clock") +{ } //------------------------------------------------- @@ -224,7 +226,7 @@ machine_config_constructor coco_fdc_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *coco_fdc_device::device_rom_region() const +const tiny_rom_entry *coco_fdc_device::device_rom_region() const { return ROM_NAME( coco_fdc ); } @@ -480,7 +482,7 @@ machine_config_constructor dragon_fdc_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *dragon_fdc_device::device_rom_region() const +const tiny_rom_entry *dragon_fdc_device::device_rom_region() const { return ROM_NAME( dragon_fdc ); } @@ -622,7 +624,7 @@ sdtandy_fdc_device::sdtandy_fdc_device(const machine_config &mconfig, const char // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *sdtandy_fdc_device::device_rom_region() const +const tiny_rom_entry *sdtandy_fdc_device::device_rom_region() const { return ROM_NAME( sdtandy_fdc ); } @@ -654,7 +656,7 @@ coco_fdc_v11_device::coco_fdc_v11_device(const machine_config &mconfig, const ch // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *coco_fdc_v11_device::device_rom_region() const +const tiny_rom_entry *coco_fdc_v11_device::device_rom_region() const { return ROM_NAME( coco_fdc_v11 ); } @@ -678,7 +680,7 @@ coco3_hdb1_device::coco3_hdb1_device(const machine_config &mconfig, const char * { } -const rom_entry *coco3_hdb1_device::device_rom_region() const +const tiny_rom_entry *coco3_hdb1_device::device_rom_region() const { return ROM_NAME( coco3_hdb1 ); } @@ -707,7 +709,7 @@ cp400_fdc_device::cp400_fdc_device(const machine_config &mconfig, const char *ta // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *cp400_fdc_device::device_rom_region() const +const tiny_rom_entry *cp400_fdc_device::device_rom_region() const { return ROM_NAME( cp400_fdc ); } diff --git a/src/devices/bus/coco/coco_fdc.h b/src/devices/bus/coco/coco_fdc.h index 2799d15e0ee..f1f4db0226e 100644 --- a/src/devices/bus/coco/coco_fdc.h +++ b/src/devices/bus/coco/coco_fdc.h @@ -41,7 +41,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual UINT8* get_cart_base() override; @@ -76,6 +76,7 @@ protected: optional_device m_disto_msm6242; /* 6242 RTC on Disto interface */ offs_t m_msm6242_rtc_address; + optional_ioport m_rtc; }; @@ -92,7 +93,7 @@ public: coco_fdc_v11_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -109,7 +110,7 @@ public: coco3_hdb1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -126,7 +127,7 @@ public: cp400_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -145,7 +146,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void update_lines() override; virtual void dskreg_w(UINT8 data) override; protected: @@ -169,7 +170,7 @@ public: sdtandy_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; diff --git a/src/devices/bus/coco/coco_pak.cpp b/src/devices/bus/coco/coco_pak.cpp index 1a861fa3bed..84b03657ec8 100644 --- a/src/devices/bus/coco/coco_pak.cpp +++ b/src/devices/bus/coco/coco_pak.cpp @@ -41,13 +41,15 @@ const device_type COCO_PAK = &device_creator; //------------------------------------------------- coco_pak_device::coco_pak_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) : device_t(mconfig, type, name, tag, owner, clock, shortname, source), - device_cococart_interface( mconfig, *this ), m_cart(nullptr), m_owner(nullptr) + device_cococart_interface( mconfig, *this ), m_cart(nullptr), m_owner(nullptr), + m_autostart(*this, ":" CART_AUTOSTART_TAG) { } coco_pak_device::coco_pak_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, COCO_PAK, "CoCo Program PAK", tag, owner, clock, "cocopak", __FILE__), - device_cococart_interface( mconfig, *this ), m_cart(nullptr), m_owner(nullptr) + device_cococart_interface( mconfig, *this ), m_cart(nullptr), m_owner(nullptr), + m_autostart(*this, ":" CART_AUTOSTART_TAG) { } @@ -75,7 +77,7 @@ machine_config_constructor coco_pak_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *coco_pak_device::device_rom_region() const +const tiny_rom_entry *coco_pak_device::device_rom_region() const { return ROM_NAME( coco_pak ); } @@ -87,9 +89,7 @@ const rom_entry *coco_pak_device::device_rom_region() const void coco_pak_device::device_reset() { if (m_cart->exists()) { - cococart_line_value cart_line; - - cart_line = read_safe(machine().root_device().ioport(CART_AUTOSTART_TAG), 0x01) + cococart_line_value cart_line = m_autostart.read_safe(0x01) ? COCOCART_LINE_VALUE_Q : COCOCART_LINE_VALUE_CLEAR; diff --git a/src/devices/bus/coco/coco_pak.h b/src/devices/bus/coco/coco_pak.h index 7915fd9923d..f75b48721ec 100644 --- a/src/devices/bus/coco/coco_pak.h +++ b/src/devices/bus/coco/coco_pak.h @@ -25,7 +25,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual UINT8* get_cart_base() override; protected: @@ -36,6 +36,8 @@ protected: // internal state device_image_interface *m_cart; cococart_slot_device *m_owner; + + optional_ioport m_autostart; }; diff --git a/src/devices/bus/coco/cococart.h b/src/devices/bus/coco/cococart.h index 7ba1e301d50..9415b5956c8 100644 --- a/src/devices/bus/coco/cococart.h +++ b/src/devices/bus/coco/cococart.h @@ -11,6 +11,8 @@ #ifndef __COCOCART_H__ #define __COCOCART_H__ +#include "softlist_dev.h" + /*************************************************************************** CONSTANTS diff --git a/src/devices/bus/coleco/exp.h b/src/devices/bus/coleco/exp.h index 25f503b378e..19fa5b5e69c 100644 --- a/src/devices/bus/coleco/exp.h +++ b/src/devices/bus/coleco/exp.h @@ -31,7 +31,7 @@ #define __COLECOVISION_CARTRIDGE_SLOT__ #include "emu.h" - +#include "softlist_dev.h" //************************************************************************** diff --git a/src/devices/bus/comx35/clm.cpp b/src/devices/bus/comx35/clm.cpp index 6929a01d6eb..513a123086a 100644 --- a/src/devices/bus/comx35/clm.cpp +++ b/src/devices/bus/comx35/clm.cpp @@ -87,7 +87,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *comx_clm_device::device_rom_region() const +const tiny_rom_entry *comx_clm_device::device_rom_region() const { return ROM_NAME( comx_clm ); } diff --git a/src/devices/bus/comx35/clm.h b/src/devices/bus/comx35/clm.h index 5b2da54d905..0a71c1afb21 100644 --- a/src/devices/bus/comx35/clm.h +++ b/src/devices/bus/comx35/clm.h @@ -32,7 +32,7 @@ public: comx_clm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; // not really public diff --git a/src/devices/bus/comx35/eprom.cpp b/src/devices/bus/comx35/eprom.cpp index 56be84b4902..505b81ebb29 100644 --- a/src/devices/bus/comx35/eprom.cpp +++ b/src/devices/bus/comx35/eprom.cpp @@ -42,7 +42,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *comx_epr_device::device_rom_region() const +const tiny_rom_entry *comx_epr_device::device_rom_region() const { return ROM_NAME( comx_epr ); } diff --git a/src/devices/bus/comx35/eprom.h b/src/devices/bus/comx35/eprom.h index 3d30b7e312a..db6823f7ac3 100644 --- a/src/devices/bus/comx35/eprom.h +++ b/src/devices/bus/comx35/eprom.h @@ -30,7 +30,7 @@ public: comx_epr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/comx35/expbox.cpp b/src/devices/bus/comx35/expbox.cpp index ce0dec61006..dac3ffc95c3 100644 --- a/src/devices/bus/comx35/expbox.cpp +++ b/src/devices/bus/comx35/expbox.cpp @@ -87,7 +87,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *comx_eb_device::device_rom_region() const +const tiny_rom_entry *comx_eb_device::device_rom_region() const { return ROM_NAME( comx_eb ); } diff --git a/src/devices/bus/comx35/expbox.h b/src/devices/bus/comx35/expbox.h index 0b479c79326..72bc7fc5a59 100644 --- a/src/devices/bus/comx35/expbox.h +++ b/src/devices/bus/comx35/expbox.h @@ -47,7 +47,7 @@ protected: virtual void device_reset() override; // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; // device_comx_expansion_card_interface overrides diff --git a/src/devices/bus/comx35/fdc.cpp b/src/devices/bus/comx35/fdc.cpp index e2c5066873a..30693eb3738 100644 --- a/src/devices/bus/comx35/fdc.cpp +++ b/src/devices/bus/comx35/fdc.cpp @@ -74,7 +74,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *comx_fd_device::device_rom_region() const +const tiny_rom_entry *comx_fd_device::device_rom_region() const { return ROM_NAME( comx_fd ); } diff --git a/src/devices/bus/comx35/fdc.h b/src/devices/bus/comx35/fdc.h index cdcb23a363e..0d8cddd7e60 100644 --- a/src/devices/bus/comx35/fdc.h +++ b/src/devices/bus/comx35/fdc.h @@ -32,7 +32,7 @@ public: comx_fd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_FLOPPY_FORMATS( floppy_formats ); diff --git a/src/devices/bus/comx35/printer.cpp b/src/devices/bus/comx35/printer.cpp index 2f36fffd9bd..5d0cb050f70 100644 --- a/src/devices/bus/comx35/printer.cpp +++ b/src/devices/bus/comx35/printer.cpp @@ -44,7 +44,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *comx_prn_device::device_rom_region() const +const tiny_rom_entry *comx_prn_device::device_rom_region() const { return ROM_NAME( comx_prn ); } diff --git a/src/devices/bus/comx35/printer.h b/src/devices/bus/comx35/printer.h index 8f0a2d2fcaf..f5b4d86b5a0 100644 --- a/src/devices/bus/comx35/printer.h +++ b/src/devices/bus/comx35/printer.h @@ -32,7 +32,7 @@ public: comx_prn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; protected: diff --git a/src/devices/bus/comx35/thermal.cpp b/src/devices/bus/comx35/thermal.cpp index e74b62978d6..87945343580 100644 --- a/src/devices/bus/comx35/thermal.cpp +++ b/src/devices/bus/comx35/thermal.cpp @@ -37,7 +37,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *comx_thm_device::device_rom_region() const +const tiny_rom_entry *comx_thm_device::device_rom_region() const { return ROM_NAME( comx_thm ); } diff --git a/src/devices/bus/comx35/thermal.h b/src/devices/bus/comx35/thermal.h index 7d16f2a3d06..e2cadb511a8 100644 --- a/src/devices/bus/comx35/thermal.h +++ b/src/devices/bus/comx35/thermal.h @@ -30,7 +30,7 @@ public: comx_thm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/cpc/brunword4.cpp b/src/devices/bus/cpc/brunword4.cpp index 278ef4ed183..a6ee0d9540c 100644 --- a/src/devices/bus/cpc/brunword4.cpp +++ b/src/devices/bus/cpc/brunword4.cpp @@ -57,7 +57,7 @@ ROM_START( cpc_brunword4 ) ROM_LOAD( "brunw-fb.rom", 0x7c000, 0x4000, CRC(88383953) SHA1(50c6417b26134b68a80912bdb91c8578eb00c8a2) ) ROM_END -const rom_entry *cpc_brunword4_device::device_rom_region() const +const tiny_rom_entry *cpc_brunword4_device::device_rom_region() const { return ROM_NAME( cpc_brunword4 ); } diff --git a/src/devices/bus/cpc/brunword4.h b/src/devices/bus/cpc/brunword4.h index 4a65bf3402d..009de694767 100644 --- a/src/devices/bus/cpc/brunword4.h +++ b/src/devices/bus/cpc/brunword4.h @@ -17,7 +17,7 @@ public: cpc_brunword4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_WRITE8_MEMBER(rombank_w); virtual void set_mapping(UINT8 type) override; diff --git a/src/devices/bus/cpc/cpc_rs232.cpp b/src/devices/bus/cpc/cpc_rs232.cpp index 42e4b83221f..225c83c79d1 100644 --- a/src/devices/bus/cpc/cpc_rs232.cpp +++ b/src/devices/bus/cpc/cpc_rs232.cpp @@ -65,12 +65,12 @@ machine_config_constructor cpc_rs232_device::device_mconfig_additions() const return MACHINE_CONFIG_NAME( cpc_rs232 ); } -const rom_entry *cpc_rs232_device::device_rom_region() const +const tiny_rom_entry *cpc_rs232_device::device_rom_region() const { return ROM_NAME( cpc_rs232 ); } -const rom_entry *cpc_ams_rs232_device::device_rom_region() const +const tiny_rom_entry *cpc_ams_rs232_device::device_rom_region() const { return ROM_NAME( cpc_rs232_ams ); } diff --git a/src/devices/bus/cpc/cpc_rs232.h b/src/devices/bus/cpc/cpc_rs232.h index 0124a685ea8..e21d6357d88 100644 --- a/src/devices/bus/cpc/cpc_rs232.h +++ b/src/devices/bus/cpc/cpc_rs232.h @@ -42,7 +42,7 @@ protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; private: cpc_expansion_slot_device *m_slot; @@ -55,7 +55,7 @@ public: cpc_ams_rs232_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); protected: - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; // device type definition diff --git a/src/devices/bus/cpc/cpc_ssa1.cpp b/src/devices/bus/cpc/cpc_ssa1.cpp index a4a0836dfc4..f2f0f61cb56 100644 --- a/src/devices/bus/cpc/cpc_ssa1.cpp +++ b/src/devices/bus/cpc/cpc_ssa1.cpp @@ -101,12 +101,12 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *cpc_ssa1_device::device_rom_region() const +const tiny_rom_entry *cpc_ssa1_device::device_rom_region() const { return ROM_NAME( cpc_ssa1 ); } -const rom_entry *cpc_dkspeech_device::device_rom_region() const +const tiny_rom_entry *cpc_dkspeech_device::device_rom_region() const { return ROM_NAME( cpc_dkspeech ); } diff --git a/src/devices/bus/cpc/cpc_ssa1.h b/src/devices/bus/cpc/cpc_ssa1.h index e47112511f5..813d304a9e4 100644 --- a/src/devices/bus/cpc/cpc_ssa1.h +++ b/src/devices/bus/cpc/cpc_ssa1.h @@ -56,7 +56,7 @@ public: cpc_ssa1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; void set_lrq(UINT8 state) { m_lrq = state; } @@ -92,7 +92,7 @@ public: cpc_dkspeech_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; void set_lrq(UINT8 state) { m_lrq = state; } diff --git a/src/devices/bus/cpc/ddi1.cpp b/src/devices/bus/cpc/ddi1.cpp index de747473f7b..f0bf519a2e5 100644 --- a/src/devices/bus/cpc/ddi1.cpp +++ b/src/devices/bus/cpc/ddi1.cpp @@ -32,7 +32,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *cpc_ddi1_device::device_rom_region() const +const tiny_rom_entry *cpc_ddi1_device::device_rom_region() const { return ROM_NAME( cpc_ddi1 ); } diff --git a/src/devices/bus/cpc/ddi1.h b/src/devices/bus/cpc/ddi1.h index 600098a3e53..776bb833b7f 100644 --- a/src/devices/bus/cpc/ddi1.h +++ b/src/devices/bus/cpc/ddi1.h @@ -23,7 +23,7 @@ public: cpc_ddi1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual void set_mapping(UINT8 type) override; virtual WRITE_LINE_MEMBER( romen_w ) override { m_romen = state; } diff --git a/src/devices/bus/cpc/hd20.cpp b/src/devices/bus/cpc/hd20.cpp index d10bf0cd828..58ce8a8658b 100644 --- a/src/devices/bus/cpc/hd20.cpp +++ b/src/devices/bus/cpc/hd20.cpp @@ -39,7 +39,7 @@ ROM_START( cpc_hd20 ) ROMX_LOAD( "x-ddos20.rom", 0x0000, 0x4000, CRC(c2d9cc03) SHA1(8a20788be5f957e84e849c226aa97b55b2a3aab9), ROM_BIOS(2) ) ROM_END -const rom_entry *cpc_hd20_device::device_rom_region() const +const tiny_rom_entry *cpc_hd20_device::device_rom_region() const { return ROM_NAME( cpc_hd20 ); } diff --git a/src/devices/bus/cpc/hd20.h b/src/devices/bus/cpc/hd20.h index 3d4f48837fd..69a3afdb5ff 100644 --- a/src/devices/bus/cpc/hd20.h +++ b/src/devices/bus/cpc/hd20.h @@ -27,7 +27,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(hdc_r); DECLARE_WRITE8_MEMBER(hdc_w); diff --git a/src/devices/bus/cpc/mface2.cpp b/src/devices/bus/cpc/mface2.cpp index bb4354041bc..6d9f9e6324f 100644 --- a/src/devices/bus/cpc/mface2.cpp +++ b/src/devices/bus/cpc/mface2.cpp @@ -294,7 +294,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *cpc_multiface2_device::device_rom_region() const +const tiny_rom_entry *cpc_multiface2_device::device_rom_region() const { return ROM_NAME( cpc_mface2 ); } diff --git a/src/devices/bus/cpc/mface2.h b/src/devices/bus/cpc/mface2.h index c64872af18b..8ed2724034d 100644 --- a/src/devices/bus/cpc/mface2.h +++ b/src/devices/bus/cpc/mface2.h @@ -39,7 +39,7 @@ public: cpc_multiface2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; virtual machine_config_constructor device_mconfig_additions() const override; diff --git a/src/devices/bus/cpc/smartwatch.cpp b/src/devices/bus/cpc/smartwatch.cpp index 4b5c1850fe2..dfd0ad2a3cf 100644 --- a/src/devices/bus/cpc/smartwatch.cpp +++ b/src/devices/bus/cpc/smartwatch.cpp @@ -36,7 +36,7 @@ ROM_START( cpc_smartwatch ) ROM_LOAD( "timerom+.rom", 0x0000, 0x4000, CRC(ed42a147) SHA1(61750d0535a1fbf2a4addad9def332cbcf8917c3) ) ROM_END -const rom_entry *cpc_smartwatch_device::device_rom_region() const +const tiny_rom_entry *cpc_smartwatch_device::device_rom_region() const { return ROM_NAME( cpc_smartwatch ); } diff --git a/src/devices/bus/cpc/smartwatch.h b/src/devices/bus/cpc/smartwatch.h index b4741bed193..3842819cb94 100644 --- a/src/devices/bus/cpc/smartwatch.h +++ b/src/devices/bus/cpc/smartwatch.h @@ -25,7 +25,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(rtc_w); DECLARE_READ8_MEMBER(rtc_r); diff --git a/src/devices/bus/cpc/transtape.cpp b/src/devices/bus/cpc/transtape.cpp index b1892f3a31e..2735536f95f 100644 --- a/src/devices/bus/cpc/transtape.cpp +++ b/src/devices/bus/cpc/transtape.cpp @@ -22,7 +22,7 @@ ROM_START( cpc_transtape ) ROM_LOAD( "tta.rom", 0x0000, 0x4000, CRC(c568da76) SHA1(cc509d21216bf11d40f9a3e0791ef7f4ada03790) ) ROM_END -const rom_entry *cpc_transtape_device::device_rom_region() const +const tiny_rom_entry *cpc_transtape_device::device_rom_region() const { return ROM_NAME( cpc_transtape ); } diff --git a/src/devices/bus/cpc/transtape.h b/src/devices/bus/cpc/transtape.h index bb1a70e6ecc..75fb06b03ca 100644 --- a/src/devices/bus/cpc/transtape.h +++ b/src/devices/bus/cpc/transtape.h @@ -21,7 +21,7 @@ public: cpc_transtape_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; virtual void set_mapping(UINT8 type) override; diff --git a/src/devices/bus/crvision/slot.h b/src/devices/bus/crvision/slot.h index 47fed8c1583..7643ca7fb1b 100644 --- a/src/devices/bus/crvision/slot.h +++ b/src/devices/bus/crvision/slot.h @@ -3,6 +3,9 @@ #ifndef __CRVISION_SLOT_H #define __CRVISION_SLOT_H +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/dmv/k220.cpp b/src/devices/bus/dmv/k220.cpp index b753e7aa20c..b48a118f01c 100644 --- a/src/devices/bus/dmv/k220.cpp +++ b/src/devices/bus/dmv/k220.cpp @@ -186,7 +186,7 @@ ioport_constructor dmv_k220_device::device_input_ports() const // device_rom_region //------------------------------------------------- -const rom_entry *dmv_k220_device::device_rom_region() const +const tiny_rom_entry *dmv_k220_device::device_rom_region() const { return ROM_NAME( dmv_k220 ); } diff --git a/src/devices/bus/dmv/k220.h b/src/devices/bus/dmv/k220.h index 0f405946ec6..78efdf085d7 100644 --- a/src/devices/bus/dmv/k220.h +++ b/src/devices/bus/dmv/k220.h @@ -25,7 +25,7 @@ public: dmv_k220_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/dmv/k230.cpp b/src/devices/bus/dmv/k230.cpp index 7ac9b984216..8e859827304 100644 --- a/src/devices/bus/dmv/k230.cpp +++ b/src/devices/bus/dmv/k230.cpp @@ -208,22 +208,22 @@ machine_config_constructor dmv_k235_device::device_mconfig_additions() const // device_rom_region //------------------------------------------------- -const rom_entry *dmv_k230_device::device_rom_region() const +const tiny_rom_entry *dmv_k230_device::device_rom_region() const { return ROM_NAME( dmv_k230 ); } -const rom_entry *dmv_k231_device::device_rom_region() const +const tiny_rom_entry *dmv_k231_device::device_rom_region() const { return ROM_NAME( dmv_k231 ); } -const rom_entry *dmv_k234_device::device_rom_region() const +const tiny_rom_entry *dmv_k234_device::device_rom_region() const { return nullptr; } -const rom_entry *dmv_k235_device::device_rom_region() const +const tiny_rom_entry *dmv_k235_device::device_rom_region() const { return ROM_NAME( dmv_k235 ); } diff --git a/src/devices/bus/dmv/k230.h b/src/devices/bus/dmv/k230.h index d05d6ef8317..d6565f461ab 100644 --- a/src/devices/bus/dmv/k230.h +++ b/src/devices/bus/dmv/k230.h @@ -33,7 +33,7 @@ public: dmv_k230_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_READ8_MEMBER(io_r); @@ -72,7 +72,7 @@ public: dmv_k231_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -90,7 +90,7 @@ public: protected: // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; // device-level overrides @@ -117,7 +117,7 @@ public: protected: // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/dmv/k806.cpp b/src/devices/bus/dmv/k806.cpp index 9e79c9d90d6..8cd13beb467 100644 --- a/src/devices/bus/dmv/k806.cpp +++ b/src/devices/bus/dmv/k806.cpp @@ -131,7 +131,7 @@ ioport_constructor dmv_k806_device::device_input_ports() const // device_rom_region //------------------------------------------------- -const rom_entry *dmv_k806_device::device_rom_region() const +const tiny_rom_entry *dmv_k806_device::device_rom_region() const { return ROM_NAME( dmv_k806 ); } diff --git a/src/devices/bus/dmv/k806.h b/src/devices/bus/dmv/k806.h index 1c25f9b6102..6ad48448e15 100644 --- a/src/devices/bus/dmv/k806.h +++ b/src/devices/bus/dmv/k806.h @@ -25,7 +25,7 @@ public: dmv_k806_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; virtual machine_config_constructor device_mconfig_additions() const override; diff --git a/src/devices/bus/ecbbus/grip.cpp b/src/devices/bus/ecbbus/grip.cpp index 3a47b5692fc..225214043cd 100644 --- a/src/devices/bus/ecbbus/grip.cpp +++ b/src/devices/bus/ecbbus/grip.cpp @@ -105,7 +105,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *grip_device::device_rom_region() const +const tiny_rom_entry *grip_device::device_rom_region() const { return ROM_NAME( grip21 ); } diff --git a/src/devices/bus/ecbbus/grip.h b/src/devices/bus/ecbbus/grip.h index 7f7abe6d0a1..da4e83ed46a 100644 --- a/src/devices/bus/ecbbus/grip.h +++ b/src/devices/bus/ecbbus/grip.h @@ -38,7 +38,7 @@ public: grip_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/econet/e01.cpp b/src/devices/bus/econet/e01.cpp index ab6e95fd6a7..3d7eb0e5a9b 100644 --- a/src/devices/bus/econet/e01.cpp +++ b/src/devices/bus/econet/e01.cpp @@ -112,7 +112,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *e01_device::device_rom_region() const +const tiny_rom_entry *e01_device::device_rom_region() const { switch (m_variant) { diff --git a/src/devices/bus/econet/e01.h b/src/devices/bus/econet/e01.h index 02a432c936d..6e123a7a84c 100644 --- a/src/devices/bus/econet/e01.h +++ b/src/devices/bus/econet/e01.h @@ -73,7 +73,7 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/electron/m2105.cpp b/src/devices/bus/electron/m2105.cpp index 6b6a701f7b5..4c7669faa3c 100644 --- a/src/devices/bus/electron/m2105.cpp +++ b/src/devices/bus/electron/m2105.cpp @@ -113,7 +113,7 @@ machine_config_constructor electron_m2105_device::device_mconfig_additions() con return MACHINE_CONFIG_NAME( m2105 ); } -const rom_entry *electron_m2105_device::device_rom_region() const +const tiny_rom_entry *electron_m2105_device::device_rom_region() const { return ROM_NAME( m2105 ); } diff --git a/src/devices/bus/electron/m2105.h b/src/devices/bus/electron/m2105.h index fb462d08ab7..f2efa191941 100644 --- a/src/devices/bus/electron/m2105.h +++ b/src/devices/bus/electron/m2105.h @@ -33,7 +33,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: virtual void device_start() override; diff --git a/src/devices/bus/ep64/exdos.cpp b/src/devices/bus/ep64/exdos.cpp index 093499c401d..67c6df6646c 100644 --- a/src/devices/bus/ep64/exdos.cpp +++ b/src/devices/bus/ep64/exdos.cpp @@ -78,7 +78,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *ep64_exdos_device::device_rom_region() const +const tiny_rom_entry *ep64_exdos_device::device_rom_region() const { return ROM_NAME( ep64_exdos ); } diff --git a/src/devices/bus/ep64/exdos.h b/src/devices/bus/ep64/exdos.h index dac02daa1b4..6259440b751 100644 --- a/src/devices/bus/ep64/exdos.h +++ b/src/devices/bus/ep64/exdos.h @@ -32,7 +32,7 @@ public: ep64_exdos_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_READ8_MEMBER( read ); diff --git a/src/devices/bus/epson_sio/pf10.cpp b/src/devices/bus/epson_sio/pf10.cpp index 7096aee3fce..4f93c542340 100644 --- a/src/devices/bus/epson_sio/pf10.cpp +++ b/src/devices/bus/epson_sio/pf10.cpp @@ -48,7 +48,7 @@ ROM_START( pf10 ) ROM_LOAD("k3pf1.bin", 0x0000, 0x2000, CRC(eef4593a) SHA1(bb176e4baf938fe58c2d32f7c46d7bb7b0627755)) ROM_END -const rom_entry *epson_pf10_device::device_rom_region() const +const tiny_rom_entry *epson_pf10_device::device_rom_region() const { return ROM_NAME( pf10 ); } diff --git a/src/devices/bus/epson_sio/pf10.h b/src/devices/bus/epson_sio/pf10.h index 4a648bbd997..3d1d3d60131 100644 --- a/src/devices/bus/epson_sio/pf10.h +++ b/src/devices/bus/epson_sio/pf10.h @@ -31,7 +31,7 @@ public: epson_pf10_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; // floppy disk controller diff --git a/src/devices/bus/epson_sio/tf20.cpp b/src/devices/bus/epson_sio/tf20.cpp index 3acb7ba28a8..83c65755501 100644 --- a/src/devices/bus/epson_sio/tf20.cpp +++ b/src/devices/bus/epson_sio/tf20.cpp @@ -52,7 +52,7 @@ ROM_START( tf20 ) ROM_LOAD("tfx.15e", 0x0000, 0x0800, CRC(af34f084) SHA1(c9bdf393f757ba5d8f838108ceb2b079be1d616e)) ROM_END -const rom_entry *epson_tf20_device::device_rom_region() const +const tiny_rom_entry *epson_tf20_device::device_rom_region() const { return ROM_NAME( tf20 ); } diff --git a/src/devices/bus/epson_sio/tf20.h b/src/devices/bus/epson_sio/tf20.h index 3e76b3dab27..252e99ed4c8 100644 --- a/src/devices/bus/epson_sio/tf20.h +++ b/src/devices/bus/epson_sio/tf20.h @@ -33,7 +33,7 @@ public: epson_tf20_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/gameboy/gb_slot.h b/src/devices/bus/gameboy/gb_slot.h index 67db3cda7f0..75a8b4e7cde 100644 --- a/src/devices/bus/gameboy/gb_slot.h +++ b/src/devices/bus/gameboy/gb_slot.h @@ -3,6 +3,9 @@ #ifndef __GB_SLOT_H #define __GB_SLOT_H +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/gba/gba_slot.h b/src/devices/bus/gba/gba_slot.h index 5cbc103e8dc..f9918744d97 100644 --- a/src/devices/bus/gba/gba_slot.h +++ b/src/devices/bus/gba/gba_slot.h @@ -3,6 +3,9 @@ #ifndef __GBA_SLOT_H #define __GBA_SLOT_H +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/generic/slot.h b/src/devices/bus/generic/slot.h index 6ba2e1a1fd5..a3e07f68ef4 100644 --- a/src/devices/bus/generic/slot.h +++ b/src/devices/bus/generic/slot.h @@ -3,6 +3,9 @@ #ifndef __GENERIC_SLOT_H #define __GENERIC_SLOT_H +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/hp_optroms/hp_optrom.h b/src/devices/bus/hp_optroms/hp_optrom.h index d82f8962f4f..6ca5440cce5 100644 --- a/src/devices/bus/hp_optroms/hp_optrom.h +++ b/src/devices/bus/hp_optroms/hp_optrom.h @@ -14,6 +14,8 @@ #define _HP_OPTROM_H_ #include "emu.h" +#include "softlist_dev.h" + class hp_optrom_cart_device : public device_t, public device_slot_card_interface diff --git a/src/devices/bus/ieee488/c2031.cpp b/src/devices/bus/ieee488/c2031.cpp index 0e455c35b67..3fbd46e520f 100644 --- a/src/devices/bus/ieee488/c2031.cpp +++ b/src/devices/bus/ieee488/c2031.cpp @@ -50,7 +50,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c2031_device::device_rom_region() const +const tiny_rom_entry *c2031_device::device_rom_region() const { return ROM_NAME( c2031 ); } diff --git a/src/devices/bus/ieee488/c2031.h b/src/devices/bus/ieee488/c2031.h index ccc2c31621a..3a23feee2b7 100644 --- a/src/devices/bus/ieee488/c2031.h +++ b/src/devices/bus/ieee488/c2031.h @@ -33,7 +33,7 @@ public: c2031_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/ieee488/c2040.cpp b/src/devices/bus/ieee488/c2040.cpp index 55dd8f9a072..2c6e82b1ce3 100644 --- a/src/devices/bus/ieee488/c2040.cpp +++ b/src/devices/bus/ieee488/c2040.cpp @@ -96,7 +96,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c2040_t::device_rom_region() const +const tiny_rom_entry *c2040_t::device_rom_region() const { return ROM_NAME( c2040 ); } @@ -123,7 +123,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c3040_t::device_rom_region() const +const tiny_rom_entry *c3040_t::device_rom_region() const { return ROM_NAME( c3040 ); } @@ -158,7 +158,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c4040_t::device_rom_region() const +const tiny_rom_entry *c4040_t::device_rom_region() const { return ROM_NAME( c4040 ); } diff --git a/src/devices/bus/ieee488/c2040.h b/src/devices/bus/ieee488/c2040.h index 74539e6524d..bac0a52ec07 100644 --- a/src/devices/bus/ieee488/c2040.h +++ b/src/devices/bus/ieee488/c2040.h @@ -36,7 +36,7 @@ public: c2040_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; @@ -98,7 +98,7 @@ public: c3040_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_FLOPPY_FORMATS( floppy_formats ); @@ -114,7 +114,7 @@ public: c4040_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_FLOPPY_FORMATS( floppy_formats ); diff --git a/src/devices/bus/ieee488/c2040fdc.cpp b/src/devices/bus/ieee488/c2040fdc.cpp index b39ab1d23a3..5cc70c7f571 100644 --- a/src/devices/bus/ieee488/c2040fdc.cpp +++ b/src/devices/bus/ieee488/c2040fdc.cpp @@ -54,7 +54,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c2040_fdc_t::device_rom_region() const +const tiny_rom_entry *c2040_fdc_t::device_rom_region() const { return ROM_NAME( c2040_fdc ); } diff --git a/src/devices/bus/ieee488/c2040fdc.h b/src/devices/bus/ieee488/c2040fdc.h index a056a8f0b60..3ff0856181b 100644 --- a/src/devices/bus/ieee488/c2040fdc.h +++ b/src/devices/bus/ieee488/c2040fdc.h @@ -78,7 +78,7 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; void stp_w(floppy_image_device *floppy, int mtr, int &old_stp, int stp); diff --git a/src/devices/bus/ieee488/c8050.cpp b/src/devices/bus/ieee488/c8050.cpp index ead9fad37a5..bdc1b848e3f 100644 --- a/src/devices/bus/ieee488/c8050.cpp +++ b/src/devices/bus/ieee488/c8050.cpp @@ -109,7 +109,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c8050_t::device_rom_region() const +const tiny_rom_entry *c8050_t::device_rom_region() const { return ROM_NAME( c8050 ); } @@ -143,7 +143,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c8250lp_t::device_rom_region() const +const tiny_rom_entry *c8250lp_t::device_rom_region() const { return ROM_NAME( c8250lp ); } @@ -173,7 +173,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *sfd1001_t::device_rom_region() const +const tiny_rom_entry *sfd1001_t::device_rom_region() const { return ROM_NAME( sfd1001 ); } diff --git a/src/devices/bus/ieee488/c8050.h b/src/devices/bus/ieee488/c8050.h index 71bd9ae42cf..e983ad06353 100644 --- a/src/devices/bus/ieee488/c8050.h +++ b/src/devices/bus/ieee488/c8050.h @@ -36,7 +36,7 @@ public: c8050_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; @@ -104,7 +104,7 @@ public: c8250lp_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_FLOPPY_FORMATS( floppy_formats ); @@ -120,7 +120,7 @@ public: sfd1001_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_FLOPPY_FORMATS( floppy_formats ); diff --git a/src/devices/bus/ieee488/c8050fdc.cpp b/src/devices/bus/ieee488/c8050fdc.cpp index 5e2e91676c0..ce16035f6e1 100644 --- a/src/devices/bus/ieee488/c8050fdc.cpp +++ b/src/devices/bus/ieee488/c8050fdc.cpp @@ -56,7 +56,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c8050_fdc_t::device_rom_region() const +const tiny_rom_entry *c8050_fdc_t::device_rom_region() const { return ROM_NAME( c8050_fdc ); } diff --git a/src/devices/bus/ieee488/c8050fdc.h b/src/devices/bus/ieee488/c8050fdc.h index 4f82962f524..83cb6dde238 100644 --- a/src/devices/bus/ieee488/c8050fdc.h +++ b/src/devices/bus/ieee488/c8050fdc.h @@ -82,7 +82,7 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; void stp_w(floppy_image_device *floppy, int mtr, int &old_stp, int stp); diff --git a/src/devices/bus/ieee488/c8280.cpp b/src/devices/bus/ieee488/c8280.cpp index 05c39c7ffdd..da51423e394 100644 --- a/src/devices/bus/ieee488/c8280.cpp +++ b/src/devices/bus/ieee488/c8280.cpp @@ -62,7 +62,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c8280_t::device_rom_region() const +const tiny_rom_entry *c8280_t::device_rom_region() const { return ROM_NAME( c8280 ); } diff --git a/src/devices/bus/ieee488/c8280.h b/src/devices/bus/ieee488/c8280.h index a7f17aaf55c..a6c36b88489 100644 --- a/src/devices/bus/ieee488/c8280.h +++ b/src/devices/bus/ieee488/c8280.h @@ -34,7 +34,7 @@ public: c8280_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/ieee488/d9060.cpp b/src/devices/bus/ieee488/d9060.cpp index 97847aa9028..dbd7aba6fd7 100644 --- a/src/devices/bus/ieee488/d9060.cpp +++ b/src/devices/bus/ieee488/d9060.cpp @@ -98,7 +98,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *d9060_base_t::device_rom_region() const +const tiny_rom_entry *d9060_base_t::device_rom_region() const { return ROM_NAME( d9060 ); } diff --git a/src/devices/bus/ieee488/d9060.h b/src/devices/bus/ieee488/d9060.h index 104daec4a11..4dd5c6cb5b4 100644 --- a/src/devices/bus/ieee488/d9060.h +++ b/src/devices/bus/ieee488/d9060.h @@ -41,7 +41,7 @@ public: d9060_base_t(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); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/ieee488/hardbox.cpp b/src/devices/bus/ieee488/hardbox.cpp index c03f147250d..355f5dba2b8 100644 --- a/src/devices/bus/ieee488/hardbox.cpp +++ b/src/devices/bus/ieee488/hardbox.cpp @@ -94,7 +94,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *hardbox_device::device_rom_region() const +const tiny_rom_entry *hardbox_device::device_rom_region() const { return ROM_NAME( hardbox ); } diff --git a/src/devices/bus/ieee488/hardbox.h b/src/devices/bus/ieee488/hardbox.h index cbaa26d335c..2d5c382f4b6 100644 --- a/src/devices/bus/ieee488/hardbox.h +++ b/src/devices/bus/ieee488/hardbox.h @@ -34,7 +34,7 @@ public: hardbox_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/ieee488/shark.cpp b/src/devices/bus/ieee488/shark.cpp index bdb11f6d261..83a270f8894 100644 --- a/src/devices/bus/ieee488/shark.cpp +++ b/src/devices/bus/ieee488/shark.cpp @@ -50,7 +50,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *mshark_device::device_rom_region() const +const tiny_rom_entry *mshark_device::device_rom_region() const { return ROM_NAME( mshark ); } diff --git a/src/devices/bus/ieee488/shark.h b/src/devices/bus/ieee488/shark.h index 50a9c967244..2be61a610c8 100644 --- a/src/devices/bus/ieee488/shark.h +++ b/src/devices/bus/ieee488/shark.h @@ -31,7 +31,7 @@ public: mshark_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/ieee488/softbox.cpp b/src/devices/bus/ieee488/softbox.cpp index d4e4617a332..7d6dbce4651 100644 --- a/src/devices/bus/ieee488/softbox.cpp +++ b/src/devices/bus/ieee488/softbox.cpp @@ -61,7 +61,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *softbox_device::device_rom_region() const +const tiny_rom_entry *softbox_device::device_rom_region() const { return ROM_NAME( softbox ); } diff --git a/src/devices/bus/ieee488/softbox.h b/src/devices/bus/ieee488/softbox.h index d8de28d031c..0b812e0a0c1 100644 --- a/src/devices/bus/ieee488/softbox.h +++ b/src/devices/bus/ieee488/softbox.h @@ -36,7 +36,7 @@ public: softbox_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/imi7000/imi5000h.cpp b/src/devices/bus/imi7000/imi5000h.cpp index ab4af469ee9..6268e7875c6 100644 --- a/src/devices/bus/imi7000/imi5000h.cpp +++ b/src/devices/bus/imi7000/imi5000h.cpp @@ -51,7 +51,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *imi5000h_device::device_rom_region() const +const tiny_rom_entry *imi5000h_device::device_rom_region() const { return ROM_NAME( imi5000h ); } diff --git a/src/devices/bus/imi7000/imi5000h.h b/src/devices/bus/imi7000/imi5000h.h index cb37319f6c1..201142fb413 100644 --- a/src/devices/bus/imi7000/imi5000h.h +++ b/src/devices/bus/imi7000/imi5000h.h @@ -36,7 +36,7 @@ public: imi5000h_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/intv/ecs.cpp b/src/devices/bus/intv/ecs.cpp index 69582c2280e..5585aa93650 100644 --- a/src/devices/bus/intv/ecs.cpp +++ b/src/devices/bus/intv/ecs.cpp @@ -120,7 +120,7 @@ ROM_START( ecs ) ROM_LOAD16_WORD_SWAP( "ecs_rom.e0", 0x1c000, 0x2000, CRC(c2ebcd90) SHA1(b3c14955f56c57e6f0d8fbb695771946cfcf6582)) ROM_END -const rom_entry *intv_ecs_device::device_rom_region() const +const tiny_rom_entry *intv_ecs_device::device_rom_region() const { return ROM_NAME( ecs ); } diff --git a/src/devices/bus/intv/ecs.h b/src/devices/bus/intv/ecs.h index ce22d4f7481..97d0c1e380c 100644 --- a/src/devices/bus/intv/ecs.h +++ b/src/devices/bus/intv/ecs.h @@ -21,7 +21,7 @@ public: virtual void device_start() override; virtual void device_reset() override; virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; // reading and writing diff --git a/src/devices/bus/intv/slot.h b/src/devices/bus/intv/slot.h index ced41e71fd0..11d88aed25c 100644 --- a/src/devices/bus/intv/slot.h +++ b/src/devices/bus/intv/slot.h @@ -3,6 +3,9 @@ #ifndef __INTV_SLOT_H #define __INTV_SLOT_H +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/intv/voice.cpp b/src/devices/bus/intv/voice.cpp index ea2c7db82f4..08d0f7c8b10 100644 --- a/src/devices/bus/intv/voice.cpp +++ b/src/devices/bus/intv/voice.cpp @@ -96,7 +96,7 @@ ROM_START( intellivoice ) ROM_LOAD( "sp0256-012.bin", 0x1000, 0x0800, CRC(0de7579d) SHA1(618563e512ff5665183664f52270fa9606c9d289) ) ROM_END -const rom_entry *intv_voice_device::device_rom_region() const +const tiny_rom_entry *intv_voice_device::device_rom_region() const { return ROM_NAME( intellivoice ); } diff --git a/src/devices/bus/intv/voice.h b/src/devices/bus/intv/voice.h index 0301c6d67b0..379a286ad12 100644 --- a/src/devices/bus/intv/voice.h +++ b/src/devices/bus/intv/voice.h @@ -19,7 +19,7 @@ public: // device-level overrides virtual void device_start() override; virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; // reading and writing // actual IntelliVoice access diff --git a/src/devices/bus/iq151/disc2.cpp b/src/devices/bus/iq151/disc2.cpp index ba2cbf36137..73690188954 100644 --- a/src/devices/bus/iq151/disc2.cpp +++ b/src/devices/bus/iq151/disc2.cpp @@ -87,7 +87,7 @@ machine_config_constructor iq151_disc2_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *iq151_disc2_device::device_rom_region() const +const tiny_rom_entry *iq151_disc2_device::device_rom_region() const { return ROM_NAME( iq151_disc2 ); } diff --git a/src/devices/bus/iq151/disc2.h b/src/devices/bus/iq151/disc2.h index 37bb1c7c26d..c4bffaa4333 100644 --- a/src/devices/bus/iq151/disc2.h +++ b/src/devices/bus/iq151/disc2.h @@ -25,7 +25,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_FLOPPY_FORMATS( floppy_formats ); diff --git a/src/devices/bus/iq151/iq151.h b/src/devices/bus/iq151/iq151.h index 1c75ff6c9a0..684aa00b8fd 100644 --- a/src/devices/bus/iq151/iq151.h +++ b/src/devices/bus/iq151/iq151.h @@ -45,6 +45,8 @@ #ifndef __IQ151CART_H__ #define __IQ151CART_H__ +#include "softlist_dev.h" + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/iq151/minigraf.cpp b/src/devices/bus/iq151/minigraf.cpp index d95c5a564ce..82fc74ad523 100644 --- a/src/devices/bus/iq151/minigraf.cpp +++ b/src/devices/bus/iq151/minigraf.cpp @@ -94,7 +94,7 @@ void iq151_minigraf_device::device_stop() // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *iq151_minigraf_device::device_rom_region() const +const tiny_rom_entry *iq151_minigraf_device::device_rom_region() const { return ROM_NAME( iq151_minigraf ); } diff --git a/src/devices/bus/iq151/minigraf.h b/src/devices/bus/iq151/minigraf.h index 6632fa31aa4..a4e382b8b43 100644 --- a/src/devices/bus/iq151/minigraf.h +++ b/src/devices/bus/iq151/minigraf.h @@ -23,7 +23,7 @@ public: iq151_minigraf_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/iq151/ms151a.cpp b/src/devices/bus/iq151/ms151a.cpp index 2d0d732f1ad..4961fd61335 100644 --- a/src/devices/bus/iq151/ms151a.cpp +++ b/src/devices/bus/iq151/ms151a.cpp @@ -93,7 +93,7 @@ void iq151_ms151a_device::device_stop() // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *iq151_ms151a_device::device_rom_region() const +const tiny_rom_entry *iq151_ms151a_device::device_rom_region() const { return ROM_NAME( iq151_ms151a ); } diff --git a/src/devices/bus/iq151/ms151a.h b/src/devices/bus/iq151/ms151a.h index 1d794e1081d..56a6f39f0ef 100644 --- a/src/devices/bus/iq151/ms151a.h +++ b/src/devices/bus/iq151/ms151a.h @@ -23,7 +23,7 @@ public: iq151_ms151a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/iq151/rom.cpp b/src/devices/bus/iq151/rom.cpp index 3229e2ac2f8..3079b731820 100644 --- a/src/devices/bus/iq151/rom.cpp +++ b/src/devices/bus/iq151/rom.cpp @@ -60,7 +60,7 @@ void iq151_rom_device::device_start() // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *iq151_rom_device::device_rom_region() const +const tiny_rom_entry *iq151_rom_device::device_rom_region() const { return ROM_NAME( iq151_rom ); } diff --git a/src/devices/bus/iq151/rom.h b/src/devices/bus/iq151/rom.h index b1c5a42cc22..0c8b52fc136 100644 --- a/src/devices/bus/iq151/rom.h +++ b/src/devices/bus/iq151/rom.h @@ -24,7 +24,7 @@ public: iq151_rom_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); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/iq151/video32.cpp b/src/devices/bus/iq151/video32.cpp index 91724700a03..f3d2657c520 100644 --- a/src/devices/bus/iq151/video32.cpp +++ b/src/devices/bus/iq151/video32.cpp @@ -87,7 +87,7 @@ void iq151_video32_device::device_reset() // device_rom_region //------------------------------------------------- -const rom_entry *iq151_video32_device::device_rom_region() const +const tiny_rom_entry *iq151_video32_device::device_rom_region() const { return ROM_NAME( iq151_video32 ); } diff --git a/src/devices/bus/iq151/video32.h b/src/devices/bus/iq151/video32.h index 10937728696..08833e21e9b 100644 --- a/src/devices/bus/iq151/video32.h +++ b/src/devices/bus/iq151/video32.h @@ -24,7 +24,7 @@ public: iq151_video32_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/iq151/video64.cpp b/src/devices/bus/iq151/video64.cpp index afb7462804d..b46d7b4257e 100644 --- a/src/devices/bus/iq151/video64.cpp +++ b/src/devices/bus/iq151/video64.cpp @@ -86,7 +86,7 @@ void iq151_video64_device::device_reset() // device_rom_region //------------------------------------------------- -const rom_entry *iq151_video64_device::device_rom_region() const +const tiny_rom_entry *iq151_video64_device::device_rom_region() const { return ROM_NAME( iq151_video64 ); } diff --git a/src/devices/bus/iq151/video64.h b/src/devices/bus/iq151/video64.h index f8d6d675f45..c1cc0f8f343 100644 --- a/src/devices/bus/iq151/video64.h +++ b/src/devices/bus/iq151/video64.h @@ -24,7 +24,7 @@ public: iq151_video64_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/isa/3c505.cpp b/src/devices/bus/isa/3c505.cpp index 0e22d52fe65..c878a540315 100644 --- a/src/devices/bus/isa/3c505.cpp +++ b/src/devices/bus/isa/3c505.cpp @@ -326,7 +326,7 @@ ioport_constructor threecom3c505_device::device_input_ports() const return INPUT_PORTS_NAME( tc3c505_port ); } -const rom_entry *threecom3c505_device::device_rom_region() const +const tiny_rom_entry *threecom3c505_device::device_rom_region() const { return ROM_NAME( threecom3c505 ); } diff --git a/src/devices/bus/isa/3c505.h b/src/devices/bus/isa/3c505.h index f892d07a7f0..3b2ede78aa2 100644 --- a/src/devices/bus/isa/3c505.h +++ b/src/devices/bus/isa/3c505.h @@ -147,7 +147,7 @@ protected: // device-level overrides virtual void device_start() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; private: // device-level overrides diff --git a/src/devices/bus/isa/aga.cpp b/src/devices/bus/isa/aga.cpp index 6d065194978..0499fa40022 100644 --- a/src/devices/bus/isa/aga.cpp +++ b/src/devices/bus/isa/aga.cpp @@ -146,7 +146,7 @@ ROM_START( aga ) ROM_LOAD("50146 char d1.0 euro.u16", 0x00000, 0x02000, CRC(1305dcf5) SHA1(aca488a16ae4ff05a1f4d14574379ff49cd48343)) //D1.0 ROM_END -const rom_entry *isa8_aga_device::device_rom_region() const +const tiny_rom_entry *isa8_aga_device::device_rom_region() const { return ROM_NAME( aga ); } @@ -177,7 +177,7 @@ ROM_START( aga_pc200 ) ROM_LOAD("40109.ic159", 0x00000, 0x08000, CRC(a8b67639) SHA1(99663bfb61798526e092205575370c2ad34249a1)) ROM_END -const rom_entry *isa8_aga_pc200_device::device_rom_region() const +const tiny_rom_entry *isa8_aga_pc200_device::device_rom_region() const { return ROM_NAME( aga_pc200 ); } diff --git a/src/devices/bus/isa/aga.h b/src/devices/bus/isa/aga.h index c0c80ac29bb..f9ec0d19afe 100644 --- a/src/devices/bus/isa/aga.h +++ b/src/devices/bus/isa/aga.h @@ -43,7 +43,7 @@ public: virtual void device_start() override; // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; DECLARE_WRITE_LINE_MEMBER( hsync_changed ); @@ -110,7 +110,7 @@ public: // device-level overrides virtual void device_start() override; // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; UINT8 m_port8; UINT8 m_portd; diff --git a/src/devices/bus/isa/aha1542.cpp b/src/devices/bus/isa/aha1542.cpp index 96f28120224..51a296e2e62 100644 --- a/src/devices/bus/isa/aha1542.cpp +++ b/src/devices/bus/isa/aha1542.cpp @@ -173,7 +173,7 @@ static MACHINE_CONFIG_FRAGMENT( aha1542 ) MCFG_CPU_PROGRAM_MAP( z84c0010_mem ) MACHINE_CONFIG_END -const rom_entry *aha1542_device::device_rom_region() const +const tiny_rom_entry *aha1542_device::device_rom_region() const { return ROM_NAME( aha1542 ); } diff --git a/src/devices/bus/isa/aha1542.h b/src/devices/bus/isa/aha1542.h index ecbe2f158d2..57229a99d04 100644 --- a/src/devices/bus/isa/aha1542.h +++ b/src/devices/bus/isa/aha1542.h @@ -33,7 +33,7 @@ public: aha1542_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_READ8_MEMBER( aha1542_r ); diff --git a/src/devices/bus/isa/cga.cpp b/src/devices/bus/isa/cga.cpp index b894060b182..6a379459336 100644 --- a/src/devices/bus/isa/cga.cpp +++ b/src/devices/bus/isa/cga.cpp @@ -294,7 +294,7 @@ ioport_constructor isa8_cga_device::device_input_ports() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa8_cga_device::device_rom_region() const +const tiny_rom_entry *isa8_cga_device::device_rom_region() const { return ROM_NAME( cga ); } @@ -461,7 +461,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa8_cga_poisk2_device::device_rom_region() const +const tiny_rom_entry *isa8_cga_poisk2_device::device_rom_region() const { return ROM_NAME( cga_poisk2 ); } @@ -1561,7 +1561,7 @@ isa8_cga_pc1512_device::isa8_cga_pc1512_device(const machine_config &mconfig, co } -const rom_entry *isa8_cga_pc1512_device::device_rom_region() const +const tiny_rom_entry *isa8_cga_pc1512_device::device_rom_region() const { return nullptr; } @@ -1706,7 +1706,7 @@ ROM_START( wyse700 ) ROM_LOAD( "250212-03.f5", 0x2000, 0x2000, CRC(6930d741) SHA1(1beeb133c5e39eee9914bdc5924039d70b5edcad)) ROM_END -const rom_entry *isa8_wyse700_device::device_rom_region() const +const tiny_rom_entry *isa8_wyse700_device::device_rom_region() const { return ROM_NAME( wyse700 ); } @@ -1872,7 +1872,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa8_cga_iskr1031_device::device_rom_region() const +const tiny_rom_entry *isa8_cga_iskr1031_device::device_rom_region() const { return ROM_NAME( cga_iskr1031 ); } @@ -1897,7 +1897,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa8_cga_iskr1030m_device::device_rom_region() const +const tiny_rom_entry *isa8_cga_iskr1030m_device::device_rom_region() const { return ROM_NAME( cga_iskr1030m ); } @@ -1921,7 +1921,7 @@ ROM_START( mc1502 ) ROM_LOAD( "symgen.rom", 0x0000, 0x2000, CRC(b2747a52) SHA1(6766d275467672436e91ac2997ac6b77700eba1e)) ROM_END -const rom_entry *isa8_cga_mc1502_device::device_rom_region() const +const tiny_rom_entry *isa8_cga_mc1502_device::device_rom_region() const { return ROM_NAME( mc1502 ); } diff --git a/src/devices/bus/isa/cga.h b/src/devices/bus/isa/cga.h index 09212df65fc..de6c6841e9f 100644 --- a/src/devices/bus/isa/cga.h +++ b/src/devices/bus/isa/cga.h @@ -44,7 +44,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: required_ioport m_cga_config; @@ -114,7 +114,7 @@ public: // construction/destruction isa8_cga_poisk2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; // device type definition @@ -131,7 +131,7 @@ public: isa8_cga_pc1512_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual MC6845_UPDATE_ROW( crtc_update_row ) override; MC6845_UPDATE_ROW( pc1512_gfx_4bpp_update_row ); @@ -172,7 +172,7 @@ public: // construction/destruction isa8_wyse700_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides @@ -227,7 +227,7 @@ class isa8_cga_iskr1030m_device : public: // construction/destruction isa8_cga_iskr1030m_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; // device type definition @@ -241,7 +241,7 @@ class isa8_cga_iskr1031_device : public: // construction/destruction isa8_cga_iskr1031_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; // device type definition @@ -256,7 +256,7 @@ public: // construction/destruction isa8_cga_mc1502_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; // device type definition diff --git a/src/devices/bus/isa/dectalk.cpp b/src/devices/bus/isa/dectalk.cpp index 08641ec392c..a59d0b07b1d 100644 --- a/src/devices/bus/isa/dectalk.cpp +++ b/src/devices/bus/isa/dectalk.cpp @@ -159,7 +159,7 @@ ROM_START( dectalk_isa ) ROM_LOAD("spc_034c__2-1-92.tms320p15nl.d3.bin", 0x0000, 0x2000, CRC(d8b1201e) SHA1(4b873a5e882205fcac79a27562054b5c4d1a117c)) ROM_END -const rom_entry* dectalk_isa_device::device_rom_region() const +const tiny_rom_entry* dectalk_isa_device::device_rom_region() const { return ROM_NAME( dectalk_isa ); } diff --git a/src/devices/bus/isa/dectalk.h b/src/devices/bus/isa/dectalk.h index 2f65fc88c67..204fdffb487 100644 --- a/src/devices/bus/isa/dectalk.h +++ b/src/devices/bus/isa/dectalk.h @@ -16,7 +16,7 @@ public: dectalk_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_WRITE8_MEMBER(write); diff --git a/src/devices/bus/isa/ega.cpp b/src/devices/bus/isa/ega.cpp index bc57b61eb8f..1c0a4e78be9 100644 --- a/src/devices/bus/isa/ega.cpp +++ b/src/devices/bus/isa/ega.cpp @@ -552,7 +552,7 @@ machine_config_constructor isa8_ega_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa8_ega_device::device_rom_region() const +const tiny_rom_entry *isa8_ega_device::device_rom_region() const { return ROM_NAME( ega ); } diff --git a/src/devices/bus/isa/ega.h b/src/devices/bus/isa/ega.h index 99dac11e1aa..6c09f34214c 100644 --- a/src/devices/bus/isa/ega.h +++ b/src/devices/bus/isa/ega.h @@ -26,7 +26,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; DECLARE_READ8_MEMBER(read); diff --git a/src/devices/bus/isa/finalchs.cpp b/src/devices/bus/isa/finalchs.cpp index 222381d6435..6a41348ad78 100644 --- a/src/devices/bus/isa/finalchs.cpp +++ b/src/devices/bus/isa/finalchs.cpp @@ -121,7 +121,7 @@ void isa8_finalchs_device::device_reset() // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa8_finalchs_device::device_rom_region() const +const tiny_rom_entry *isa8_finalchs_device::device_rom_region() const { return ROM_NAME( finalchs ); } diff --git a/src/devices/bus/isa/finalchs.h b/src/devices/bus/isa/finalchs.h index b964310b6ba..b21af6000f0 100644 --- a/src/devices/bus/isa/finalchs.h +++ b/src/devices/bus/isa/finalchs.h @@ -32,7 +32,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/isa/hdc.cpp b/src/devices/bus/isa/hdc.cpp index 8c7f65c0c0d..eb1f55eb682 100644 --- a/src/devices/bus/isa/hdc.cpp +++ b/src/devices/bus/isa/hdc.cpp @@ -896,7 +896,7 @@ machine_config_constructor isa8_hdc_ec1841_device::device_mconfig_additions() co // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa8_hdc_device::device_rom_region() const +const tiny_rom_entry *isa8_hdc_device::device_rom_region() const { return ROM_NAME( hdc ); } diff --git a/src/devices/bus/isa/hdc.h b/src/devices/bus/isa/hdc.h index 994af2ea3ba..e2f3a081624 100644 --- a/src/devices/bus/isa/hdc.h +++ b/src/devices/bus/isa/hdc.h @@ -153,7 +153,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; protected: // device-level overrides diff --git a/src/devices/bus/isa/ibm_mfc.cpp b/src/devices/bus/isa/ibm_mfc.cpp index 4a715ec797a..1163023a219 100644 --- a/src/devices/bus/isa/ibm_mfc.cpp +++ b/src/devices/bus/isa/ibm_mfc.cpp @@ -433,7 +433,7 @@ ioport_constructor isa8_ibm_mfc_device::device_input_ports() const // internal ROM region //------------------------------------------------- -const rom_entry *isa8_ibm_mfc_device::device_rom_region() const +const tiny_rom_entry *isa8_ibm_mfc_device::device_rom_region() const { return ROM_NAME( ibm_mfc ); } diff --git a/src/devices/bus/isa/ibm_mfc.h b/src/devices/bus/isa/ibm_mfc.h index 3c90a0917a7..d3942365db1 100644 --- a/src/devices/bus/isa/ibm_mfc.h +++ b/src/devices/bus/isa/ibm_mfc.h @@ -60,7 +60,7 @@ protected: virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; - virtual const rom_entry* device_rom_region() const override; + virtual const tiny_rom_entry* device_rom_region() const override; private: void set_z80_interrupt(int src, int state); diff --git a/src/devices/bus/isa/mc1502_fdc.cpp b/src/devices/bus/isa/mc1502_fdc.cpp index 3df26b862fe..73f8d5bd568 100644 --- a/src/devices/bus/isa/mc1502_fdc.cpp +++ b/src/devices/bus/isa/mc1502_fdc.cpp @@ -68,7 +68,7 @@ machine_config_constructor mc1502_fdc_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *mc1502_fdc_device::device_rom_region() const +const tiny_rom_entry *mc1502_fdc_device::device_rom_region() const { return ROM_NAME( mc1502_fdc ); } diff --git a/src/devices/bus/isa/mc1502_fdc.h b/src/devices/bus/isa/mc1502_fdc.h index c254aa3b791..c01316ec1ef 100644 --- a/src/devices/bus/isa/mc1502_fdc.h +++ b/src/devices/bus/isa/mc1502_fdc.h @@ -30,7 +30,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_FLOPPY_FORMATS( floppy_formats ); TIMER_CALLBACK_MEMBER( motor_callback ); diff --git a/src/devices/bus/isa/mc1502_rom.cpp b/src/devices/bus/isa/mc1502_rom.cpp index bdf9dbc3d43..e61e2410a7e 100644 --- a/src/devices/bus/isa/mc1502_rom.cpp +++ b/src/devices/bus/isa/mc1502_rom.cpp @@ -30,7 +30,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *mc1502_rom_device::device_rom_region() const +const tiny_rom_entry *mc1502_rom_device::device_rom_region() const { return ROM_NAME( mc1502_rom ); } diff --git a/src/devices/bus/isa/mc1502_rom.h b/src/devices/bus/isa/mc1502_rom.h index d4423247991..f55911d485f 100644 --- a/src/devices/bus/isa/mc1502_rom.h +++ b/src/devices/bus/isa/mc1502_rom.h @@ -26,7 +26,7 @@ public: mc1502_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/isa/mda.cpp b/src/devices/bus/isa/mda.cpp index 739f6b677d7..aece6b1f740 100644 --- a/src/devices/bus/isa/mda.cpp +++ b/src/devices/bus/isa/mda.cpp @@ -137,7 +137,7 @@ machine_config_constructor isa8_mda_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa8_mda_device::device_rom_region() const +const tiny_rom_entry *isa8_mda_device::device_rom_region() const { return ROM_NAME( mda ); } @@ -574,7 +574,7 @@ machine_config_constructor isa8_hercules_device::device_mconfig_additions() cons // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa8_hercules_device::device_rom_region() const +const tiny_rom_entry *isa8_hercules_device::device_rom_region() const { return ROM_NAME( hercules ); } diff --git a/src/devices/bus/isa/mda.h b/src/devices/bus/isa/mda.h index c6cf72b29ad..1d987789b2b 100644 --- a/src/devices/bus/isa/mda.h +++ b/src/devices/bus/isa/mda.h @@ -27,7 +27,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_WRITE_LINE_MEMBER(hsync_changed); DECLARE_WRITE_LINE_MEMBER(vsync_changed); @@ -74,7 +74,7 @@ public: isa8_hercules_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual DECLARE_READ8_MEMBER(io_read) override; virtual DECLARE_WRITE8_MEMBER(io_write) override; diff --git a/src/devices/bus/isa/mufdc.cpp b/src/devices/bus/isa/mufdc.cpp index 24c8c3d142b..49425585e62 100644 --- a/src/devices/bus/isa/mufdc.cpp +++ b/src/devices/bus/isa/mufdc.cpp @@ -105,7 +105,7 @@ ROM_START( fdc344 ) ROM_LOAD("fdc344_42.u2", 0x0000, 0x4000, CRC(3e02567c) SHA1(b639d92435ecf2a6d4aefd3576a6955028f6bde7)) ROM_END -const rom_entry *fdc344_device::device_rom_region() const +const tiny_rom_entry *fdc344_device::device_rom_region() const { return ROM_NAME( fdc344 ); } @@ -115,7 +115,7 @@ ROM_START( fdcmag ) ROM_LOAD("magitronic_40.u2", 0x0000, 0x2000, CRC(41a5371b) SHA1(9c4443169a0b104395404274470e62b8b65efcf4)) ROM_END -const rom_entry *fdcmag_device::device_rom_region() const +const tiny_rom_entry *fdcmag_device::device_rom_region() const { return ROM_NAME( fdcmag ); } diff --git a/src/devices/bus/isa/mufdc.h b/src/devices/bus/isa/mufdc.h index 976558e90cd..abfd8965c94 100644 --- a/src/devices/bus/isa/mufdc.h +++ b/src/devices/bus/isa/mufdc.h @@ -69,7 +69,7 @@ public: // construction/destruction fdc344_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: virtual void device_config_complete() override { m_shortname = "fdc344"; } @@ -81,7 +81,7 @@ public: // construction/destruction fdcmag_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: virtual void device_config_complete() override { m_shortname = "fdcmag"; } diff --git a/src/devices/bus/isa/omti8621.cpp b/src/devices/bus/isa/omti8621.cpp index 1e019e69ddc..cdf86b0034a 100644 --- a/src/devices/bus/isa/omti8621.cpp +++ b/src/devices/bus/isa/omti8621.cpp @@ -266,12 +266,12 @@ machine_config_constructor omti8621_device::device_mconfig_additions() const return MACHINE_CONFIG_NAME( omti_disk ); } -const rom_entry *omti8621_device::device_rom_region() const +const tiny_rom_entry *omti8621_device::device_rom_region() const { return ROM_NAME( omti8621 ); } -const rom_entry *omti8621_apollo_device::device_rom_region() const +const tiny_rom_entry *omti8621_apollo_device::device_rom_region() const { // OMTI 8621 boards for Apollo workstations never use a BIOS ROM // They don't even have a socket for the BIOS ROM diff --git a/src/devices/bus/isa/omti8621.h b/src/devices/bus/isa/omti8621.h index 1084906c385..dbcd9f00103 100644 --- a/src/devices/bus/isa/omti8621.h +++ b/src/devices/bus/isa/omti8621.h @@ -54,7 +54,7 @@ protected: virtual void device_config_complete() override; virtual void device_start() override; virtual void device_reset() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; @@ -148,7 +148,7 @@ public: // get sector diskaddr of logical unit lun into data_buffer UINT32 get_sector(INT32 diskaddr, UINT8 *data_buffer, UINT32 length, UINT8 lun); protected: - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; extern const device_type ISA16_OMTI8621_APOLLO; diff --git a/src/devices/bus/isa/p1_fdc.cpp b/src/devices/bus/isa/p1_fdc.cpp index 27fe8657e26..6f6ed6b3cc0 100644 --- a/src/devices/bus/isa/p1_fdc.cpp +++ b/src/devices/bus/isa/p1_fdc.cpp @@ -78,7 +78,7 @@ machine_config_constructor p1_fdc_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *p1_fdc_device::device_rom_region() const +const tiny_rom_entry *p1_fdc_device::device_rom_region() const { return ROM_NAME( p1_fdc ); } diff --git a/src/devices/bus/isa/p1_fdc.h b/src/devices/bus/isa/p1_fdc.h index f40748085d8..495f9f559d7 100644 --- a/src/devices/bus/isa/p1_fdc.h +++ b/src/devices/bus/isa/p1_fdc.h @@ -30,7 +30,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_FLOPPY_FORMATS( floppy_formats ); DECLARE_READ8_MEMBER(p1_fdc_r); diff --git a/src/devices/bus/isa/p1_hdc.cpp b/src/devices/bus/isa/p1_hdc.cpp index bb3192f287a..a8bd565479a 100644 --- a/src/devices/bus/isa/p1_hdc.cpp +++ b/src/devices/bus/isa/p1_hdc.cpp @@ -80,7 +80,7 @@ machine_config_constructor p1_hdc_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *p1_hdc_device::device_rom_region() const +const tiny_rom_entry *p1_hdc_device::device_rom_region() const { return ROM_NAME( p1_hdc ); } diff --git a/src/devices/bus/isa/p1_hdc.h b/src/devices/bus/isa/p1_hdc.h index 7d4e0af3486..a009fdcebaf 100644 --- a/src/devices/bus/isa/p1_hdc.h +++ b/src/devices/bus/isa/p1_hdc.h @@ -30,7 +30,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/isa/p1_rom.cpp b/src/devices/bus/isa/p1_rom.cpp index 96b860bc60e..4ace5c48e41 100644 --- a/src/devices/bus/isa/p1_rom.cpp +++ b/src/devices/bus/isa/p1_rom.cpp @@ -35,7 +35,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *p1_rom_device::device_rom_region() const +const tiny_rom_entry *p1_rom_device::device_rom_region() const { return ROM_NAME( p1_rom ); } diff --git a/src/devices/bus/isa/p1_rom.h b/src/devices/bus/isa/p1_rom.h index 4d0cffcbaea..6ee2a63e755 100644 --- a/src/devices/bus/isa/p1_rom.h +++ b/src/devices/bus/isa/p1_rom.h @@ -26,7 +26,7 @@ public: p1_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/isa/pc1640_iga.cpp b/src/devices/bus/isa/pc1640_iga.cpp index 7304e96c26f..e38ed4d09d0 100644 --- a/src/devices/bus/isa/pc1640_iga.cpp +++ b/src/devices/bus/isa/pc1640_iga.cpp @@ -52,7 +52,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa8_pc1640_iga_device::device_rom_region() const +const tiny_rom_entry *isa8_pc1640_iga_device::device_rom_region() const { return ROM_NAME( pc1640_iga ); } diff --git a/src/devices/bus/isa/pc1640_iga.h b/src/devices/bus/isa/pc1640_iga.h index c0e055b7424..225b31cfdae 100644 --- a/src/devices/bus/isa/pc1640_iga.h +++ b/src/devices/bus/isa/pc1640_iga.h @@ -30,7 +30,7 @@ public: isa8_pc1640_iga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/isa/pgc.cpp b/src/devices/bus/isa/pgc.cpp index bc5563cb19c..b211765ba95 100644 --- a/src/devices/bus/isa/pgc.cpp +++ b/src/devices/bus/isa/pgc.cpp @@ -181,7 +181,7 @@ machine_config_constructor isa8_pgc_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa8_pgc_device::device_rom_region() const +const tiny_rom_entry *isa8_pgc_device::device_rom_region() const { return ROM_NAME( pgc ); } diff --git a/src/devices/bus/isa/pgc.h b/src/devices/bus/isa/pgc.h index cf83eb8ae1d..b06e87478f8 100644 --- a/src/devices/bus/isa/pgc.h +++ b/src/devices/bus/isa/pgc.h @@ -28,7 +28,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/isa/sb16.cpp b/src/devices/bus/isa/sb16.cpp index 2bc2d43c517..9378da64858 100644 --- a/src/devices/bus/isa/sb16.cpp +++ b/src/devices/bus/isa/sb16.cpp @@ -420,7 +420,7 @@ static MACHINE_CONFIG_FRAGMENT( sb16 ) MCFG_PC_JOY_ADD("pc_joy") MACHINE_CONFIG_END -const rom_entry *sb16_lle_device::device_rom_region() const +const tiny_rom_entry *sb16_lle_device::device_rom_region() const { return ROM_NAME( sb16 ); } diff --git a/src/devices/bus/isa/sb16.h b/src/devices/bus/isa/sb16.h index ff4c8a4a8f0..2d6811a5f78 100644 --- a/src/devices/bus/isa/sb16.h +++ b/src/devices/bus/isa/sb16.h @@ -25,7 +25,7 @@ public: sb16_lle_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; required_device m_dacl; diff --git a/src/devices/bus/isa/sc499.h b/src/devices/bus/isa/sc499.h index 7bbdaedfb8b..ad536a66df0 100644 --- a/src/devices/bus/isa/sc499.h +++ b/src/devices/bus/isa/sc499.h @@ -15,6 +15,8 @@ #include "emu.h" #include "bus/isa/isa.h" +#include "softlist_dev.h" + //************************************************************************** // TYPE DEFINITIONS diff --git a/src/devices/bus/isa/side116.cpp b/src/devices/bus/isa/side116.cpp index 6aeda746d5f..2212ac3844d 100644 --- a/src/devices/bus/isa/side116.cpp +++ b/src/devices/bus/isa/side116.cpp @@ -72,7 +72,7 @@ ROM_START( side116 ) ROM_LOAD("bios12.u2", 0x0000, 0x2000, CRC(c202a0e6) SHA1(a5b130a6d17c972d6c378cb2cd8113a4039631fe)) ROM_END -const rom_entry *side116_device::device_rom_region() const +const tiny_rom_entry *side116_device::device_rom_region() const { return ROM_NAME( side116 ); } diff --git a/src/devices/bus/isa/side116.h b/src/devices/bus/isa/side116.h index 1c9592de531..2d7d2e19a1a 100644 --- a/src/devices/bus/isa/side116.h +++ b/src/devices/bus/isa/side116.h @@ -34,7 +34,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); diff --git a/src/devices/bus/isa/stereo_fx.cpp b/src/devices/bus/isa/stereo_fx.cpp index fc17f2acfea..6b76e6c730f 100644 --- a/src/devices/bus/isa/stereo_fx.cpp +++ b/src/devices/bus/isa/stereo_fx.cpp @@ -122,7 +122,7 @@ static MACHINE_CONFIG_FRAGMENT( stereo_fx ) MCFG_PC_JOY_ADD("pc_joy") MACHINE_CONFIG_END -const rom_entry *stereo_fx_device::device_rom_region() const +const tiny_rom_entry *stereo_fx_device::device_rom_region() const { return ROM_NAME( stereo_fx ); } diff --git a/src/devices/bus/isa/stereo_fx.h b/src/devices/bus/isa/stereo_fx.h index 9ec059a2640..68c0888440f 100644 --- a/src/devices/bus/isa/stereo_fx.h +++ b/src/devices/bus/isa/stereo_fx.h @@ -24,7 +24,7 @@ public: stereo_fx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; required_device m_dacl; diff --git a/src/devices/bus/isa/svga_cirrus.cpp b/src/devices/bus/isa/svga_cirrus.cpp index ebe18325c26..de3ecaa8bd9 100644 --- a/src/devices/bus/isa/svga_cirrus.cpp +++ b/src/devices/bus/isa/svga_cirrus.cpp @@ -46,7 +46,7 @@ machine_config_constructor isa16_svga_cirrus_device::device_mconfig_additions() // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa16_svga_cirrus_device::device_rom_region() const +const tiny_rom_entry *isa16_svga_cirrus_device::device_rom_region() const { return ROM_NAME( dm_clgd5430 ); } @@ -132,7 +132,7 @@ machine_config_constructor isa16_svga_cirrus_gd542x_device::device_mconfig_addit // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa16_svga_cirrus_gd542x_device::device_rom_region() const +const tiny_rom_entry *isa16_svga_cirrus_gd542x_device::device_rom_region() const { return ROM_NAME( clgd542x ); } diff --git a/src/devices/bus/isa/svga_cirrus.h b/src/devices/bus/isa/svga_cirrus.h index a26e9503e1b..c46d7630285 100644 --- a/src/devices/bus/isa/svga_cirrus.h +++ b/src/devices/bus/isa/svga_cirrus.h @@ -23,7 +23,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(input_port_0_r); protected: @@ -44,7 +44,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(input_port_0_r); protected: diff --git a/src/devices/bus/isa/svga_s3.cpp b/src/devices/bus/isa/svga_s3.cpp index 98668979d61..9e37a29f55c 100644 --- a/src/devices/bus/isa/svga_s3.cpp +++ b/src/devices/bus/isa/svga_s3.cpp @@ -57,7 +57,7 @@ machine_config_constructor isa16_svga_s3_device::device_mconfig_additions() cons // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa16_svga_s3_device::device_rom_region() const +const tiny_rom_entry *isa16_svga_s3_device::device_rom_region() const { return ROM_NAME( s3_764 ); } @@ -169,7 +169,7 @@ machine_config_constructor isa16_s3virge_device::device_mconfig_additions() cons // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa16_s3virge_device::device_rom_region() const +const tiny_rom_entry *isa16_s3virge_device::device_rom_region() const { return ROM_NAME( s3virge ); } @@ -256,7 +256,7 @@ machine_config_constructor isa16_s3virgedx_device::device_mconfig_additions() co // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa16_s3virgedx_device::device_rom_region() const +const tiny_rom_entry *isa16_s3virgedx_device::device_rom_region() const { return ROM_NAME( s3virgedx ); } @@ -344,7 +344,7 @@ machine_config_constructor isa16_stealth3d2kpro_device::device_mconfig_additions // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa16_stealth3d2kpro_device::device_rom_region() const +const tiny_rom_entry *isa16_stealth3d2kpro_device::device_rom_region() const { return ROM_NAME( stealth3d2kpro ); } diff --git a/src/devices/bus/isa/svga_s3.h b/src/devices/bus/isa/svga_s3.h index fba9bfd6769..92c824e0339 100644 --- a/src/devices/bus/isa/svga_s3.h +++ b/src/devices/bus/isa/svga_s3.h @@ -26,7 +26,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(input_port_0_r); protected: @@ -48,7 +48,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(input_port_0_r); protected: @@ -69,7 +69,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(input_port_0_r); protected: @@ -90,7 +90,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(input_port_0_r); protected: diff --git a/src/devices/bus/isa/svga_trident.cpp b/src/devices/bus/isa/svga_trident.cpp index 6cf4d3d407a..e4dd7005d37 100644 --- a/src/devices/bus/isa/svga_trident.cpp +++ b/src/devices/bus/isa/svga_trident.cpp @@ -48,7 +48,7 @@ machine_config_constructor isa16_svga_tgui9680_device::device_mconfig_additions( // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa16_svga_tgui9680_device::device_rom_region() const +const tiny_rom_entry *isa16_svga_tgui9680_device::device_rom_region() const { return ROM_NAME( tgui9680 ); } diff --git a/src/devices/bus/isa/svga_trident.h b/src/devices/bus/isa/svga_trident.h index 7ce5479735b..3ee4a192d27 100644 --- a/src/devices/bus/isa/svga_trident.h +++ b/src/devices/bus/isa/svga_trident.h @@ -30,7 +30,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(input_port_0_r); protected: diff --git a/src/devices/bus/isa/svga_tseng.cpp b/src/devices/bus/isa/svga_tseng.cpp index ab0a4e9b5f7..ad5acfe9243 100644 --- a/src/devices/bus/isa/svga_tseng.cpp +++ b/src/devices/bus/isa/svga_tseng.cpp @@ -46,7 +46,7 @@ machine_config_constructor isa8_svga_et4k_device::device_mconfig_additions() con // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa8_svga_et4k_device::device_rom_region() const +const tiny_rom_entry *isa8_svga_et4k_device::device_rom_region() const { return ROM_NAME( et4000 ); } diff --git a/src/devices/bus/isa/svga_tseng.h b/src/devices/bus/isa/svga_tseng.h index 4762fed3ec0..32093785de6 100644 --- a/src/devices/bus/isa/svga_tseng.h +++ b/src/devices/bus/isa/svga_tseng.h @@ -25,7 +25,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(input_port_0_r); protected: diff --git a/src/devices/bus/isa/vga.cpp b/src/devices/bus/isa/vga.cpp index 306f1254eeb..c47b7c516fd 100644 --- a/src/devices/bus/isa/vga.cpp +++ b/src/devices/bus/isa/vga.cpp @@ -36,7 +36,7 @@ machine_config_constructor isa8_vga_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa8_vga_device::device_rom_region() const +const tiny_rom_entry *isa8_vga_device::device_rom_region() const { return ROM_NAME( ibm_vga ); } diff --git a/src/devices/bus/isa/vga.h b/src/devices/bus/isa/vga.h index 4707b3c0d61..e850e0e4929 100644 --- a/src/devices/bus/isa/vga.h +++ b/src/devices/bus/isa/vga.h @@ -25,7 +25,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(input_port_0_r); protected: diff --git a/src/devices/bus/isa/vga_ati.cpp b/src/devices/bus/isa/vga_ati.cpp index a0f1a7f2f72..0a9867964c5 100644 --- a/src/devices/bus/isa/vga_ati.cpp +++ b/src/devices/bus/isa/vga_ati.cpp @@ -123,17 +123,17 @@ machine_config_constructor isa16_vga_mach64_device::device_mconfig_additions() c // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa16_vga_gfxultra_device::device_rom_region() const +const tiny_rom_entry *isa16_vga_gfxultra_device::device_rom_region() const { return ROM_NAME( gfxultra ); } -const rom_entry *isa16_vga_gfxultrapro_device::device_rom_region() const +const tiny_rom_entry *isa16_vga_gfxultrapro_device::device_rom_region() const { return ROM_NAME( gfxultrp ); } -const rom_entry *isa16_vga_mach64_device::device_rom_region() const +const tiny_rom_entry *isa16_vga_mach64_device::device_rom_region() const { return ROM_NAME( mach64 ); } diff --git a/src/devices/bus/isa/vga_ati.h b/src/devices/bus/isa/vga_ati.h index 616667ef17b..5a400e11c24 100644 --- a/src/devices/bus/isa/vga_ati.h +++ b/src/devices/bus/isa/vga_ati.h @@ -33,7 +33,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(input_port_0_r); protected: @@ -55,7 +55,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(input_port_0_r); protected: @@ -76,7 +76,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(input_port_0_r); protected: diff --git a/src/devices/bus/isa/wd1002a_wx1.cpp b/src/devices/bus/isa/wd1002a_wx1.cpp index 29df9cec729..151418882db 100644 --- a/src/devices/bus/isa/wd1002a_wx1.cpp +++ b/src/devices/bus/isa/wd1002a_wx1.cpp @@ -31,7 +31,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa8_wd1002a_wx1_device::device_rom_region() const +const tiny_rom_entry *isa8_wd1002a_wx1_device::device_rom_region() const { return ROM_NAME( wd1002a_wx1 ); } diff --git a/src/devices/bus/isa/wd1002a_wx1.h b/src/devices/bus/isa/wd1002a_wx1.h index 86715ed367e..3bb361849d3 100644 --- a/src/devices/bus/isa/wd1002a_wx1.h +++ b/src/devices/bus/isa/wd1002a_wx1.h @@ -30,7 +30,7 @@ public: isa8_wd1002a_wx1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/isa/wdxt_gen.cpp b/src/devices/bus/isa/wdxt_gen.cpp index dd2e28202ce..f7d0523a036 100644 --- a/src/devices/bus/isa/wdxt_gen.cpp +++ b/src/devices/bus/isa/wdxt_gen.cpp @@ -81,7 +81,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *wdxt_gen_device::device_rom_region() const +const tiny_rom_entry *wdxt_gen_device::device_rom_region() const { return ROM_NAME( wdxt_gen ); } diff --git a/src/devices/bus/isa/wdxt_gen.h b/src/devices/bus/isa/wdxt_gen.h index 5185b2d8def..e1beb34267a 100644 --- a/src/devices/bus/isa/wdxt_gen.h +++ b/src/devices/bus/isa/wdxt_gen.h @@ -43,7 +43,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; // not really public DECLARE_WRITE_LINE_MEMBER( irq5_w ); diff --git a/src/devices/bus/isa/xtide.cpp b/src/devices/bus/isa/xtide.cpp index ef5fd332f47..2861484d8a1 100644 --- a/src/devices/bus/isa/xtide.cpp +++ b/src/devices/bus/isa/xtide.cpp @@ -286,7 +286,7 @@ ioport_constructor xtide_device::device_input_ports() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *xtide_device::device_rom_region() const +const tiny_rom_entry *xtide_device::device_rom_region() const { return ROM_NAME( xtide ); } diff --git a/src/devices/bus/isa/xtide.h b/src/devices/bus/isa/xtide.h index a8113ebe9db..9b5775a26c3 100644 --- a/src/devices/bus/isa/xtide.h +++ b/src/devices/bus/isa/xtide.h @@ -24,7 +24,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(read); DECLARE_WRITE8_MEMBER(write); diff --git a/src/devices/bus/kc/d004.cpp b/src/devices/bus/kc/d004.cpp index c22b5c16f9c..cab28b21297 100644 --- a/src/devices/bus/kc/d004.cpp +++ b/src/devices/bus/kc/d004.cpp @@ -192,7 +192,7 @@ machine_config_constructor kc_d004_device::device_mconfig_additions() const // device_rom_region //------------------------------------------------- -const rom_entry *kc_d004_device::device_rom_region() const +const tiny_rom_entry *kc_d004_device::device_rom_region() const { return ROM_NAME( kc_d004 ); } @@ -402,7 +402,7 @@ machine_config_constructor kc_d004_gide_device::device_mconfig_additions() const // device_rom_region //------------------------------------------------- -const rom_entry *kc_d004_gide_device::device_rom_region() const +const tiny_rom_entry *kc_d004_gide_device::device_rom_region() const { return ROM_NAME( kc_d004_gide ); } diff --git a/src/devices/bus/kc/d004.h b/src/devices/bus/kc/d004.h index ceb0a848876..d8eb1d4fad0 100644 --- a/src/devices/bus/kc/d004.h +++ b/src/devices/bus/kc/d004.h @@ -31,7 +31,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_FLOPPY_FORMATS( floppy_formats ); @@ -90,7 +90,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/kc/kc.h b/src/devices/bus/kc/kc.h index 7f9ed65f7d0..6f5e30f4943 100644 --- a/src/devices/bus/kc/kc.h +++ b/src/devices/bus/kc/kc.h @@ -11,6 +11,8 @@ #ifndef __KCEXP_H__ #define __KCEXP_H__ +#include "softlist_dev.h" + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/kc/rom.cpp b/src/devices/bus/kc/rom.cpp index 883b36eb739..8906f1cbe18 100644 --- a/src/devices/bus/kc/rom.cpp +++ b/src/devices/bus/kc/rom.cpp @@ -80,7 +80,7 @@ void kc_8k_device::device_reset() // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *kc_8k_device::device_rom_region() const +const tiny_rom_entry *kc_8k_device::device_rom_region() const { return ROM_NAME( kc_rom ); } diff --git a/src/devices/bus/kc/rom.h b/src/devices/bus/kc/rom.h index 4310b98ea3b..e5e1673058c 100644 --- a/src/devices/bus/kc/rom.h +++ b/src/devices/bus/kc/rom.h @@ -29,7 +29,7 @@ protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; // kcexp_interface overrides virtual UINT8 module_id_r() override { return 0xfb; } diff --git a/src/devices/bus/m5/slot.h b/src/devices/bus/m5/slot.h index cd12d43f3a8..27345e34a99 100644 --- a/src/devices/bus/m5/slot.h +++ b/src/devices/bus/m5/slot.h @@ -3,6 +3,9 @@ #ifndef __M5_SLOT_H #define __M5_SLOT_H +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/macpds/pds_tpdfpd.cpp b/src/devices/bus/macpds/pds_tpdfpd.cpp index a28577bfc99..6ba0b413722 100644 --- a/src/devices/bus/macpds/pds_tpdfpd.cpp +++ b/src/devices/bus/macpds/pds_tpdfpd.cpp @@ -73,7 +73,7 @@ machine_config_constructor macpds_sedisplay_device::device_mconfig_additions() c // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *macpds_sedisplay_device::device_rom_region() const +const tiny_rom_entry *macpds_sedisplay_device::device_rom_region() const { return ROM_NAME( sedisplay ); } diff --git a/src/devices/bus/macpds/pds_tpdfpd.h b/src/devices/bus/macpds/pds_tpdfpd.h index 218c30f959b..44878aa8e82 100644 --- a/src/devices/bus/macpds/pds_tpdfpd.h +++ b/src/devices/bus/macpds/pds_tpdfpd.h @@ -26,7 +26,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: diff --git a/src/devices/bus/megadrive/jcart.cpp b/src/devices/bus/megadrive/jcart.cpp index 85fb7c373b4..e3182fca414 100644 --- a/src/devices/bus/megadrive/jcart.cpp +++ b/src/devices/bus/megadrive/jcart.cpp @@ -180,14 +180,14 @@ READ16_MEMBER(md_jcart_device::read) if (m_jcart_io_data[0] & 0x40) { - joy[0] = read_safe(m_jcart3, 0); - joy[1] = read_safe(m_jcart4, 0); + joy[0] = m_jcart3.read_safe(0); + joy[1] = m_jcart4.read_safe(0); return (m_jcart_io_data[0] & 0x40) | joy[0] | (joy[1] << 8); } else { - 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); + 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); 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] = read_safe(m_jcart3, 0); - joy[1] = read_safe(m_jcart4, 0); + joy[0] = m_jcart3.read_safe(0); + joy[1] = m_jcart4.read_safe(0); return (m_jcart_io_data[0] & 0x40) | joy[0] | (joy[1] << 8); } else { - 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); + 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); 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 4a86749d991..008ae917fb5 100644 --- a/src/devices/bus/megadrive/md_slot.h +++ b/src/devices/bus/megadrive/md_slot.h @@ -3,6 +3,8 @@ #ifndef __MD_SLOT_H #define __MD_SLOT_H +#include "softlist_dev.h" + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/msx_cart/bm_012.cpp b/src/devices/bus/msx_cart/bm_012.cpp index 89430da93f2..4939d15e902 100644 --- a/src/devices/bus/msx_cart/bm_012.cpp +++ b/src/devices/bus/msx_cart/bm_012.cpp @@ -90,7 +90,7 @@ ROM_START( msx_cart_bm_012 ) ROM_END -const rom_entry *msx_cart_bm_012::device_rom_region() const +const tiny_rom_entry *msx_cart_bm_012::device_rom_region() const { return ROM_NAME( msx_cart_bm_012 ); } diff --git a/src/devices/bus/msx_cart/bm_012.h b/src/devices/bus/msx_cart/bm_012.h index 20c6c1970be..8cab8e268e9 100644 --- a/src/devices/bus/msx_cart/bm_012.h +++ b/src/devices/bus/msx_cart/bm_012.h @@ -19,7 +19,7 @@ public: // device-level overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_start() override; DECLARE_WRITE_LINE_MEMBER(midi_in); diff --git a/src/devices/bus/msx_cart/moonsound.cpp b/src/devices/bus/msx_cart/moonsound.cpp index cdae9385815..1d7371f1a9a 100644 --- a/src/devices/bus/msx_cart/moonsound.cpp +++ b/src/devices/bus/msx_cart/moonsound.cpp @@ -60,7 +60,7 @@ ROM_START( msx_cart_moonsound ) ROM_END -const rom_entry *msx_cart_moonsound::device_rom_region() const +const tiny_rom_entry *msx_cart_moonsound::device_rom_region() const { return ROM_NAME( msx_cart_moonsound ); } diff --git a/src/devices/bus/msx_cart/moonsound.h b/src/devices/bus/msx_cart/moonsound.h index d826d446ec1..0428534cda0 100644 --- a/src/devices/bus/msx_cart/moonsound.h +++ b/src/devices/bus/msx_cart/moonsound.h @@ -20,7 +20,7 @@ public: virtual void device_start() override; virtual void device_reset() override; virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_WRITE8_MEMBER(write_ymf278b_fm); DECLARE_READ8_MEMBER(read_ymf278b_fm); diff --git a/src/devices/bus/msx_cart/msx_audio.cpp b/src/devices/bus/msx_cart/msx_audio.cpp index 01ad0cd1f45..200194e31e4 100644 --- a/src/devices/bus/msx_cart/msx_audio.cpp +++ b/src/devices/bus/msx_cart/msx_audio.cpp @@ -174,7 +174,7 @@ ROM_START( msx_nms1205 ) ROM_END -const rom_entry *msx_cart_msx_audio_nms1205::device_rom_region() const +const tiny_rom_entry *msx_cart_msx_audio_nms1205::device_rom_region() const { return ROM_NAME( msx_nms1205 ); } @@ -287,7 +287,7 @@ ROM_START( msx_fsca1 ) ROM_END -const rom_entry *msx_cart_msx_audio_fsca1::device_rom_region() const +const tiny_rom_entry *msx_cart_msx_audio_fsca1::device_rom_region() const { return ROM_NAME( msx_fsca1 ); } diff --git a/src/devices/bus/msx_cart/msx_audio.h b/src/devices/bus/msx_cart/msx_audio.h index 9787d1b163b..7759a1b6908 100644 --- a/src/devices/bus/msx_cart/msx_audio.h +++ b/src/devices/bus/msx_cart/msx_audio.h @@ -42,7 +42,7 @@ public: // device-level overrides virtual void device_start() override; virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void initialize_cartridge() override; @@ -69,7 +69,7 @@ public: virtual void device_start() override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void initialize_cartridge() override; diff --git a/src/devices/bus/msx_cart/yamaha.cpp b/src/devices/bus/msx_cart/yamaha.cpp index 7abf066c3af..cec5bdd673b 100644 --- a/src/devices/bus/msx_cart/yamaha.cpp +++ b/src/devices/bus/msx_cart/yamaha.cpp @@ -82,7 +82,7 @@ ROM_START( msx_sfg01 ) ROM_END -const rom_entry *msx_cart_sfg01::device_rom_region() const +const tiny_rom_entry *msx_cart_sfg01::device_rom_region() const { return ROM_NAME( msx_sfg01 ); } @@ -94,7 +94,7 @@ ROM_START( msx_sfg05 ) ROM_END -const rom_entry *msx_cart_sfg05::device_rom_region() const +const tiny_rom_entry *msx_cart_sfg05::device_rom_region() const { return ROM_NAME( msx_sfg05 ); } diff --git a/src/devices/bus/msx_cart/yamaha.h b/src/devices/bus/msx_cart/yamaha.h index 431b55da5b5..f8897cc45be 100644 --- a/src/devices/bus/msx_cart/yamaha.h +++ b/src/devices/bus/msx_cart/yamaha.h @@ -49,7 +49,7 @@ class msx_cart_sfg01 : public msx_cart_sfg public: msx_cart_sfg01(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -58,7 +58,7 @@ class msx_cart_sfg05 : public msx_cart_sfg public: msx_cart_sfg05(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; #endif diff --git a/src/devices/bus/msx_slot/cartridge.h b/src/devices/bus/msx_slot/cartridge.h index b9e1ca5e4f7..63530699b2b 100644 --- a/src/devices/bus/msx_slot/cartridge.h +++ b/src/devices/bus/msx_slot/cartridge.h @@ -5,6 +5,7 @@ #include "slot.h" #include "bus/msx_cart/cartridge.h" +#include "softlist_dev.h" extern const device_type MSX_SLOT_CARTRIDGE; diff --git a/src/devices/bus/neogeo/slot.h b/src/devices/bus/neogeo/slot.h index 158ff77e706..83de22b0a4b 100644 --- a/src/devices/bus/neogeo/slot.h +++ b/src/devices/bus/neogeo/slot.h @@ -4,6 +4,8 @@ #define __NEOGEO_SLOT_H #include "emu.h" +#include "softlist_dev.h" + /* PCB */ enum diff --git a/src/devices/bus/nes/aladdin.cpp b/src/devices/bus/nes/aladdin.cpp index d4ff5fbdfff..6ed293dccfd 100644 --- a/src/devices/bus/nes/aladdin.cpp +++ b/src/devices/bus/nes/aladdin.cpp @@ -221,7 +221,7 @@ void nes_algq_rom_device::device_reset() m_bank_base = 0; } -const rom_entry *nes_algn_rom_device::device_rom_region() const +const tiny_rom_entry *nes_algn_rom_device::device_rom_region() const { return ROM_NAME( ade_rom ); } diff --git a/src/devices/bus/nes/aladdin.h b/src/devices/bus/nes/aladdin.h index b49ecbf964e..589fc3d87ec 100644 --- a/src/devices/bus/nes/aladdin.h +++ b/src/devices/bus/nes/aladdin.h @@ -4,6 +4,7 @@ #define __NES_ALADDIN_H #include "nxrom.h" +#include "softlist_dev.h" //---------------------------------- @@ -98,7 +99,7 @@ public: nes_algn_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual UINT8* get_cart_base(); virtual void write_prg(UINT32 offset, UINT8 data) override; diff --git a/src/devices/bus/nes/datach.cpp b/src/devices/bus/nes/datach.cpp index 2e5d42d4bbb..6e4e619c286 100644 --- a/src/devices/bus/nes/datach.cpp +++ b/src/devices/bus/nes/datach.cpp @@ -191,7 +191,7 @@ void nes_datach_rom_device::device_reset() m_bank = 0; } -const rom_entry *nes_datach_rom_device::device_rom_region() const +const tiny_rom_entry *nes_datach_rom_device::device_rom_region() const { return ROM_NAME( datach_rom ); } diff --git a/src/devices/bus/nes/datach.h b/src/devices/bus/nes/datach.h index 80157a83a5c..47c625badc7 100644 --- a/src/devices/bus/nes/datach.h +++ b/src/devices/bus/nes/datach.h @@ -4,6 +4,7 @@ #define __NES_DATACH_H #include "bandai.h" +#include "softlist_dev.h" #include "machine/i2cmem.h" #include "machine/bcreader.h" @@ -100,7 +101,7 @@ public: nes_datach_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual UINT8* get_cart_base(); protected: diff --git a/src/devices/bus/nes/disksys.cpp b/src/devices/bus/nes/disksys.cpp index bdc4862da56..d272232387d 100644 --- a/src/devices/bus/nes/disksys.cpp +++ b/src/devices/bus/nes/disksys.cpp @@ -75,7 +75,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *nes_disksys_device::device_rom_region() const +const tiny_rom_entry *nes_disksys_device::device_rom_region() const { return ROM_NAME( disksys ); } diff --git a/src/devices/bus/nes/disksys.h b/src/devices/bus/nes/disksys.h index 8fabb0a80db..35cda095114 100644 --- a/src/devices/bus/nes/disksys.h +++ b/src/devices/bus/nes/disksys.h @@ -19,7 +19,7 @@ public: virtual void device_start() override; virtual machine_config_constructor device_mconfig_additions() const override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual DECLARE_READ8_MEMBER(read_ex) override; virtual DECLARE_READ8_MEMBER(read_m) override; diff --git a/src/devices/bus/nes/karastudio.cpp b/src/devices/bus/nes/karastudio.cpp index 6bf2d109613..13366022114 100644 --- a/src/devices/bus/nes/karastudio.cpp +++ b/src/devices/bus/nes/karastudio.cpp @@ -161,7 +161,7 @@ void nes_kstudio_rom_device::device_reset() m_bank = 0; } -const rom_entry *nes_kstudio_rom_device::device_rom_region() const +const tiny_rom_entry *nes_kstudio_rom_device::device_rom_region() const { return ROM_NAME( ks_exp_rom ); } diff --git a/src/devices/bus/nes/karastudio.h b/src/devices/bus/nes/karastudio.h index e2b5ef874b5..f5d15ce6e46 100644 --- a/src/devices/bus/nes/karastudio.h +++ b/src/devices/bus/nes/karastudio.h @@ -4,6 +4,7 @@ #define __NES_KARASTUDIO_H #include "nxrom.h" +#include "softlist_dev.h" //----------------------------------------- @@ -96,7 +97,7 @@ public: nes_kstudio_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual UINT8* get_cart_base(); protected: diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h index d9b64cfa30a..27790c208e0 100644 --- a/src/devices/bus/nes/nes_slot.h +++ b/src/devices/bus/nes/nes_slot.h @@ -3,6 +3,9 @@ #ifndef __NES_SLOT_H__ #define __NES_SLOT_H__ +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/nes/sunsoft_dcs.cpp b/src/devices/bus/nes/sunsoft_dcs.cpp index 9c7635a58e5..40c9c69bff0 100644 --- a/src/devices/bus/nes/sunsoft_dcs.cpp +++ b/src/devices/bus/nes/sunsoft_dcs.cpp @@ -133,7 +133,7 @@ void nes_ntb_rom_device::device_start() m_rom = (UINT8*)memregion("ntbrom")->base(); } -const rom_entry *nes_ntb_rom_device::device_rom_region() const +const tiny_rom_entry *nes_ntb_rom_device::device_rom_region() const { return ROM_NAME( ntb_rom ); } diff --git a/src/devices/bus/nes/sunsoft_dcs.h b/src/devices/bus/nes/sunsoft_dcs.h index 04f8011d29a..2428632824a 100644 --- a/src/devices/bus/nes/sunsoft_dcs.h +++ b/src/devices/bus/nes/sunsoft_dcs.h @@ -4,6 +4,7 @@ #define __NES_SUNSOFT_DCS_H #include "sunsoft.h" +#include "softlist_dev.h" //----------------------------------------------- @@ -92,7 +93,7 @@ public: nes_ntb_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual UINT8* get_cart_base(); protected: diff --git a/src/devices/bus/newbrain/eim.cpp b/src/devices/bus/newbrain/eim.cpp index 6600d04efb1..599267b3ffb 100644 --- a/src/devices/bus/newbrain/eim.cpp +++ b/src/devices/bus/newbrain/eim.cpp @@ -56,7 +56,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *newbrain_eim_t::device_rom_region() const +const tiny_rom_entry *newbrain_eim_t::device_rom_region() const { return ROM_NAME( newbrain_eim ); } diff --git a/src/devices/bus/newbrain/eim.h b/src/devices/bus/newbrain/eim.h index d3f6c3d8a9b..2512321783a 100644 --- a/src/devices/bus/newbrain/eim.h +++ b/src/devices/bus/newbrain/eim.h @@ -35,7 +35,7 @@ public: newbrain_eim_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_READ8_MEMBER( anout_r ); diff --git a/src/devices/bus/newbrain/fdc.cpp b/src/devices/bus/newbrain/fdc.cpp index ff7bdb0b128..d4fadb9df70 100644 --- a/src/devices/bus/newbrain/fdc.cpp +++ b/src/devices/bus/newbrain/fdc.cpp @@ -58,7 +58,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *newbrain_fdc_t::device_rom_region() const +const tiny_rom_entry *newbrain_fdc_t::device_rom_region() const { return ROM_NAME( newbrain_fdc ); } @@ -80,7 +80,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( newbrain_fdc_io, AS_IO, 8, newbrain_fdc_t ) ADDRESS_MAP_UNMAP_HIGH - ADDRESS_MAP_GLOBAL_MASK(0xd1) + ADDRESS_MAP_GLOBAL_MASK(0x71) AM_RANGE(0x00, 0x01) AM_MIRROR(0x10) AM_DEVICE(UPD765_TAG, upd765a_device, map) AM_RANGE(0x20, 0x20) AM_MIRROR(0x11) AM_WRITE(fdc_auxiliary_w) AM_RANGE(0x40, 0x40) AM_MIRROR(0x11) AM_READ(fdc_control_r) diff --git a/src/devices/bus/newbrain/fdc.h b/src/devices/bus/newbrain/fdc.h index 2e4e21abbc0..fdb0e5f4fca 100644 --- a/src/devices/bus/newbrain/fdc.h +++ b/src/devices/bus/newbrain/fdc.h @@ -32,7 +32,7 @@ public: newbrain_fdc_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_WRITE_LINE_MEMBER( fdc_int_w ); diff --git a/src/devices/bus/nubus/nubus_48gc.cpp b/src/devices/bus/nubus/nubus_48gc.cpp index 74110534d93..2a60b1e5bfb 100644 --- a/src/devices/bus/nubus/nubus_48gc.cpp +++ b/src/devices/bus/nubus/nubus_48gc.cpp @@ -58,12 +58,12 @@ machine_config_constructor jmfb_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *jmfb_device::device_rom_region() const +const tiny_rom_entry *jmfb_device::device_rom_region() const { return ROM_NAME( gc48 ); } -const rom_entry *nubus_824gc_device::device_rom_region() const +const tiny_rom_entry *nubus_824gc_device::device_rom_region() const { return ROM_NAME( gc824 ); } diff --git a/src/devices/bus/nubus/nubus_48gc.h b/src/devices/bus/nubus/nubus_48gc.h index b32b057cfda..7764321ddb7 100644 --- a/src/devices/bus/nubus/nubus_48gc.h +++ b/src/devices/bus/nubus/nubus_48gc.h @@ -25,7 +25,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -60,7 +60,7 @@ class nubus_824gc_device : public jmfb_device { public: nubus_824gc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; // device type definition diff --git a/src/devices/bus/nubus/nubus_asntmc3b.cpp b/src/devices/bus/nubus/nubus_asntmc3b.cpp index 1d911055e11..da9b4e9f803 100644 --- a/src/devices/bus/nubus/nubus_asntmc3b.cpp +++ b/src/devices/bus/nubus/nubus_asntmc3b.cpp @@ -58,12 +58,12 @@ machine_config_constructor nubus_mac8390_device::device_mconfig_additions() cons // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *nubus_mac8390_device::device_rom_region() const +const tiny_rom_entry *nubus_mac8390_device::device_rom_region() const { return ROM_NAME( asntm3nb ); } -const rom_entry *nubus_appleenet_device::device_rom_region() const +const tiny_rom_entry *nubus_appleenet_device::device_rom_region() const { return ROM_NAME( appleenet ); } diff --git a/src/devices/bus/nubus/nubus_asntmc3b.h b/src/devices/bus/nubus/nubus_asntmc3b.h index 7933cc11623..0f88175df5b 100644 --- a/src/devices/bus/nubus/nubus_asntmc3b.h +++ b/src/devices/bus/nubus/nubus_asntmc3b.h @@ -25,7 +25,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; void dp_irq_w(int state); DECLARE_READ8_MEMBER(dp_mem_read); @@ -58,7 +58,7 @@ class nubus_appleenet_device : public nubus_mac8390_device { public: nubus_appleenet_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; // device type definition diff --git a/src/devices/bus/nubus/nubus_cb264.cpp b/src/devices/bus/nubus/nubus_cb264.cpp index bdc7cba85c7..04808f1520a 100644 --- a/src/devices/bus/nubus/nubus_cb264.cpp +++ b/src/devices/bus/nubus/nubus_cb264.cpp @@ -56,7 +56,7 @@ machine_config_constructor nubus_cb264_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *nubus_cb264_device::device_rom_region() const +const tiny_rom_entry *nubus_cb264_device::device_rom_region() const { return ROM_NAME( cb264 ); } diff --git a/src/devices/bus/nubus/nubus_cb264.h b/src/devices/bus/nubus/nubus_cb264.h index fe0a934d7c8..54466bb66f2 100644 --- a/src/devices/bus/nubus/nubus_cb264.h +++ b/src/devices/bus/nubus/nubus_cb264.h @@ -25,7 +25,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: diff --git a/src/devices/bus/nubus/nubus_image.cpp b/src/devices/bus/nubus/nubus_image.cpp index e3e3a29f2fa..4b7901891ff 100644 --- a/src/devices/bus/nubus/nubus_image.cpp +++ b/src/devices/bus/nubus/nubus_image.cpp @@ -158,7 +158,7 @@ machine_config_constructor nubus_image_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *nubus_image_device::device_rom_region() const +const tiny_rom_entry *nubus_image_device::device_rom_region() const { return ROM_NAME( image ); } diff --git a/src/devices/bus/nubus/nubus_image.h b/src/devices/bus/nubus/nubus_image.h index 54fe5dbb39b..1b86eed9636 100644 --- a/src/devices/bus/nubus/nubus_image.h +++ b/src/devices/bus/nubus/nubus_image.h @@ -37,7 +37,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/nubus/nubus_m2hires.cpp b/src/devices/bus/nubus/nubus_m2hires.cpp index 3cf9e5abead..98217981055 100644 --- a/src/devices/bus/nubus/nubus_m2hires.cpp +++ b/src/devices/bus/nubus/nubus_m2hires.cpp @@ -52,7 +52,7 @@ machine_config_constructor nubus_m2hires_device::device_mconfig_additions() cons // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *nubus_m2hires_device::device_rom_region() const +const tiny_rom_entry *nubus_m2hires_device::device_rom_region() const { return ROM_NAME( m2hires ); } diff --git a/src/devices/bus/nubus/nubus_m2hires.h b/src/devices/bus/nubus/nubus_m2hires.h index e11e6e1a3ff..43c805f03fa 100644 --- a/src/devices/bus/nubus/nubus_m2hires.h +++ b/src/devices/bus/nubus/nubus_m2hires.h @@ -26,7 +26,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: diff --git a/src/devices/bus/nubus/nubus_m2video.cpp b/src/devices/bus/nubus/nubus_m2video.cpp index ec4b7fb6d4c..1d8134887f8 100644 --- a/src/devices/bus/nubus/nubus_m2video.cpp +++ b/src/devices/bus/nubus/nubus_m2video.cpp @@ -53,7 +53,7 @@ machine_config_constructor nubus_m2video_device::device_mconfig_additions() cons // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *nubus_m2video_device::device_rom_region() const +const tiny_rom_entry *nubus_m2video_device::device_rom_region() const { return ROM_NAME( m2video ); } diff --git a/src/devices/bus/nubus/nubus_m2video.h b/src/devices/bus/nubus/nubus_m2video.h index 9dd7bc4a80b..f30066a408a 100644 --- a/src/devices/bus/nubus/nubus_m2video.h +++ b/src/devices/bus/nubus/nubus_m2video.h @@ -26,7 +26,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: diff --git a/src/devices/bus/nubus/nubus_radiustpd.cpp b/src/devices/bus/nubus/nubus_radiustpd.cpp index 84188fd215e..42053976689 100644 --- a/src/devices/bus/nubus/nubus_radiustpd.cpp +++ b/src/devices/bus/nubus/nubus_radiustpd.cpp @@ -52,7 +52,7 @@ machine_config_constructor nubus_radiustpd_device::device_mconfig_additions() co // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *nubus_radiustpd_device::device_rom_region() const +const tiny_rom_entry *nubus_radiustpd_device::device_rom_region() const { return ROM_NAME( radiustpd ); } diff --git a/src/devices/bus/nubus/nubus_radiustpd.h b/src/devices/bus/nubus/nubus_radiustpd.h index c8968ca30eb..a1c3bd4ac6a 100644 --- a/src/devices/bus/nubus/nubus_radiustpd.h +++ b/src/devices/bus/nubus/nubus_radiustpd.h @@ -26,7 +26,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: diff --git a/src/devices/bus/nubus/nubus_spec8.cpp b/src/devices/bus/nubus/nubus_spec8.cpp index 8b2651bcff8..fbe55114daf 100644 --- a/src/devices/bus/nubus/nubus_spec8.cpp +++ b/src/devices/bus/nubus/nubus_spec8.cpp @@ -54,7 +54,7 @@ machine_config_constructor nubus_spec8s3_device::device_mconfig_additions() cons // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *nubus_spec8s3_device::device_rom_region() const +const tiny_rom_entry *nubus_spec8s3_device::device_rom_region() const { return ROM_NAME( spec8s3 ); } diff --git a/src/devices/bus/nubus/nubus_spec8.h b/src/devices/bus/nubus/nubus_spec8.h index 57c721afde5..dfbc23324f8 100644 --- a/src/devices/bus/nubus/nubus_spec8.h +++ b/src/devices/bus/nubus/nubus_spec8.h @@ -26,7 +26,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/nubus/nubus_specpdq.cpp b/src/devices/bus/nubus/nubus_specpdq.cpp index d67ac04ef31..a7995cc1ff0 100644 --- a/src/devices/bus/nubus/nubus_specpdq.cpp +++ b/src/devices/bus/nubus/nubus_specpdq.cpp @@ -69,7 +69,7 @@ machine_config_constructor nubus_specpdq_device::device_mconfig_additions() cons // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *nubus_specpdq_device::device_rom_region() const +const tiny_rom_entry *nubus_specpdq_device::device_rom_region() const { return ROM_NAME( specpdq ); } diff --git a/src/devices/bus/nubus/nubus_specpdq.h b/src/devices/bus/nubus/nubus_specpdq.h index ef260f7512a..0638114dde1 100644 --- a/src/devices/bus/nubus/nubus_specpdq.h +++ b/src/devices/bus/nubus/nubus_specpdq.h @@ -26,7 +26,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/nubus/nubus_vikbw.cpp b/src/devices/bus/nubus/nubus_vikbw.cpp index 63b81446251..fffdd5f7c36 100644 --- a/src/devices/bus/nubus/nubus_vikbw.cpp +++ b/src/devices/bus/nubus/nubus_vikbw.cpp @@ -52,7 +52,7 @@ machine_config_constructor nubus_vikbw_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *nubus_vikbw_device::device_rom_region() const +const tiny_rom_entry *nubus_vikbw_device::device_rom_region() const { return ROM_NAME( vikbw ); } diff --git a/src/devices/bus/nubus/nubus_vikbw.h b/src/devices/bus/nubus/nubus_vikbw.h index e7a7b090eb1..c299f637878 100644 --- a/src/devices/bus/nubus/nubus_vikbw.h +++ b/src/devices/bus/nubus/nubus_vikbw.h @@ -25,7 +25,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: diff --git a/src/devices/bus/nubus/nubus_wsportrait.cpp b/src/devices/bus/nubus/nubus_wsportrait.cpp index 3fe0e4c3ec0..7a666f4ceda 100644 --- a/src/devices/bus/nubus/nubus_wsportrait.cpp +++ b/src/devices/bus/nubus/nubus_wsportrait.cpp @@ -55,7 +55,7 @@ machine_config_constructor nubus_wsportrait_device::device_mconfig_additions() c // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *nubus_wsportrait_device::device_rom_region() const +const tiny_rom_entry *nubus_wsportrait_device::device_rom_region() const { return ROM_NAME( wsportrait ); } diff --git a/src/devices/bus/nubus/nubus_wsportrait.h b/src/devices/bus/nubus/nubus_wsportrait.h index 9afdf36d8c7..1c39b5a5ec1 100644 --- a/src/devices/bus/nubus/nubus_wsportrait.h +++ b/src/devices/bus/nubus/nubus_wsportrait.h @@ -26,7 +26,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: diff --git a/src/devices/bus/nubus/pds30_30hr.cpp b/src/devices/bus/nubus/pds30_30hr.cpp index eb5550cb64e..042726dbd80 100644 --- a/src/devices/bus/nubus/pds30_30hr.cpp +++ b/src/devices/bus/nubus/pds30_30hr.cpp @@ -55,7 +55,7 @@ machine_config_constructor nubus_xceed30hr_device::device_mconfig_additions() co // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *nubus_xceed30hr_device::device_rom_region() const +const tiny_rom_entry *nubus_xceed30hr_device::device_rom_region() const { return ROM_NAME( xceed30hr ); } diff --git a/src/devices/bus/nubus/pds30_30hr.h b/src/devices/bus/nubus/pds30_30hr.h index 7cb832d4af3..569401a8070 100644 --- a/src/devices/bus/nubus/pds30_30hr.h +++ b/src/devices/bus/nubus/pds30_30hr.h @@ -26,7 +26,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: diff --git a/src/devices/bus/nubus/pds30_cb264.cpp b/src/devices/bus/nubus/pds30_cb264.cpp index b5c10671aea..8926db4e28a 100644 --- a/src/devices/bus/nubus/pds30_cb264.cpp +++ b/src/devices/bus/nubus/pds30_cb264.cpp @@ -48,7 +48,7 @@ machine_config_constructor nubus_cb264se30_device::device_mconfig_additions() co // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *nubus_cb264se30_device::device_rom_region() const +const tiny_rom_entry *nubus_cb264se30_device::device_rom_region() const { return ROM_NAME( cb264se30 ); } diff --git a/src/devices/bus/nubus/pds30_cb264.h b/src/devices/bus/nubus/pds30_cb264.h index 4932468e573..f68e7085d5f 100644 --- a/src/devices/bus/nubus/pds30_cb264.h +++ b/src/devices/bus/nubus/pds30_cb264.h @@ -26,7 +26,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: diff --git a/src/devices/bus/nubus/pds30_mc30.cpp b/src/devices/bus/nubus/pds30_mc30.cpp index 4c0e6999541..56719c0ffb0 100644 --- a/src/devices/bus/nubus/pds30_mc30.cpp +++ b/src/devices/bus/nubus/pds30_mc30.cpp @@ -51,7 +51,7 @@ machine_config_constructor nubus_xceedmc30_device::device_mconfig_additions() co // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *nubus_xceedmc30_device::device_rom_region() const +const tiny_rom_entry *nubus_xceedmc30_device::device_rom_region() const { return ROM_NAME( xceedmc30 ); } diff --git a/src/devices/bus/nubus/pds30_mc30.h b/src/devices/bus/nubus/pds30_mc30.h index b9bcc01a42a..71327a0d0d8 100644 --- a/src/devices/bus/nubus/pds30_mc30.h +++ b/src/devices/bus/nubus/pds30_mc30.h @@ -26,7 +26,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: diff --git a/src/devices/bus/nubus/pds30_procolor816.cpp b/src/devices/bus/nubus/pds30_procolor816.cpp index bb995682381..f56520fda8b 100644 --- a/src/devices/bus/nubus/pds30_procolor816.cpp +++ b/src/devices/bus/nubus/pds30_procolor816.cpp @@ -54,7 +54,7 @@ machine_config_constructor nubus_procolor816_device::device_mconfig_additions() // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *nubus_procolor816_device::device_rom_region() const +const tiny_rom_entry *nubus_procolor816_device::device_rom_region() const { return ROM_NAME( procolor816 ); } diff --git a/src/devices/bus/nubus/pds30_procolor816.h b/src/devices/bus/nubus/pds30_procolor816.h index 5dfabef5be4..a5922e4a1ed 100644 --- a/src/devices/bus/nubus/pds30_procolor816.h +++ b/src/devices/bus/nubus/pds30_procolor816.h @@ -26,7 +26,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: diff --git a/src/devices/bus/nubus/pds30_sigmalview.cpp b/src/devices/bus/nubus/pds30_sigmalview.cpp index 88eab2ffdcb..19ff5ef869f 100644 --- a/src/devices/bus/nubus/pds30_sigmalview.cpp +++ b/src/devices/bus/nubus/pds30_sigmalview.cpp @@ -48,7 +48,7 @@ machine_config_constructor nubus_lview_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *nubus_lview_device::device_rom_region() const +const tiny_rom_entry *nubus_lview_device::device_rom_region() const { return ROM_NAME( lview ); } diff --git a/src/devices/bus/nubus/pds30_sigmalview.h b/src/devices/bus/nubus/pds30_sigmalview.h index 3fe9d94f952..c5cff0f68b8 100644 --- a/src/devices/bus/nubus/pds30_sigmalview.h +++ b/src/devices/bus/nubus/pds30_sigmalview.h @@ -26,7 +26,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: diff --git a/src/devices/bus/odyssey2/slot.h b/src/devices/bus/odyssey2/slot.h index 88dde833dca..50f04e74b7e 100644 --- a/src/devices/bus/odyssey2/slot.h +++ b/src/devices/bus/odyssey2/slot.h @@ -3,6 +3,9 @@ #ifndef __O2_SLOT_H #define __O2_SLOT_H +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/odyssey2/voice.cpp b/src/devices/bus/odyssey2/voice.cpp index 338b8053f64..0f1f702a541 100644 --- a/src/devices/bus/odyssey2/voice.cpp +++ b/src/devices/bus/odyssey2/voice.cpp @@ -84,7 +84,7 @@ ROM_START( o2voice ) ROM_LOAD( "spr128-004.bin", 0x8000, 0x4000, CRC(e79dfb75) SHA1(37f33d79ffd1739d7c2f226b010a1eac28d74ca0) ) ROM_END -const rom_entry *o2_voice_device::device_rom_region() const +const tiny_rom_entry *o2_voice_device::device_rom_region() const { return ROM_NAME( o2voice ); } diff --git a/src/devices/bus/odyssey2/voice.h b/src/devices/bus/odyssey2/voice.h index 6616753238d..b841189f149 100644 --- a/src/devices/bus/odyssey2/voice.h +++ b/src/devices/bus/odyssey2/voice.h @@ -21,7 +21,7 @@ public: virtual void device_reset() override {} virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; // reading and writing virtual DECLARE_READ8_MEMBER(read_rom04) override { if (m_subslot->exists()) return m_subslot->read_rom04(space, offset); else return 0xff; } diff --git a/src/devices/bus/oricext/jasmin.cpp b/src/devices/bus/oricext/jasmin.cpp index 49034d22d16..8383fc5ddcd 100644 --- a/src/devices/bus/oricext/jasmin.cpp +++ b/src/devices/bus/oricext/jasmin.cpp @@ -74,7 +74,7 @@ void jasmin_device::device_reset() fdc->set_floppy(nullptr); } -const rom_entry *jasmin_device::device_rom_region() const +const tiny_rom_entry *jasmin_device::device_rom_region() const { return ROM_NAME( jasmin ); } diff --git a/src/devices/bus/oricext/jasmin.h b/src/devices/bus/oricext/jasmin.h index 5d27895ccfa..9befe4a2900 100644 --- a/src/devices/bus/oricext/jasmin.h +++ b/src/devices/bus/oricext/jasmin.h @@ -33,7 +33,7 @@ protected: virtual void device_start() override; virtual void device_reset() override; - const rom_entry *device_rom_region() const override; + const tiny_rom_entry *device_rom_region() const override; machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/oricext/microdisc.cpp b/src/devices/bus/oricext/microdisc.cpp index abb2ea138fd..f4b1e6f1678 100644 --- a/src/devices/bus/oricext/microdisc.cpp +++ b/src/devices/bus/oricext/microdisc.cpp @@ -73,7 +73,7 @@ void microdisc_device::device_reset() ram[0xe000] = 0x42; } -const rom_entry *microdisc_device::device_rom_region() const +const tiny_rom_entry *microdisc_device::device_rom_region() const { return ROM_NAME( microdisc ); } diff --git a/src/devices/bus/oricext/microdisc.h b/src/devices/bus/oricext/microdisc.h index 9ffc2f23f14..663e7fbf029 100644 --- a/src/devices/bus/oricext/microdisc.h +++ b/src/devices/bus/oricext/microdisc.h @@ -45,7 +45,7 @@ protected: virtual void device_start() override; virtual void device_reset() override; - const rom_entry *device_rom_region() const override; + const tiny_rom_entry *device_rom_region() const override; machine_config_constructor device_mconfig_additions() const override; void remap(); diff --git a/src/devices/bus/pc_kbd/ec1841.cpp b/src/devices/bus/pc_kbd/ec1841.cpp index 54c4d6b3a97..5e4bdcc69bd 100644 --- a/src/devices/bus/pc_kbd/ec1841.cpp +++ b/src/devices/bus/pc_kbd/ec1841.cpp @@ -55,7 +55,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *ec_1841_keyboard_device::device_rom_region() const +const tiny_rom_entry *ec_1841_keyboard_device::device_rom_region() const { return ROM_NAME( ec_1841_keyboard ); } diff --git a/src/devices/bus/pc_kbd/ec1841.h b/src/devices/bus/pc_kbd/ec1841.h index b91564cbe62..ce04dc17cd1 100644 --- a/src/devices/bus/pc_kbd/ec1841.h +++ b/src/devices/bus/pc_kbd/ec1841.h @@ -31,7 +31,7 @@ public: ec_1841_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/pc_kbd/iskr1030.cpp b/src/devices/bus/pc_kbd/iskr1030.cpp index b90fd1cef14..0b752793785 100644 --- a/src/devices/bus/pc_kbd/iskr1030.cpp +++ b/src/devices/bus/pc_kbd/iskr1030.cpp @@ -50,7 +50,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *iskr_1030_keyboard_device::device_rom_region() const +const tiny_rom_entry *iskr_1030_keyboard_device::device_rom_region() const { return ROM_NAME( iskr_1030_keyboard ); } diff --git a/src/devices/bus/pc_kbd/iskr1030.h b/src/devices/bus/pc_kbd/iskr1030.h index 8ea16a802eb..81178bbc854 100644 --- a/src/devices/bus/pc_kbd/iskr1030.h +++ b/src/devices/bus/pc_kbd/iskr1030.h @@ -32,7 +32,7 @@ public: iskr_1030_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/pc_kbd/keytro.cpp b/src/devices/bus/pc_kbd/keytro.cpp index 8dd5a4e3d5c..331ed871d09 100644 --- a/src/devices/bus/pc_kbd/keytro.cpp +++ b/src/devices/bus/pc_kbd/keytro.cpp @@ -439,7 +439,7 @@ ioport_constructor pc_kbd_keytronic_pc3270_at_device::device_input_ports() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *pc_kbd_keytronic_pc3270_device::device_rom_region() const +const tiny_rom_entry *pc_kbd_keytronic_pc3270_device::device_rom_region() const { return ROM_NAME( keytronic_pc3270 ); } diff --git a/src/devices/bus/pc_kbd/keytro.h b/src/devices/bus/pc_kbd/keytro.h index 5fdcbf72f87..98f8097fda7 100644 --- a/src/devices/bus/pc_kbd/keytro.h +++ b/src/devices/bus/pc_kbd/keytro.h @@ -29,7 +29,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual DECLARE_WRITE_LINE_MEMBER(clock_write) override; virtual DECLARE_WRITE_LINE_MEMBER(data_write) override; diff --git a/src/devices/bus/pc_kbd/msnat.cpp b/src/devices/bus/pc_kbd/msnat.cpp index 2d300841d26..c1bb29f6a7e 100644 --- a/src/devices/bus/pc_kbd/msnat.cpp +++ b/src/devices/bus/pc_kbd/msnat.cpp @@ -297,7 +297,7 @@ ioport_constructor pc_kbd_microsoft_natural_device::device_input_ports() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *pc_kbd_microsoft_natural_device::device_rom_region() const +const tiny_rom_entry *pc_kbd_microsoft_natural_device::device_rom_region() const { return ROM_NAME( microsoft_natural ); } diff --git a/src/devices/bus/pc_kbd/msnat.h b/src/devices/bus/pc_kbd/msnat.h index 600138f9479..bbcc9e26516 100644 --- a/src/devices/bus/pc_kbd/msnat.h +++ b/src/devices/bus/pc_kbd/msnat.h @@ -27,7 +27,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual DECLARE_WRITE_LINE_MEMBER(clock_write) override; virtual DECLARE_WRITE_LINE_MEMBER(data_write) override; diff --git a/src/devices/bus/pc_kbd/pc83.cpp b/src/devices/bus/pc_kbd/pc83.cpp index e79c4126c47..e65d688b1f5 100644 --- a/src/devices/bus/pc_kbd/pc83.cpp +++ b/src/devices/bus/pc_kbd/pc83.cpp @@ -39,7 +39,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *ibm_pc_83_keyboard_device::device_rom_region() const +const tiny_rom_entry *ibm_pc_83_keyboard_device::device_rom_region() const { return ROM_NAME( ibm_pc_83_keyboard ); } diff --git a/src/devices/bus/pc_kbd/pc83.h b/src/devices/bus/pc_kbd/pc83.h index b445c5b1f45..6cc8baef052 100644 --- a/src/devices/bus/pc_kbd/pc83.h +++ b/src/devices/bus/pc_kbd/pc83.h @@ -32,7 +32,7 @@ public: ibm_pc_83_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/pc_kbd/pcat84.cpp b/src/devices/bus/pc_kbd/pcat84.cpp index eeaf9494fd3..781984f77c4 100644 --- a/src/devices/bus/pc_kbd/pcat84.cpp +++ b/src/devices/bus/pc_kbd/pcat84.cpp @@ -65,7 +65,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *ibm_pc_at_84_keyboard_device::device_rom_region() const +const tiny_rom_entry *ibm_pc_at_84_keyboard_device::device_rom_region() const { return ROM_NAME( ibm_pc_at_84_keyboard ); } @@ -92,7 +92,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *ibm_3270pc_122_keyboard_device::device_rom_region() const +const tiny_rom_entry *ibm_3270pc_122_keyboard_device::device_rom_region() const { return ROM_NAME( ibm_3270pc_122_keyboard ); } diff --git a/src/devices/bus/pc_kbd/pcat84.h b/src/devices/bus/pc_kbd/pcat84.h index e099dd31760..5fe1b85316a 100644 --- a/src/devices/bus/pc_kbd/pcat84.h +++ b/src/devices/bus/pc_kbd/pcat84.h @@ -33,7 +33,7 @@ public: ibm_pc_at_84_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; @@ -100,7 +100,7 @@ public: ibm_3270pc_122_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; }; diff --git a/src/devices/bus/pc_kbd/pcxt83.cpp b/src/devices/bus/pc_kbd/pcxt83.cpp index dfbc5616b73..3838fadbb3a 100644 --- a/src/devices/bus/pc_kbd/pcxt83.cpp +++ b/src/devices/bus/pc_kbd/pcxt83.cpp @@ -61,7 +61,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *ibm_pc_xt_83_keyboard_device::device_rom_region() const +const tiny_rom_entry *ibm_pc_xt_83_keyboard_device::device_rom_region() const { return ROM_NAME( ibm_pc_xt_83_keyboard ); } diff --git a/src/devices/bus/pc_kbd/pcxt83.h b/src/devices/bus/pc_kbd/pcxt83.h index af53d6244b4..f43e33d0b28 100644 --- a/src/devices/bus/pc_kbd/pcxt83.h +++ b/src/devices/bus/pc_kbd/pcxt83.h @@ -32,7 +32,7 @@ public: ibm_pc_xt_83_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/pce/pce_slot.h b/src/devices/bus/pce/pce_slot.h index c6cb11096e1..579945229bf 100644 --- a/src/devices/bus/pce/pce_slot.h +++ b/src/devices/bus/pce/pce_slot.h @@ -3,6 +3,9 @@ #ifndef __PCE_SLOT_H #define __PCE_SLOT_H +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/pet/hsg.cpp b/src/devices/bus/pet/hsg.cpp index e22f4041a73..3fa297e7a0d 100644 --- a/src/devices/bus/pet/hsg.cpp +++ b/src/devices/bus/pet/hsg.cpp @@ -56,7 +56,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *cbm8000_hsg_t::device_rom_region() const +const tiny_rom_entry *cbm8000_hsg_t::device_rom_region() const { return ROM_NAME( cbm8000_hsg ); } diff --git a/src/devices/bus/pet/hsg.h b/src/devices/bus/pet/hsg.h index 22e328bafc1..b706124a5f1 100644 --- a/src/devices/bus/pet/hsg.h +++ b/src/devices/bus/pet/hsg.h @@ -31,7 +31,7 @@ public: cbm8000_hsg_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; // device_pet_expansion_card_interface overrides virtual int pet_norom_r(address_space &space, offs_t offset, int sel) override; diff --git a/src/devices/bus/pet/superpet.cpp b/src/devices/bus/pet/superpet.cpp index 592e50b8327..174ade45079 100644 --- a/src/devices/bus/pet/superpet.cpp +++ b/src/devices/bus/pet/superpet.cpp @@ -49,7 +49,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *superpet_device::device_rom_region() const +const tiny_rom_entry *superpet_device::device_rom_region() const { return ROM_NAME( superpet ); } diff --git a/src/devices/bus/pet/superpet.h b/src/devices/bus/pet/superpet.h index d26fbf059dd..4ec50f0d906 100644 --- a/src/devices/bus/pet/superpet.h +++ b/src/devices/bus/pet/superpet.h @@ -31,7 +31,7 @@ public: superpet_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/plus4/c1551.cpp b/src/devices/bus/plus4/c1551.cpp index 4e24bb153e9..d456580f67a 100644 --- a/src/devices/bus/plus4/c1551.cpp +++ b/src/devices/bus/plus4/c1551.cpp @@ -46,7 +46,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *c1551_t::device_rom_region() const +const tiny_rom_entry *c1551_t::device_rom_region() const { return ROM_NAME( c1551 ); } diff --git a/src/devices/bus/plus4/c1551.h b/src/devices/bus/plus4/c1551.h index af10e75daed..39fdd69b0df 100644 --- a/src/devices/bus/plus4/c1551.h +++ b/src/devices/bus/plus4/c1551.h @@ -34,7 +34,7 @@ public: c1551_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/plus4/exp.h b/src/devices/bus/plus4/exp.h index c63d2b618f1..2d18efaa207 100644 --- a/src/devices/bus/plus4/exp.h +++ b/src/devices/bus/plus4/exp.h @@ -40,7 +40,7 @@ #define __PLUS4_EXPANSION_SLOT__ #include "emu.h" - +#include "softlist_dev.h" //************************************************************************** diff --git a/src/devices/bus/plus4/sid.cpp b/src/devices/bus/plus4/sid.cpp index 5e4ffb172b1..4c100861cd6 100644 --- a/src/devices/bus/plus4/sid.cpp +++ b/src/devices/bus/plus4/sid.cpp @@ -51,7 +51,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *plus4_sid_cartridge_device::device_rom_region() const +const tiny_rom_entry *plus4_sid_cartridge_device::device_rom_region() const { return ROM_NAME( plus4_sid ); } diff --git a/src/devices/bus/plus4/sid.h b/src/devices/bus/plus4/sid.h index 0351381f478..b5980849425 100644 --- a/src/devices/bus/plus4/sid.h +++ b/src/devices/bus/plus4/sid.h @@ -33,7 +33,7 @@ public: plus4_sid_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; protected: diff --git a/src/devices/bus/pofo/ccm.cpp b/src/devices/bus/pofo/ccm.cpp new file mode 100644 index 00000000000..a28f29c7637 --- /dev/null +++ b/src/devices/bus/pofo/ccm.cpp @@ -0,0 +1,109 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Atari Portfolio Memory Card Port emulation + +**********************************************************************/ + +#include "ccm.h" + + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +const device_type PORTFOLIO_MEMORY_CARD_SLOT = &device_creator; + + + +//************************************************************************** +// CARD INTERFACE +//************************************************************************** + +//------------------------------------------------- +// device_portfolio_memory_card_slot_interface - constructor +//------------------------------------------------- + +device_portfolio_memory_card_slot_interface::device_portfolio_memory_card_slot_interface(const machine_config &mconfig, device_t &device) : + device_slot_card_interface(mconfig, device), + m_rom(*this, "rom"), + m_nvram(*this, "nvram") +{ + m_slot = dynamic_cast(device.owner()); +} + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// portfolio_memory_card_slot_t - constructor +//------------------------------------------------- + +portfolio_memory_card_slot_t::portfolio_memory_card_slot_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, PORTFOLIO_MEMORY_CARD_SLOT, "Atari Portfolio memory card port", tag, owner, clock, "portfolio_ccm_slot", __FILE__), + device_slot_interface(mconfig, *this), + device_image_interface(mconfig, *this), + m_card(nullptr) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void portfolio_memory_card_slot_t::device_start() +{ + m_card = dynamic_cast(get_card_device()); +} + + +//------------------------------------------------- +// call_load - +//------------------------------------------------- + +image_init_result portfolio_memory_card_slot_t::call_load() +{ + if (m_card) + { + if (software_entry() == nullptr) + { + fread(m_card->m_rom, length()); + } + else + { + load_software_region("rom", m_card->m_rom); + } + } + + return image_init_result::PASS; +} + + +//------------------------------------------------- +// get_default_card_software - +//------------------------------------------------- + +std::string portfolio_memory_card_slot_t::get_default_card_software() +{ + return software_get_default_slot("rom"); +} + + +//------------------------------------------------- +// SLOT_INTERFACE( portfolio_memory_cards ) +//------------------------------------------------- + +// slot devices +#include "ram.h" +#include "rom.h" + +SLOT_INTERFACE_START( portfolio_memory_cards ) + SLOT_INTERFACE("ram", PORTFOLIO_RAM_CARD) + SLOT_INTERFACE("rom", PORTFOLIO_ROM_CARD) +SLOT_INTERFACE_END diff --git a/src/devices/bus/pofo/ccm.h b/src/devices/bus/pofo/ccm.h new file mode 100644 index 00000000000..4f8f87c873f --- /dev/null +++ b/src/devices/bus/pofo/ccm.h @@ -0,0 +1,156 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Atari Portfolio Memory Card port emulation + +********************************************************************** + + Pin COMMON RAM OPTROM Mask ROM + 32k 64k 128k + 1 A16 + 2 A15 + 3 VBB VPP NC VPP NC + 4 A12 + 5 A7 + 6 A6 + 7 A5 + 8 A4 + 9 A3 + 10 A2 + 11 A1 + 12 A0 + 13 D0 + 14 D1 + 15 D2 + 16 GND + 17 D3 + 18 D4 + 19 D5 + 20 D6 + 21 D7 + 22 CE + 23 A10 + 24 OE OE OE/VPP OE OE + 25 A11 + 26 A9 + 27 A8 + 28 A13 + 29 A14 + 30 WE NC NC PGM NC + 31 VCC + 32 CDET + +**********************************************************************/ + +#pragma once + +#ifndef __PORTFOLIO_MEMORY_CARD_SLOT__ +#define __PORTFOLIO_MEMORY_CARD_SLOT__ + +#include "emu.h" +#include "softlist_dev.h" + + + +//************************************************************************** +// CONSTANTS +//************************************************************************** + +#define PORTFOLIO_MEMORY_CARD_SLOT_A_TAG "ccma" +#define PORTFOLIO_MEMORY_CARD_SLOT_B_TAG "ccmb" + + + +//************************************************************************** +// INTERFACE CONFIGURATION MACROS +//************************************************************************** + +#define MCFG_PORTFOLIO_MEMORY_CARD_SLOT_ADD(_tag, _slot_intf, _def_slot) \ + MCFG_DEVICE_ADD(_tag, PORTFOLIO_MEMORY_CARD_SLOT, 0) \ + MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> device_portfolio_memory_card_slot_interface + +class portfolio_memory_card_slot_t; + +class device_portfolio_memory_card_slot_interface : public device_slot_card_interface +{ + friend class portfolio_memory_card_slot_t; + +public: + // construction/destruction + device_portfolio_memory_card_slot_interface(const machine_config &mconfig, device_t &device); + virtual ~device_portfolio_memory_card_slot_interface() { } + + virtual bool cdet() { return 1; } + + virtual UINT8 nrdi_r(address_space &space, offs_t offset) { return 0xff; }; + virtual void nwri_w(address_space &space, offs_t offset, UINT8 data) { }; + +protected: + optional_shared_ptr m_rom; + optional_shared_ptr m_nvram; + + portfolio_memory_card_slot_t *m_slot; +}; + + +// ======================> portfolio_memory_card_slot_t + +class portfolio_memory_card_slot_t : public device_t, + public device_slot_interface, + public device_image_interface +{ +public: + // construction/destruction + portfolio_memory_card_slot_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual ~portfolio_memory_card_slot_t() { } + + // computer interface + bool cdet_r() { return (m_card != nullptr) ? m_card->cdet() : 1; } + + DECLARE_READ8_MEMBER( nrdi_r ) { return (m_card != nullptr) ? m_card->nrdi_r(space, offset) : 0xff; } + DECLARE_WRITE8_MEMBER( nwri_w ) { if (m_card != nullptr) m_card->nwri_w(space, offset, data); } + +protected: + // device-level overrides + virtual void device_config_complete() override { update_names(); } + virtual void device_start() override; + + // image-level overrides + virtual image_init_result call_load() override; + virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } + + virtual iodevice_t image_type() const override { return IO_CARTSLOT; } + + virtual bool is_readable() const override { return 1; } + virtual bool is_writeable() const override { return 1; } + virtual bool is_creatable() const override { return 1; } + virtual bool must_be_loaded() const override { return 0; } + virtual bool is_reset_on_load() const override { return 1; } + virtual const char *image_interface() const override { return "pofo_card"; } + virtual const char *file_extensions() const override { return "rom,bin"; } + + // slot interface overrides + virtual std::string get_default_card_software() override; + + device_portfolio_memory_card_slot_interface *m_card; +}; + + +// device type definition +extern const device_type PORTFOLIO_MEMORY_CARD_SLOT; + + +SLOT_INTERFACE_EXTERN( portfolio_memory_cards ); + + + +#endif diff --git a/src/devices/bus/pofo/exp.cpp b/src/devices/bus/pofo/exp.cpp index 98b411990bf..ce7adb0d1fb 100644 --- a/src/devices/bus/pofo/exp.cpp +++ b/src/devices/bus/pofo/exp.cpp @@ -96,8 +96,11 @@ void portfolio_expansion_slot_t::device_reset() // slot devices #include "hpc101.h" #include "hpc102.h" +#include "hpc104.h" SLOT_INTERFACE_START( portfolio_expansion_cards ) SLOT_INTERFACE("lpt", HPC101) SLOT_INTERFACE("uart", HPC102) + SLOT_INTERFACE("ram", HPC104) + SLOT_INTERFACE("ram2", HPC104_2) SLOT_INTERFACE_END diff --git a/src/devices/bus/pofo/hpc104.cpp b/src/devices/bus/pofo/hpc104.cpp new file mode 100644 index 00000000000..5483fc72c2b --- /dev/null +++ b/src/devices/bus/pofo/hpc104.cpp @@ -0,0 +1,241 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Atari Portfolio HPC-104 Memory Expander Plus emulation + +**********************************************************************/ + +#include "hpc104.h" + + + +//************************************************************************** +// MACROS / CONSTANTS +//************************************************************************** + +#define LOG 0 + + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type HPC104 = &device_creator; +const device_type HPC104_2 = &device_creator; + + +//------------------------------------------------- +// MACHINE_CONFIG_FRAGMENT( hpc104 ) +//------------------------------------------------- + +static MACHINE_CONFIG_FRAGMENT( hpc104 ) + MCFG_PORTFOLIO_MEMORY_CARD_SLOT_ADD(PORTFOLIO_MEMORY_CARD_SLOT_B_TAG, portfolio_memory_cards, nullptr) + + MCFG_PORTFOLIO_EXPANSION_SLOT_ADD(PORTFOLIO_EXPANSION_SLOT_TAG, XTAL_4_9152MHz, portfolio_expansion_cards, nullptr) + MCFG_PORTFOLIO_EXPANSION_SLOT_IINT_CALLBACK(DEVWRITELINE(DEVICE_SELF_OWNER, portfolio_expansion_slot_t, iint_w)) + MCFG_PORTFOLIO_EXPANSION_SLOT_EINT_CALLBACK(DEVWRITELINE(DEVICE_SELF_OWNER, portfolio_expansion_slot_t, eint_w)) + MCFG_PORTFOLIO_EXPANSION_SLOT_NMIO_CALLBACK(DEVWRITELINE(DEVICE_SELF_OWNER, portfolio_expansion_slot_t, nmio_w)) + MCFG_PORTFOLIO_EXPANSION_SLOT_WAKE_CALLBACK(DEVWRITELINE(DEVICE_SELF_OWNER, portfolio_expansion_slot_t, wake_w)) +MACHINE_CONFIG_END + + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor hpc104_t::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( hpc104 ); +} + + +//------------------------------------------------- +// INPUT_PORTS( hpc104 ) +//------------------------------------------------- + +static INPUT_PORTS_START( hpc104 ) + PORT_START("SW1") + PORT_DIPNAME( 0x01, 0x00, "Unit Number" ) + PORT_DIPSETTING( 0x00, "1 (0x1F000)" ) + PORT_DIPSETTING( 0x01, "2 (0x5F000)" ) +INPUT_PORTS_END + + +//------------------------------------------------- +// input_ports - device-specific input ports +//------------------------------------------------- + +ioport_constructor hpc104_t::device_input_ports() const +{ + return INPUT_PORTS_NAME( hpc104 ); +} + + +//------------------------------------------------- +// INPUT_PORTS( hpc104_2 ) +//------------------------------------------------- + +static INPUT_PORTS_START( hpc104_2 ) + PORT_START("SW1") + PORT_DIPNAME( 0x01, 0x01, "Unit Number" ) + PORT_DIPSETTING( 0x00, "1 (0x1F000)" ) + PORT_DIPSETTING( 0x01, "2 (0x5F000)" ) +INPUT_PORTS_END + + +//------------------------------------------------- +// input_ports - device-specific input ports +//------------------------------------------------- + +ioport_constructor hpc104_2_t::device_input_ports() const +{ + return INPUT_PORTS_NAME( hpc104_2 ); +} + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// hpc104_t - constructor +//------------------------------------------------- + +hpc104_t::hpc104_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : + device_t(mconfig, type, name, tag, owner, clock, shortname, source), + device_portfolio_expansion_slot_interface(mconfig, *this), + device_nvram_interface(mconfig, *this), + m_ccm(*this, PORTFOLIO_MEMORY_CARD_SLOT_B_TAG), + m_exp(*this, PORTFOLIO_EXPANSION_SLOT_TAG), + m_nvram(*this, "nvram"), + m_io_sw1(*this, "SW1") +{ +} + +hpc104_t::hpc104_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, HPC104, "Atari Portfolio HPC-104", tag, owner, clock, "hpc104", __FILE__), + device_portfolio_expansion_slot_interface(mconfig, *this), + device_nvram_interface(mconfig, *this), + m_ccm(*this, PORTFOLIO_MEMORY_CARD_SLOT_B_TAG), + m_exp(*this, PORTFOLIO_EXPANSION_SLOT_TAG), + m_nvram(*this, "nvram"), + m_io_sw1(*this, "SW1") +{ +} + + +//------------------------------------------------- +// hpc104_2_t - constructor +//------------------------------------------------- + +hpc104_2_t::hpc104_2_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + hpc104_t(mconfig, HPC104_2, "Atari Portfolio HPC-104 (Unit 2)", tag, owner, clock, "hpc104_2", __FILE__) { } + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void hpc104_t::device_start() +{ + // allocate memory + m_nvram.allocate(0x40000); +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void hpc104_t::device_reset() +{ + m_sw1 = BIT(m_io_sw1->read(), 0); +} + + +//------------------------------------------------- +// nrdi_r - read +//------------------------------------------------- + +UINT8 hpc104_t::nrdi_r(address_space &space, offs_t offset, UINT8 data, bool iom, bool bcom, bool ncc1) +{ + data = m_exp->nrdi_r(space, offset, data, iom, bcom, m_ncc1_out || ncc1); + + if (!iom) + { + if (!(!m_ncc1_out || ncc1)) + { + if (LOG) logerror("%s %s CCM0 read %05x\n", machine().time().as_string(), machine().describe_context(), offset & 0x1ffff); + + data = m_ccm->nrdi_r(space, offset & 0x1ffff); + } + + if (m_sw1) + { + if (offset >= 0x5f000 && offset < 0x9f000) + { + data = m_nvram[offset - 0x5f000]; + } + } + else + { + if (offset >= 0x1f000 && offset < 0x5f000) + { + data = m_nvram[offset - 0x1f000] = data; + } + } + } + + return data; +} + + +//------------------------------------------------- +// nwri_w - write +//------------------------------------------------- + +void hpc104_t::nwri_w(address_space &space, offs_t offset, UINT8 data, bool iom, bool bcom, bool ncc1) +{ + m_exp->nwri_w(space, offset, data, iom, bcom, m_ncc1_out || ncc1); + + if (!iom) + { + if (!(!m_ncc1_out || ncc1)) + { + if (LOG) logerror("%s %s CCM1 write %05x:%02x\n", machine().time().as_string(), machine().describe_context(), offset & 0x1ffff, data); + + m_ccm->nwri_w(space, offset & 0x1ffff, data); + } + + if (m_sw1) + { + if (offset >= 0x5f000 && offset < 0x9f000) + { + m_nvram[offset - 0x5f000] = data; + } + } + else + { + if (offset >= 0x1f000 && offset < 0x5f000) + { + m_nvram[offset - 0x1f000] = data; + } + } + } + else + { + if (!bcom) + { + if ((offset & 0x0f) == 0x0c) + { + m_ncc1_out = BIT(data, 0); + + if (LOG) logerror("NCC1 out %u\n", machine().time().as_string(), machine().describe_context(), m_ncc1_out); + } + } + } +} diff --git a/src/devices/bus/pofo/hpc104.h b/src/devices/bus/pofo/hpc104.h new file mode 100644 index 00000000000..9d930c21347 --- /dev/null +++ b/src/devices/bus/pofo/hpc104.h @@ -0,0 +1,86 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Atari Portfolio HPC-104 Memory Expander Plus emulation + +**********************************************************************/ + +#pragma once + +#ifndef __HPC104__ +#define __HPC104__ + +#include "emu.h" +#include "exp.h" +#include "bus/pofo/ccm.h" +#include "machine/nvram.h" + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> hpc104_t + +class hpc104_t : public device_t, + public device_portfolio_expansion_slot_interface, + public device_nvram_interface +{ +public: + // construction/destruction + hpc104_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + hpc104_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // optional information overrides + virtual machine_config_constructor device_mconfig_additions() const override; + virtual ioport_constructor device_input_ports() const override; + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + + // device_nvram_interface overrides + virtual void nvram_default() override { } + virtual void nvram_read(emu_file &file) override { if (m_nvram != nullptr) { file.read(m_nvram, m_nvram.bytes()); } } + virtual void nvram_write(emu_file &file) override { if (m_nvram != nullptr) { file.write(m_nvram, m_nvram.bytes()); } } + + // device_portfolio_expansion_slot_interface overrides + virtual bool nmd1() override { return m_ccm->cdet_r(); } + + virtual UINT8 nrdi_r(address_space &space, offs_t offset, UINT8 data, bool iom, bool bcom, bool ncc1) override; + virtual void nwri_w(address_space &space, offs_t offset, UINT8 data, bool iom, bool bcom, bool ncc1) override; + +private: + required_device m_ccm; + required_device m_exp; + optional_shared_ptr m_nvram; + required_ioport m_io_sw1; + + bool m_sw1; + bool m_ncc1_out; +}; + + +// ======================> hpc104_2_t + +class hpc104_2_t : public hpc104_t +{ +public: + // construction/destruction + hpc104_2_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // optional information overrides + virtual ioport_constructor device_input_ports() const override; +}; + + +// device type definition +extern const device_type HPC104; +extern const device_type HPC104_2; + + + +#endif diff --git a/src/devices/bus/pofo/ram.cpp b/src/devices/bus/pofo/ram.cpp new file mode 100644 index 00000000000..e1fdce1b7ad --- /dev/null +++ b/src/devices/bus/pofo/ram.cpp @@ -0,0 +1,63 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Atari Portfolio 128KB RAM card emulation + +**********************************************************************/ + +#include "ram.h" + + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type PORTFOLIO_RAM_CARD = &device_creator; + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// portfolio_ram_card_t - constructor +//------------------------------------------------- + +portfolio_ram_card_t::portfolio_ram_card_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, PORTFOLIO_RAM_CARD, "Atari Portfolio RAM card", tag, owner, clock, "portfolio_ram_card", __FILE__), + device_portfolio_memory_card_slot_interface(mconfig, *this), + device_nvram_interface(mconfig, *this) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void portfolio_ram_card_t::device_start() +{ + m_nvram.allocate(0x20000); +} + + +//------------------------------------------------- +// nrdi_r - read +//------------------------------------------------- + +UINT8 portfolio_ram_card_t::nrdi_r(address_space &space, offs_t offset) +{ + return m_nvram[offset]; +} + + +//------------------------------------------------- +// nwri_w - write +//------------------------------------------------- + +void portfolio_ram_card_t::nwri_w(address_space &space, offs_t offset, UINT8 data) +{ + m_nvram[offset] = data; +} diff --git a/src/devices/bus/pofo/ram.h b/src/devices/bus/pofo/ram.h new file mode 100644 index 00000000000..77af70f33be --- /dev/null +++ b/src/devices/bus/pofo/ram.h @@ -0,0 +1,56 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Atari Portfolio 128KB RAM card emulation + +**********************************************************************/ + +#pragma once + +#ifndef __PORTFOLIO_RAM_CARD__ +#define __PORTFOLIO_RAM_CARD__ + +#include "emu.h" +#include "ccm.h" +#include "machine/nvram.h" + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> portfolio_ram_card_t + +class portfolio_ram_card_t : public device_t, + public device_portfolio_memory_card_slot_interface, + public device_nvram_interface +{ +public: + // construction/destruction + portfolio_ram_card_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + +protected: + // device-level overrides + virtual void device_start() override; + + // device_nvram_interface overrides + virtual void nvram_default() override { } + virtual void nvram_read(emu_file &file) override { if (m_nvram != nullptr) { file.read(m_nvram, m_nvram.bytes()); } } + virtual void nvram_write(emu_file &file) override { if (m_nvram != nullptr) { file.write(m_nvram, m_nvram.bytes()); } } + + // device_portfolio_memory_card_slot_interface overrides + virtual bool cdet() override { return 0; } + + virtual UINT8 nrdi_r(address_space &space, offs_t offset) override; + virtual void nwri_w(address_space &space, offs_t offset, UINT8 data) override; +}; + + +// device type definition +extern const device_type PORTFOLIO_RAM_CARD; + + + +#endif diff --git a/src/devices/bus/pofo/rom.cpp b/src/devices/bus/pofo/rom.cpp new file mode 100644 index 00000000000..fbc4c5961b5 --- /dev/null +++ b/src/devices/bus/pofo/rom.cpp @@ -0,0 +1,51 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Atari Portfolio ROM card emulation + +**********************************************************************/ + +#include "rom.h" + + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type PORTFOLIO_ROM_CARD = &device_creator; + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// portfolio_rom_card_t - constructor +//------------------------------------------------- + +portfolio_rom_card_t::portfolio_rom_card_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, PORTFOLIO_ROM_CARD, "Atari Portfolio ROM card", tag, owner, clock, "portfolio_rom_card", __FILE__), + device_portfolio_memory_card_slot_interface(mconfig, *this) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void portfolio_rom_card_t::device_start() +{ +} + + +//------------------------------------------------- +// nrdi_r - read +//------------------------------------------------- + +UINT8 portfolio_rom_card_t::nrdi_r(address_space &space, offs_t offset) +{ + return m_rom[offset]; +} diff --git a/src/devices/bus/pofo/rom.h b/src/devices/bus/pofo/rom.h new file mode 100644 index 00000000000..48503fef58b --- /dev/null +++ b/src/devices/bus/pofo/rom.h @@ -0,0 +1,48 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Atari Portfolio ROM card emulation + +**********************************************************************/ + +#pragma once + +#ifndef __PORTFOLIO_ROM_CARD__ +#define __PORTFOLIO_ROM_CARD__ + +#include "emu.h" +#include "ccm.h" + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> portfolio_rom_card_t + +class portfolio_rom_card_t : public device_t, + public device_portfolio_memory_card_slot_interface +{ +public: + // construction/destruction + portfolio_rom_card_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + +protected: + // device-level overrides + virtual void device_start() override; + + // device_portfolio_memory_card_slot_interface overrides + virtual bool cdet() override { return 0; } + + virtual UINT8 nrdi_r(address_space &space, offs_t offset) override; +}; + + +// device type definition +extern const device_type PORTFOLIO_ROM_CARD; + + + +#endif diff --git a/src/devices/bus/ql/cst_q_plus4.cpp b/src/devices/bus/ql/cst_q_plus4.cpp index 5b6d94f2a9d..27273687d65 100644 --- a/src/devices/bus/ql/cst_q_plus4.cpp +++ b/src/devices/bus/ql/cst_q_plus4.cpp @@ -39,7 +39,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *cst_q_plus4_t::device_rom_region() const +const tiny_rom_entry *cst_q_plus4_t::device_rom_region() const { return ROM_NAME( cst_q_plus4 ); } diff --git a/src/devices/bus/ql/cst_q_plus4.h b/src/devices/bus/ql/cst_q_plus4.h index eba0f3ac712..691e1b24281 100644 --- a/src/devices/bus/ql/cst_q_plus4.h +++ b/src/devices/bus/ql/cst_q_plus4.h @@ -30,7 +30,7 @@ public: cst_q_plus4_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_WRITE_LINE_MEMBER( exp1_extintl_w ) { m_exp1_extinl = state; update_extintl(); } diff --git a/src/devices/bus/ql/cst_qdisc.cpp b/src/devices/bus/ql/cst_qdisc.cpp index f9fdcf26e04..8ba128b3d9b 100644 --- a/src/devices/bus/ql/cst_qdisc.cpp +++ b/src/devices/bus/ql/cst_qdisc.cpp @@ -35,7 +35,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *cst_ql_disc_interface_t::device_rom_region() const +const tiny_rom_entry *cst_ql_disc_interface_t::device_rom_region() const { return ROM_NAME( cst_ql_disc_interface ); } diff --git a/src/devices/bus/ql/cst_qdisc.h b/src/devices/bus/ql/cst_qdisc.h index d2ddae10b2e..c272f345b6b 100644 --- a/src/devices/bus/ql/cst_qdisc.h +++ b/src/devices/bus/ql/cst_qdisc.h @@ -29,7 +29,7 @@ public: cst_ql_disc_interface_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/ql/cumana_fdi.cpp b/src/devices/bus/ql/cumana_fdi.cpp index 91259f0db43..ed868f985e2 100644 --- a/src/devices/bus/ql/cumana_fdi.cpp +++ b/src/devices/bus/ql/cumana_fdi.cpp @@ -35,7 +35,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *cumana_floppy_disk_interface_t::device_rom_region() const +const tiny_rom_entry *cumana_floppy_disk_interface_t::device_rom_region() const { return ROM_NAME( cumana_floppy_disk_interface ); } diff --git a/src/devices/bus/ql/cumana_fdi.h b/src/devices/bus/ql/cumana_fdi.h index 9ac1b9ba01e..4425560d604 100644 --- a/src/devices/bus/ql/cumana_fdi.h +++ b/src/devices/bus/ql/cumana_fdi.h @@ -29,7 +29,7 @@ public: cumana_floppy_disk_interface_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/ql/kempston_di.cpp b/src/devices/bus/ql/kempston_di.cpp index c69c129e2e9..de6c30ac2e8 100644 --- a/src/devices/bus/ql/kempston_di.cpp +++ b/src/devices/bus/ql/kempston_di.cpp @@ -33,7 +33,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *kempston_disk_interface_t::device_rom_region() const +const tiny_rom_entry *kempston_disk_interface_t::device_rom_region() const { return ROM_NAME( kempston_disk_system ); } diff --git a/src/devices/bus/ql/kempston_di.h b/src/devices/bus/ql/kempston_di.h index 041bdc65544..19e68ce864d 100644 --- a/src/devices/bus/ql/kempston_di.h +++ b/src/devices/bus/ql/kempston_di.h @@ -29,7 +29,7 @@ public: kempston_disk_interface_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/ql/miracle_gold_card.cpp b/src/devices/bus/ql/miracle_gold_card.cpp index 3e25f43e0a6..31a566b3944 100644 --- a/src/devices/bus/ql/miracle_gold_card.cpp +++ b/src/devices/bus/ql/miracle_gold_card.cpp @@ -35,7 +35,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *miracle_gold_card_t::device_rom_region() const +const tiny_rom_entry *miracle_gold_card_t::device_rom_region() const { return ROM_NAME( miracle_gold_card ); } diff --git a/src/devices/bus/ql/miracle_gold_card.h b/src/devices/bus/ql/miracle_gold_card.h index 176f7556fdf..a92abc790e2 100644 --- a/src/devices/bus/ql/miracle_gold_card.h +++ b/src/devices/bus/ql/miracle_gold_card.h @@ -29,7 +29,7 @@ public: miracle_gold_card_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/ql/miracle_hd.cpp b/src/devices/bus/ql/miracle_hd.cpp index b181fc48918..3de4d0360d0 100644 --- a/src/devices/bus/ql/miracle_hd.cpp +++ b/src/devices/bus/ql/miracle_hd.cpp @@ -33,7 +33,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *miracle_hard_disk_t::device_rom_region() const +const tiny_rom_entry *miracle_hard_disk_t::device_rom_region() const { return ROM_NAME( miracle_hard_disk ); } diff --git a/src/devices/bus/ql/miracle_hd.h b/src/devices/bus/ql/miracle_hd.h index c4aeaa6d74b..9881f6769f3 100644 --- a/src/devices/bus/ql/miracle_hd.h +++ b/src/devices/bus/ql/miracle_hd.h @@ -29,7 +29,7 @@ public: miracle_hard_disk_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/ql/mp_fdi.cpp b/src/devices/bus/ql/mp_fdi.cpp index d23542ab8f4..72543005cb3 100644 --- a/src/devices/bus/ql/mp_fdi.cpp +++ b/src/devices/bus/ql/mp_fdi.cpp @@ -33,7 +33,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *micro_peripherals_floppy_disk_interface_t::device_rom_region() const +const tiny_rom_entry *micro_peripherals_floppy_disk_interface_t::device_rom_region() const { return ROM_NAME( micro_peripherals_floppy_disk_interface ); } diff --git a/src/devices/bus/ql/mp_fdi.h b/src/devices/bus/ql/mp_fdi.h index 57681f30d28..14dc4087d6d 100644 --- a/src/devices/bus/ql/mp_fdi.h +++ b/src/devices/bus/ql/mp_fdi.h @@ -29,7 +29,7 @@ public: micro_peripherals_floppy_disk_interface_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/ql/opd_basic_master.cpp b/src/devices/bus/ql/opd_basic_master.cpp index fa20bf4f5eb..58bc110f433 100644 --- a/src/devices/bus/ql/opd_basic_master.cpp +++ b/src/devices/bus/ql/opd_basic_master.cpp @@ -31,7 +31,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *opd_basic_master_t::device_rom_region() const +const tiny_rom_entry *opd_basic_master_t::device_rom_region() const { return ROM_NAME( opd_basic_master ); } diff --git a/src/devices/bus/ql/opd_basic_master.h b/src/devices/bus/ql/opd_basic_master.h index 16608210cf2..ec0a92869ca 100644 --- a/src/devices/bus/ql/opd_basic_master.h +++ b/src/devices/bus/ql/opd_basic_master.h @@ -29,7 +29,7 @@ public: opd_basic_master_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/ql/pcml_qdisk.cpp b/src/devices/bus/ql/pcml_qdisk.cpp index b5d534f68d7..0dd88363660 100644 --- a/src/devices/bus/ql/pcml_qdisk.cpp +++ b/src/devices/bus/ql/pcml_qdisk.cpp @@ -33,7 +33,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *pcml_q_disk_interface_t::device_rom_region() const +const tiny_rom_entry *pcml_q_disk_interface_t::device_rom_region() const { return ROM_NAME( pcml_q_disk_interface ); } diff --git a/src/devices/bus/ql/pcml_qdisk.h b/src/devices/bus/ql/pcml_qdisk.h index 29a011b7455..6348a7d5fd6 100644 --- a/src/devices/bus/ql/pcml_qdisk.h +++ b/src/devices/bus/ql/pcml_qdisk.h @@ -29,7 +29,7 @@ public: pcml_q_disk_interface_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/ql/qubide.cpp b/src/devices/bus/ql/qubide.cpp index 9241321bcac..418eea3ea81 100644 --- a/src/devices/bus/ql/qubide.cpp +++ b/src/devices/bus/ql/qubide.cpp @@ -81,7 +81,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *qubide_t::device_rom_region() const +const tiny_rom_entry *qubide_t::device_rom_region() const { return ROM_NAME( qubide ); } diff --git a/src/devices/bus/ql/qubide.h b/src/devices/bus/ql/qubide.h index f8a363b55a2..4ccb043847c 100644 --- a/src/devices/bus/ql/qubide.h +++ b/src/devices/bus/ql/qubide.h @@ -30,7 +30,7 @@ public: qubide_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/ql/rom.h b/src/devices/bus/ql/rom.h index 606ffe4e67b..5649804df66 100644 --- a/src/devices/bus/ql/rom.h +++ b/src/devices/bus/ql/rom.h @@ -31,7 +31,7 @@ #define __QL_ROM_CARTRIDGE_SLOT__ #include "emu.h" - +#include "softlist_dev.h" //************************************************************************** diff --git a/src/devices/bus/ql/sandy_superdisk.cpp b/src/devices/bus/ql/sandy_superdisk.cpp index c4bdb1bfdf4..48d269fa68e 100644 --- a/src/devices/bus/ql/sandy_superdisk.cpp +++ b/src/devices/bus/ql/sandy_superdisk.cpp @@ -41,7 +41,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *sandy_super_disk_t::device_rom_region() const +const tiny_rom_entry *sandy_super_disk_t::device_rom_region() const { return ROM_NAME( sandy_super_disk ); } diff --git a/src/devices/bus/ql/sandy_superdisk.h b/src/devices/bus/ql/sandy_superdisk.h index 408c3430695..56efeafab6a 100644 --- a/src/devices/bus/ql/sandy_superdisk.h +++ b/src/devices/bus/ql/sandy_superdisk.h @@ -32,7 +32,7 @@ public: sandy_super_disk_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; WRITE_LINE_MEMBER( busy_w ); diff --git a/src/devices/bus/ql/sandy_superqboard.cpp b/src/devices/bus/ql/sandy_superqboard.cpp index 0508b835982..03b9a09c92c 100644 --- a/src/devices/bus/ql/sandy_superqboard.cpp +++ b/src/devices/bus/ql/sandy_superqboard.cpp @@ -53,7 +53,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *sandy_superqboard_t::device_rom_region() const +const tiny_rom_entry *sandy_superqboard_t::device_rom_region() const { return ROM_NAME( sandy_superqboard ); } diff --git a/src/devices/bus/ql/sandy_superqboard.h b/src/devices/bus/ql/sandy_superqboard.h index 286e224f962..5aefdc250ed 100644 --- a/src/devices/bus/ql/sandy_superqboard.h +++ b/src/devices/bus/ql/sandy_superqboard.h @@ -33,7 +33,7 @@ public: sandy_superqboard_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int ram_size); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; WRITE_LINE_MEMBER( busy_w ); diff --git a/src/devices/bus/ql/trumpcard.cpp b/src/devices/bus/ql/trumpcard.cpp index cd2a829c3b8..c4c334efed0 100644 --- a/src/devices/bus/ql/trumpcard.cpp +++ b/src/devices/bus/ql/trumpcard.cpp @@ -56,7 +56,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *ql_trump_card_t::device_rom_region() const +const tiny_rom_entry *ql_trump_card_t::device_rom_region() const { return ROM_NAME( ql_trump_card ); } diff --git a/src/devices/bus/ql/trumpcard.h b/src/devices/bus/ql/trumpcard.h index d8675a8459c..21ec7109712 100644 --- a/src/devices/bus/ql/trumpcard.h +++ b/src/devices/bus/ql/trumpcard.h @@ -32,7 +32,7 @@ public: ql_trump_card_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int ram_size); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_FLOPPY_FORMATS( floppy_formats ); diff --git a/src/devices/bus/s100/dj2db.cpp b/src/devices/bus/s100/dj2db.cpp index ca144a8f82a..2d068245c47 100644 --- a/src/devices/bus/s100/dj2db.cpp +++ b/src/devices/bus/s100/dj2db.cpp @@ -53,7 +53,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *s100_dj2db_device::device_rom_region() const +const tiny_rom_entry *s100_dj2db_device::device_rom_region() const { return ROM_NAME( dj2db ); } diff --git a/src/devices/bus/s100/dj2db.h b/src/devices/bus/s100/dj2db.h index a8504cee1cf..725b2f3144a 100644 --- a/src/devices/bus/s100/dj2db.h +++ b/src/devices/bus/s100/dj2db.h @@ -32,7 +32,7 @@ public: s100_dj2db_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/s100/djdma.cpp b/src/devices/bus/s100/djdma.cpp index c0d93aed2f5..0d75e497040 100644 --- a/src/devices/bus/s100/djdma.cpp +++ b/src/devices/bus/s100/djdma.cpp @@ -48,7 +48,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *s100_djdma_device::device_rom_region() const +const tiny_rom_entry *s100_djdma_device::device_rom_region() const { return ROM_NAME( djdma ); } diff --git a/src/devices/bus/s100/djdma.h b/src/devices/bus/s100/djdma.h index e1ac5d2d95d..a21e717493c 100644 --- a/src/devices/bus/s100/djdma.h +++ b/src/devices/bus/s100/djdma.h @@ -32,7 +32,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/s100/mm65k16s.cpp b/src/devices/bus/s100/mm65k16s.cpp index 22240dd789a..1a6af3c4c89 100644 --- a/src/devices/bus/s100/mm65k16s.cpp +++ b/src/devices/bus/s100/mm65k16s.cpp @@ -42,7 +42,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *s100_mm65k16s_device::device_rom_region() const +const tiny_rom_entry *s100_mm65k16s_device::device_rom_region() const { return ROM_NAME( mm65k16s ); } diff --git a/src/devices/bus/s100/mm65k16s.h b/src/devices/bus/s100/mm65k16s.h index 7a9c50ad1aa..c8ec89af58c 100644 --- a/src/devices/bus/s100/mm65k16s.h +++ b/src/devices/bus/s100/mm65k16s.h @@ -30,7 +30,7 @@ public: s100_mm65k16s_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; protected: diff --git a/src/devices/bus/s100/nsmdsa.cpp b/src/devices/bus/s100/nsmdsa.cpp index 91fb4f46135..d892c1931e7 100644 --- a/src/devices/bus/s100/nsmdsa.cpp +++ b/src/devices/bus/s100/nsmdsa.cpp @@ -36,7 +36,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *s100_mds_a_device::device_rom_region() const +const tiny_rom_entry *s100_mds_a_device::device_rom_region() const { return ROM_NAME( mds_a ); } diff --git a/src/devices/bus/s100/nsmdsa.h b/src/devices/bus/s100/nsmdsa.h index bdf170fb869..3eb7f4049e4 100644 --- a/src/devices/bus/s100/nsmdsa.h +++ b/src/devices/bus/s100/nsmdsa.h @@ -31,7 +31,7 @@ public: s100_mds_a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; protected: diff --git a/src/devices/bus/s100/nsmdsad.cpp b/src/devices/bus/s100/nsmdsad.cpp index d1a06407c6d..191c265cf59 100644 --- a/src/devices/bus/s100/nsmdsad.cpp +++ b/src/devices/bus/s100/nsmdsad.cpp @@ -37,7 +37,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *s100_mds_ad_device::device_rom_region() const +const tiny_rom_entry *s100_mds_ad_device::device_rom_region() const { return ROM_NAME( mds_ad ); } diff --git a/src/devices/bus/s100/nsmdsad.h b/src/devices/bus/s100/nsmdsad.h index 0f524af48bd..105a526b0a6 100644 --- a/src/devices/bus/s100/nsmdsad.h +++ b/src/devices/bus/s100/nsmdsad.h @@ -31,7 +31,7 @@ public: s100_mds_ad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; protected: diff --git a/src/devices/bus/saturn/sat_slot.h b/src/devices/bus/saturn/sat_slot.h index af16ecbdeaa..f87ce9bf0d3 100644 --- a/src/devices/bus/saturn/sat_slot.h +++ b/src/devices/bus/saturn/sat_slot.h @@ -3,6 +3,9 @@ #ifndef __SAT_SLOT_H #define __SAT_SLOT_H +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/scsi/omti5100.cpp b/src/devices/bus/scsi/omti5100.cpp index 9dd436f4acb..c2c56ff5175 100644 --- a/src/devices/bus/scsi/omti5100.cpp +++ b/src/devices/bus/scsi/omti5100.cpp @@ -17,7 +17,7 @@ ROM_START( omti5100 ) ROM_LOAD("100240-N.7a", 0x0000, 0x1000, CRC(d227d6cb) SHA1(3d6140764d3d043428c941826370ebf1597c63bd)) ROM_END -const rom_entry *omti5100_device::device_rom_region() const +const tiny_rom_entry *omti5100_device::device_rom_region() const { return ROM_NAME( omti5100 ); } diff --git a/src/devices/bus/scsi/s1410.cpp b/src/devices/bus/scsi/s1410.cpp index dba1e0bb7fd..eaeaf51d461 100644 --- a/src/devices/bus/scsi/s1410.cpp +++ b/src/devices/bus/scsi/s1410.cpp @@ -122,7 +122,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *s1410_device::device_rom_region() const +const tiny_rom_entry *s1410_device::device_rom_region() const { return ROM_NAME( s1410 ); } diff --git a/src/devices/bus/scsi/s1410.h b/src/devices/bus/scsi/s1410.h index 519c013b066..c17d6e349ed 100644 --- a/src/devices/bus/scsi/s1410.h +++ b/src/devices/bus/scsi/s1410.h @@ -20,7 +20,7 @@ public: s1410_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual void ExecCommand() override; diff --git a/src/devices/bus/scsi/sa1403d.cpp b/src/devices/bus/scsi/sa1403d.cpp index 1abe47e0805..1e8e3a512cf 100644 --- a/src/devices/bus/scsi/sa1403d.cpp +++ b/src/devices/bus/scsi/sa1403d.cpp @@ -46,7 +46,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *sa1403d_device::device_rom_region() const +const tiny_rom_entry *sa1403d_device::device_rom_region() const { return ROM_NAME( sa1403d ); } diff --git a/src/devices/bus/scsi/sa1403d.h b/src/devices/bus/scsi/sa1403d.h index 308be3b5b48..3241b0aa782 100644 --- a/src/devices/bus/scsi/sa1403d.h +++ b/src/devices/bus/scsi/sa1403d.h @@ -21,7 +21,7 @@ public: sa1403d_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/scv/slot.h b/src/devices/bus/scv/slot.h index 1d921f8d607..cbf87dd7d06 100644 --- a/src/devices/bus/scv/slot.h +++ b/src/devices/bus/scv/slot.h @@ -3,6 +3,9 @@ #ifndef __SCV_SLOT_H #define __SCV_SLOT_H +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/sega8/sega8_slot.h b/src/devices/bus/sega8/sega8_slot.h index d27e993f0f7..5a0ce0af010 100644 --- a/src/devices/bus/sega8/sega8_slot.h +++ b/src/devices/bus/sega8/sega8_slot.h @@ -3,6 +3,9 @@ #ifndef __SEGA8_SLOT_H #define __SEGA8_SLOT_H +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/sg1000_exp/sk1100.cpp b/src/devices/bus/sg1000_exp/sk1100.cpp index aee9e3c09f7..b6c2e037748 100644 --- a/src/devices/bus/sg1000_exp/sk1100.cpp +++ b/src/devices/bus/sg1000_exp/sk1100.cpp @@ -104,6 +104,9 @@ static INPUT_PORTS_START( sk1100_keys ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START("PA7") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) // keyboard disabled + PORT_START("PB0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -134,6 +137,9 @@ static INPUT_PORTS_START( sk1100_keys ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("GRAPH") PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(LALT)) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL)) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) + + PORT_START("PB7") + PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) // keyboard disabled INPUT_PORTS_END @@ -185,20 +191,8 @@ sega_sk1100_device::sega_sk1100_device(const machine_config &mconfig, const char device_sg1000_expansion_slot_interface(mconfig, *this), m_cassette(*this, "cassette"), m_ppi(*this, UPD9255_0_TAG), - m_pa0(*this, "PA0"), - m_pa1(*this, "PA1"), - m_pa2(*this, "PA2"), - m_pa3(*this, "PA3"), - m_pa4(*this, "PA4"), - m_pa5(*this, "PA5"), - m_pa6(*this, "PA6"), - m_pb0(*this, "PB0"), - m_pb1(*this, "PB1"), - m_pb2(*this, "PB2"), - m_pb3(*this, "PB3"), - m_pb4(*this, "PB4"), - m_pb5(*this, "PB5"), - m_pb6(*this, "PB6"), + m_pa(*this, {"PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7"}), + m_pb(*this, {"PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7"}), m_keylatch(0) { } @@ -210,24 +204,6 @@ sega_sk1100_device::sega_sk1100_device(const machine_config &mconfig, const char void sega_sk1100_device::device_start() { - // find keyboard rows - m_key_row[0] = m_pa0; - m_key_row[1] = m_pa1; - m_key_row[2] = m_pa2; - m_key_row[3] = m_pa3; - m_key_row[4] = m_pa4; - m_key_row[5] = m_pa5; - m_key_row[6] = m_pa6; - m_key_row[7] = nullptr; // keyboard disabled - m_key_row[8] = m_pb0; - m_key_row[9] = m_pb1; - m_key_row[10] = m_pb2; - m_key_row[11] = m_pb3; - m_key_row[12] = m_pb4; - m_key_row[13] = m_pb5; - m_key_row[14] = m_pb6; - m_key_row[15] = nullptr; // keyboard disabled - /* register for state saving */ save_item(NAME(m_keylatch)); } @@ -278,7 +254,7 @@ READ8_MEMBER( sega_sk1100_device::ppi_pa_r ) PA7 Keyboard input */ - return m_key_row[m_keylatch]->read(); + return m_pa[m_keylatch]->read(); } READ8_MEMBER( sega_sk1100_device::ppi_pb_r ) @@ -297,7 +273,7 @@ READ8_MEMBER( sega_sk1100_device::ppi_pb_r ) */ /* keyboard */ - UINT8 data = m_key_row[m_keylatch + 8]->read(); + UINT8 data = m_pb[m_keylatch]->read(); /* cartridge contact */ data |= 0x10; diff --git a/src/devices/bus/sg1000_exp/sk1100.h b/src/devices/bus/sg1000_exp/sk1100.h index 80cabb3f30d..8ee058e9d5e 100644 --- a/src/devices/bus/sg1000_exp/sk1100.h +++ b/src/devices/bus/sg1000_exp/sk1100.h @@ -54,23 +54,10 @@ protected: virtual bool is_readable(UINT8 offset) override; private: - ioport_port* m_key_row[16]; required_device m_cassette; required_device m_ppi; - required_ioport m_pa0; - required_ioport m_pa1; - required_ioport m_pa2; - required_ioport m_pa3; - required_ioport m_pa4; - required_ioport m_pa5; - required_ioport m_pa6; - required_ioport m_pb0; - required_ioport m_pb1; - required_ioport m_pb2; - required_ioport m_pb3; - required_ioport m_pb4; - required_ioport m_pb5; - required_ioport m_pb6; + required_ioport_array<8> m_pa; + required_ioport_array<8> m_pb; /* keyboard state */ UINT8 m_keylatch; diff --git a/src/devices/bus/snes/snes_slot.h b/src/devices/bus/snes/snes_slot.h index 7ebfefaa7f2..f6d4208eb1c 100644 --- a/src/devices/bus/snes/snes_slot.h +++ b/src/devices/bus/snes/snes_slot.h @@ -3,6 +3,9 @@ #ifndef __SNS_SLOT_H #define __SNS_SLOT_H +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/snes/upd.cpp b/src/devices/bus/snes/upd.cpp index 056f462e2fa..611b84f6610 100644 --- a/src/devices/bus/snes/upd.cpp +++ b/src/devices/bus/snes/upd.cpp @@ -525,42 +525,42 @@ ROM_START( snes_st011 ) ROM_LOAD( "st011.bin", 0, 0x11000, CRC(34d2952c) SHA1(1375b8c1efc8cae4962b57dfe22f6b78e1ddacc8) ) ROM_END -const rom_entry *sns_rom20_necdsp1_legacy_device::device_rom_region() const +const tiny_rom_entry *sns_rom20_necdsp1_legacy_device::device_rom_region() const { return ROM_NAME( snes_dsp1 ); } -const rom_entry *sns_rom20_necdsp1b_legacy_device::device_rom_region() const +const tiny_rom_entry *sns_rom20_necdsp1b_legacy_device::device_rom_region() const { return ROM_NAME( snes_dsp1b ); } -const rom_entry *sns_rom20_necdsp2_legacy_device::device_rom_region() const +const tiny_rom_entry *sns_rom20_necdsp2_legacy_device::device_rom_region() const { return ROM_NAME( snes_dsp2 ); } -const rom_entry *sns_rom20_necdsp3_legacy_device::device_rom_region() const +const tiny_rom_entry *sns_rom20_necdsp3_legacy_device::device_rom_region() const { return ROM_NAME( snes_dsp3 ); } -const rom_entry *sns_rom20_necdsp4_legacy_device::device_rom_region() const +const tiny_rom_entry *sns_rom20_necdsp4_legacy_device::device_rom_region() const { return ROM_NAME( snes_dsp4 ); } -const rom_entry *sns_rom21_necdsp1_legacy_device::device_rom_region() const +const tiny_rom_entry *sns_rom21_necdsp1_legacy_device::device_rom_region() const { return ROM_NAME( snes_dsp1 ); } -const rom_entry *sns_rom_seta10dsp_legacy_device::device_rom_region() const +const tiny_rom_entry *sns_rom_seta10dsp_legacy_device::device_rom_region() const { return ROM_NAME( snes_st010 ); } -const rom_entry *sns_rom_seta11dsp_legacy_device::device_rom_region() const +const tiny_rom_entry *sns_rom_seta11dsp_legacy_device::device_rom_region() const { return ROM_NAME( snes_st011 ); } diff --git a/src/devices/bus/snes/upd.h b/src/devices/bus/snes/upd.h index 815b5b2a42c..653ee71d9e4 100644 --- a/src/devices/bus/snes/upd.h +++ b/src/devices/bus/snes/upd.h @@ -131,7 +131,7 @@ public: // device-level overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; class sns_rom20_necdsp1b_legacy_device : public sns_rom20_necdsp_device @@ -142,7 +142,7 @@ public: // device-level overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; class sns_rom20_necdsp2_legacy_device : public sns_rom20_necdsp_device @@ -153,7 +153,7 @@ public: // device-level overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; class sns_rom20_necdsp3_legacy_device : public sns_rom20_necdsp_device @@ -164,7 +164,7 @@ public: // device-level overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; class sns_rom20_necdsp4_legacy_device : public sns_rom20_necdsp_device @@ -175,7 +175,7 @@ public: // device-level overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; class sns_rom21_necdsp1_legacy_device : public sns_rom21_necdsp_device @@ -186,7 +186,7 @@ public: // device-level overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; class sns_rom_seta10dsp_legacy_device : public sns_rom_setadsp_device @@ -197,7 +197,7 @@ public: // device-level overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; class sns_rom_seta11dsp_legacy_device : public sns_rom_setadsp_device @@ -208,7 +208,7 @@ public: // device-level overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; extern const device_type SNS_LOROM_NECDSP1_LEG; diff --git a/src/devices/bus/spc1000/fdd.cpp b/src/devices/bus/spc1000/fdd.cpp index 40c5496b873..5e624862e23 100644 --- a/src/devices/bus/spc1000/fdd.cpp +++ b/src/devices/bus/spc1000/fdd.cpp @@ -114,7 +114,7 @@ ROM_END // device_rom_region //------------------------------------------------- -const rom_entry *spc1000_fdd_exp_device::device_rom_region() const +const tiny_rom_entry *spc1000_fdd_exp_device::device_rom_region() const { return ROM_NAME( spc1000_fdd ); } diff --git a/src/devices/bus/spc1000/fdd.h b/src/devices/bus/spc1000/fdd.h index ea8366770b0..51c53d74f1f 100644 --- a/src/devices/bus/spc1000/fdd.h +++ b/src/devices/bus/spc1000/fdd.h @@ -23,7 +23,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; public: // device-level overrides diff --git a/src/devices/bus/svi3x8/expander/sv603.cpp b/src/devices/bus/svi3x8/expander/sv603.cpp index ccfa2efc2c7..f6baca7d2ac 100644 --- a/src/devices/bus/svi3x8/expander/sv603.cpp +++ b/src/devices/bus/svi3x8/expander/sv603.cpp @@ -25,7 +25,7 @@ ROM_START( sv603 ) ROM_LOAD("sv603.ic10", 0x0000, 0x2000, CRC(19e91b82) SHA1(8a30abe5ffef810b0f99b86db38b1b3c9d259b78)) ROM_END -const rom_entry *sv603_device::device_rom_region() const +const tiny_rom_entry *sv603_device::device_rom_region() const { return ROM_NAME( sv603 ); } diff --git a/src/devices/bus/svi3x8/expander/sv603.h b/src/devices/bus/svi3x8/expander/sv603.h index 1045d6e3567..eb58a51b003 100644 --- a/src/devices/bus/svi3x8/expander/sv603.h +++ b/src/devices/bus/svi3x8/expander/sv603.h @@ -39,7 +39,7 @@ public: DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cartridge); protected: - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/svi3x8/slot/sv806.cpp b/src/devices/bus/svi3x8/slot/sv806.cpp index 4cce2deaec4..87f35b268f7 100644 --- a/src/devices/bus/svi3x8/slot/sv806.cpp +++ b/src/devices/bus/svi3x8/slot/sv806.cpp @@ -27,7 +27,7 @@ ROM_START( sv806 ) ROMX_LOAD("sv806se.ic27", 0x0000, 0x1000, CRC(daea8956) SHA1(3f16d5513ad35692488ae7d864f660e76c6e8ed3), ROM_BIOS(2)) ROM_END -const rom_entry *sv806_device::device_rom_region() const +const tiny_rom_entry *sv806_device::device_rom_region() const { return ROM_NAME( sv806 ); } diff --git a/src/devices/bus/svi3x8/slot/sv806.h b/src/devices/bus/svi3x8/slot/sv806.h index 4782faa4812..2a3071ed8ec 100644 --- a/src/devices/bus/svi3x8/slot/sv806.h +++ b/src/devices/bus/svi3x8/slot/sv806.h @@ -36,7 +36,7 @@ public: MC6845_UPDATE_ROW(crtc_update_row); protected: - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual void device_start() override; diff --git a/src/devices/bus/ti99_peb/bwg.cpp b/src/devices/bus/ti99_peb/bwg.cpp index 18d295c21de..5587c931b6e 100644 --- a/src/devices/bus/ti99_peb/bwg.cpp +++ b/src/devices/bus/ti99_peb/bwg.cpp @@ -85,10 +85,15 @@ */ snug_bwg_device::snug_bwg_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : ti_expansion_card_device(mconfig, TI99_BWG, "SNUG BwG Floppy Controller", tag, owner, clock, "ti99_bwg", __FILE__), m_DRQ(), m_IRQ(), m_dip1(0), m_dip2(0), m_dip34(0), m_ram_page(0), m_rom_page(0), m_WAITena(false), m_inDsrArea(false), m_WDsel(false), m_WDsel0(false), m_RTCsel(false), m_lastK(false), m_dataregLB(false), m_rtc_enabled(false), m_MOTOR_ON(), m_lastval(0), m_address(0), m_DSEL(0), m_SIDSEL(), m_motor_on_timer(nullptr), m_dsrrom(nullptr), m_buffer_ram(nullptr), m_current_floppy(nullptr), - m_wd1773(*this, FDC_TAG), - m_clock(*this, CLOCK_TAG), m_debug_dataout(false) - { } + : ti_expansion_card_device(mconfig, TI99_BWG, "SNUG BwG Floppy Controller", tag, owner, clock, "ti99_bwg", __FILE__), + m_DRQ(), m_IRQ(), m_dip1(0), m_dip2(0), m_dip34(0), m_ram_page(0), + m_rom_page(0), m_WAITena(false), m_inDsrArea(false), m_WDsel(false), + m_WDsel0(false), m_RTCsel(false), m_lastK(false), m_dataregLB(false), + m_rtc_enabled(false), m_MOTOR_ON(), m_lastval(0), m_address(0), + m_DSEL(0), m_SIDSEL(), m_motor_on_timer(nullptr), m_dsrrom(nullptr), + m_buffer_ram(*this, BUFFER), m_current_floppy(nullptr), + m_wd1773(*this, FDC_TAG), + m_clock(*this, CLOCK_TAG), m_debug_dataout(false) { } /* Operate the wait state logic. @@ -189,7 +194,7 @@ void snug_bwg_device::debug_read(offs_t offset, UINT8* value) if ((offset & 0x1c00)==0x1c00) { if ((offset & 0x1fe0)!=0x1fe0) - *value = m_buffer_ram[(m_ram_page<<10) | (offset & 0x03ff)]; + *value = m_buffer_ram->pointer()[(m_ram_page<<10) | (offset & 0x03ff)]; } else *value = m_dsrrom[(m_rom_page<<13) | (offset & 0x1fff)]; @@ -201,7 +206,7 @@ void snug_bwg_device::debug_write(offs_t offset, UINT8 data) if (((offset & m_select_mask)==m_select_value) && m_selected) { if (((offset & 0x1c00)==0x1c00) && ((offset & 0x1fe0)!=0x1fe0)) - m_buffer_ram[(m_ram_page<<10) | (m_address & 0x03ff)] = data; + m_buffer_ram->pointer()[(m_ram_page<<10) | (m_address & 0x03ff)] = data; } } @@ -233,7 +238,7 @@ READ8Z_MEMBER(snug_bwg_device::readz) } else { - *value = m_buffer_ram[(m_ram_page<<10) | (m_address & 0x03ff)]; + *value = m_buffer_ram->pointer()[(m_ram_page<<10) | (m_address & 0x03ff)]; if (TRACE_RW) logerror("bwg: read ram: %04x (page %d)-> %02x\n", m_address & 0xffff, m_ram_page, *value); } } @@ -254,7 +259,7 @@ READ8Z_MEMBER(snug_bwg_device::readz) } else { - *value = m_buffer_ram[(m_ram_page<<10) | (m_address & 0x03ff)]; + *value = m_buffer_ram->pointer()[(m_ram_page<<10) | (m_address & 0x03ff)]; if (TRACE_RW) logerror("bwg: read ram: %04x (page %d)-> %02x\n", m_address & 0xffff, m_ram_page, *value); } } @@ -302,7 +307,7 @@ WRITE8_MEMBER(snug_bwg_device::write) else { if (TRACE_RW) logerror("bwg: write ram: %04x (page %d) <- %02x\n", m_address & 0xffff, m_ram_page, data); - m_buffer_ram[(m_ram_page<<10) | (m_address & 0x03ff)] = data; + m_buffer_ram->pointer()[(m_ram_page<<10) | (m_address & 0x03ff)] = data; } } else @@ -318,7 +323,7 @@ WRITE8_MEMBER(snug_bwg_device::write) else { if (TRACE_RW) logerror("bwg: write ram: %04x (page %d) <- %02x\n", m_address & 0xffff, m_ram_page, data); - m_buffer_ram[(m_ram_page<<10) | (m_address & 0x03ff)] = data; + m_buffer_ram->pointer()[(m_ram_page<<10) | (m_address & 0x03ff)] = data; } } } @@ -558,7 +563,6 @@ void snug_bwg_device::device_start(void) { logerror("bwg: BWG start\n"); m_dsrrom = memregion(DSRROM)->base(); - m_buffer_ram = memregion(BUFFER)->base(); m_motor_on_timer = timer_alloc(MOTOR_TIMER); m_cru_base = 0x1100; } @@ -678,13 +682,15 @@ MACHINE_CONFIG_FRAGMENT( bwg_fdc ) MCFG_FLOPPY_DRIVE_SOUND(true) MCFG_FLOPPY_DRIVE_ADD("3", bwg_floppies, nullptr, snug_bwg_device::floppy_formats) MCFG_FLOPPY_DRIVE_SOUND(true) + + MCFG_RAM_ADD(BUFFER) + MCFG_RAM_DEFAULT_SIZE("2K") + MCFG_RAM_DEFAULT_VALUE(0) MACHINE_CONFIG_END ROM_START( bwg_fdc ) ROM_REGION(0x8000, DSRROM, 0) ROM_LOAD("bwg_dsr.u15", 0x0000, 0x8000, CRC(06f1ec89) SHA1(6ad77033ed268f986d9a5439e65f7d391c4b7651)) /* BwG disk DSR ROM */ - ROM_REGION(0x0800, BUFFER, 0) /* BwG RAM buffer */ - ROM_FILL(0x0000, 0x0400, 0x00) ROM_END machine_config_constructor snug_bwg_device::device_mconfig_additions() const @@ -697,7 +703,7 @@ ioport_constructor snug_bwg_device::device_input_ports() const return INPUT_PORTS_NAME( bwg_fdc ); } -const rom_entry *snug_bwg_device::device_rom_region() const +const tiny_rom_entry *snug_bwg_device::device_rom_region() const { return ROM_NAME( bwg_fdc ); } diff --git a/src/devices/bus/ti99_peb/bwg.h b/src/devices/bus/ti99_peb/bwg.h index 6a301b5cb59..6178a20d457 100644 --- a/src/devices/bus/ti99_peb/bwg.h +++ b/src/devices/bus/ti99_peb/bwg.h @@ -17,6 +17,7 @@ #include "imagedev/flopdrv.h" #include "machine/mm58274c.h" #include "machine/wd_fdc.h" +#include "machine/ram.h" extern const device_type TI99_BWG; @@ -41,7 +42,7 @@ protected: void device_reset() override; void device_config_complete() override; - const rom_entry *device_rom_region() const override; + const tiny_rom_entry *device_rom_region() const override; machine_config_constructor device_mconfig_additions() const override; ioport_constructor device_input_ports() const override; @@ -119,7 +120,7 @@ private: UINT8* m_dsrrom; // Buffer RAM - UINT8* m_buffer_ram; + required_device m_buffer_ram; // Link to the attached floppy drives floppy_image_device* m_floppy[4]; diff --git a/src/devices/bus/ti99_peb/evpc.cpp b/src/devices/bus/ti99_peb/evpc.cpp index 96f7f2baa9e..1f3b00c0e19 100644 --- a/src/devices/bus/ti99_peb/evpc.cpp +++ b/src/devices/bus/ti99_peb/evpc.cpp @@ -453,7 +453,7 @@ INPUT_PORTS_START( ti99_evpc ) PORT_DIPSETTING( 0x01, "NOVRAM" ) INPUT_PORTS_END -const rom_entry *snug_enhanced_video_device::device_rom_region() const +const tiny_rom_entry *snug_enhanced_video_device::device_rom_region() const { return ROM_NAME( ti99_evpc ); } diff --git a/src/devices/bus/ti99_peb/evpc.h b/src/devices/bus/ti99_peb/evpc.h index f7423f6011d..0556c17bf64 100644 --- a/src/devices/bus/ti99_peb/evpc.h +++ b/src/devices/bus/ti99_peb/evpc.h @@ -51,7 +51,7 @@ protected: void device_reset(void) override; void device_stop(void) override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; machine_config_constructor device_mconfig_additions() const override; diff --git a/src/devices/bus/ti99_peb/hfdc.cpp b/src/devices/bus/ti99_peb/hfdc.cpp index 54cf7b06310..0252cfda5f9 100644 --- a/src/devices/bus/ti99_peb/hfdc.cpp +++ b/src/devices/bus/ti99_peb/hfdc.cpp @@ -90,9 +90,14 @@ myarc_hfdc_device::myarc_hfdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : ti_expansion_card_device(mconfig, TI99_HFDC, "Myarc Hard and Floppy Disk Controller", tag, owner, clock, "ti99_hfdc", __FILE__), m_motor_on_timer(nullptr), m_hdc9234(*this, FDC_TAG), - m_clock(*this, CLOCK_TAG), m_current_floppy(nullptr), m_current_harddisk(nullptr), m_see_switches(false), m_irq(), m_dip(), m_motor_running(false), - m_inDsrArea(false), m_HDCsel(false), m_RTCsel(false), m_tapesel(false), m_RAMsel(false), m_ROMsel(false), m_address(0), - m_wait_for_hd1(false), m_dsrrom(nullptr), m_rom_page(0), m_buffer_ram(nullptr), m_status_latch(0), m_dma_address(0), m_output1_latch(0), m_output2_latch(0), m_lastval(0), m_MOTOR_ON(), m_readyflags(0) + m_clock(*this, CLOCK_TAG), m_current_floppy(nullptr), + m_current_harddisk(nullptr), m_see_switches(false), + m_irq(), m_dip(), m_motor_running(false), + m_inDsrArea(false), m_HDCsel(false), m_RTCsel(false), + m_tapesel(false), m_RAMsel(false), m_ROMsel(false), m_address(0), + m_wait_for_hd1(false), m_dsrrom(nullptr), m_rom_page(0), + m_buffer_ram(*this, BUFFER), m_status_latch(0), m_dma_address(0), + m_output1_latch(0), m_output2_latch(0), m_lastval(0), m_MOTOR_ON(), m_readyflags(0) { } @@ -151,7 +156,7 @@ void myarc_hfdc_device::debug_read(offs_t offset, UINT8* value) if ((offset & 0x1000)==RAM_ADDR) { int bank = (offset & 0x0c00) >> 10; - *value = m_buffer_ram[(m_ram_page[bank]<<10) | (offset & 0x03ff)]; + *value = m_buffer_ram->pointer()[(m_ram_page[bank]<<10) | (offset & 0x03ff)]; } else { @@ -170,7 +175,7 @@ void myarc_hfdc_device::debug_write(offs_t offset, UINT8 data) if ((offset & 0x1000)==RAM_ADDR) { int bank = (offset & 0x0c00) >> 10; - m_buffer_ram[(m_ram_page[bank]<<10) | (m_address & 0x03ff)] = data; + m_buffer_ram->pointer()[(m_ram_page[bank]<<10) | (m_address & 0x03ff)] = data; } } } @@ -202,21 +207,21 @@ READ8Z_MEMBER(myarc_hfdc_device::readz) { if (m_tapesel) { - logerror("%s: Tape support not available on this HFDC version (access to address %04x)\n", tag(), m_address & 0xffff); + logerror("Tape support not available on this HFDC version (access to address %04x)\n", m_address & 0xffff); return; } if (m_HDCsel) { *value = m_hdc9234->read(space, (m_address>>2)&1, 0xff); - if (TRACE_COMP) logerror("%s: %04x[HDC] -> %02x\n", tag(), m_address & 0xffff, *value); + if (TRACE_COMP) logerror("%04x[HDC] -> %02x\n", m_address & 0xffff, *value); return; } if (m_RTCsel) { *value = m_clock->read(space, (m_address & 0x001e) >> 1); - if (TRACE_COMP) logerror("%s: %04x[CLK] -> %02x\n", tag(), m_address & 0xffff, *value); + if (TRACE_COMP) logerror("%04x[CLK] -> %02x\n", m_address & 0xffff, *value); return; } @@ -229,13 +234,13 @@ READ8Z_MEMBER(myarc_hfdc_device::readz) int bank = (m_address & 0x0c00) >> 10; // If a DMA is in progress, do not respond - if (m_dip == CLEAR_LINE) *value = m_buffer_ram[(m_ram_page[bank]<<10) | (m_address & 0x03ff)]; + if (m_dip == CLEAR_LINE) *value = m_buffer_ram->pointer()[(m_ram_page[bank]<<10) | (m_address & 0x03ff)]; if (TRACE_RAM) { if (WORD_ALIGNED(m_address)) { - int valword = (((*value) << 8) | m_buffer_ram[(m_ram_page[bank]<<10) | ((m_address+1) & 0x03ff)])&0xffff; - logerror("%s: %04x[%02x] -> %04x\n", tag(), m_address & 0xffff, m_ram_page[bank], valword); + int valword = (((*value) << 8) | m_buffer_ram->pointer()[(m_ram_page[bank]<<10) | ((m_address+1) & 0x03ff)])&0xffff; + logerror("%04x[%02x] -> %04x\n", m_address & 0xffff, m_ram_page[bank], valword); } } return; @@ -249,7 +254,7 @@ READ8Z_MEMBER(myarc_hfdc_device::readz) if (WORD_ALIGNED(m_address)) { int valword = (((*value) << 8) | m_dsrrom[(m_rom_page << 12) | ((m_address + 1) & 0x0fff)])&0xffff; - logerror("%s: %04x[%02x] -> %04x\n", tag(), m_address & 0xffff, m_rom_page, valword); + logerror("%04x[%02x] -> %04x\n", m_address & 0xffff, m_rom_page, valword); } } return; @@ -281,20 +286,20 @@ WRITE8_MEMBER( myarc_hfdc_device::write ) { if (m_tapesel) { - logerror("%s: Tape support not available on this HFDC version (write access to address %04x: %02x)\n", tag(), m_address & 0xffff, data); + logerror("Tape support not available on this HFDC version (write access to address %04x: %02x)\n", m_address & 0xffff, data); return; } if (m_HDCsel) { - if (TRACE_COMP) logerror("%s: %04x[HDC] <- %02x\n", tag(), m_address & 0xffff, data); + if (TRACE_COMP) logerror("%04x[HDC] <- %02x\n", m_address & 0xffff, data); m_hdc9234->write(space, (m_address>>2)&1, data, 0xff); return; } if (m_RTCsel) { - if (TRACE_COMP) logerror("%s: %04x[CLK] <- %02x\n", tag(), m_address & 0xffff, data); + if (TRACE_COMP) logerror("%04x[CLK] <- %02x\n", m_address & 0xffff, data); m_clock->write(space, (m_address & 0x001e) >> 1, data); return; } @@ -306,16 +311,16 @@ WRITE8_MEMBER( myarc_hfdc_device::write ) // 0101 10xx xxxx xxxx bank 2 // 0101 11xx xxxx xxxx bank 3 int bank = (m_address & 0x0c00) >> 10; - if (TRACE_RAM) logerror("%s: %04x[%02x] <- %02x\n", tag(), m_address & 0xffff, m_ram_page[bank], data); + if (TRACE_RAM) logerror("%04x[%02x] <- %02x\n", m_address & 0xffff, m_ram_page[bank], data); // When a DMA is in progress, do not change anything - if (m_dip == CLEAR_LINE) m_buffer_ram[(m_ram_page[bank]<<10) | (m_address & 0x03ff)] = data; + if (m_dip == CLEAR_LINE) m_buffer_ram->pointer()[(m_ram_page[bank]<<10) | (m_address & 0x03ff)] = data; return; } // The rest is ROM if (m_ROMsel) { - if (TRACE_ROM) logerror("%s: Ignoring write ROM %04x[%02x]: %02x\n", tag(), m_address & 0xffff, m_rom_page, data); + if (TRACE_ROM) logerror("Ignoring write ROM %04x[%02x]: %02x\n", m_address & 0xffff, m_rom_page, data); } } } @@ -388,7 +393,7 @@ READ8Z_MEMBER(myarc_hfdc_device::crureadz) *value = 0; } - if (TRACE_CRU) logerror("%s: CRU %04x -> %02x\n", tag(), offset & 0xffff, *value); + if (TRACE_CRU) logerror("CRU %04x -> %02x\n", offset & 0xffff, *value); } } @@ -420,7 +425,7 @@ WRITE8_MEMBER(myarc_hfdc_device::cruwrite) { if ((offset & 0xff00)==m_cru_base) { - if (TRACE_CRU) logerror("%s: CRU %04x <- %d\n", tag(), offset & 0xffff, data); + if (TRACE_CRU) logerror("CRU %04x <- %d\n", offset & 0xffff, data); int bit = (offset >> 1) & 0x1f; @@ -435,9 +440,9 @@ WRITE8_MEMBER(myarc_hfdc_device::cruwrite) if (TRACE_CRU) { - if (bit==0x0d) logerror("%s: RAM page @5400 = %d\n", tag(), m_ram_page[1]); - if (bit==0x12) logerror("%s: RAM page @5800 = %d\n", tag(), m_ram_page[2]); - if (bit==0x17) logerror("%s: RAM page @5C00 = %d\n", tag(), m_ram_page[3]); + if (bit==0x0d) logerror("RAM page @5400 = %d\n", m_ram_page[1]); + if (bit==0x12) logerror("RAM page @5800 = %d\n", m_ram_page[2]); + if (bit==0x17) logerror("RAM page @5C00 = %d\n", m_ram_page[3]); } return; } @@ -448,12 +453,12 @@ WRITE8_MEMBER(myarc_hfdc_device::cruwrite) { bool turnOn = (data!=0); // Avoid too many meaningless log outputs - if (TRACE_CRU) if (m_selected != turnOn) logerror("%s: card %s\n", tag(), turnOn? "selected" : "unselected"); + if (TRACE_CRU) if (m_selected != turnOn) logerror("card %s\n", turnOn? "selected" : "unselected"); m_selected = turnOn; break; } case 1: - if (TRACE_CRU) if (data==0) logerror("%s: trigger HDC reset\n", tag()); + if (TRACE_CRU) if (data==0) logerror("trigger HDC reset\n"); m_hdc9234->reset((data == 0)? ASSERT_LINE : CLEAR_LINE); break; @@ -477,17 +482,17 @@ WRITE8_MEMBER(myarc_hfdc_device::cruwrite) case 3: m_hdc9234->set_clock_divider(1, data); m_rom_page = (data != 0)? (m_rom_page | 2) : (m_rom_page & 0xfd); - if (TRACE_CRU) logerror("%s: ROM page = %d\n", tag(), m_rom_page); + if (TRACE_CRU) logerror("ROM page = %d\n", m_rom_page); break; case 4: m_see_switches = (data != 0); m_rom_page = (data != 0)? (m_rom_page | 1) : (m_rom_page & 0xfe); - if (TRACE_CRU) logerror("%s: ROM page = %d, see_switches = %d\n", tag(), m_rom_page, m_see_switches); + if (TRACE_CRU) logerror("ROM page = %d, see_switches = %d\n", m_rom_page, m_see_switches); break; default: - logerror("%s: Attempt to set undefined CRU bit %d\n", tag(), bit); + logerror("Attempt to set undefined CRU bit %d\n", bit); } } } @@ -505,7 +510,7 @@ void myarc_hfdc_device::device_timer(emu_timer &timer, device_timer_id id, int p */ void myarc_hfdc_device::floppy_index_callback(floppy_image_device *floppy, int state) { - if (TRACE_LINES) if (state==1) logerror("%s: Floppy index pulse\n", tag()); + if (TRACE_LINES) if (state==1) logerror("Floppy index pulse\n"); // m_status_latch = (state==ASSERT_LINE)? (m_status_latch | HDC_DS_INDEX) : (m_status_latch & ~HDC_DS_INDEX); set_bits(m_status_latch, HDC_DS_INDEX, (state==ASSERT_LINE)); signal_drive_status(); @@ -516,7 +521,7 @@ void myarc_hfdc_device::floppy_index_callback(floppy_image_device *floppy, int s */ void myarc_hfdc_device::harddisk_index_callback(mfm_harddisk_device *harddisk, int state) { - if (TRACE_LINES) if (state==1) logerror("%s: HD index pulse\n", tag()); + if (TRACE_LINES) if (state==1) logerror("HD index pulse\n"); set_bits(m_status_latch, HDC_DS_INDEX, (state==ASSERT_LINE)); signal_drive_status(); } @@ -526,7 +531,7 @@ void myarc_hfdc_device::harddisk_index_callback(mfm_harddisk_device *harddisk, i */ void myarc_hfdc_device::harddisk_ready_callback(mfm_harddisk_device *harddisk, int state) { - if (TRACE_LINES) logerror("%s: HD READY = %d\n", tag(), state); + if (TRACE_LINES) logerror("HD READY = %d\n", state); set_bits(m_status_latch, HDC_DS_READY, (state==ASSERT_LINE)); signal_drive_status(); } @@ -536,7 +541,7 @@ void myarc_hfdc_device::harddisk_ready_callback(mfm_harddisk_device *harddisk, i */ void myarc_hfdc_device::harddisk_skcom_callback(mfm_harddisk_device *harddisk, int state) { - if (TRACE_LINES) logerror("%s: HD seek complete = %d\n", tag(), state); + if (TRACE_LINES) logerror("HD seek complete = %d\n", state); set_bits(m_status_latch, HDC_DS_SKCOM, (state==ASSERT_LINE)); signal_drive_status(); } @@ -627,14 +632,14 @@ WRITE8_MEMBER( myarc_hfdc_device::auxbus_out ) switch (offset) { case HDC_INPUT_STATUS: - logerror("%s: Invalid operation: S0=S1=0, but tried to write (expected: read drive status)\n", tag()); + logerror("Invalid operation: S0=S1=0, but tried to write (expected: read drive status)\n"); break; case HDC_OUTPUT_DMA_ADDR: // Value is dma address byte. Shift previous contents to the left. // The value is latched inside the Gate Array. m_dma_address = ((m_dma_address << 8) + (data&0xff))&0xffffff; - if (TRACE_DMA) logerror("%s: Setting DMA address; current value = %06x\n", tag(), m_dma_address); + if (TRACE_DMA) logerror("Setting DMA address; current value = %06x\n", m_dma_address); break; case HDC_OUTPUT_1: @@ -713,7 +718,7 @@ void myarc_hfdc_device::connect_floppy_unit(int index) // Clear all latched flags from other drives m_status_latch = 0; disconnect_floppy_drives(); - if (TRACE_LINES) logerror("%s: Select floppy drive DSK%d\n", tag(), index+1); + if (TRACE_LINES) logerror("Select floppy drive DSK%d\n", index+1); // Connect new drive m_current_floppy = m_floppy_unit[index]; @@ -721,11 +726,11 @@ void myarc_hfdc_device::connect_floppy_unit(int index) // We don't use the READY line of floppy drives. // READY is asserted when DSKx = 1 // The controller fetches the state with the auxbus access - if (TRACE_LINES) logerror("%s: Connect index callback DSK%d\n", tag(), index+1); + if (TRACE_LINES) logerror("Connect index callback DSK%d\n", index+1); if (m_current_floppy != nullptr) m_current_floppy->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(myarc_hfdc_device::floppy_index_callback), this)); else - logerror("%s: Connection to DSK%d failed because no drive is connected\n", tag(), index+1); + logerror("Connection to DSK%d failed because no drive is connected\n", index+1); m_hdc9234->connect_floppy_drive(m_floppy_unit[index]); } @@ -740,12 +745,12 @@ void myarc_hfdc_device::connect_harddisk_unit(int index) // Clear all latched flags form other drives m_status_latch = 0; disconnect_hard_drives(); - if (TRACE_LINES) logerror("%s: Select hard disk WDS%d\n", tag(), index+1); + if (TRACE_LINES) logerror("Select hard disk WDS%d\n", index+1); // Connect new drive m_current_harddisk = m_harddisk_unit[index]; - if (TRACE_LINES) logerror("%s: Connect index callback WDS%d\n", tag(), index+1); + if (TRACE_LINES) logerror("Connect index callback WDS%d\n", index+1); if (m_current_harddisk != nullptr) { m_current_harddisk->setup_index_pulse_cb(mfm_harddisk_device::index_pulse_cb(FUNC(myarc_hfdc_device::harddisk_index_callback), this)); @@ -753,7 +758,7 @@ void myarc_hfdc_device::connect_harddisk_unit(int index) m_current_harddisk->setup_seek_complete_cb(mfm_harddisk_device::seek_complete_cb(FUNC(myarc_hfdc_device::harddisk_skcom_callback), this)); } else - logerror("%s: Connection to WDS%d failed because no drive is connected\n", tag(), index+1); + logerror("Connection to WDS%d failed because no drive is connected\n", index+1); m_hdc9234->connect_hard_drive(m_current_harddisk); } @@ -763,7 +768,7 @@ void myarc_hfdc_device::connect_harddisk_unit(int index) void myarc_hfdc_device::disconnect_floppy_drives() { - if (TRACE_LINES) logerror("%s: Unselect floppy drives\n", tag()); + if (TRACE_LINES) logerror("Unselect floppy drives\n"); // Disconnect current floppy if (m_current_floppy != nullptr) { @@ -774,7 +779,7 @@ void myarc_hfdc_device::disconnect_floppy_drives() void myarc_hfdc_device::disconnect_hard_drives() { - if (TRACE_LINES) logerror("%s: Unselect hard drives\n", tag()); + if (TRACE_LINES) logerror("Unselect hard drives\n"); if (m_current_harddisk != nullptr) { m_current_harddisk->setup_index_pulse_cb(mfm_harddisk_device::index_pulse_cb()); @@ -791,13 +796,13 @@ void myarc_hfdc_device::set_floppy_motors_running(bool run) if (run) { if (TRACE_MOTOR) - if (m_MOTOR_ON==CLEAR_LINE) logerror("%s: Motor START\n", tag()); + if (m_MOTOR_ON==CLEAR_LINE) logerror("Motor START\n"); m_MOTOR_ON = ASSERT_LINE; } else { if (TRACE_MOTOR) - if (m_MOTOR_ON==ASSERT_LINE) logerror("%s: Motor STOP\n", tag()); + if (m_MOTOR_ON==ASSERT_LINE) logerror("Motor STOP\n"); m_MOTOR_ON = CLEAR_LINE; } @@ -812,7 +817,7 @@ void myarc_hfdc_device::set_floppy_motors_running(bool run) WRITE_LINE_MEMBER( myarc_hfdc_device::intrq_w ) { m_irq = (line_state)state; - if (TRACE_INT) logerror("%s: INT pin from controller = %d, propagating to INTA*\n", tag(), state); + if (TRACE_INT) logerror("INT pin from controller = %d, propagating to INTA*\n", state); // Set INTA* // Signal from SMC is active high, INTA* is active low; board inverts signal @@ -826,7 +831,7 @@ WRITE_LINE_MEMBER( myarc_hfdc_device::intrq_w ) */ WRITE_LINE_MEMBER( myarc_hfdc_device::dmarq_w ) { - if (TRACE_DMA) logerror("%s: DMARQ pin from controller = %d\n", tag(), state); + if (TRACE_DMA) logerror("DMARQ pin from controller = %d\n", state); if (state == ASSERT_LINE) { m_hdc9234->dmaack(ASSERT_LINE); @@ -846,9 +851,9 @@ WRITE_LINE_MEMBER( myarc_hfdc_device::dip_w ) */ READ8_MEMBER( myarc_hfdc_device::read_buffer ) { - if (TRACE_DMA) logerror("%s: Read access to onboard SRAM at %04x\n", tag(), m_dma_address); - if (m_dma_address > 0x8000) logerror("%s: Read access beyond RAM size: %06x\n", tag(), m_dma_address); - UINT8 value = m_buffer_ram[m_dma_address & 0x7fff]; + if (TRACE_DMA) logerror("Read access to onboard SRAM at %04x\n", m_dma_address); + if (m_dma_address > 0x8000) logerror("Read access beyond RAM size: %06x\n", m_dma_address); + UINT8 value = m_buffer_ram->pointer()[m_dma_address & 0x7fff]; m_dma_address = (m_dma_address+1) & 0x7fff; return value; } @@ -858,17 +863,15 @@ READ8_MEMBER( myarc_hfdc_device::read_buffer ) */ WRITE8_MEMBER( myarc_hfdc_device::write_buffer ) { - if (TRACE_DMA) logerror("%s: Write access to onboard SRAM at %04x: %02x\n", tag(), m_dma_address, data); - if (m_dma_address > 0x8000) logerror("%s: Write access beyond RAM size: %06x\n", tag(), m_dma_address); - m_buffer_ram[m_dma_address & 0x7fff] = data; + if (TRACE_DMA) logerror("Write access to onboard SRAM at %04x: %02x\n", m_dma_address, data); + if (m_dma_address > 0x8000) logerror("Write access beyond RAM size: %06x\n", m_dma_address); + m_buffer_ram->pointer()[m_dma_address & 0x7fff] = data; m_dma_address = (m_dma_address+1) & 0x7fff; } void myarc_hfdc_device::device_start() { - if (TRACE_EMU) logerror("%s: start\n", tag()); m_dsrrom = memregion(DSRROM)->base(); - m_buffer_ram = memregion(BUFFER)->base(); m_motor_on_timer = timer_alloc(MOTOR_TIMER); // The HFDC does not use READY; it has on-board RAM for DMA m_current_floppy = nullptr; @@ -877,8 +880,6 @@ void myarc_hfdc_device::device_start() void myarc_hfdc_device::device_reset() { - if (TRACE_EMU) logerror("%s: reset\n", tag()); - // The GenMOD mod; our implementation automagically adapts all cards if (m_genmod) { @@ -914,17 +915,17 @@ void myarc_hfdc_device::device_reset() for (int i=0; i < 4; i++) { if (m_floppy_unit[i] != nullptr) - logerror("%s: FD connector %d with %s\n", tag(), i+1, m_floppy_unit[i]->name()); + logerror("FD connector %d with %s\n", i+1, m_floppy_unit[i]->name()); else - logerror("%s: FD connector %d has no floppy attached\n", tag(), i+1); + logerror("FD connector %d has no floppy attached\n", i+1); } for (int i=0; i < 3; i++) { if (m_harddisk_unit[i] != nullptr) - logerror("%s: HD connector %d with %s\n", tag(), i+1, m_harddisk_unit[i]->name()); + logerror("HD connector %d with %s\n", i+1, m_harddisk_unit[i]->name()); else - logerror("%s: HD connector %d has no drive attached\n", tag(), i+1); + logerror("HD connector %d has no drive attached\n", i+1); } // Disconnect all units @@ -1053,13 +1054,15 @@ MACHINE_CONFIG_FRAGMENT( ti99_hfdc ) MCFG_DEVICE_ADD(CLOCK_TAG, MM58274C, 0) MCFG_MM58274C_MODE24(1) // 24 hour MCFG_MM58274C_DAY1(0) // sunday + + MCFG_RAM_ADD(BUFFER) + MCFG_RAM_DEFAULT_SIZE("32K") + MCFG_RAM_DEFAULT_VALUE(0) MACHINE_CONFIG_END ROM_START( ti99_hfdc ) ROM_REGION(0x4000, DSRROM, 0) ROM_LOAD("hfdc_dsr.u34", 0x0000, 0x4000, CRC(66fbe0ed) SHA1(11df2ecef51de6f543e4eaf8b2529d3e65d0bd59)) /* HFDC disk DSR ROM */ - ROM_REGION(0x8000, BUFFER, 0) /* HFDC RAM buffer 32 KiB */ - ROM_FILL(0x0000, 0x8000, 0x00) ROM_END @@ -1068,7 +1071,7 @@ machine_config_constructor myarc_hfdc_device::device_mconfig_additions() const return MACHINE_CONFIG_NAME( ti99_hfdc ); } -const rom_entry *myarc_hfdc_device::device_rom_region() const +const tiny_rom_entry *myarc_hfdc_device::device_rom_region() const { return ROM_NAME( ti99_hfdc ); } diff --git a/src/devices/bus/ti99_peb/hfdc.h b/src/devices/bus/ti99_peb/hfdc.h index ec51e3122d6..939671f0142 100644 --- a/src/devices/bus/ti99_peb/hfdc.h +++ b/src/devices/bus/ti99_peb/hfdc.h @@ -21,6 +21,7 @@ #include "machine/mm58274c.h" #include "machine/hdc92x4.h" +#include "machine/ram.h" extern const device_type TI99_HFDC; @@ -55,7 +56,7 @@ private: void device_start() override; void device_reset() override; - const rom_entry *device_rom_region() const override; + const tiny_rom_entry *device_rom_region() const override; machine_config_constructor device_mconfig_additions() const override; ioport_constructor device_input_ports() const override; @@ -149,7 +150,7 @@ private: int m_rom_page; // HFDC on-board SRAM (8K or 32K) - UINT8* m_buffer_ram; + required_device m_buffer_ram; // RAM page registers int m_ram_page[4]; diff --git a/src/devices/bus/ti99_peb/myarcmem.cpp b/src/devices/bus/ti99_peb/myarcmem.cpp index b2bc44d5815..d6a8b0fa0a1 100644 --- a/src/devices/bus/ti99_peb/myarcmem.cpp +++ b/src/devices/bus/ti99_peb/myarcmem.cpp @@ -200,7 +200,7 @@ machine_config_constructor myarc_memory_expansion_device::device_mconfig_additio return MACHINE_CONFIG_NAME( myarc_exp ); } -const rom_entry *myarc_memory_expansion_device::device_rom_region() const +const tiny_rom_entry *myarc_memory_expansion_device::device_rom_region() const { return ROM_NAME( myarc_exp ); } diff --git a/src/devices/bus/ti99_peb/myarcmem.h b/src/devices/bus/ti99_peb/myarcmem.h index 0210935b2c0..19a8f1fd95a 100644 --- a/src/devices/bus/ti99_peb/myarcmem.h +++ b/src/devices/bus/ti99_peb/myarcmem.h @@ -32,7 +32,7 @@ public: protected: void device_start(void) override; void device_reset(void) override; - const rom_entry *device_rom_region(void) const override; + const tiny_rom_entry *device_rom_region(void) const override; ioport_constructor device_input_ports() const override; machine_config_constructor device_mconfig_additions() const override; diff --git a/src/devices/bus/ti99_peb/pcode.cpp b/src/devices/bus/ti99_peb/pcode.cpp index 1a396729e5d..0d4153f5616 100644 --- a/src/devices/bus/ti99_peb/pcode.cpp +++ b/src/devices/bus/ti99_peb/pcode.cpp @@ -352,7 +352,7 @@ machine_config_constructor ti_pcode_card_device::device_mconfig_additions() cons return MACHINE_CONFIG_NAME( ti99_pcode ); } -const rom_entry *ti_pcode_card_device::device_rom_region() const +const tiny_rom_entry *ti_pcode_card_device::device_rom_region() const { return ROM_NAME( ti99_pcode ); } diff --git a/src/devices/bus/ti99_peb/pcode.h b/src/devices/bus/ti99_peb/pcode.h index c08f5b201b5..dfb2fb1a371 100644 --- a/src/devices/bus/ti99_peb/pcode.h +++ b/src/devices/bus/ti99_peb/pcode.h @@ -40,7 +40,7 @@ protected: virtual void device_start() override; virtual void device_reset() override; virtual void device_config_complete() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/ti99_peb/spchsyn.cpp b/src/devices/bus/ti99_peb/spchsyn.cpp index 1dd617cb5e9..798d552a564 100644 --- a/src/devices/bus/ti99_peb/spchsyn.cpp +++ b/src/devices/bus/ti99_peb/spchsyn.cpp @@ -161,7 +161,7 @@ machine_config_constructor ti_speech_synthesizer_device::device_mconfig_addition return MACHINE_CONFIG_NAME( ti99_speech ); } -const rom_entry *ti_speech_synthesizer_device::device_rom_region() const +const tiny_rom_entry *ti_speech_synthesizer_device::device_rom_region() const { return ROM_NAME( ti99_speech ); } diff --git a/src/devices/bus/ti99_peb/spchsyn.h b/src/devices/bus/ti99_peb/spchsyn.h index 28113ebbfea..6841e397793 100644 --- a/src/devices/bus/ti99_peb/spchsyn.h +++ b/src/devices/bus/ti99_peb/spchsyn.h @@ -35,7 +35,7 @@ public: protected: virtual void device_start() override; virtual void device_reset(void) override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; private: diff --git a/src/devices/bus/ti99_peb/ti_fdc.cpp b/src/devices/bus/ti99_peb/ti_fdc.cpp index 2b028459eb8..df24aea6580 100644 --- a/src/devices/bus/ti99_peb/ti_fdc.cpp +++ b/src/devices/bus/ti99_peb/ti_fdc.cpp @@ -427,7 +427,7 @@ machine_config_constructor ti_fdc_device::device_mconfig_additions() const return MACHINE_CONFIG_NAME( ti_fdc ); } -const rom_entry *ti_fdc_device::device_rom_region() const +const tiny_rom_entry *ti_fdc_device::device_rom_region() const { return ROM_NAME( ti_fdc ); } diff --git a/src/devices/bus/ti99_peb/ti_fdc.h b/src/devices/bus/ti99_peb/ti_fdc.h index ed1082d3b0a..7cb6267cab5 100644 --- a/src/devices/bus/ti99_peb/ti_fdc.h +++ b/src/devices/bus/ti99_peb/ti_fdc.h @@ -41,7 +41,7 @@ protected: void device_reset() override; void device_config_complete() override; - const rom_entry *device_rom_region() const override; + const tiny_rom_entry *device_rom_region() const override; machine_config_constructor device_mconfig_additions() const override; void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; diff --git a/src/devices/bus/ti99_peb/ti_rs232.cpp b/src/devices/bus/ti99_peb/ti_rs232.cpp index ce062b9a839..8678d34df33 100644 --- a/src/devices/bus/ti99_peb/ti_rs232.cpp +++ b/src/devices/bus/ti99_peb/ti_rs232.cpp @@ -111,8 +111,13 @@ #define RECV_MODE_ESC 2 #define RECV_MODE_ESC_LINES 3 -#define VERBOSE 1 -#define LOG logerror +#define TRACE_LINES 0 +#define TRACE_SETTING 0 +#define TRACE_STATE 0 +#define TRACE_MAP 0 +#define TRACE_IN 0 +#define TRACE_OUT 0 +#define TRACE_ILA 0 #define ESC 0x1b @@ -177,7 +182,6 @@ int ti_rs232_attached_device::get_index_from_tagname() image_init_result ti_rs232_attached_device::call_load() { tms9902_device* tms9902; -// ti_rs232_pio_device* card = static_cast(owner()); int devnumber = get_index_from_tagname(); if (devnumber==0) @@ -194,7 +198,7 @@ image_init_result ti_rs232_attached_device::call_load() } else { - LOG("ti99/rs232: Could not find device tag number\n"); + logerror("Could not find device tag number\n"); return image_init_result::FAIL; } @@ -374,13 +378,13 @@ WRITE8_MEMBER(ti_rs232_pio_device::cruwrite) case 5: // Set the CTS line for RS232/1 - if (VERBOSE>5) LOG("TI-RS232/1/3: Setting CTS* via CRU to %d\n", data); + if (TRACE_LINES) logerror("(1/3) Setting CTS* via CRU to %d\n", data); output_line_state(0, CTS, (data==0)? CTS : 0); break; case 6: // Set the CTS line for RS232/2 - if (VERBOSE>5) LOG("TI-RS232/2/4: Setting CTS* via CRU to %d\n", data); + if (TRACE_LINES) logerror("(2/4) Setting CTS* via CRU to %d\n", data); output_line_state(1, CTS, (data==0)? CTS : 0); break; @@ -399,7 +403,7 @@ READ8Z_MEMBER( ti_rs232_pio_device::readz ) { if (m_senila==ASSERT_LINE) { - if (VERBOSE>3) LOG("ti99/rs232: Sensing ILA\n"); + if (TRACE_ILA) logerror("Sensing ILA\n"); *value = m_ila; // The card ROM must be unselected, or we get two values // on the data bus @@ -437,16 +441,13 @@ WRITE8_MEMBER( ti_rs232_pio_device::write ) /**************************************************************************/ - -// ========================================================== - /* The DTR line of the interface card is wired to the CTS and DSR of the UART. */ void ti_rs232_pio_device::incoming_dtr(int uartind, line_state value) { - if (VERBOSE>2) LOG("TI-RS232/%d: incoming DTR = %d\n", uartind+1, (value==ASSERT_LINE)? 1:0); + if (TRACE_LINES) logerror("(RS232/%d) Incoming DTR = %d\n", uartind+1, (value==ASSERT_LINE)? 1:0); m_uart[uartind]->rcv_cts(value); m_uart[uartind]->rcv_dsr(value); @@ -463,57 +464,64 @@ void ti_rs232_pio_device::transmit_data(int uartind, UINT8 value) serial = dynamic_cast(m_serdev[uartind]); if (!serial->exists()) { - if (VERBOSE>1) LOG("TI-RS232/%d: No serial output attached\n", uartind+1); + logerror("(RS232/%d) No serial output attached\n", uartind+1); return; } // Send a double ESC if this is not a control operation if (buf==0x1b) { - if (VERBOSE>2) LOG("TI-RS232/%d: send ESC (requires another ESC)\n", uartind+1); + if (TRACE_OUT) logerror("(RS232/%d) send ESC (requires another ESC)\n", uartind+1); serial->fwrite(&buf, 1); } - if (VERBOSE>3) LOG("TI-RS232/%d: send %c <%02x>\n", uartind+1, buf, buf); + if (TRACE_OUT) + { + char cbuf = (buf < 0x20 || buf > 0x7e)? '.' : (char)buf; + logerror("(RS232/%d) send %c <%02x>\n", uartind+1, cbuf, buf); + } serial->fwrite(&buf, 1); } /* - Map the DCE-like wiring to a DTE-like wiring (and vice versa), V1 + Map the DCE-like wiring to a DTE-like wiring and vice versa (mapping==0) + No handshake - Emulated PC serial - TI RS232 interface - XOUT 2 -----------( 3) ---> TXD - RIN 3 -----------( 2) <--- RXD - nc 4 -----------( 5) <--- CTS (cable) - CRU 5 -| |-( 8) <--- DCD - DSR+CTS 20 -----------( 6) <--- DSR - +12V 6 -----------(20) ---> DTR - RTS 8 -----------( 4) ---> RTS + Emulated PC serial + TI RS232 interface + XOUT 2 TXD ----->-----( 3) ---> TXD + RIN 3 RXD -----<-----( 2) <--- RXD + CRU 5 CTS -| |-( 8) <--- DCD (cable) + +12V 6 DSR ----->-----(20) ---> DTR + RTS 8 DCD ----->-----( 4) ---> RTS + DSR+CTS 20 DTR -----<-----( 6) <--- DSR + |-( 5) <--- CTS + Alternative mapping: (mapping==1) + RTS/CTS handshake - Alternative mapping for the PORT terminal emulator: (V2) + Emulated PC serial + TI RS232 interface + XOUT 2 TXD ----->-----( 3) ---> TXD + RIN 3 RXD -----<-----( 2) <--- RXD + CRU 5 CTS ----->-----( 4) ---> RTS + +12V 6 DSR -| |-( 6) <--- DSR + RTS 8 DCD ----->-----(20) ---> DTR + DSR+CTS 20 DTR -----<-----( 8) <--- DCD + |-( 5) <--- CTS - Emulated PC serial - TI RS232 interface - XOUT 2 -----------( 3) ---> TXD - RIN 3 -----------( 2) <--- RXD - DSR+CTS 20 -----------( 5) <--- CTS (cable) - RTS 8 -----------(20) ---> DTR - CRU 5 -----------( 4) ---> RTS - +12V 6 -| |-( 6) <--- DSR - nc 4 -----------( 8) <--- DCD + Yet another mapping: (mapping==2) + CRU-based handshake - Yet another mapping for the PORT terminal emulator: (V3) + Emulated PC serial + TI RS232 interface + XOUT 2 TXD ----->-----( 3) ---> TXD + RIN 3 RXD -----<-----( 2) <--- RXD + CRU 5 CTS ----->-----(20) ---> DTR + +12V 6 DSR -| |-( 6) <--- DSR + RTS 8 DCD ----->-----( 4) ---> RTS + DSR+CTS 20 DTR -----<-----( 5) <--- CTS (cable) + |-( 8) <--- DCD - Emulated PC serial - TI RS232 interface - XOUT 2 -----------( 3) ---> TXD - RIN 3 -----------( 2) <--- RXD - DSR+CTS 20 -----------( 5) <--- CTS (cable) - CRU 5 -----------(20) ---> DTR - RTS 8 -----------( 4) ---> RTS - +12V 6 -| |-( 6) <--- DSR - nc 4 -----------( 8) <--- DCD */ UINT8 ti_rs232_pio_device::map_lines_out(int uartind, UINT8 value) { @@ -522,11 +530,11 @@ UINT8 ti_rs232_pio_device::map_lines_out(int uartind, UINT8 value) // 00ab cdef = setting line RTS=a, CTS=b, DSR=c, DCD=d, DTR=e, RI=f - if (VERBOSE>3) LOG("TI-RS232/%d: out connector pins = 0x%02x; translate for DTE\n", uartind+1, value); + if (TRACE_LINES) logerror("(RS232/%d) out connector pins = 0x%02x; translate for DTE\n", uartind+1, value); if (value & BRK) { - if (VERBOSE>5) LOG("TI-RS232/%d: ... sending BRK\n", uartind+1); + if (TRACE_MAP) logerror("(RS232/%d) Sending BRK\n", uartind+1); ret |= EXCEPT | BRK; } @@ -535,17 +543,17 @@ UINT8 ti_rs232_pio_device::map_lines_out(int uartind, UINT8 value) // V1 if (value & CTS) { - if (VERBOSE>5) LOG("TI-RS232/%d: ... cannot map CTS line, ignoring\n", uartind+1); + if (TRACE_MAP) logerror("(RS232/%d) Cannot map CTS line, ignoring\n", uartind+1); } if (value & DSR) { ret |= DTR; - if (VERBOSE>5) LOG("TI-RS232/%d: ... setting DTR line\n", uartind+1); + if (TRACE_MAP) logerror("(RS232/%d) Setting DTR line\n", uartind+1); } if (value & DCD) { ret |= RTS; - if (VERBOSE>5) LOG("TI-RS232/%d: ... setting RTS line\n", uartind+1); + if (TRACE_MAP) logerror("(RS232/%d) Setting RTS line\n", uartind+1); } } else @@ -556,12 +564,12 @@ UINT8 ti_rs232_pio_device::map_lines_out(int uartind, UINT8 value) if (value & CTS) { ret |= RTS; - if (VERBOSE>5) LOG("TI-RS232/%d: ... setting RTS line\n", uartind+1); + if (TRACE_MAP) logerror("(RS232/%d) Setting RTS line\n", uartind+1); } if (value & DCD) { ret |= DTR; - if (VERBOSE>5) LOG("TI-RS232/%d: ... setting DTR line\n", uartind+1); + if (TRACE_MAP) logerror("(RS232/%d) Setting DTR line\n", uartind+1); } } else @@ -570,16 +578,16 @@ UINT8 ti_rs232_pio_device::map_lines_out(int uartind, UINT8 value) if (value & CTS) { ret |= DTR; - if (VERBOSE>5) LOG("TI-RS232/%d: ... setting DTR line\n", uartind+1); + if (TRACE_MAP) logerror("(RS232/%d) Setting DTR line\n", uartind+1); } if (value & DSR) { - if (VERBOSE>5) LOG("TI-RS232/%d: ... cannot map DSR line, ignoring\n", uartind+1); + if (TRACE_MAP) logerror("(RS232/%d) Cannot map DSR line, ignoring\n", uartind+1); } if (value & DCD) { ret |= RTS; - if (VERBOSE>5) LOG("TI-RS232/%d: ... setting RTS line\n", uartind+1); + if (TRACE_MAP) logerror("(RS232/%d) Setting RTS line\n", uartind+1); } } } @@ -594,11 +602,11 @@ UINT8 ti_rs232_pio_device::map_lines_in(int uartind, UINT8 value) // 00ab cdef = setting line RTS=a, CTS=b, DSR=c, DCD=d, DTR=e, RI=f - if (VERBOSE>3) LOG("TI-RS232/%d: in connector pins = 0x%02x; translate from DTE\n", uartind+1, value); + if (TRACE_LINES) logerror("(RS232/%d) in connector pins = 0x%02x; translate from DTE\n", uartind+1, value); if (value & BRK) { - if (VERBOSE>5) LOG("TI-RS232/%d: ... getting BRK\n", uartind+1); + if (TRACE_MAP) logerror("(RS232/%d) Getting BRK\n", uartind+1); ret |= EXCEPT | BRK; } @@ -607,35 +615,34 @@ UINT8 ti_rs232_pio_device::map_lines_in(int uartind, UINT8 value) // V1 if (value & CTS) { - if (VERBOSE>5) LOG("TI-RS232/%d: ... cannot map CTS line, ignoring\n", uartind+1); + if (TRACE_MAP) logerror("(RS232/%d) Cannot map CTS line, ignoring\n", uartind+1); } if (value & DSR) { ret |= DTR; - if (VERBOSE>5) LOG("TI-RS232/%d: ... setting DTR line\n", uartind+1); + if (TRACE_MAP) logerror("(RS232/%d) Setting DTR line\n", uartind+1); } if (value & DCD) { - if (VERBOSE>5) LOG("TI-RS232/%d: ... cannot map DCD line, ignoring\n", uartind+1); + if (TRACE_MAP) logerror("(RS232/%d) Cannot map DCD line, ignoring\n", uartind+1); } } else { if (mapping==1) { - // V2 (PORT application) - if (value & CTS) + if (value & DCD) { ret |= DTR; - if (VERBOSE>5) LOG("TI-RS232/%d: ... setting DTR line\n", uartind+1); + if (TRACE_MAP) logerror("(RS232/%d) Setting DTR line\n", uartind+1); } if (value & DSR) { - if (VERBOSE>5) LOG("TI-RS232/%d: ... cannot map DSR line, ignoring\n", uartind+1); + if (TRACE_MAP) logerror("(RS232/%d) Cannot map DSR line, ignoring\n", uartind+1); } - if (value & DCD) + if (value & CTS) { - if (VERBOSE>5) LOG("TI-RS232/%d: ... cannot map DCD line, ignoring\n", uartind+1); + if (TRACE_MAP) logerror("(RS232/%d) Cannot map CTS line, ignoring\n", uartind+1); } } else @@ -643,15 +650,15 @@ UINT8 ti_rs232_pio_device::map_lines_in(int uartind, UINT8 value) if (value & CTS) { ret |= DTR; - if (VERBOSE>5) LOG("TI-RS232/%d: ... setting DTR line\n", uartind+1); + if (TRACE_MAP) logerror("(RS232/%d) Setting DTR line\n", uartind+1); } if (value & DSR) { - if (VERBOSE>5) LOG("TI-RS232/%d: ... cannot map DSR line, ignoring\n", uartind+1); + if (TRACE_MAP) logerror("(RS232/%d) Cannot map DSR line, ignoring\n", uartind+1); } if (value & DCD) { - if (VERBOSE>5) LOG("TI-RS232/%d: ... cannot map DCD line, ignoring\n", uartind+1); + if (TRACE_MAP) logerror("(RS232/%d) Cannot map DCD line, ignoring\n", uartind+1); } } } @@ -691,7 +698,7 @@ void ti_rs232_pio_device::receive_data_or_line_state(int uartind) if (!serial->exists()) { - if (VERBOSE>1) LOG("TI-RS232/%d: No serial input attached\n", uartind+1); + logerror("(RS232/%d) No serial input attached\n", uartind+1); return; } @@ -718,18 +725,20 @@ void ti_rs232_pio_device::receive_data_or_line_state(int uartind) return; } + char cbuf = (buffer < 0x20 || buffer > 0x7e)? '.' : (char)buffer; + // No config parameters here, only data or line setting switch (m_recv_mode[uartind]) { case RECV_MODE_NORMAL: if (buffer==0x1b) { - if (VERBOSE>2) LOG("TI-RS232/%d: received: %c <%02x>, switch to ESC mode\n", uartind+1, buffer, buffer); + if (TRACE_IN) logerror("(RS232/%d) Received: %c <%02x>, switch to ESC mode\n", uartind+1, cbuf, buffer); m_recv_mode[uartind] = RECV_MODE_ESC; } else { - if (VERBOSE>3) LOG("TI-RS232/%d: received: %c <%02x>, pass to UART\n", uartind+1, buffer, buffer); + if (TRACE_IN) logerror("(RS232/%d) Received: %c <%02x>, pass to UART\n", uartind+1, cbuf, buffer); m_uart[uartind]->rcv_data(buffer); m_time_hold[uartind] = 0.0; } @@ -738,17 +747,17 @@ void ti_rs232_pio_device::receive_data_or_line_state(int uartind) if (buffer==0x1b) { m_recv_mode[uartind] = RECV_MODE_NORMAL; - if (VERBOSE>2) LOG("TI-RS232/%d: leaving ESC mode, received: %c <%02x>, pass to UART\n", uartind+1, buffer, buffer); + if (TRACE_STATE) logerror("(RS232/%d) Received another ESC, passing to UART, leaving ESC mode\n", uartind+1); m_uart[uartind]->rcv_data(buffer); m_time_hold[uartind] = 0.0; } else { // the byte in buffer is the length byte - if (VERBOSE>3) LOG("TI-RS232/%d: received length byte <%02x> in ESC mode\n", uartind+1, buffer); + if (TRACE_STATE) logerror("(RS232/%d) Received length byte <%02x> in ESC mode\n", uartind+1, buffer); if (buffer != 1) { - LOG("TI-RS232/%d: expected length 1 but got %02x, leaving ESC mode.\n", uartind+1, buffer); + logerror("(RS232/%d) ** ERROR: Expected length byte 1 but got 0x%02x, leaving ESC mode.\n", uartind+1, buffer); m_recv_mode[uartind] = RECV_MODE_NORMAL; } else @@ -762,6 +771,7 @@ void ti_rs232_pio_device::receive_data_or_line_state(int uartind) if (buffer & EXCEPT) { // Exception states: BRK, FRMERR, PARERR + if (TRACE_LINES) logerror("(RS232/%d) Received BRK or ERROR <%02x>\n", uartind+1, buffer); m_uart[uartind]->rcv_break(((buffer & BRK)!=0)); if (buffer & FRMERR) m_uart[uartind]->rcv_framing_error(); @@ -770,7 +780,7 @@ void ti_rs232_pio_device::receive_data_or_line_state(int uartind) else { buffer = map_lines_in(uartind, buffer); - if (VERBOSE>2) LOG("TI-RS232/%d: received (remapped) <%02x> in ESC mode\n", uartind+1, buffer); + if (TRACE_LINES) logerror("(RS232/%d) Received (remapped) <%02x> in ESC mode\n", uartind+1, buffer); // The DTR line on the RS232 connector of the board is wired to both the // CTS and the DSR pin of the TMS9902 @@ -782,7 +792,7 @@ void ti_rs232_pio_device::receive_data_or_line_state(int uartind) break; default: - if (VERBOSE>1) LOG("TI-RS232/%d: unknown mode: %d\n", uartind+1, m_recv_mode[uartind]); + logerror("(RS232/%d) Unknown mode: %d\n", uartind+1, m_recv_mode[uartind]); } } @@ -799,7 +809,7 @@ void ti_rs232_pio_device::configure_interface(int uartind, int type, int value) if (!serial->exists()) { - if (VERBOSE>1) LOG("TI-RS232/%d: No serial output attached\n", uartind+1); + logerror("(RS232/%d) No serial output attached\n", uartind+1); return; } @@ -809,7 +819,7 @@ void ti_rs232_pio_device::configure_interface(int uartind, int type, int value) switch (type) { case RATERECV: - if (VERBOSE>2) LOG("TI-RS232/%d: send receive rate %04x\n", uartind+1, value); + if (TRACE_SETTING) logerror("(RS232/%d) Send receive rate %04x\n", uartind+1, value); // value has 12 bits // 1ccc xaaa = config adapter type a // 1111 xaaa rrrr rrrr rrrr 0000 = config receive rate on a @@ -820,29 +830,29 @@ void ti_rs232_pio_device::configure_interface(int uartind, int type, int value) bufctrl[3] = (value & 0x0f)<<4; break; case RATEXMIT: - if (VERBOSE>2) LOG("TI-RS232/%d: send transmit rate %04x\n", uartind+1, value); + if (TRACE_SETTING) logerror("(RS232/%d) Send transmit rate %04x\n", uartind+1, value); bufctrl[0] = 0x03; // length bufctrl[1] |= RATEXMIT; bufctrl[2] = (value & 0x0ff0)>>4; bufctrl[3] = (value & 0x0f)<<4; break; case STOPBITS: - if (VERBOSE>2) LOG("TI-RS232/%d: send stop bit config %02x\n", uartind+1, value&0x03); + if (TRACE_SETTING) logerror("(RS232/%d) Send stop bit config %02x\n", uartind+1, value&0x03); bufctrl[1] |= STOPBITS; bufctrl[2] = (value & 0x03); break; case DATABITS: - if (VERBOSE>2) LOG("TI-RS232/%d: send data bit config %02x\n", uartind+1, value&0x03); + if (TRACE_SETTING) logerror("(RS232/%d) Send data bit config %02x\n", uartind+1, value&0x03); bufctrl[1] |= DATABITS; bufctrl[2] = (value & 0x03); break; case PARITY: - if (VERBOSE>2) LOG("TI-RS232/%d: send parity config %02x\n", uartind+1, value&0x03); + if (TRACE_SETTING) logerror("(RS232/%d) Send parity config %02x\n", uartind+1, value&0x03); bufctrl[1] |= PARITY; bufctrl[2] = (value & 0x03); break; default: - if (VERBOSE>1) LOG("TI-RS232/%d: error - unknown config type %02x\n", uartind+1, type); + logerror("(RS232/%d) Error - unknown config type %02x\n", uartind+1, type); } serial->fwrite(bufctrl, bufctrl[0]+1); @@ -850,13 +860,13 @@ void ti_rs232_pio_device::configure_interface(int uartind, int type, int value) void ti_rs232_pio_device::set_bit(int uartind, int line, int value) { - if (VERBOSE>5) + if (TRACE_LINES) { switch (line) { - case CTS: LOG("TI-RS232/%d: set CTS(out)=%s\n", uartind+1, (value!=0)? "asserted" : "cleared"); break; - case DCD: LOG("TI-RS232/%d: set DCD(out)=%s\n", uartind+1, (value!=0)? "asserted" : "cleared"); break; - case BRK: LOG("TI-RS232/%d: set BRK(out)=%s\n", uartind+1, (value!=0)? "asserted" : "cleared"); break; + case CTS: logerror("(RS232/%d) Set CTS(out)=%s\n", uartind+1, (value!=0)? "asserted" : "cleared"); break; + case DCD: logerror("(RS232/%d) Set DCD(out)=%s\n", uartind+1, (value!=0)? "asserted" : "cleared"); break; + case BRK: logerror("(RS232/%d) Set BRK(out)=%s\n", uartind+1, (value!=0)? "asserted" : "cleared"); break; } } @@ -877,7 +887,7 @@ void ti_rs232_pio_device::output_exception(int uartind, int param, UINT8 value) if (!serial->exists()) { - if (VERBOSE>1) LOG("TI-RS232/%d: No serial output attached\n", uartind+1); + logerror("(RS232/%d) No serial output attached\n", uartind+1); return; } @@ -903,15 +913,18 @@ void ti_rs232_pio_device::output_line_state(int uartind, int mask, UINT8 value) if (!serial->exists()) { - if (VERBOSE>1) LOG("TI-RS232/%d: No serial output attached\n", uartind+1); + logerror("(RS232/%d) No serial output attached\n", uartind+1); return; } + // Send ESC to serial bridge serial->fwrite(&esc, 1); - // 01ab cdef = setting line RTS=a, CTS=b, DSR=c, DCD=d, DTR=e, RI=f + // Length 1 bufctrl[0] = 1; + // 01ab cdef = setting line RTS=a, CTS=b, DSR=c, DCD=d, DTR=e, RI=f + // The CTS line (coming from a CRU bit) is connected to the CTS pin if (mask & CTS) set_bit(uartind, CTS, value & CTS); @@ -1069,16 +1082,9 @@ void ti_rs232_pio_device::device_reset() m_time_hold[0] = m_time_hold[1] = 0.0; - // The GenMod modification changes the address bus width of the Geneve. - // All peripheral cards need to be manually modified to properly decode - // the wider address. The next lines perform this soldering job - // automagically. - /* if (device->machine().root_device().ioport("MODE")->read()==GENMOD) - { - // GenMod card modification - card->select_mask = 0x1fe000; - card->select_value = 0x174000; - }*/ + // Both DTRs are pulled up + incoming_dtr(0, ASSERT_LINE); + incoming_dtr(1, ASSERT_LINE); } static MACHINE_CONFIG_FRAGMENT( ti_rs232 ) @@ -1120,7 +1126,7 @@ machine_config_constructor ti_rs232_pio_device::device_mconfig_additions() const return MACHINE_CONFIG_NAME( ti_rs232 ); } -const rom_entry *ti_rs232_pio_device::device_rom_region() const +const tiny_rom_entry *ti_rs232_pio_device::device_rom_region() const { return ROM_NAME( ti_rs232 ); } diff --git a/src/devices/bus/ti99_peb/ti_rs232.h b/src/devices/bus/ti99_peb/ti_rs232.h index 78aea20a6bf..371eefccdf9 100644 --- a/src/devices/bus/ti99_peb/ti_rs232.h +++ b/src/devices/bus/ti99_peb/ti_rs232.h @@ -50,7 +50,7 @@ protected: virtual void device_start(void) override; virtual void device_reset(void) override; virtual void device_stop(void) override; - virtual const rom_entry *device_rom_region(void) const override; + virtual const tiny_rom_entry *device_rom_region(void) const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/ti99_peb/tn_ide.cpp b/src/devices/bus/ti99_peb/tn_ide.cpp index 3b9e9b1f6ce..39686998a96 100644 --- a/src/devices/bus/ti99_peb/tn_ide.cpp +++ b/src/devices/bus/ti99_peb/tn_ide.cpp @@ -34,7 +34,7 @@ #define CRU_BASE 0x1000 -#define BUFFER_TAG "ram" +#define RAMREGION "ram" /* previously 0xff */ #define PAGE_MASK 0x3f @@ -52,8 +52,9 @@ enum nouspikel_ide_interface_device::nouspikel_ide_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : ti_expansion_card_device(mconfig, TI99_IDE, "Nouspikel IDE interface card", tag, owner, clock, "ti99_ide", __FILE__), m_ata_irq(false), m_cru_register(0), m_rtc(nullptr), - m_ata(*this, "ata"), m_clk_irq(false), m_sram_enable(false), m_sram_enable_dip(false), m_cur_page(0), m_tms9995_mode(false), - m_input_latch(0), m_output_latch(0), m_ram(nullptr) + m_ata(*this, "ata"), m_clk_irq(false), m_sram_enable(false), + m_sram_enable_dip(false), m_cur_page(0), m_tms9995_mode(false), + m_input_latch(0), m_output_latch(0), m_ram(*this, RAMREGION) { } @@ -180,9 +181,9 @@ READ8Z_MEMBER(nouspikel_ide_interface_device::readz) else { /* sram */ if ((m_cru_register & cru_reg_page_0) || (addr >= 0x1000)) - reply = m_ram[addr+0x2000 * m_cur_page]; + reply = m_ram->pointer()[addr+0x2000 * m_cur_page]; else - reply = m_ram[addr]; + reply = m_ram->pointer()[addr]; } *value = reply; } @@ -267,9 +268,9 @@ WRITE8_MEMBER(nouspikel_ide_interface_device::write) if (! (m_cru_register & cru_reg_wp)) { if ((m_cru_register & cru_reg_page_0) || (addr >= 0x1000)) - m_ram[addr+0x2000 * m_cur_page] = data; + m_ram->pointer()[addr+0x2000 * m_cur_page] = data; else - m_ram[addr] = data; + m_ram->pointer()[addr] = data; } } } @@ -304,8 +305,6 @@ WRITE_LINE_MEMBER(nouspikel_ide_interface_device::clock_interrupt_callback) void nouspikel_ide_interface_device::device_start() { m_rtc = subdevice("ide_rtc"); - - m_ram = memregion(BUFFER_TAG)->base(); m_sram_enable_dip = false; // TODO: what is this? } @@ -338,12 +337,11 @@ MACHINE_CONFIG_FRAGMENT( tn_ide ) MCFG_RTC65271_INTERRUPT_CB(WRITELINE(nouspikel_ide_interface_device, clock_interrupt_callback)) MCFG_ATA_INTERFACE_ADD( "ata", ata_devices, "hdd", nullptr, false) MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(nouspikel_ide_interface_device, ide_interrupt_callback)) -MACHINE_CONFIG_END -ROM_START( tn_ide ) - ROM_REGION(0x80000, BUFFER_TAG, 0) /* RAM buffer 512 KiB */ - ROM_FILL(0x0000, 0x80000, 0x00) -ROM_END + MCFG_RAM_ADD(RAMREGION) + MCFG_RAM_DEFAULT_SIZE("512K") + MCFG_RAM_DEFAULT_VALUE(0) +MACHINE_CONFIG_END INPUT_PORTS_START( tn_ide ) PORT_START( "CRUIDE" ) @@ -371,11 +369,6 @@ machine_config_constructor nouspikel_ide_interface_device::device_mconfig_additi return MACHINE_CONFIG_NAME( tn_ide ); } -const rom_entry *nouspikel_ide_interface_device::device_rom_region() const -{ - return ROM_NAME( tn_ide ); -} - ioport_constructor nouspikel_ide_interface_device::device_input_ports() const { return INPUT_PORTS_NAME(tn_ide); diff --git a/src/devices/bus/ti99_peb/tn_ide.h b/src/devices/bus/ti99_peb/tn_ide.h index 52694555b3b..e4bb41e2642 100644 --- a/src/devices/bus/ti99_peb/tn_ide.h +++ b/src/devices/bus/ti99_peb/tn_ide.h @@ -17,6 +17,7 @@ #include "emu.h" #include "machine/ataintf.h" #include "machine/rtc65271.h" +#include "machine/ram.h" extern const device_type TI99_IDE; @@ -40,7 +41,6 @@ public: protected: virtual void device_start(void) override; virtual void device_reset(void) override; - virtual const rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; @@ -58,7 +58,7 @@ private: UINT16 m_input_latch; UINT16 m_output_latch; - UINT8 *m_ram; + required_device m_ram; }; #endif diff --git a/src/devices/bus/ti99x/genboard.cpp b/src/devices/bus/ti99x/genboard.cpp index 7eb48b6197a..572638701ce 100644 --- a/src/devices/bus/ti99x/genboard.cpp +++ b/src/devices/bus/ti99x/genboard.cpp @@ -206,12 +206,22 @@ #define TRACE_VIDEOWS 0 #define TRACE_PFM 0 +#define SRAM_PAR_TAG ":sram" +#define DRAM_PAR_TAG ":dram" + geneve_mapper_device::geneve_mapper_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) -: device_t(mconfig, GENEVE_MAPPER, "Geneve Gate Array", tag, owner, clock, "geneve_mapper", __FILE__), m_gromwaddr_LSB(false), m_gromraddr_LSB(false), m_grom_address(0), m_video_waitstates(false), m_extra_waitstates(false), m_ready_asserted(false), m_read_mode(false), m_debug_no_ws(false), m_geneve_mode(false), m_direct_mode(false), m_cartridge_size(0), m_cartridge_secondpage(false), m_cartridge6_writable(false), m_cartridge7_writable(false), m_turbo(false), m_genmod(false), m_timode(false), m_pfm_mode(0), m_pfm_bank(0), m_pfm_output_enable(false), m_sram_mask(0), m_sram_val(0), +: device_t(mconfig, GENEVE_MAPPER, "Geneve Gate Array", tag, owner, clock, "geneve_mapper", __FILE__), m_gromwaddr_LSB(false), + m_gromraddr_LSB(false), m_grom_address(0), m_video_waitstates(false), + m_extra_waitstates(false), m_ready_asserted(false), m_read_mode(false), + m_debug_no_ws(false), m_geneve_mode(false), m_direct_mode(false), + m_cartridge_size(0), m_cartridge_secondpage(false), + m_cartridge6_writable(false), m_cartridge7_writable(false), + m_turbo(false), m_genmod(false), m_timode(false), m_pfm_mode(0), + m_pfm_bank(0), m_pfm_output_enable(false), m_sram_mask(0), m_sram_val(0), m_ready(*this), m_waitcount(0), m_ext_waitcount(0), m_clock(nullptr), m_cpu(nullptr), m_pfm512(nullptr), m_pfm512a(nullptr), m_sound(nullptr), m_keyboard(nullptr), - m_video(nullptr), m_peribox(nullptr), m_sram(nullptr), m_dram(nullptr) + m_video(nullptr), m_peribox(nullptr), m_sram(*this, SRAM_PAR_TAG), m_dram(*this, DRAM_PAR_TAG) { m_eprom = nullptr; } @@ -225,12 +235,12 @@ INPUT_CHANGED_MEMBER( geneve_mapper_device::settings_changed ) { case 1: // Turbo switch. May be changed at any time. - if (TRACE_SETTING) logerror("%s: Setting turbo flag to %d\n", tag(), value); + if (TRACE_SETTING) logerror("Setting turbo flag to %d\n", value); m_turbo = (value!=0); break; case 2: // TIMode switch. Causes reset when changed. - if (TRACE_SETTING) logerror("%s: Setting timode flag to %d\n", tag(), value); + if (TRACE_SETTING) logerror("Setting timode flag to %d\n", value); m_timode = (value!=0); machine().schedule_hard_reset(); break; @@ -239,7 +249,7 @@ INPUT_CHANGED_MEMBER( geneve_mapper_device::settings_changed ) set_boot_rom(value); break; default: - logerror("%s: Unknown setting %d ignored\n", tag(), number); + logerror("Unknown setting %d ignored\n", number); } } @@ -277,7 +287,7 @@ READ8_MEMBER( geneve_mapper_device::read_grom ) // GROM data handling // GROMs are stored in pages 38..3f int page = 0x38; - reply = m_dram[(page<<13) + m_grom_address]; + reply = m_dram->pointer()[(page<<13) + m_grom_address]; m_grom_address = (m_grom_address + 1) & 0xffff; m_gromraddr_LSB = m_gromwaddr_LSB = false; } @@ -310,7 +320,7 @@ WRITE8_MEMBER( geneve_mapper_device::write_grom ) { // write GPL data // The Geneve GROM simulator allows for GROM writing (verified with a real system) int page = 0x38; - m_dram[(page<<13) + m_grom_address] = data; + m_dram->pointer()[(page<<13) + m_grom_address] = data; m_grom_address = (m_grom_address + 1) & 0xffff; m_gromraddr_LSB = m_gromwaddr_LSB = false; @@ -330,7 +340,7 @@ void geneve_mapper_device::set_wait(int min) m_waitcount = min + 1; if (m_waitcount > 1) { - if (TRACE_LINES) logerror("%s: Pulling down READY line for %d cycles\n", tag(), min); + if (TRACE_LINES) logerror("Pulling down READY line for %d cycles\n", min); m_ready(CLEAR_LINE); m_ready_asserted = false; } @@ -347,62 +357,62 @@ void geneve_mapper_device::set_boot_rom(int selection) switch (selection) { case GENEVE_098: - logerror("%s: Using 0.98 boot eprom\n", tag()); + logerror("Using 0.98 boot eprom\n"); m_eprom = machine().root_device().memregion("maincpu")->base() + 0x4000; m_pfm_mode = 0; break; case GENEVE_100: - logerror("%s: Using 1.00 boot eprom\n", tag()); + logerror("Using 1.00 boot eprom\n"); m_eprom = machine().root_device().memregion("maincpu")->base(); m_pfm_mode = 0; break; case GENEVE_PFM512: - logerror("%s: Using PFM512 (AT29C040)\n", tag()); + logerror("Using PFM512 (AT29C040)\n"); m_pfm_mode = 1; break; case GENEVE_PFM512A: - logerror("%s: Using PFM512A (AT29C040A)\n", tag()); + logerror("Using PFM512A (AT29C040A)\n"); m_pfm_mode = 2; break; default: - logerror("%s: Unknown boot ROM selection\n", tag()); + logerror("Unknown boot ROM selection\n"); } } void geneve_mapper_device::set_geneve_mode(bool geneve) { - if (TRACE_SETTING) logerror("%s: Setting Geneve mode = %d\n", tag(), geneve); + if (TRACE_SETTING) logerror("Setting Geneve mode = %d\n", geneve); m_geneve_mode = geneve; } void geneve_mapper_device::set_direct_mode(bool direct) { - if (TRACE_SETTING) logerror("%s: Setting direct mode = %d\n", tag(), direct); + if (TRACE_SETTING) logerror("Setting direct mode = %d\n", direct); m_direct_mode = direct; } void geneve_mapper_device::set_cartridge_size(int size) { - if (TRACE_SETTING) logerror("%s: Setting cartridge size to %d\n", tag(), size); + if (TRACE_SETTING) logerror("Setting cartridge size to %d\n", size); m_cartridge_size = size; } void geneve_mapper_device::set_cartridge_writable(int base, bool write) { - if (TRACE_SETTING) logerror("%s: Cartridge %04x space writable = %d\n", tag(), base, write); + if (TRACE_SETTING) logerror("Cartridge %04x space writable = %d\n", base, write); if (base==0x6000) m_cartridge6_writable = write; else m_cartridge7_writable = write; } void geneve_mapper_device::set_video_waitstates(bool wait) { - if (TRACE_VIDEOWS) logerror("%s: Setting video waitstates = %d\n", tag(), wait); + if (TRACE_VIDEOWS) logerror("Setting video waitstates = %d\n", wait); m_video_waitstates = wait; } void geneve_mapper_device::set_extra_waitstates(bool wait) { - if (TRACE_SETTING) logerror("%s: Setting extra waitstates = %d\n", tag(), wait); + if (TRACE_SETTING) logerror("Setting extra waitstates = %d\n", wait); m_extra_waitstates = wait; } @@ -473,7 +483,7 @@ READ8_MEMBER( geneve_mapper_device::readm ) if (!space.debugger_access()) { value = m_video->read(space, dec->offset>>1); - if (TRACE_READ) logerror("%s: Read video %04x -> %02x\n", tag(), dec->offset, value); + if (TRACE_READ) logerror("Read video %04x -> %02x\n", dec->offset, value); // Video wait states are created *after* the access // Accordingly, they have no effect when execution is in onchip RAM if (m_video_waitstates) set_ext_wait(15); @@ -483,13 +493,13 @@ READ8_MEMBER( geneve_mapper_device::readm ) case MLGMAPPER: // mapper value = m_map[dec->offset]; - if (TRACE_READ) logerror("%s: read mapper %04x -> %02x\n", tag(), dec->offset, value); + if (TRACE_READ) logerror("read mapper %04x -> %02x\n", dec->offset, value); break; case MLGKEY: // key if (!space.debugger_access()) value = m_keyboard->get_recent_key(); - if (TRACE_READ) logerror("%s: Read keyboard -> %02x\n", tag(), value); + if (TRACE_READ) logerror("Read keyboard -> %02x\n", value); break; case MLGCLOCK: @@ -497,19 +507,19 @@ READ8_MEMBER( geneve_mapper_device::readm ) // tests on the real machine showed that // upper nibble is 0xf (probably because of the location at 0xf130?) value = m_clock->read(space, dec->offset) | 0xf0; - if (TRACE_READ) logerror("%s: Read clock %04x -> %02x\n", tag(), dec->offset, value); + if (TRACE_READ) logerror("Read clock %04x -> %02x\n", dec->offset, value); break; case MLTMAPPER: // mapper value = m_map[dec->offset]; - if (TRACE_READ) logerror("%s: Read mapper %04x -> %02x\n", tag(), dec->offset, value); + if (TRACE_READ) logerror("Read mapper %04x -> %02x\n", dec->offset, value); break; case MLTKEY: // key if (!space.debugger_access()) value = m_keyboard->get_recent_key(); - if (TRACE_READ) logerror("%s: Read keyboard -> %02x\n", tag(), value); + if (TRACE_READ) logerror("Read keyboard -> %02x\n", value); break; case MLTCLOCK: @@ -523,7 +533,7 @@ READ8_MEMBER( geneve_mapper_device::readm ) // value floating around. value = m_clock->read(space, dec->offset); value |= (dec->offset==0x000f)? 0x20 : 0x10; - if (TRACE_READ) logerror("%s: Read clock %04x -> %02x\n", tag(), dec->offset, value); + if (TRACE_READ) logerror("Read clock %04x -> %02x\n", dec->offset, value); break; case MLTVIDEO: @@ -533,7 +543,7 @@ READ8_MEMBER( geneve_mapper_device::readm ) if (!space.debugger_access()) { value = m_video->read(space, dec->offset>>1); - if (TRACE_READ) logerror("%s: Read video %04x -> %02x\n", tag(), dec->offset, value); + if (TRACE_READ) logerror("Read video %04x -> %02x\n", dec->offset, value); // See above if (m_video_waitstates) set_ext_wait(15); } @@ -546,7 +556,7 @@ READ8_MEMBER( geneve_mapper_device::readm ) // We need to add the address prefix bits m_peribox->readz(space, dec->offset, &value, 0xff); m_peribox->memen_in(CLEAR_LINE); - if (TRACE_READ) logerror("%s: Read speech -> %02x\n", tag(), value); + if (TRACE_READ) logerror("Read speech -> %02x\n", value); break; case MLTGROM: @@ -554,7 +564,7 @@ READ8_MEMBER( geneve_mapper_device::readm ) // ++++ ++-- ---- ---+ // 1001 1000 0000 00x0 if (!space.debugger_access()) value = read_grom(space, dec->offset, 0xff); - if (TRACE_READ) logerror("%s: Read GROM %04x -> %02x\n", tag(), dec->offset, value); + if (TRACE_READ) logerror("Read GROM %04x -> %02x\n", dec->offset, value); break; case MLGSOUND: @@ -565,14 +575,14 @@ READ8_MEMBER( geneve_mapper_device::readm ) case MPGDRAM: // DRAM. - value = m_dram[dec->physaddr]; + value = m_dram->pointer()[dec->physaddr]; // LOG("dram read physaddr = %06x logaddr = %04x value = %02x\n", dec->physaddr, dec->offset, value); - if (TRACE_READ) logerror("%s: Read DRAM %04x (%06x) -> %02x\n", tag(), dec->offset, dec->physaddr, value); + if (TRACE_READ) logerror("Read DRAM %04x (%06x) -> %02x\n", dec->offset, dec->physaddr, value); break; case MPGEXP: // On-board memory expansion for standard Geneve (never used) - if (TRACE_READ) logerror("%s: Read unmapped area %06x\n", tag(), dec->physaddr); + if (TRACE_READ) logerror("Read unmapped area %06x\n", dec->physaddr); value = 0; break; @@ -582,7 +592,7 @@ READ8_MEMBER( geneve_mapper_device::readm ) if (m_pfm_mode == 0) { value = m_eprom[dec->physaddr & 0x003fff]; - if (TRACE_READ) logerror("%s: Read EPROM %04x (%06x) -> %02x\n", tag(), dec->offset, dec->physaddr, value); + if (TRACE_READ) logerror("Read EPROM %04x (%06x) -> %02x\n", dec->offset, dec->physaddr, value); } else value = read_from_pfm(space, dec->physaddr, 0xff); @@ -591,12 +601,12 @@ READ8_MEMBER( geneve_mapper_device::readm ) case MPGSRAM: if ((dec->physaddr & m_sram_mask)==m_sram_val) { - value = m_sram[dec->physaddr & ~m_sram_mask]; + value = m_sram->pointer()[dec->physaddr & ~m_sram_mask]; } else value = 0; // Return in any case // LOG("sram read physaddr = %06x logaddr = %04x value = %02x\n", dec->physaddr, dec->offset, value); - if (TRACE_READ) logerror("%s: Read SRAM %04x (%06x) -> %02x\n", tag(), dec->offset, dec->physaddr, value); + if (TRACE_READ) logerror("Read SRAM %04x (%06x) -> %02x\n", dec->offset, dec->physaddr, value); break; case MPGBOX: @@ -606,12 +616,12 @@ READ8_MEMBER( geneve_mapper_device::readm ) m_peribox->readz(space, dec->physaddr, &value, 0xff); m_peribox->memen_in(CLEAR_LINE); - if (TRACE_READ) logerror("%s: Read P-Box %04x (%06x) -> %02x\n", tag(), dec->offset, dec->physaddr, value); + if (TRACE_READ) logerror("Read P-Box %04x (%06x) -> %02x\n", dec->offset, dec->physaddr, value); break; case MPGMDRAM: // DRAM. One wait state. - value = m_dram[dec->physaddr]; + value = m_dram->pointer()[dec->physaddr]; break; case MPGMEPROM: @@ -620,7 +630,7 @@ READ8_MEMBER( geneve_mapper_device::readm ) if (m_pfm_mode == 0) { value = m_eprom[dec->physaddr & 0x003fff]; - if (TRACE_READ) logerror("%s: Read EPROM %04x (%06x) -> %02x\n", tag(), dec->offset, dec->physaddr, value); + if (TRACE_READ) logerror("Read EPROM %04x (%06x) -> %02x\n", dec->offset, dec->physaddr, value); } else value = read_from_pfm(space, dec->physaddr, 0xff); break; @@ -663,7 +673,7 @@ WRITE8_MEMBER( geneve_mapper_device::writem ) if (!space.debugger_access()) { m_video->write(space, dec->offset>>1, data); - if (TRACE_WRITE) logerror("%s: Write video %04x <- %02x\n", tag(), offset, data); + if (TRACE_WRITE) logerror("Write video %04x <- %02x\n", offset, data); // See above if (m_video_waitstates) set_ext_wait(15); } @@ -672,33 +682,33 @@ WRITE8_MEMBER( geneve_mapper_device::writem ) case MLGMAPPER: // mapper m_map[dec->offset] = data; - if (TRACE_WRITE) logerror("%s: Write mapper %04x <- %02x\n", tag(), offset, data); + if (TRACE_WRITE) logerror("Write mapper %04x <- %02x\n", offset, data); break; case MLGCLOCK: // clock // ++++ ++++ ++++ ---- m_clock->write(space, dec->offset, data); - if (TRACE_WRITE) logerror("%s: Write clock %04x <- %02x\n", tag(), offset, data); + if (TRACE_WRITE) logerror("Write clock %04x <- %02x\n", offset, data); break; case MLGSOUND: // sound // ++++ ++++ ++++ ---+ m_sound->write(space, 0, data, 0xff); - if (TRACE_WRITE) logerror("%s: Write sound <- %02x\n", tag(), data); + if (TRACE_WRITE) logerror("Write sound <- %02x\n", data); break; case MLTMAPPER: // mapper m_map[dec->offset] = data; - if (TRACE_WRITE) logerror("%s: Write mapper %04x <- %02x\n", tag(), offset, data); + if (TRACE_WRITE) logerror("Write mapper %04x <- %02x\n", offset, data); break; case MLTCLOCK: // clock m_clock->write(space, dec->offset, data); - if (TRACE_WRITE) logerror("%s: Write clock %04x <- %02x\n", tag(), offset, data); + if (TRACE_WRITE) logerror("Write clock %04x <- %02x\n", offset, data); break; case MLTVIDEO: @@ -709,7 +719,7 @@ WRITE8_MEMBER( geneve_mapper_device::writem ) if (!space.debugger_access()) { m_video->write(space, dec->offset>>1, data); - if (TRACE_WRITE) logerror("%s: Write video %04x <- %02x\n", tag(), offset, data); + if (TRACE_WRITE) logerror("Write video %04x <- %02x\n", offset, data); // See above if (m_video_waitstates) set_ext_wait(15); } @@ -722,7 +732,7 @@ WRITE8_MEMBER( geneve_mapper_device::writem ) // We need to add the address prefix bits m_peribox->write(space, dec->offset, data, 0xff); m_peribox->memen_in(CLEAR_LINE); - if (TRACE_WRITE) logerror("%s: Write speech <- %02x\n", tag(), data); + if (TRACE_WRITE) logerror("Write speech <- %02x\n", data); break; case MLTGROM: @@ -730,7 +740,7 @@ WRITE8_MEMBER( geneve_mapper_device::writem ) // ++++ ++-- ---- ---+ // 1001 1100 0000 00c0 write_grom(space, dec->offset, data, 0xff); - if (TRACE_WRITE) logerror("%s: Write GROM %04x <- %02x\n", tag(), offset, data); + if (TRACE_WRITE) logerror("Write GROM %04x <- %02x\n", offset, data); break; case MLTSOUND: @@ -738,7 +748,7 @@ WRITE8_MEMBER( geneve_mapper_device::writem ) // ++++ ++-- ---- ---+ // 1000 0100 0000 0000 m_sound->write(space, 0, data, 0xff); - if (TRACE_WRITE) logerror("%s: Write sound <- %02x\n", tag(), data); + if (TRACE_WRITE) logerror("Write sound <- %02x\n", data); break; case MLTKEY: @@ -747,13 +757,13 @@ WRITE8_MEMBER( geneve_mapper_device::writem ) case MPGDRAM: // DRAM write. One wait state. (only for normal Geneve) - m_dram[dec->physaddr] = data; - if (TRACE_WRITE) logerror("%s: Write DRAM %04x (%06x) <- %02x\n", tag(), offset, dec->physaddr, data); + m_dram->pointer()[dec->physaddr] = data; + if (TRACE_WRITE) logerror("Write DRAM %04x (%06x) <- %02x\n", offset, dec->physaddr, data); break; case MPGEXP: // On-board memory expansion for standard Geneve (never used) - if (TRACE_WRITE) logerror("%s: Write unmapped area %06x\n", tag(), dec->physaddr); + if (TRACE_WRITE) logerror("Write unmapped area %06x\n", dec->physaddr); break; case MPGEPROM: @@ -762,27 +772,27 @@ WRITE8_MEMBER( geneve_mapper_device::writem ) // Ignore EPROM write (unless PFM) if (m_pfm_mode != 0) write_to_pfm(space, dec->physaddr, data, 0xff); else - logerror("%s: Write EPROM %04x (%06x) <- %02x, ignored\n", tag(), offset, dec->physaddr, data); + logerror("Write EPROM %04x (%06x) <- %02x, ignored\n", offset, dec->physaddr, data); break; case MPGSRAM: if ((dec->physaddr & m_sram_mask)==m_sram_val) { - m_sram[dec->physaddr & ~m_sram_mask] = data; + m_sram->pointer()[dec->physaddr & ~m_sram_mask] = data; } - if (TRACE_WRITE) logerror("%s: Write SRAM %04x (%06x) <- %02x\n", tag(), offset, dec->physaddr, data); + if (TRACE_WRITE) logerror("Write SRAM %04x (%06x) <- %02x\n", offset, dec->physaddr, data); break; case MPGBOX: dec->physaddr = (dec->physaddr & 0x0007ffff); // 19 bit address - if (TRACE_WRITE) logerror("%s: Write P-Box %04x (%06x) <- %02x\n", tag(), offset, dec->physaddr, data); + if (TRACE_WRITE) logerror("Write P-Box %04x (%06x) <- %02x\n", offset, dec->physaddr, data); m_peribox->write(space, dec->physaddr, data, 0xff); m_peribox->memen_in(CLEAR_LINE); break; case MPGMDRAM: // DRAM. One wait state. - m_dram[dec->physaddr] = data; + m_dram->pointer()[dec->physaddr] = data; break; case MPGMEPROM: @@ -791,7 +801,7 @@ WRITE8_MEMBER( geneve_mapper_device::writem ) // Ignore EPROM write if (m_pfm_mode != 0) write_to_pfm(space, dec->physaddr, data, 0xff); else - logerror("%s: Write EPROM %04x (%06x) <- %02x, ignored\n", tag(), offset, dec->physaddr, data); + logerror("Write EPROM %04x (%06x) <- %02x, ignored\n", offset, dec->physaddr, data); break; case MPGMBOX: @@ -1119,7 +1129,7 @@ void geneve_mapper_device::decode(address_space& space, offs_t offset, bool read if (m_cartridge_size==0x4000) { m_cartridge_secondpage = ((dec->offset & 0x0002)!=0); - if (TRACE_WRITE) logerror("%s: Set cartridge page %02x\n", tag(), m_cartridge_secondpage); + if (TRACE_WRITE) logerror("Set cartridge page %02x\n", m_cartridge_secondpage); set_wait(1); return; } @@ -1129,7 +1139,7 @@ void geneve_mapper_device::decode(address_space& space, offs_t offset, bool read if ((((dec->offset & 0x1000)==0x0000) && !m_cartridge6_writable) || (((dec->offset & 0x1000)==0x1000) && !m_cartridge7_writable)) { - logerror("%s: Writing to protected cartridge space %04x ignored\n", tag(), dec->offset); + logerror("Writing to protected cartridge space %04x ignored\n", dec->offset); return; } else @@ -1229,11 +1239,11 @@ READ8_MEMBER( geneve_mapper_device::read_from_pfm ) value = m_pfm512a->read(space, address, mem_mask); break; default: - logerror("%s: Illegal mode for reading PFM: %d\n", tag(), m_pfm_mode); + logerror("Illegal mode for reading PFM: %d\n", m_pfm_mode); return 0; } - if (TRACE_PFM) logerror("%s: Reading from PFM at address %05x -> %02x\n", tag(), address, value); + if (TRACE_PFM) logerror("Reading from PFM at address %05x -> %02x\n", address, value); return value; } @@ -1242,7 +1252,7 @@ WRITE8_MEMBER( geneve_mapper_device::write_to_pfm ) // Nota bene: The PFM must be write protected on startup, or the RESET // of the 9995 will attempt to write the return vector into the flash EEPROM int address = (offset & 0x01ffff) | (m_pfm_bank<<17); - if (TRACE_PFM) logerror("%s: Writing to PFM at address %05x <- %02x\n", tag(), address, data); + if (TRACE_PFM) logerror("Writing to PFM at address %05x <- %02x\n", address, data); switch (m_pfm_mode) { @@ -1253,7 +1263,7 @@ WRITE8_MEMBER( geneve_mapper_device::write_to_pfm ) m_pfm512a->write(space, address, data, mem_mask); break; default: - logerror("%s: Illegal mode for writing to PFM: %d\n", tag(), m_pfm_mode); + logerror("Illegal mode for writing to PFM: %d\n", m_pfm_mode); } } @@ -1265,7 +1275,7 @@ WRITE8_MEMBER( geneve_mapper_device::write_to_pfm ) */ SETOFFSET_MEMBER( geneve_mapper_device::setoffset ) { - if (TRACE_DETAIL) logerror("%s: setoffset = %04x\n", tag(), offset); + if (TRACE_DETAIL) logerror("setoffset = %04x\n", offset); m_debug_no_ws = false; decode(space, offset, m_read_mode, &m_decoded); } @@ -1294,13 +1304,13 @@ WRITE_LINE_MEMBER( geneve_mapper_device::clock_in ) m_waitcount--; if (m_waitcount == 0) { - if (TRACE_CLOCK) logerror("%s: clock, READY asserted\n", tag()); + if (TRACE_CLOCK) logerror("clock, READY asserted\n"); m_ready(ASSERT_LINE); m_ready_asserted = true; } else { - if (TRACE_CLOCK) logerror("%s: clock\n", tag()); + if (TRACE_CLOCK) logerror("clock\n"); } } else @@ -1310,13 +1320,13 @@ WRITE_LINE_MEMBER( geneve_mapper_device::clock_in ) m_ext_waitcount--; if (m_ext_waitcount == 0) { - if (TRACE_CLOCK) logerror("%s: clock, READY asserted after video\n", tag()); + if (TRACE_CLOCK) logerror("clock, READY asserted after video\n"); m_ready(ASSERT_LINE); m_ready_asserted = true; } else { - if (TRACE_CLOCK) logerror("%s: vclock, ew=%d\n", tag(), m_ext_waitcount); + if (TRACE_CLOCK) logerror("vclock, ew=%d\n", m_ext_waitcount); } } } @@ -1328,7 +1338,7 @@ WRITE_LINE_MEMBER( geneve_mapper_device::clock_in ) // Do we have video wait states? In that case, clear the line again if ((m_waitcount == 0) && (m_ext_waitcount > 0) && m_ready_asserted) { - if (TRACE_CLOCK) logerror("%s: clock, READY cleared for video\n", tag()); + if (TRACE_CLOCK) logerror("clock, READY cleared for video\n"); m_ready(CLEAR_LINE); m_ready_asserted = false; } @@ -1341,7 +1351,7 @@ WRITE_LINE_MEMBER( geneve_mapper_device::clock_in ) WRITE_LINE_MEMBER( geneve_mapper_device::dbin_in ) { m_read_mode = (state==ASSERT_LINE); - if (TRACE_DETAIL) logerror("%s: dbin = %02x\n", tag(), m_read_mode? 1:0); + if (TRACE_DETAIL) logerror("dbin = %02x\n", m_read_mode? 1:0); } /* @@ -1351,21 +1361,21 @@ WRITE_LINE_MEMBER( geneve_mapper_device::pfm_select_lsb ) { if (state==ASSERT_LINE) m_pfm_bank |= 1; else m_pfm_bank &= 0xfe; - if (TRACE_PFM) logerror("%s: Setting bank (l) = %d\n", tag(), m_pfm_bank); + if (TRACE_PFM) logerror("Setting bank (l) = %d\n", m_pfm_bank); } WRITE_LINE_MEMBER( geneve_mapper_device::pfm_select_msb ) { if (state==ASSERT_LINE) m_pfm_bank |= 2; else m_pfm_bank &= 0xfd; - if (TRACE_PFM) logerror("%s: Setting bank (u) = %d\n", tag(), m_pfm_bank); + if (TRACE_PFM) logerror("Setting bank (u) = %d\n", m_pfm_bank); } WRITE_LINE_MEMBER( geneve_mapper_device::pfm_output_enable ) { // Negative logic m_pfm_output_enable = (state==CLEAR_LINE); - if (TRACE_PFM) logerror("%s: PFM output %s\n", tag(), m_pfm_output_enable? "enable" : "disable"); + if (TRACE_PFM) logerror("PFM output %s\n", m_pfm_output_enable? "enable" : "disable"); } //==================================================================== @@ -1386,9 +1396,6 @@ void geneve_mapper_device::device_start() m_pfm512a = machine().device(PFM512A_TAG); m_ready.resolve(); - - m_sram = machine().root_device().memregion(SRAM_TAG)->base(); - m_dram = machine().root_device().memregion(DRAM_TAG)->base(); m_cpu = static_cast(machine().device("maincpu")); m_geneve_mode = false; @@ -1425,7 +1432,7 @@ void geneve_mapper_device::device_reset() // Check for GenMod. We assume that GenMod can be combined with PFM. if (machine().root_device().ioport("MODE")->read()!=0) { - logerror("%s: Using GenMod modification\n", tag()); + logerror("Using GenMod modification\n"); m_eprom = machine().root_device().memregion("maincpu")->base() + 0x8000; if (m_eprom[0] != 0xf0) { @@ -1508,7 +1515,7 @@ void geneve_keyboard_device::post_in_key_queue(int keycode) m_key_queue[(m_key_queue_head + m_key_queue_length) % KEYQUEUESIZE] = keycode; m_key_queue_length++; - if (TRACE_KEYBOARD) logerror("%s: Posting keycode %02x\n", tag(), keycode); + if (TRACE_KEYBOARD) logerror("Posting keycode %02x\n", keycode); } void geneve_keyboard_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) @@ -1523,7 +1530,7 @@ void geneve_keyboard_device::poll() int i, j; int keycode; int pressed; - if (TRACE_KEYBOARD) logerror("%s: Poll keyboard\n", tag()); + if (TRACE_KEYBOARD) logerror("Poll keyboard\n"); if (m_key_reset) return; /* Poll keyboard */ @@ -1729,7 +1736,7 @@ void geneve_keyboard_device::signal_when_key_available() // buffer clear is disabled, and key queue is not empty. */ if ((!m_key_reset) && (m_keyboard_clock) && (m_keep_keybuf) && (m_key_queue_length != 0)) { - if (TRACE_KEYBOARD) logerror("%s: Signalling key available\n", tag()); + if (TRACE_KEYBOARD) logerror("Signalling key available\n"); m_interrupt(ASSERT_LINE); m_key_in_buffer = true; } @@ -1739,7 +1746,7 @@ WRITE_LINE_MEMBER( geneve_keyboard_device::clock_control ) { bool rising_edge = (!m_keyboard_clock && (state==ASSERT_LINE)); m_keyboard_clock = (state==ASSERT_LINE); - if (TRACE_KEYBOARD) logerror("%s: Keyboard clock_control state=%d\n", tag(), m_keyboard_clock); + if (TRACE_KEYBOARD) logerror("Keyboard clock_control state=%d\n", m_keyboard_clock); if (rising_edge) signal_when_key_available(); } diff --git a/src/devices/bus/ti99x/genboard.h b/src/devices/bus/ti99x/genboard.h index 4f9c5da7f27..932989cf8d7 100644 --- a/src/devices/bus/ti99x/genboard.h +++ b/src/devices/bus/ti99x/genboard.h @@ -21,6 +21,7 @@ #include "machine/at29x.h" #include "bus/ti99_peb/peribox.h" #include "sound/sn76496.h" +#include "machine/ram.h" extern const device_type GENEVE_MOUSE; extern const device_type GENEVE_KEYBOARD; @@ -212,8 +213,8 @@ private: v9938_device* m_video; peribox_device* m_peribox; UINT8* m_eprom; - UINT8* m_sram; - UINT8* m_dram; + required_device m_sram; + required_device m_dram; }; #define MCFG_GENEVE_READY_HANDLER( _intcallb ) \ diff --git a/src/devices/bus/ti99x/gromport.cpp b/src/devices/bus/ti99x/gromport.cpp index a41a5285a7f..b0539a7ad8f 100644 --- a/src/devices/bus/ti99x/gromport.cpp +++ b/src/devices/bus/ti99x/gromport.cpp @@ -1071,7 +1071,7 @@ ROM_START( gkracker_rom ) ROM_LOAD("gkracker.bin", 0x0000, 0x2000, CRC(86eaaf9f) SHA1(a3bd5257c63e190800921b52dbe3ffa91ad91113)) ROM_END -const rom_entry *gkracker_device::device_rom_region() const +const tiny_rom_entry *gkracker_device::device_rom_region() const { return ROM_NAME( gkracker_rom ); } @@ -1498,7 +1498,7 @@ ROM_START( cartridge_memory ) ROM_REGION(0x200000, CARTROM_TAG, ROMREGION_ERASE00) ROM_END -const rom_entry *ti99_cartridge_device::device_rom_region() const +const tiny_rom_entry *ti99_cartridge_device::device_rom_region() const { return ROM_NAME( cartridge_memory ); } diff --git a/src/devices/bus/ti99x/gromport.h b/src/devices/bus/ti99x/gromport.h index 81fa024f995..d21497d9d55 100644 --- a/src/devices/bus/ti99x/gromport.h +++ b/src/devices/bus/ti99x/gromport.h @@ -12,6 +12,8 @@ #include "emu.h" #include "ti99defs.h" #include "machine/tmc0430.h" +#include "softlist_dev.h" + extern const device_type GROMPORT; @@ -103,7 +105,7 @@ protected: virtual void device_start() override { }; virtual void device_config_complete() override; virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry* device_rom_region() const override; + virtual const tiny_rom_entry* device_rom_region() const override; // Image handling: implementation of methods which are abstract in the parent image_init_result call_load() override; @@ -261,7 +263,7 @@ protected: virtual void device_reset() override; virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry* device_rom_region() const override; + virtual const tiny_rom_entry* device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; // device_nvram_interface diff --git a/src/devices/bus/tiki100/8088.cpp b/src/devices/bus/tiki100/8088.cpp index d8c9fe201b5..e3bc01908fb 100644 --- a/src/devices/bus/tiki100/8088.cpp +++ b/src/devices/bus/tiki100/8088.cpp @@ -42,7 +42,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *tiki100_8088_t::device_rom_region() const +const tiny_rom_entry *tiki100_8088_t::device_rom_region() const { return ROM_NAME( tiki100_8088 ); } diff --git a/src/devices/bus/tiki100/8088.h b/src/devices/bus/tiki100/8088.h index 7ce0fe64776..3b019131472 100644 --- a/src/devices/bus/tiki100/8088.h +++ b/src/devices/bus/tiki100/8088.h @@ -31,7 +31,7 @@ public: tiki100_8088_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_READ8_MEMBER( read ); diff --git a/src/devices/bus/tvc/hbf.cpp b/src/devices/bus/tvc/hbf.cpp index 8fd354a18c4..e8de66ebc07 100644 --- a/src/devices/bus/tvc/hbf.cpp +++ b/src/devices/bus/tvc/hbf.cpp @@ -98,7 +98,7 @@ machine_config_constructor tvc_hbf_device::device_mconfig_additions() const // device_rom_region //------------------------------------------------- -const rom_entry *tvc_hbf_device::device_rom_region() const +const tiny_rom_entry *tvc_hbf_device::device_rom_region() const { return ROM_NAME( tvc_hbf ); } diff --git a/src/devices/bus/tvc/hbf.h b/src/devices/bus/tvc/hbf.h index da677aa617e..83d98d8a0cb 100644 --- a/src/devices/bus/tvc/hbf.h +++ b/src/devices/bus/tvc/hbf.h @@ -27,7 +27,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_FLOPPY_FORMATS( floppy_formats ); diff --git a/src/devices/bus/vboy/slot.h b/src/devices/bus/vboy/slot.h index cf031e75f85..71adadd6a2a 100644 --- a/src/devices/bus/vboy/slot.h +++ b/src/devices/bus/vboy/slot.h @@ -3,6 +3,9 @@ #ifndef __VBOY_SLOT_H #define __VBOY_SLOT_H +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/vc4000/slot.h b/src/devices/bus/vc4000/slot.h index 069593208bc..ed3425d0ddc 100644 --- a/src/devices/bus/vc4000/slot.h +++ b/src/devices/bus/vc4000/slot.h @@ -3,6 +3,9 @@ #ifndef __VC4000_SLOT_H #define __VC4000_SLOT_H +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/vcs/vcs_slot.h b/src/devices/bus/vcs/vcs_slot.h index 142c30f9622..b8532dc216d 100755 --- a/src/devices/bus/vcs/vcs_slot.h +++ b/src/devices/bus/vcs/vcs_slot.h @@ -3,6 +3,8 @@ #ifndef __VCS_SLOT_H #define __VCS_SLOT_H +#include "softlist_dev.h" + /*************************************************************************** TYPE DEFINITIONS diff --git a/src/devices/bus/vectrex/slot.h b/src/devices/bus/vectrex/slot.h index 5c0183327ae..261574556cd 100644 --- a/src/devices/bus/vectrex/slot.h +++ b/src/devices/bus/vectrex/slot.h @@ -3,6 +3,9 @@ #ifndef __VECTREX_SLOT_H #define __VECTREX_SLOT_H +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/vic10/exp.h b/src/devices/bus/vic10/exp.h index 4221991e124..a3ff118c891 100644 --- a/src/devices/bus/vic10/exp.h +++ b/src/devices/bus/vic10/exp.h @@ -37,10 +37,10 @@ #define __VIC10_EXPANSION_SLOT__ #include "emu.h" +#include "softlist_dev.h" #include "formats/cbm_crt.h" - //************************************************************************** // CONSTANTS //************************************************************************** diff --git a/src/devices/bus/vic20/exp.h b/src/devices/bus/vic20/exp.h index 1bd6092e400..9f161fb5c28 100644 --- a/src/devices/bus/vic20/exp.h +++ b/src/devices/bus/vic20/exp.h @@ -37,7 +37,7 @@ #define __VIC20_EXPANSION_SLOT__ #include "emu.h" - +#include "softlist_dev.h" //************************************************************************** diff --git a/src/devices/bus/vic20/fe3.cpp b/src/devices/bus/vic20/fe3.cpp index 9c24b0de19e..1c07b296f98 100644 --- a/src/devices/bus/vic20/fe3.cpp +++ b/src/devices/bus/vic20/fe3.cpp @@ -75,7 +75,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *vic20_final_expansion_3_t::device_rom_region() const +const tiny_rom_entry *vic20_final_expansion_3_t::device_rom_region() const { return ROM_NAME( vic20_fe3 ); } diff --git a/src/devices/bus/vic20/fe3.h b/src/devices/bus/vic20/fe3.h index 93669f5ace3..01a4a743c63 100644 --- a/src/devices/bus/vic20/fe3.h +++ b/src/devices/bus/vic20/fe3.h @@ -31,7 +31,7 @@ public: vic20_final_expansion_3_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; protected: diff --git a/src/devices/bus/vidbrain/exp.h b/src/devices/bus/vidbrain/exp.h index f662dd7cfa7..c9cd6677b55 100644 --- a/src/devices/bus/vidbrain/exp.h +++ b/src/devices/bus/vidbrain/exp.h @@ -40,7 +40,7 @@ #define __VIDEOBRAIN_EXPANSION_SLOT__ #include "emu.h" - +#include "softlist_dev.h" //************************************************************************** diff --git a/src/devices/bus/vip/vp700.cpp b/src/devices/bus/vip/vp700.cpp index 7d9b32536a7..bfdfd488067 100644 --- a/src/devices/bus/vip/vp700.cpp +++ b/src/devices/bus/vip/vp700.cpp @@ -30,7 +30,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *vp700_device::device_rom_region() const +const tiny_rom_entry *vp700_device::device_rom_region() const { return ROM_NAME( vp700 ); } diff --git a/src/devices/bus/vip/vp700.h b/src/devices/bus/vip/vp700.h index 2631dc01c62..f3e515928a9 100644 --- a/src/devices/bus/vip/vp700.h +++ b/src/devices/bus/vip/vp700.h @@ -31,7 +31,7 @@ public: vp700_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/bus/vtech/memexp/floppy.cpp b/src/devices/bus/vtech/memexp/floppy.cpp index afe88fce06a..6f3196f64e0 100644 --- a/src/devices/bus/vtech/memexp/floppy.cpp +++ b/src/devices/bus/vtech/memexp/floppy.cpp @@ -34,7 +34,7 @@ ROM_START( floppy ) ROM_LOAD("vzdos.rom", 0x0000, 0x2000, CRC(b6ed6084) SHA1(59d1cbcfa6c5e1906a32704fbf0d9670f0d1fd8b)) ROM_END -const rom_entry *floppy_controller_device::device_rom_region() const +const tiny_rom_entry *floppy_controller_device::device_rom_region() const { return ROM_NAME( floppy ); } diff --git a/src/devices/bus/vtech/memexp/floppy.h b/src/devices/bus/vtech/memexp/floppy.h index 7b01c742d07..e12dea6ffb2 100644 --- a/src/devices/bus/vtech/memexp/floppy.h +++ b/src/devices/bus/vtech/memexp/floppy.h @@ -39,7 +39,7 @@ public: DECLARE_READ8_MEMBER(wpt_r); protected: - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/vtech/memexp/rs232.cpp b/src/devices/bus/vtech/memexp/rs232.cpp index 188f473514b..254664acbf7 100644 --- a/src/devices/bus/vtech/memexp/rs232.cpp +++ b/src/devices/bus/vtech/memexp/rs232.cpp @@ -24,7 +24,7 @@ ROM_START( rs232 ) ROM_LOAD("rs232_v15.ic2", 0x000, 0x800, CRC(6545260d) SHA1(4042f6f1e09e383f3c92f628c6187dc5f072fdb2)) ROM_END -const rom_entry *rs232_interface_device::device_rom_region() const +const tiny_rom_entry *rs232_interface_device::device_rom_region() const { return ROM_NAME( rs232 ); } diff --git a/src/devices/bus/vtech/memexp/rs232.h b/src/devices/bus/vtech/memexp/rs232.h index 23c91004533..eef273da255 100644 --- a/src/devices/bus/vtech/memexp/rs232.h +++ b/src/devices/bus/vtech/memexp/rs232.h @@ -33,7 +33,7 @@ public: DECLARE_WRITE8_MEMBER( transmit_data_w ); protected: - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/vtech/memexp/rtty.cpp b/src/devices/bus/vtech/memexp/rtty.cpp index fa1438461f3..b44a81c370a 100644 --- a/src/devices/bus/vtech/memexp/rtty.cpp +++ b/src/devices/bus/vtech/memexp/rtty.cpp @@ -24,7 +24,7 @@ ROM_START( rtty ) ROM_LOAD("vzrtty.ic3", 0x0000, 0x1000, CRC(ccf4289b) SHA1(de737ef0e0b582b3102da473836af1fa159a2e78)) ROM_END -const rom_entry *rtty_interface_device::device_rom_region() const +const tiny_rom_entry *rtty_interface_device::device_rom_region() const { return ROM_NAME( rtty ); } diff --git a/src/devices/bus/vtech/memexp/rtty.h b/src/devices/bus/vtech/memexp/rtty.h index 1bc25eca77a..1b96c611ece 100644 --- a/src/devices/bus/vtech/memexp/rtty.h +++ b/src/devices/bus/vtech/memexp/rtty.h @@ -32,7 +32,7 @@ public: DECLARE_WRITE8_MEMBER( relay_w ); protected: - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/vtech/memexp/wordpro.cpp b/src/devices/bus/vtech/memexp/wordpro.cpp index 1a038bcf0ac..1eb51c23d82 100644 --- a/src/devices/bus/vtech/memexp/wordpro.cpp +++ b/src/devices/bus/vtech/memexp/wordpro.cpp @@ -26,7 +26,7 @@ ROM_START( wordpro ) ROM_LOAD("wordpro.u5", 0x2000, 0x1000, CRC(2a336802) SHA1(b4de50f943243f18a2bfabef354b76d77178c189)) ROM_END -const rom_entry *wordpro_device::device_rom_region() const +const tiny_rom_entry *wordpro_device::device_rom_region() const { return ROM_NAME( wordpro ); } diff --git a/src/devices/bus/vtech/memexp/wordpro.h b/src/devices/bus/vtech/memexp/wordpro.h index 79e78735cd4..288a7fb565d 100644 --- a/src/devices/bus/vtech/memexp/wordpro.h +++ b/src/devices/bus/vtech/memexp/wordpro.h @@ -28,7 +28,7 @@ public: wordpro_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); protected: - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_start() override; virtual void device_reset() override; }; diff --git a/src/devices/bus/wangpc/lic.cpp b/src/devices/bus/wangpc/lic.cpp index cebc359a942..c14dce7a5d3 100644 --- a/src/devices/bus/wangpc/lic.cpp +++ b/src/devices/bus/wangpc/lic.cpp @@ -39,7 +39,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *wangpc_lic_device::device_rom_region() const +const tiny_rom_entry *wangpc_lic_device::device_rom_region() const { return ROM_NAME( wangpc_lic ); } diff --git a/src/devices/bus/wangpc/lic.h b/src/devices/bus/wangpc/lic.h index 98f9f83fd3a..071b26dde58 100644 --- a/src/devices/bus/wangpc/lic.h +++ b/src/devices/bus/wangpc/lic.h @@ -30,7 +30,7 @@ public: wangpc_lic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; protected: diff --git a/src/devices/bus/wangpc/rtc.cpp b/src/devices/bus/wangpc/rtc.cpp index 34279514870..6f9ffb171c7 100644 --- a/src/devices/bus/wangpc/rtc.cpp +++ b/src/devices/bus/wangpc/rtc.cpp @@ -45,7 +45,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *wangpc_rtc_device::device_rom_region() const +const tiny_rom_entry *wangpc_rtc_device::device_rom_region() const { return ROM_NAME( wangpc_rtc ); } diff --git a/src/devices/bus/wangpc/rtc.h b/src/devices/bus/wangpc/rtc.h index f59de8c8139..3265e895f72 100644 --- a/src/devices/bus/wangpc/rtc.h +++ b/src/devices/bus/wangpc/rtc.h @@ -34,7 +34,7 @@ public: wangpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/wangpc/tig.cpp b/src/devices/bus/wangpc/tig.cpp index 519758ba12a..c808ac69622 100644 --- a/src/devices/bus/wangpc/tig.cpp +++ b/src/devices/bus/wangpc/tig.cpp @@ -70,7 +70,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *wangpc_tig_device::device_rom_region() const +const tiny_rom_entry *wangpc_tig_device::device_rom_region() const { return ROM_NAME( wangpc_tig ); } diff --git a/src/devices/bus/wangpc/tig.h b/src/devices/bus/wangpc/tig.h index 8f9f8f9a5eb..fd9d3fc12a0 100644 --- a/src/devices/bus/wangpc/tig.h +++ b/src/devices/bus/wangpc/tig.h @@ -31,7 +31,7 @@ public: wangpc_tig_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/wangpc/wdc.cpp b/src/devices/bus/wangpc/wdc.cpp index b4326319cf3..740a16e5c8c 100644 --- a/src/devices/bus/wangpc/wdc.cpp +++ b/src/devices/bus/wangpc/wdc.cpp @@ -53,7 +53,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *wangpc_wdc_device::device_rom_region() const +const tiny_rom_entry *wangpc_wdc_device::device_rom_region() const { return ROM_NAME( wangpc_wdc ); } diff --git a/src/devices/bus/wangpc/wdc.h b/src/devices/bus/wangpc/wdc.h index fd8edbcbfdf..7657c77dfe2 100644 --- a/src/devices/bus/wangpc/wdc.h +++ b/src/devices/bus/wangpc/wdc.h @@ -33,7 +33,7 @@ public: wangpc_wdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; // not really public diff --git a/src/devices/bus/wswan/slot.h b/src/devices/bus/wswan/slot.h index 72036eab9ca..bd9d74fbe85 100644 --- a/src/devices/bus/wswan/slot.h +++ b/src/devices/bus/wswan/slot.h @@ -3,6 +3,9 @@ #ifndef __WS_SLOT_H #define __WS_SLOT_H +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/bus/x68k/x68k_scsiext.cpp b/src/devices/bus/x68k/x68k_scsiext.cpp index 960721458f0..e6414a4a9b5 100644 --- a/src/devices/bus/x68k/x68k_scsiext.cpp +++ b/src/devices/bus/x68k/x68k_scsiext.cpp @@ -29,7 +29,7 @@ ROM_START( x68k_cz6bs1 ) ROM_LOAD16_WORD_SWAP( "scsiexrom.bin", 0x0000, 0x2000, CRC(7be488de) SHA1(49616c09a8986ffe6a12ad600febe512f7ba8ae4) ) ROM_END -const rom_entry *x68k_scsiext_device::device_rom_region() const +const tiny_rom_entry *x68k_scsiext_device::device_rom_region() const { return ROM_NAME( x68k_cz6bs1 ); } diff --git a/src/devices/bus/x68k/x68k_scsiext.h b/src/devices/bus/x68k/x68k_scsiext.h index 7cd45c2c6da..3477daa7ad3 100644 --- a/src/devices/bus/x68k/x68k_scsiext.h +++ b/src/devices/bus/x68k/x68k_scsiext.h @@ -22,7 +22,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; void irq_w(int state); void drq_w(int state); diff --git a/src/devices/bus/z88/z88.h b/src/devices/bus/z88/z88.h index 60dfa2f924c..73d64575976 100644 --- a/src/devices/bus/z88/z88.h +++ b/src/devices/bus/z88/z88.h @@ -54,6 +54,9 @@ #ifndef __Z88CART_H__ #define __Z88CART_H__ +#include "softlist_dev.h" + + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ diff --git a/src/devices/cpu/alto2/a2curt.cpp b/src/devices/cpu/alto2/a2curt.cpp index bc934afef45..1980408f2b5 100644 --- a/src/devices/cpu/alto2/a2curt.cpp +++ b/src/devices/cpu/alto2/a2curt.cpp @@ -28,6 +28,15 @@ void alto2_cpu_device::f2_late_load_xpreg() /** * @brief f2_load_csr late: load the cursor shift register from BUS[0-15] + */ +void alto2_cpu_device::f2_late_load_csr() +{ + m_dsp.csr = m_bus; + LOG((this,LOG_CURT, m_dsp.csr ? 2 : 9," CSR<- BUS (%#o)\n", m_dsp.csr)); +} + +/** + * @brief curt_activate: called by the CPU when the cursor task becomes active * * Shift CSR to xpreg % 16 position to make it easier to * to handle the word xor in unload_word(). @@ -43,15 +52,6 @@ void alto2_cpu_device::f2_late_load_xpreg() * 15 000000000000000xxxxxxxxxxxxxxxx0 * */ -void alto2_cpu_device::f2_late_load_csr() -{ - m_dsp.csr = m_bus; - LOG((this,LOG_CURT, m_dsp.csr ? 2 : 9," CSR<- BUS (%#o)\n", m_dsp.csr)); -} - -/** - * @brief curt_activate: called by the CPU when the cursor task becomes active - */ void alto2_cpu_device::activate_curt() { m_task_wakeup &= ~(1 << m_task); @@ -67,10 +67,6 @@ void alto2_cpu_device::activate_curt() /** @brief initialize the cursor task F1 and F2 functions */ void alto2_cpu_device::init_curt(int task) { - set_f1(task, f1_block, &alto2_cpu_device::f1_early_curt_block, nullptr); - set_f2(task, f2_curt_load_xpreg, nullptr, &alto2_cpu_device::f2_late_load_xpreg); - set_f2(task, f2_curt_load_csr, nullptr, &alto2_cpu_device::f2_late_load_csr); - m_active_callback[task] = &alto2_cpu_device::activate_curt; } void alto2_cpu_device::exit_curt() diff --git a/src/devices/cpu/alto2/a2dht.cpp b/src/devices/cpu/alto2/a2dht.cpp index 2f9aef63906..27f2103344c 100644 --- a/src/devices/cpu/alto2/a2dht.cpp +++ b/src/devices/cpu/alto2/a2dht.cpp @@ -7,6 +7,52 @@ *****************************************************************************/ #include "alto2cpu.h" +/* + * Copied from ALTOCODE24.MU + * ;Display Horizontal Task. + * ;11 cycles if no block change, 17 if new control block. + * + * DHT: MAR↠CBA-1; + * L↠SLC -1, BUS=0; + * SLC↠L, :DHT0; + * + * DHT0: T↠37400; MORE TO DO IN THIS BLOCK + * SINK↠MD; + * L↠T↠MD AND T, SETMODE; + * HTAB↠L LCY 8, :NORMODE; + * + * NORMODE:L↠T↠377 . T; + * AECL↠L, :REST; + * + * HALFMODE: L↠T↠377 . T; + * AECL↠L, :REST, T↠0; + * + * REST: L↠DWA + T,TASK; INCREMENT DWA BY 0 OR NWRDS + * NDNX: DWA↠L, :DHT; + * + * DHT1: L↠T↠MD+1, BUS=0; + * CBA↠L, MAR↠T, :MOREB; + * + * NOMORE: BLOCK, :DNX; + * MOREB: T↠37400; + * L↠T↠MD AND T, SETMODE; + * MAR↠CBA+1, :NORMX, EVENFIELD; + * + * NORMX: HTAB↠L LCY 8, :NODD; + * HALFX: HTAB↠L LCY 8, :NEVEN; + * + * NODD: Lâ†T↠377 . T; + * AECL↠L, :XREST; ODD FIELD, FULL RESOLUTION + * + * NEVEN: L↠377 AND T; EVEN FIELD OR HALF RESOLUTION + * AECLâ†L, Tâ†0; + * + * XREST: L↠MD+T; + * Tâ†MD-1; + * DNX: DWAâ†L, Lâ†T, TASK; + * SLCâ†L, :DHT; + */ + /** * @brief f1_dht_block early: disable the display word task */ @@ -49,10 +95,6 @@ void alto2_cpu_device::activate_dht() */ void alto2_cpu_device::init_dht(int task) { - set_f1(task, f1_block, &alto2_cpu_device::f1_early_dht_block, nullptr); - set_f2(task, f2_dht_evenfield, nullptr, &alto2_cpu_device::f2_late_evenfield); - set_f2(task, f2_dht_setmode, nullptr, &alto2_cpu_device::f2_late_dht_setmode); - m_active_callback[task] = &alto2_cpu_device::activate_dht; } void alto2_cpu_device::exit_dht() diff --git a/src/devices/cpu/alto2/a2disk.cpp b/src/devices/cpu/alto2/a2disk.cpp index 4ad6be9ab74..c4658726492 100644 --- a/src/devices/cpu/alto2/a2disk.cpp +++ b/src/devices/cpu/alto2/a2disk.cpp @@ -61,22 +61,6 @@ #define GET_KCOM_SENDADR(kcom) X_RDBITS(kcom,16,5,5) //!< get send address flag from controller command (hardware command register) #define PUT_KCOM_SENDADR(kcom,val) X_WRBITS(kcom,16,5,5,val) //!< put send address flag into controller command (hardware command register) -#if defined(ALTO2_FAKE_STATUS_H) && (ALTO2_FAKE_STATUS_H > 0) -#define STATUS_DP0 28 -#define STATUS_DP1 58 -#define STATUS_RGATE 0, "%c" -#define STATUS_WGATE 1, "%c" -#define STATUS_KWRC 2, "%c" -#define STATUS_CYL 4, "C%03d" -#define STATUS_HEAD 9, "H%d" -#define STATUS_SECT 12, "S%02d" -#define STATUS_PAGE 16, "[%04d]" -#define FAKE_STATUS(_unit,_which,...) do { \ - int x = (_unit) ? STATUS_DP1 : STATUS_DP0; \ - fake_status_printf(x + _which, __VA_ARGS__); \ -} while (0) -#endif - /** @brief completion codes (only for documentation, since this is microcode defined) */ enum { STATUS_COMPLETION_GOOD, @@ -769,8 +753,6 @@ void alto2_cpu_device::kwd_timing(int bitclk, int datin, int block) dhd->set_egate(m_dsk.egate = 1); dhd->set_wrgate(m_dsk.wrgate = 1); dhd->set_rdgate(m_dsk.rdgate = 1); - FAKE_STATUS(m_dsk.drive, STATUS_WGATE, '-'); - FAKE_STATUS(m_dsk.drive, STATUS_RGATE, '-'); } else { if (m_dsk.krwc & RWC_WRITE) { if (m_dsk.ok_to_run) { @@ -789,7 +771,6 @@ void alto2_cpu_device::kwd_timing(int bitclk, int datin, int block) // assert erase and write gates dhd->set_egate(m_dsk.egate = 0); dhd->set_wrgate(m_dsk.wrgate = 0); - FAKE_STATUS(m_dsk.drive, STATUS_WGATE, 'W'); } } else { #if ALTO2_DEBUG @@ -799,7 +780,6 @@ void alto2_cpu_device::kwd_timing(int bitclk, int datin, int block) #endif // assert read gate dhd->set_rdgate(m_dsk.rdgate = 0); - FAKE_STATUS(m_dsk.drive, STATUS_RGATE, 'R'); } } @@ -920,8 +900,6 @@ void alto2_cpu_device::disk_strobon(void* ptr, INT32 arg) } else { m_dsk.strobon_timer->reset(); } - FAKE_STATUS(unit, STATUS_CYL, dhd->get_cylinder()); - FAKE_STATUS(unit, STATUS_HEAD, dhd->get_head()); } /** @brief timer callback to change the READY monoflop 31a */ @@ -1182,7 +1160,6 @@ void alto2_cpu_device::f1_late_increcno() break; } // TODO: show disk indicator - FAKE_STATUS(m_dsk.drive, STATUS_KWRC, "HPLD"[m_dsk.krecno]); } /** @@ -1643,14 +1620,6 @@ void alto2_cpu_device::disk_bitclk(void* ptr, INT32 arg) kwd_timing(clk, bit, 0); } -#if USE_BITCLK_TIMER - /* more bits to clock? */ - if (++arg < dhd->bits_per_sector()) { - m_dsk.bitclk_timer->adjust(dhd->bit_time(), arg); - } else { - m_dsk.bitclk_timer->reset(); - } -#else if (++arg < dhd->bits_per_sector()) { m_bitclk_time += m_dsk.bitclk_time[m_dsk.drive]; m_bitclk_index = arg; @@ -1658,7 +1627,6 @@ void alto2_cpu_device::disk_bitclk(void* ptr, INT32 arg) // stop the bitclock timer m_bitclk_time = -1; } -#endif } /** @@ -1672,16 +1640,11 @@ void alto2_cpu_device::next_sector(int unit) LOG((this,LOG_DISK,0,"%s dhd=%p\n", __FUNCTION__, dhd)); // get bit time in pico seconds m_dsk.bitclk_time[unit] = static_cast(dhd->bit_time().as_attoseconds() / 1000000); -#if USE_BITCLK_TIMER - LOG((this,LOG_DISK,0," unit #%d stop bitclk\n", unit)); - m_dsk.bitclk_timer->enable(false); -#else if (m_bitclk_time >= 0) { LOG((this,LOG_DISK,0," unit #%d stop bitclk\n", unit)); m_bitclk_time = -1; m_bitclk_index = -1; } -#endif /* KSTAT[0-3] update the current sector in the kstat field */ PUT_KSTAT_SECTOR(m_dsk.kstat, dhd->get_sector()); @@ -1692,12 +1655,6 @@ void alto2_cpu_device::next_sector(int unit) 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 - if (debug_read_mem(0521)) - /* start a timer chain for the bit clock */ - disk_bitclk(0, 0); -#else // TODO: verify current sector == requested sector and only then run the bitclk? // HACK: no command, no bit clock if (debug_read_mem(0521)) @@ -1706,14 +1663,6 @@ void alto2_cpu_device::next_sector(int unit) m_bitclk_time = 0; m_bitclk_index = 0; } -#endif -#if defined(ALTO2_FAKE_STATUS_H) && (ALTO2_FAKE_STATUS_H > 0) - if (debug_read_mem(0521) && unit == GET_KADDR_DRIVE(debug_read_mem(0523))) - { - FAKE_STATUS(unit, STATUS_SECT, dhd->get_sector()); - FAKE_STATUS(unit, STATUS_PAGE, dhd->get_page()); - } -#endif } /** @@ -1799,10 +1748,6 @@ void alto2_cpu_device::init_disk() m_dsk.kcom = 066000; -#if USE_BITCLK_TIMER - m_dsk.bitclk_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(alto2_cpu_device::disk_bitclk),this)); -#endif - m_dsk.strobon_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(alto2_cpu_device::disk_strobon),this)); m_dsk.strobon_timer->reset(); @@ -1851,12 +1796,8 @@ void alto2_cpu_device::reset_disk() m_dsk.strobe = 0; m_dsk.strobon_timer->reset(); m_dsk.bitclk = 0; -#if USE_BITCLK_TIMER - m_dsk.bitclk_timer->reset(); -#else m_dsk.bitclk_time[0] = static_cast(attotime::from_nsec(300).as_attoseconds() / 1000000); m_dsk.bitclk_time[1] = static_cast(attotime::from_nsec(300).as_attoseconds() / 1000000); -#endif m_dsk.datin = 0; m_dsk.bitcount = 0; m_dsk.seclate = 0; @@ -1880,16 +1821,4 @@ void alto2_cpu_device::reset_disk() m_dsk.ff_44b = JKFF_0; m_dsk.ff_45a = JKFF_0; m_dsk.ff_45b = JKFF_0; - -#if defined(ALTO2_FAKE_STATUS_H) && (ALTO2_FAKE_STATUS_H > 0) - for (int unit = 0; unit < 2; unit++) { - FAKE_STATUS(unit, STATUS_RGATE, '-'); - FAKE_STATUS(unit, STATUS_WGATE, '-'); - FAKE_STATUS(unit, STATUS_KWRC, '-'); - FAKE_STATUS(unit, STATUS_CYL, 0); - FAKE_STATUS(unit, STATUS_HEAD, 0); - FAKE_STATUS(unit, STATUS_SECT, 0); - FAKE_STATUS(unit, STATUS_PAGE, 0); - } -#endif } diff --git a/src/devices/cpu/alto2/a2disk.h b/src/devices/cpu/alto2/a2disk.h index 5fd994f654e..a3f8c7755fc 100644 --- a/src/devices/cpu/alto2/a2disk.h +++ b/src/devices/cpu/alto2/a2disk.h @@ -37,11 +37,7 @@ struct { UINT8 strobe; //!< strobe (still) active emu_timer* strobon_timer; //!< set strobe on timer UINT8 bitclk; //!< current bitclk state (either crystal clock, or rdclk from the drive) -#if USE_BITCLK_TIMER - emu_timer* bitclk_timer; //!< bit clock timer -#else int bitclk_time[2]; //!< per drive time in clocks per bit -#endif UINT8 datin; //!< current datin from the drive UINT8 bitcount; //!< bit counter UINT8 carry; //!< carry output of the bitcounter @@ -78,11 +74,7 @@ TIMER_CALLBACK_MEMBER( disk_seclate ); //!< timer callback to take away TIMER_CALLBACK_MEMBER( disk_ok_to_run ); //!< timer callback to take away the OK TO RUN pulse (reset) TIMER_CALLBACK_MEMBER( disk_strobon ); //!< timer callback to pulse the STROBE' signal to the drive TIMER_CALLBACK_MEMBER( disk_ready_mf31a ); //!< timer callback to change the READY monoflop 31a -#if USE_BITCLK_TIMER -TIMER_CALLBACK_MEMBER( disk_bitclk ); //!< callback to update the disk controller with a new bitclk -#else void disk_bitclk(void *ptr, int arg); //!< function to update the disk controller with a new bitclk -#endif void disk_block(int task); //!< called if one of the disk tasks (task_kwd or task_ksec) blocks void bs_early_read_kstat(); //!< bus source: bus driven by disk status register KSTAT void bs_early_read_kdata(); //!< bus source: bus driven by disk data register KDATA input diff --git a/src/devices/cpu/alto2/a2disp.cpp b/src/devices/cpu/alto2/a2disp.cpp index 6ec42384dcb..e7a0474ea7c 100644 --- a/src/devices/cpu/alto2/a2disp.cpp +++ b/src/devices/cpu/alto2/a2disp.cpp @@ -10,10 +10,10 @@ /** * @brief PROM a38 contains the STOPWAKE' and MBEMBPTY' signals for the FIFO - *
  * The inputs to a38 are the UNLOAD counter RA[0-3] and the DDR<- counter
  * WA[0-3], and the designer decided to reverse the address lines :-)
  *
+ * 
  *  a38  counter
  *  -------------
  *   A0  RA[0]
@@ -50,10 +50,10 @@ static const prom_load_t pl_displ_a38 =
 };
 
 //! PROM a38 bit O1 is STOPWAKE' (stop DWT if bit is zero)
-#define FIFO_STOPWAKE(a38) (0 == (a38 & disp_a38_STOPWAKE) ? true : false)
+#define FIFO_STOPWAKE(a38) ((a38 & disp_a38_STOPWAKE) ? false : true)
 
 //! PROM a38 bit O3 is MBEMPTY' (FIFO is empty if bit is zero)
-#define FIFO_MBEMPTY(a38) (0 == (a38 & disp_a38_MBEMPTY) ? true : false)
+#define FIFO_MBEMPTY(a38) ((a38 & disp_a38_MBEMPTY) ? false : true)
 
 /**
  * @brief emulation of PROM a63 in the display schematics page 8
@@ -155,10 +155,10 @@ static const prom_load_t pl_displ_a63 =
  * Address lines are driven by H[1] to H[128] of the horz. line counters.
  * PROM is enabled when H[256] and H[512] are both 0.
  *
- * Q1 is VSYNC for the odd field (with H1024=0)
- * Q2 is VSYNC for the even field (with H1024=1)
- * Q3 is VBLANK for the odd field (with H1024=0)
- * Q4 is VBLANK for the even field (with H1024=1)
+ * Q1 is VSYNC for the odd field (with H1024=1)
+ * Q2 is VSYNC for the even field (with H1024=0)
+ * Q3 is VBLANK for the odd field (with H1024=1)
+ * Q4 is VBLANK for the even field (with H1024=0)
  * 
*/ @@ -224,17 +224,17 @@ static const UINT16 double_bits[256] = { 0xffc0,0xffc3,0xffcc,0xffcf,0xfff0,0xfff3,0xfffc,0xffff }; -#define HLC1 ((m_dsp.hlc >> 0) & 1) //!< horizontal line counter bit 0 (mid of the scanline) -#define HLC2 ((m_dsp.hlc >> 1) & 1) //!< horizontal line counter bit 1 -#define HLC4 ((m_dsp.hlc >> 2) & 1) //!< horizontal line counter bit 2 -#define HLC8 ((m_dsp.hlc >> 3) & 1) //!< horizontal line counter bit 3 -#define HLC16 ((m_dsp.hlc >> 4) & 1) //!< horizontal line counter bit 4 -#define HLC32 ((m_dsp.hlc >> 5) & 1) //!< horizontal line counter bit 5 -#define HLC64 ((m_dsp.hlc >> 6) & 1) //!< horizontal line counter bit 6 -#define HLC128 ((m_dsp.hlc >> 7) & 1) //!< horizontal line counter bit 7 -#define HLC256 ((m_dsp.hlc >> 8) & 1) //!< horizontal line counter bit 8 -#define HLC512 ((m_dsp.hlc >> 9) & 1) //!< horizontal line counter bit 9 -#define HLC1024 ((m_dsp.hlc >> 10) & 1) //!< horizontal line counter bit 10 (odd/even field) +#define HLC1 X_BIT(m_dsp.hlc,16,15) //!< horizontal line counter bit 0 (mid of the scanline) +#define HLC2 X_BIT(m_dsp.hlc,16,14) //!< horizontal line counter bit 1 +#define HLC4 X_BIT(m_dsp.hlc,16,13) //!< horizontal line counter bit 2 +#define HLC8 X_BIT(m_dsp.hlc,16,12) //!< horizontal line counter bit 3 +#define HLC16 X_BIT(m_dsp.hlc,16,11) //!< horizontal line counter bit 4 +#define HLC32 X_BIT(m_dsp.hlc,16,10) //!< horizontal line counter bit 5 +#define HLC64 X_BIT(m_dsp.hlc,16, 9) //!< horizontal line counter bit 6 +#define HLC128 X_BIT(m_dsp.hlc,16, 8) //!< horizontal line counter bit 7 +#define HLC256 X_BIT(m_dsp.hlc,16, 7) //!< horizontal line counter bit 8 +#define HLC512 X_BIT(m_dsp.hlc,16, 6) //!< horizontal line counter bit 9 +#define HLC1024 X_BIT(m_dsp.hlc,16, 5) //!< horizontal line counter bit 10 (odd/even field #define GET_SETMODE_SPEEDY(mode) X_RDBITS(mode,16,0,0) //!< get the pixel clock speed from a SETMODE<- bus value #define GET_SETMODE_INVERSE(mode) X_RDBITS(mode,16,1,1) //!< get the inverse video flag from a SETMODE<- bus value @@ -242,8 +242,8 @@ static const UINT16 double_bits[256] = { //!< helper to extract A3-A0 from a PROM a63 value #define A63_NEXT(n) ((n >> 2) & 017) -//! update the internal bitmap to a byte array -void alto2_cpu_device::update_bitmap_word(UINT16* bitmap, int x, int y, UINT16 word) +//! update the internal frame buffer and draw the scanline segment if changed +void alto2_cpu_device::update_framebuf_word(UINT16* framebuf, int x, int y, UINT16 word) { // mixing with the cursor if (x == m_dsp.curxpos + 0) @@ -251,11 +251,10 @@ void alto2_cpu_device::update_bitmap_word(UINT16* bitmap, int x, int y, UINT16 w if (x == m_dsp.curxpos + 1) word ^= m_dsp.cursor1; // no change? - if (word == bitmap[x]) + if (word == framebuf[x]) return; - bitmap[x] = word; - UINT8* pix = m_dsp.scanline[y] + x * 16; - memcpy(pix, m_dsp.patterns + 16 * word, 16); + framebuf[x] = word; + draw_scanline8(*m_dsp.bitmap, x * 16, y, 16, m_dsp.patterns + 16 * word, nullptr); } /** @@ -271,7 +270,7 @@ void alto2_cpu_device::unload_word() m_unload_time = -1; return; } - UINT16* bitmap = m_dsp.raw_bitmap.get() + y * ALTO2_DISPLAY_SCANLINE_WORDS; + UINT16* framebuf = m_dsp.framebuf.get() + y * ALTO2_DISPLAY_SCANLINE_WORDS; UINT16 word = m_dsp.inverse; UINT8 a38 = m_disp_a38[m_dsp.ra * 16 + m_dsp.wa]; if (FIFO_MBEMPTY(a38)) @@ -288,20 +287,20 @@ void alto2_cpu_device::unload_word() if (m_dsp.halfclock) { - UINT16 word1 = double_bits[word / 256]; - UINT16 word2 = double_bits[word % 256]; - update_bitmap_word(bitmap, x, y, word1); + const UINT16 word1 = double_bits[word / 256]; + update_framebuf_word(framebuf, x, y, word1); x++; if (x < ALTO2_DISPLAY_VISIBLE_WORDS) { - update_bitmap_word(bitmap, x, y, word2); + const UINT16 word2 = double_bits[word % 256]; + update_framebuf_word(framebuf, x, y, word2); x++; } m_unload_time += ALTO2_DISPLAY_BITTIME(32); } else { - update_bitmap_word(bitmap, x, y, word); + update_framebuf_word(framebuf, x, y, word); x++; m_unload_time += ALTO2_DISPLAY_BITTIME(16); } @@ -325,7 +324,7 @@ void alto2_cpu_device::display_state_machine() LOG((this,LOG_DISPL,2," HLC=%d", m_dsp.hlc)); } - UINT8 a63 = m_disp_a63[m_dsp.state]; + const UINT8 a63 = m_disp_a63[m_dsp.state]; if (A63_HLCGATE(a63)) { // count horizontal line counters and wrap @@ -336,15 +335,15 @@ void alto2_cpu_device::display_state_machine() m_task_wakeup |= 1 << task_mrt; } // PROM a66 is disabled, if any of HLC256 or HLC512 are high - UINT8 a66 = (HLC256 || HLC512) ? 017 : m_disp_a66[m_dsp.hlc & 0377]; + const UINT8 a66 = (HLC256 | HLC512) ? 017 : m_disp_a66[m_dsp.hlc & 0377]; // next address from PROM a63, use A4 from HLC1 - UINT8 next = ((HLC1 ^ 1) << 4) | A63_NEXT(a63); + const UINT8 next = ((HLC1 ^ 1) << 4) | A63_NEXT(a63); if (A66_VBLANK(a66)) { // Rising edge of VBLANK: remember HLC[1-10] where the VBLANK starts - m_dsp.vblank = m_dsp.hlc & ~02000; + m_dsp.vblank = m_dsp.hlc & ~(1 << 10); LOG((this,LOG_DISPL,1, " VBLANK")); @@ -357,7 +356,6 @@ void alto2_cpu_device::display_state_machine() * at the beginning of vertical retrace. */ m_task_wakeup |= 1 << task_dvt; - // TODO: upade odd or even field of the internal bitmap now? } } else @@ -480,9 +478,9 @@ void alto2_cpu_device::f2_late_evenfield() /** * @brief initialize the display context to useful values * - * Zap the display context to all 0s. - * Allocate a bitmap array to save blitting to the screen when - * there is no change in the data words. + * Zap the display context. + * Allocate a framebuf array to save updating the bitmap when + * there is no change in the data word. */ void alto2_cpu_device::init_disp() { @@ -514,18 +512,15 @@ void alto2_cpu_device::init_disp() m_dsp.hlc = ALTO2_DISPLAY_HLC_START; - m_dsp.raw_bitmap = std::make_unique(ALTO2_DISPLAY_HEIGHT * ALTO2_DISPLAY_SCANLINE_WORDS); + m_dsp.framebuf = std::make_unique(ALTO2_DISPLAY_HEIGHT * ALTO2_DISPLAY_SCANLINE_WORDS); m_dsp.patterns = auto_alloc_array(machine(), UINT8, 65536 * 16); for (int y = 0; y < 65536; y++) { UINT8* dst = m_dsp.patterns + y * 16; for (int x = 0; x < 16; x++) - *dst++ = (y >> (15 - x)) & 1; + *dst++ = (~y >> (15 - x)) & 1; } - m_dsp.scanline = auto_alloc_array(machine(), UINT8*, ALTO2_DISPLAY_HEIGHT + ALTO2_FAKE_STATUS_H); - for (int y = 0; y < ALTO2_DISPLAY_HEIGHT + ALTO2_FAKE_STATUS_H; y++) - m_dsp.scanline[y] = auto_alloc_array(machine(), UINT8, ALTO2_DISPLAY_TOTAL_WIDTH); - m_dsp.bitmap = std::make_unique(ALTO2_DISPLAY_WIDTH, ALTO2_DISPLAY_HEIGHT + ALTO2_FAKE_STATUS_H); + m_dsp.bitmap = std::make_unique(ALTO2_DISPLAY_WIDTH, ALTO2_DISPLAY_HEIGHT); m_dsp.state = 0; } @@ -555,305 +550,17 @@ void alto2_cpu_device::reset_disp() m_dsp.curxpos = 0; m_dsp.cursor0 = 0; m_dsp.cursor1 = 0; - memset(m_dsp.raw_bitmap.get(), 0, sizeof(UINT16) * ALTO2_DISPLAY_HEIGHT * ALTO2_DISPLAY_SCANLINE_WORDS); - for (int y = 0; y < ALTO2_DISPLAY_HEIGHT; y++) - memset(m_dsp.scanline[y], 0, sizeof(UINT8) * ALTO2_DISPLAY_TOTAL_WIDTH); - m_dsp.odd_frame = false; - - for (int y = ALTO2_DISPLAY_HEIGHT; y < ALTO2_DISPLAY_HEIGHT + ALTO2_FAKE_STATUS_H; y++) - memset(m_dsp.scanline[y], 1, sizeof(UINT8) * ALTO2_DISPLAY_TOTAL_WIDTH); - fake_status_printf(1, "Disk status info"); + memset(m_dsp.framebuf.get(), 1, sizeof(UINT16) * ALTO2_DISPLAY_HEIGHT * ALTO2_DISPLAY_SCANLINE_WORDS); } /* Video update */ UINT32 alto2_cpu_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - pen_t palette_bw[2]; - palette_bw[0] = screen.palette().white_pen(); - palette_bw[1] = screen.palette().black_pen(); - for (int y = m_dsp.odd_frame ? 1 : 0; y < ALTO2_DISPLAY_HEIGHT; y += 2) - draw_scanline8(*m_dsp.bitmap, 0, y, ALTO2_DISPLAY_WIDTH, m_dsp.scanline[y], palette_bw); - for (int y = ALTO2_DISPLAY_HEIGHT; y < ALTO2_DISPLAY_HEIGHT + ALTO2_FAKE_STATUS_H; y++) - draw_scanline8(*m_dsp.bitmap, 0, y, ALTO2_DISPLAY_WIDTH, m_dsp.scanline[y], palette_bw); copybitmap(bitmap, *m_dsp.bitmap, 0, 0, 0, 0, cliprect); return 0; } void alto2_cpu_device::screen_eof(screen_device &screen, bool state) { - if (state) - m_dsp.odd_frame = !m_dsp.odd_frame; -} - -/***************************************************************************** - * - * FAKE STATUS LINE - * - *****************************************************************************/ - -typedef struct { - UINT8 code; - UINT8 bits[10]; -} bdf_6x10_t; - -/** - * STARTFONT 2.1 - * COMMENT "$ucs-fonts: 6x10.bdf,v 1.34 2002-11-10 19:12:30+00 mgk25 Rel $" - * COMMENT "Send bug reports to Markus Kuhn " - * FONT -Misc-Fixed-Medium-R-Normal--10-100-75-75-C-60-ISO10646-1 - * SIZE 10 75 75 - * FONTBOUNDINGBOX 6 10 0 -2 - * STARTPROPERTIES 22 - * FONTNAME_REGISTRY "" - * FOUNDRY "Misc" - * FAMILY_NAME "Fixed" - * WEIGHT_NAME "Medium" - * SLANT "R" - * SETWIDTH_NAME "Normal" - * ADD_STYLE_NAME "" - * PIXEL_SIZE 10 - * POINT_SIZE 100 - * RESOLUTION_X 75 - * RESOLUTION_Y 75 - * SPACING "C" - * AVERAGE_WIDTH 60 - * CHARSET_REGISTRY "ISO10646" - * CHARSET_ENCODING "1" - * FONT_ASCENT 8 - * FONT_DESCENT 2 - * DEFAULT_CHAR 0 - * COPYRIGHT "Public domain terminal emulator font. Share and enjoy." - * _XMBDFED_INFO "Edited with xmbdfed 4.5." - * CAP_HEIGHT 7 - * X_HEIGHT 5 - * ENDPROPERTIES - * CHARS 1597 - */ -static const bdf_6x10_t bdf_6x10[] = { -/* space */ { 32, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}, -/* exclam */ { 33, {0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x20, 0x00, 0x00 }}, -/* quotedbl */ { 34, {0x00, 0x50, 0x50, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}, -/* numbersign */ { 35, {0x00, 0x50, 0x50, 0xF8, 0x50, 0xF8, 0x50, 0x50, 0x00, 0x00 }}, -/* dollar */ { 36, {0x00, 0x20, 0x70, 0xA0, 0x70, 0x28, 0x70, 0x20, 0x00, 0x00 }}, -/* percent */ { 37, {0x00, 0x48, 0xA8, 0x50, 0x20, 0x50, 0xA8, 0x90, 0x00, 0x00 }}, -/* ampersand */ { 38, {0x00, 0x40, 0xA0, 0xA0, 0x40, 0xA8, 0x90, 0x68, 0x00, 0x00 }}, -/* quotesingle */ { 39, {0x00, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}, -/* parenleft */ { 40, {0x00, 0x10, 0x20, 0x40, 0x40, 0x40, 0x20, 0x10, 0x00, 0x00 }}, -/* parenright */ { 41, {0x00, 0x40, 0x20, 0x10, 0x10, 0x10, 0x20, 0x40, 0x00, 0x00 }}, -/* asterisk */ { 42, {0x00, 0x00, 0x88, 0x50, 0xF8, 0x50, 0x88, 0x00, 0x00, 0x00 }}, -/* plus */ { 43, {0x00, 0x00, 0x20, 0x20, 0xF8, 0x20, 0x20, 0x00, 0x00, 0x00 }}, -/* comma */ { 44, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x20, 0x40, 0x00 }}, -/* hyphen */ { 45, {0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00 }}, -/* period */ { 46, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x70, 0x20, 0x00 }}, -/* slash */ { 47, {0x00, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00 }}, -/* zero */ { 48, {0x00, 0x20, 0x50, 0x88, 0x88, 0x88, 0x50, 0x20, 0x00, 0x00 }}, -/* one */ { 49, {0x00, 0x20, 0x60, 0xA0, 0x20, 0x20, 0x20, 0xF8, 0x00, 0x00 }}, -/* two */ { 50, {0x00, 0x70, 0x88, 0x08, 0x30, 0x40, 0x80, 0xF8, 0x00, 0x00 }}, -/* three */ { 51, {0x00, 0xF8, 0x08, 0x10, 0x30, 0x08, 0x88, 0x70, 0x00, 0x00 }}, -/* four */ { 52, {0x00, 0x10, 0x30, 0x50, 0x90, 0xF8, 0x10, 0x10, 0x00, 0x00 }}, -/* five */ { 53, {0x00, 0xF8, 0x80, 0xB0, 0xC8, 0x08, 0x88, 0x70, 0x00, 0x00 }}, -/* six */ { 54, {0x00, 0x30, 0x40, 0x80, 0xB0, 0xC8, 0x88, 0x70, 0x00, 0x00 }}, -/* seven */ { 55, {0x00, 0xF8, 0x08, 0x10, 0x10, 0x20, 0x40, 0x40, 0x00, 0x00 }}, -/* eight */ { 56, {0x00, 0x70, 0x88, 0x88, 0x70, 0x88, 0x88, 0x70, 0x00, 0x00 }}, -/* nine */ { 57, {0x00, 0x70, 0x88, 0x98, 0x68, 0x08, 0x10, 0x60, 0x00, 0x00 }}, -/* colon */ { 58, {0x00, 0x00, 0x20, 0x70, 0x20, 0x00, 0x20, 0x70, 0x20, 0x00 }}, -/* semicolon */ { 59, {0x00, 0x00, 0x20, 0x70, 0x20, 0x00, 0x30, 0x20, 0x40, 0x00 }}, -/* less */ { 60, {0x00, 0x08, 0x10, 0x20, 0x40, 0x20, 0x10, 0x08, 0x00, 0x00 }}, -/* equal */ { 61, {0x00, 0x00, 0x00, 0xF8, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00 }}, -/* greater */ { 62, {0x00, 0x40, 0x20, 0x10, 0x08, 0x10, 0x20, 0x40, 0x00, 0x00 }}, -/* question */ { 63, {0x00, 0x70, 0x88, 0x10, 0x20, 0x20, 0x00, 0x20, 0x00, 0x00 }}, -/* at */ { 64, {0x00, 0x70, 0x88, 0x98, 0xA8, 0xB0, 0x80, 0x70, 0x00, 0x00 }}, -/* A */ { 65, {0x00, 0x20, 0x50, 0x88, 0x88, 0xF8, 0x88, 0x88, 0x00, 0x00 }}, -/* B */ { 66, {0x00, 0xF0, 0x48, 0x48, 0x70, 0x48, 0x48, 0xF0, 0x00, 0x00 }}, -/* C */ { 67, {0x00, 0x70, 0x88, 0x80, 0x80, 0x80, 0x88, 0x70, 0x00, 0x00 }}, -/* D */ { 68, {0x00, 0xF0, 0x48, 0x48, 0x48, 0x48, 0x48, 0xF0, 0x00, 0x00 }}, -/* E */ { 69, {0x00, 0xF8, 0x80, 0x80, 0xF0, 0x80, 0x80, 0xF8, 0x00, 0x00 }}, -/* F */ { 70, {0x00, 0xF8, 0x80, 0x80, 0xF0, 0x80, 0x80, 0x80, 0x00, 0x00 }}, -/* G */ { 71, {0x00, 0x70, 0x88, 0x80, 0x80, 0x98, 0x88, 0x70, 0x00, 0x00 }}, -/* H */ { 72, {0x00, 0x88, 0x88, 0x88, 0xF8, 0x88, 0x88, 0x88, 0x00, 0x00 }}, -/* I */ { 73, {0x00, 0x70, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x00, 0x00 }}, -/* J */ { 74, {0x00, 0x38, 0x10, 0x10, 0x10, 0x10, 0x90, 0x60, 0x00, 0x00 }}, -/* K */ { 75, {0x00, 0x88, 0x90, 0xA0, 0xC0, 0xA0, 0x90, 0x88, 0x00, 0x00 }}, -/* L */ { 76, {0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xF8, 0x00, 0x00 }}, -/* M */ { 77, {0x00, 0x88, 0x88, 0xD8, 0xA8, 0x88, 0x88, 0x88, 0x00, 0x00 }}, -/* N */ { 78, {0x00, 0x88, 0x88, 0xC8, 0xA8, 0x98, 0x88, 0x88, 0x00, 0x00 }}, -/* O */ { 79, {0x00, 0x70, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00 }}, -/* P */ { 80, {0x00, 0xF0, 0x88, 0x88, 0xF0, 0x80, 0x80, 0x80, 0x00, 0x00 }}, -/* Q */ { 81, {0x00, 0x70, 0x88, 0x88, 0x88, 0x88, 0xA8, 0x70, 0x08, 0x00 }}, -/* R */ { 82, {0x00, 0xF0, 0x88, 0x88, 0xF0, 0xA0, 0x90, 0x88, 0x00, 0x00 }}, -/* S */ { 83, {0x00, 0x70, 0x88, 0x80, 0x70, 0x08, 0x88, 0x70, 0x00, 0x00 }}, -/* T */ { 84, {0x00, 0xF8, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00 }}, -/* U */ { 85, {0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00 }}, -/* V */ { 86, {0x00, 0x88, 0x88, 0x88, 0x50, 0x50, 0x50, 0x20, 0x00, 0x00 }}, -/* W */ { 87, {0x00, 0x88, 0x88, 0x88, 0xA8, 0xA8, 0xD8, 0x88, 0x00, 0x00 }}, -/* X */ { 88, {0x00, 0x88, 0x88, 0x50, 0x20, 0x50, 0x88, 0x88, 0x00, 0x00 }}, -/* Y */ { 89, {0x00, 0x88, 0x88, 0x50, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00 }}, -/* Z */ { 90, {0x00, 0xF8, 0x08, 0x10, 0x20, 0x40, 0x80, 0xF8, 0x00, 0x00 }}, -/* bracketleft */ { 91, {0x00, 0x70, 0x40, 0x40, 0x40, 0x40, 0x40, 0x70, 0x00, 0x00 }}, -/* backslash */ { 92, {0x00, 0x80, 0x80, 0x40, 0x20, 0x10, 0x08, 0x08, 0x00, 0x00 }}, -/* bracketright */ { 93, {0x00, 0x70, 0x10, 0x10, 0x10, 0x10, 0x10, 0x70, 0x00, 0x00 }}, -/* asciicircum */ { 94, {0x00, 0x20, 0x50, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}, -/* underscore */ { 95, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00 }}, -/* grave */ { 96, {0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}, -/* a */ { 97, {0x00, 0x00, 0x00, 0x70, 0x08, 0x78, 0x88, 0x78, 0x00, 0x00 }}, -/* b */ { 98, {0x00, 0x80, 0x80, 0xB0, 0xC8, 0x88, 0xC8, 0xB0, 0x00, 0x00 }}, -/* c */ { 99, {0x00, 0x00, 0x00, 0x70, 0x88, 0x80, 0x88, 0x70, 0x00, 0x00 }}, -/* d */ { 100, {0x00, 0x08, 0x08, 0x68, 0x98, 0x88, 0x98, 0x68, 0x00, 0x00 }}, -/* e */ { 101, {0x00, 0x00, 0x00, 0x70, 0x88, 0xF8, 0x80, 0x70, 0x00, 0x00 }}, -/* f */ { 102, {0x00, 0x30, 0x48, 0x40, 0xF0, 0x40, 0x40, 0x40, 0x00, 0x00 }}, -/* g */ { 103, {0x00, 0x00, 0x00, 0x78, 0x88, 0x88, 0x78, 0x08, 0x88, 0x70 }}, -/* h */ { 104, {0x00, 0x80, 0x80, 0xB0, 0xC8, 0x88, 0x88, 0x88, 0x00, 0x00 }}, -/* i */ { 105, {0x00, 0x20, 0x00, 0x60, 0x20, 0x20, 0x20, 0x70, 0x00, 0x00 }}, -/* j */ { 106, {0x00, 0x08, 0x00, 0x18, 0x08, 0x08, 0x08, 0x48, 0x48, 0x30 }}, -/* k */ { 107, {0x00, 0x80, 0x80, 0x88, 0x90, 0xE0, 0x90, 0x88, 0x00, 0x00 }}, -/* l */ { 108, {0x00, 0x60, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x00, 0x00 }}, -/* m */ { 109, {0x00, 0x00, 0x00, 0xD0, 0xA8, 0xA8, 0xA8, 0x88, 0x00, 0x00 }}, -/* n */ { 110, {0x00, 0x00, 0x00, 0xB0, 0xC8, 0x88, 0x88, 0x88, 0x00, 0x00 }}, -/* o */ { 111, {0x00, 0x00, 0x00, 0x70, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00 }}, -/* p */ { 112, {0x00, 0x00, 0x00, 0xB0, 0xC8, 0x88, 0xC8, 0xB0, 0x80, 0x80 }}, -/* q */ { 113, {0x00, 0x00, 0x00, 0x68, 0x98, 0x88, 0x98, 0x68, 0x08, 0x08 }}, -/* r */ { 114, {0x00, 0x00, 0x00, 0xB0, 0xC8, 0x80, 0x80, 0x80, 0x00, 0x00 }}, -/* s */ { 115, {0x00, 0x00, 0x00, 0x70, 0x80, 0x70, 0x08, 0xF0, 0x00, 0x00 }}, -/* t */ { 116, {0x00, 0x40, 0x40, 0xF0, 0x40, 0x40, 0x48, 0x30, 0x00, 0x00 }}, -/* u */ { 117, {0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x98, 0x68, 0x00, 0x00 }}, -/* v */ { 118, {0x00, 0x00, 0x00, 0x88, 0x88, 0x50, 0x50, 0x20, 0x00, 0x00 }}, -/* w */ { 119, {0x00, 0x00, 0x00, 0x88, 0x88, 0xA8, 0xA8, 0x50, 0x00, 0x00 }}, -/* x */ { 120, {0x00, 0x00, 0x00, 0x88, 0x50, 0x20, 0x50, 0x88, 0x00, 0x00 }}, -/* y */ { 121, {0x00, 0x00, 0x00, 0x88, 0x88, 0x98, 0x68, 0x08, 0x88, 0x70 }}, -/* z */ { 122, {0x00, 0x00, 0x00, 0xF8, 0x10, 0x20, 0x40, 0xF8, 0x00, 0x00 }}, -/* braceleft */ { 123, {0x00, 0x18, 0x20, 0x10, 0x60, 0x10, 0x20, 0x18, 0x00, 0x00 }}, -/* bar */ { 124, {0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00 }}, -/* braceright */ { 125, {0x00, 0x60, 0x10, 0x20, 0x18, 0x20, 0x10, 0x60, 0x00, 0x00 }}, -/* asciitilde */ { 126, {0x00, 0x48, 0xA8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}, -/* space */ { 160, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}, -/* exclamdown */ { 161, {0x00, 0x20, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00 }}, -/* cent */ { 162, {0x00, 0x00, 0x20, 0x78, 0xA0, 0xA0, 0xA0, 0x78, 0x20, 0x00 }}, -/* sterling */ { 163, {0x00, 0x30, 0x48, 0x40, 0xE0, 0x40, 0x48, 0xB0, 0x00, 0x00 }}, -/* currency */ { 164, {0x00, 0x00, 0x00, 0x88, 0x70, 0x50, 0x70, 0x88, 0x00, 0x00 }}, -/* yen */ { 165, {0x00, 0x88, 0x88, 0x50, 0x20, 0xF8, 0x20, 0x20, 0x20, 0x00 }}, -/* brokenbar */ { 166, {0x00, 0x20, 0x20, 0x20, 0x00, 0x20, 0x20, 0x20, 0x00, 0x00 }}, -/* section */ { 167, {0x00, 0x70, 0x80, 0xE0, 0x90, 0x48, 0x38, 0x08, 0x70, 0x00 }}, -/* dieresis */ { 168, {0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}, -/* copyright */ { 169, {0x00, 0x70, 0x88, 0xA8, 0xC8, 0xA8, 0x88, 0x70, 0x00, 0x00 }}, -/* ordfeminine */ { 170, {0x00, 0x38, 0x48, 0x58, 0x28, 0x00, 0x78, 0x00, 0x00, 0x00 }}, -/* guillemotleft */ { 171, {0x00, 0x00, 0x00, 0x24, 0x48, 0x90, 0x48, 0x24, 0x00, 0x00 }}, -/* logicalnot */ { 172, {0x00, 0x00, 0x00, 0x00, 0x78, 0x08, 0x00, 0x00, 0x00, 0x00 }}, -/* hyphen */ { 173, {0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00 }}, -/* registered */ { 174, {0x00, 0x70, 0x88, 0xE8, 0xC8, 0xC8, 0x88, 0x70, 0x00, 0x00 }}, -/* macron */ { 175, {0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}, -/* degree */ { 176, {0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}, -/* plusminus */ { 177, {0x00, 0x00, 0x20, 0x20, 0xF8, 0x20, 0x20, 0xF8, 0x00, 0x00 }}, -/* twosuperior */ { 178, {0x30, 0x48, 0x10, 0x20, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00 }}, -/* threesuperior */ { 179, {0x70, 0x08, 0x30, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00 }}, -/* acute */ { 180, {0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}, -/* mu */ { 181, {0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0xC8, 0xB0, 0x80, 0x00 }}, -/* paragraph */ { 182, {0x00, 0x78, 0xE8, 0xE8, 0x68, 0x28, 0x28, 0x28, 0x00, 0x00 }}, -/* periodcentered */ { 183, {0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00 }}, -/* cedilla */ { 184, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20 }}, -/* onesuperior */ { 185, {0x20, 0x60, 0x20, 0x20, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00 }}, -/* ordmasculine */ { 186, {0x00, 0x30, 0x48, 0x48, 0x30, 0x00, 0x78, 0x00, 0x00, 0x00 }}, -/* guillemotright */ { 187, {0x00, 0x00, 0x00, 0x90, 0x48, 0x24, 0x48, 0x90, 0x00, 0x00 }}, -/* onequarter */ { 188, {0x40, 0xC0, 0x40, 0x40, 0xE4, 0x0C, 0x14, 0x3C, 0x04, 0x00 }}, -/* onehalf */ { 189, {0x40, 0xC0, 0x40, 0x40, 0xE8, 0x14, 0x04, 0x08, 0x1C, 0x00 }}, -/* threequarters */ { 190, {0xC0, 0x20, 0x40, 0x20, 0xC8, 0x18, 0x28, 0x78, 0x08, 0x00 }}, -/* questiondown */ { 191, {0x00, 0x20, 0x00, 0x20, 0x20, 0x40, 0x88, 0x70, 0x00, 0x00 }}, -/* Agrave */ { 192, {0x40, 0x20, 0x70, 0x88, 0x88, 0xF8, 0x88, 0x88, 0x00, 0x00 }}, -/* Aacute */ { 193, {0x10, 0x20, 0x70, 0x88, 0x88, 0xF8, 0x88, 0x88, 0x00, 0x00 }}, -/* Acircumflex */ { 194, {0x20, 0x50, 0x70, 0x88, 0x88, 0xF8, 0x88, 0x88, 0x00, 0x00 }}, -/* Atilde */ { 195, {0x48, 0xB0, 0x70, 0x88, 0x88, 0xF8, 0x88, 0x88, 0x00, 0x00 }}, -/* Adieresis */ { 196, {0x50, 0x00, 0x70, 0x88, 0x88, 0xF8, 0x88, 0x88, 0x00, 0x00 }}, -/* Aring */ { 197, {0x20, 0x50, 0x70, 0x88, 0x88, 0xF8, 0x88, 0x88, 0x00, 0x00 }}, -/* AE */ { 198, {0x00, 0x3C, 0x50, 0x90, 0x9C, 0xF0, 0x90, 0x9C, 0x00, 0x00 }}, -/* Ccedilla */ { 199, {0x00, 0x70, 0x88, 0x80, 0x80, 0x80, 0x88, 0x70, 0x20, 0x40 }}, -/* Egrave */ { 200, {0x40, 0xF8, 0x80, 0x80, 0xF0, 0x80, 0x80, 0xF8, 0x00, 0x00 }}, -/* Eacute */ { 201, {0x10, 0xF8, 0x80, 0x80, 0xF0, 0x80, 0x80, 0xF8, 0x00, 0x00 }}, -/* Ecircumflex */ { 202, {0x20, 0xF8, 0x80, 0x80, 0xF0, 0x80, 0x80, 0xF8, 0x00, 0x00 }}, -/* Edieresis */ { 203, {0x50, 0xF8, 0x80, 0x80, 0xF0, 0x80, 0x80, 0xF8, 0x00, 0x00 }}, -/* Igrave */ { 204, {0x40, 0x20, 0x70, 0x20, 0x20, 0x20, 0x20, 0x70, 0x00, 0x00 }}, -/* Iacute */ { 205, {0x10, 0x20, 0x70, 0x20, 0x20, 0x20, 0x20, 0x70, 0x00, 0x00 }}, -/* Icircumflex */ { 206, {0x20, 0x50, 0x70, 0x20, 0x20, 0x20, 0x20, 0x70, 0x00, 0x00 }}, -/* Idieresis */ { 207, {0x50, 0x00, 0x70, 0x20, 0x20, 0x20, 0x20, 0x70, 0x00, 0x00 }}, -/* Eth */ { 208, {0x00, 0xF0, 0x48, 0x48, 0xE8, 0x48, 0x48, 0xF0, 0x00, 0x00 }}, -/* Ntilde */ { 209, {0x28, 0x50, 0x88, 0xC8, 0xA8, 0x98, 0x88, 0x88, 0x00, 0x00 }}, -/* Ograve */ { 210, {0x40, 0x20, 0x70, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00 }}, -/* Oacute */ { 211, {0x10, 0x20, 0x70, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00 }}, -/* Ocircumflex */ { 212, {0x20, 0x50, 0x70, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00 }}, -/* Otilde */ { 213, {0x28, 0x50, 0x70, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00 }}, -/* Odieresis */ { 214, {0x50, 0x00, 0x70, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00 }}, -/* multiply */ { 215, {0x00, 0x00, 0x00, 0x88, 0x50, 0x20, 0x50, 0x88, 0x00, 0x00 }}, -/* Oslash */ { 216, {0x00, 0x70, 0x98, 0x98, 0xA8, 0xC8, 0xC8, 0x70, 0x00, 0x00 }}, -/* Ugrave */ { 217, {0x40, 0x20, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00 }}, -/* Uacute */ { 218, {0x10, 0x20, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00 }}, -/* Ucircumflex */ { 219, {0x20, 0x50, 0x00, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00 }}, -/* Udieresis */ { 220, {0x50, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00 }}, -/* Yacute */ { 221, {0x10, 0x20, 0x88, 0x88, 0x50, 0x20, 0x20, 0x20, 0x00, 0x00 }}, -/* Thorn */ { 222, {0x00, 0x80, 0xF0, 0x88, 0xF0, 0x80, 0x80, 0x80, 0x00, 0x00 }}, -/* germandbls */ { 223, {0x00, 0x70, 0x88, 0x90, 0xA0, 0x90, 0x88, 0xB0, 0x00, 0x00 }}, -/* agrave */ { 224, {0x40, 0x20, 0x00, 0x70, 0x08, 0x78, 0x88, 0x78, 0x00, 0x00 }}, -/* aacute */ { 225, {0x10, 0x20, 0x00, 0x70, 0x08, 0x78, 0x88, 0x78, 0x00, 0x00 }}, -/* acircumflex */ { 226, {0x20, 0x50, 0x00, 0x70, 0x08, 0x78, 0x88, 0x78, 0x00, 0x00 }}, -/* atilde */ { 227, {0x28, 0x50, 0x00, 0x70, 0x08, 0x78, 0x88, 0x78, 0x00, 0x00 }}, -/* adieresis */ { 228, {0x00, 0x50, 0x00, 0x70, 0x08, 0x78, 0x88, 0x78, 0x00, 0x00 }}, -/* aring */ { 229, {0x20, 0x50, 0x20, 0x70, 0x08, 0x78, 0x88, 0x78, 0x00, 0x00 }}, -/* ae */ { 230, {0x00, 0x00, 0x00, 0x78, 0x14, 0x7C, 0x90, 0x7C, 0x00, 0x00 }}, -/* ccedilla */ { 231, {0x00, 0x00, 0x00, 0x70, 0x88, 0x80, 0x88, 0x70, 0x20, 0x40 }}, -/* egrave */ { 232, {0x40, 0x20, 0x00, 0x70, 0x88, 0xF8, 0x80, 0x70, 0x00, 0x00 }}, -/* eacute */ { 233, {0x10, 0x20, 0x00, 0x70, 0x88, 0xF8, 0x80, 0x70, 0x00, 0x00 }}, -/* ecircumflex */ { 234, {0x20, 0x50, 0x00, 0x70, 0x88, 0xF8, 0x80, 0x70, 0x00, 0x00 }}, -/* edieresis */ { 235, {0x00, 0x50, 0x00, 0x70, 0x88, 0xF8, 0x80, 0x70, 0x00, 0x00 }}, -/* igrave */ { 236, {0x40, 0x20, 0x00, 0x60, 0x20, 0x20, 0x20, 0x70, 0x00, 0x00 }}, -/* iacute */ { 237, {0x20, 0x40, 0x00, 0x60, 0x20, 0x20, 0x20, 0x70, 0x00, 0x00 }}, -/* icircumflex */ { 238, {0x20, 0x50, 0x00, 0x60, 0x20, 0x20, 0x20, 0x70, 0x00, 0x00 }}, -/* idieresis */ { 239, {0x00, 0x50, 0x00, 0x60, 0x20, 0x20, 0x20, 0x70, 0x00, 0x00 }}, -/* eth */ { 240, {0x00, 0xC0, 0x30, 0x70, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00 }}, -/* ntilde */ { 241, {0x28, 0x50, 0x00, 0xB0, 0xC8, 0x88, 0x88, 0x88, 0x00, 0x00 }}, -/* ograve */ { 242, {0x40, 0x20, 0x00, 0x70, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00 }}, -/* oacute */ { 243, {0x10, 0x20, 0x00, 0x70, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00 }}, -/* ocircumflex */ { 244, {0x20, 0x50, 0x00, 0x70, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00 }}, -/* otilde */ { 245, {0x28, 0x50, 0x00, 0x70, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00 }}, -/* odieresis */ { 246, {0x00, 0x50, 0x00, 0x70, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00 }}, -/* divide */ { 247, {0x00, 0x00, 0x20, 0x00, 0xF8, 0x00, 0x20, 0x00, 0x00, 0x00 }}, -/* oslash */ { 248, {0x00, 0x00, 0x00, 0x78, 0x98, 0xA8, 0xC8, 0xF0, 0x00, 0x00 }}, -/* ugrave */ { 249, {0x40, 0x20, 0x00, 0x88, 0x88, 0x88, 0x98, 0x68, 0x00, 0x00 }}, -/* uacute */ { 250, {0x10, 0x20, 0x00, 0x88, 0x88, 0x88, 0x98, 0x68, 0x00, 0x00 }}, -/* ucircumflex */ { 251, {0x20, 0x50, 0x00, 0x88, 0x88, 0x88, 0x98, 0x68, 0x00, 0x00 }}, -/* udieresis */ { 252, {0x00, 0x50, 0x00, 0x88, 0x88, 0x88, 0x98, 0x68, 0x00, 0x00 }}, -/* yacute */ { 253, {0x00, 0x10, 0x20, 0x88, 0x88, 0x98, 0x68, 0x08, 0x88, 0x70 }}, -/* thorn */ { 254, {0x00, 0x00, 0x80, 0xF0, 0x88, 0x88, 0x88, 0xF0, 0x80, 0x80 }}, -/* ydieresis */ { 255, {0x00, 0x50, 0x00, 0x88, 0x88, 0x98, 0x68, 0x08, 0x88, 0x70 }}, -/* char0 */ { 0, {0x00, 0xA8, 0x00, 0x88, 0x00, 0x88, 0x00, 0xA8, 0x00, 0x00 }} -}; - -void alto2_cpu_device::fake_status_putch(int x, UINT8 ch) -{ - const bdf_6x10_t* pf = bdf_6x10; - while (pf->code != ch && pf->code != 0) - pf++; - int dx = 6 * x; - if (dx >= ALTO2_DISPLAY_WIDTH) - return; - for (int dy = 0; dy < 10; dy++) - { - UINT8* pix = m_dsp.scanline[ALTO2_DISPLAY_HEIGHT + 1 + dy] + dx; - UINT8 bits = ~pf->bits[dy]; - pix[0] = (bits >> 7) & 1; - pix[1] = (bits >> 6) & 1; - pix[2] = (bits >> 5) & 1; - pix[3] = (bits >> 4) & 1; - pix[4] = (bits >> 3) & 1; - pix[5] = (bits >> 2) & 1; - } - -} - -void alto2_cpu_device::fake_status_printf(int x, const char* format, ...) -{ - static char buff[256]; - va_list ap; - va_start(ap, format); - vsnprintf(buff, sizeof(buff), format, ap); - va_end(ap); - char* src = buff; - while (*src) - fake_status_putch(x++, *src++); + // FIXME: do we need this in some way? } diff --git a/src/devices/cpu/alto2/a2disp.h b/src/devices/cpu/alto2/a2disp.h index ceb55a2a100..282ccd94f56 100644 --- a/src/devices/cpu/alto2/a2disp.h +++ b/src/devices/cpu/alto2/a2disp.h @@ -2,13 +2,13 @@ // copyright-holders:Juergen Buchmueller /***************************************************************************** * - * Xerox AltoII display block + * Xerox AltoII display emulation * *****************************************************************************/ #ifdef ALTO2_DEFINE_CONSTANTS /** - * @brief start value for the horizontal line counter + * @brief Start value for the horizontal line counter. * * This value is loaded into the three 4 bit counters (type 9316) * with numbers 65, 67, and 75. @@ -16,17 +16,19 @@ * 67: A=1 B=0 C=0 D=1 * 75: A=0 B=0 C=0 D=0 * - * The value is 150 + * The value is 2+4+16+128 = 150 */ #define ALTO2_DISPLAY_HLC_START (2+4+16+128) /** - * @brief end value for the horizontal line counter + * @brief End value for the horizontal line counter. * * This is decoded by H30, an 8 input NAND gate. * The value is 1899; horz. line count range 150...1899 = 1750. + * So there are 1750 / 2 = 875 total scanlines. * - * There are 1750 / 2 = 875 total scanlines. + * Note: The horizontal line counts 150 ... 1023 for the even field, + * and 1024 ... 1899 for the odd field. */ #define ALTO2_DISPLAY_HLC_END (1+2+8+32+64+256+512+1024) @@ -37,7 +39,7 @@ * scanlines to the monitor. The frame rate is 60Hz, which is actually the rate * of the half-frames. The rate for full frames is thus 30Hz. */ -#define ALTO2_DISPLAY_TOTAL_HEIGHT ((ALTO2_DISPLAY_HLC_END + 1 - ALTO2_DISPLAY_HLC_START) / 2) +#define ALTO2_DISPLAY_TOTAL_HEIGHT ((ALTO2_DISPLAY_HLC_END - ALTO2_DISPLAY_HLC_START) / 2) /** * @brief display total width, including horizontal blanking @@ -68,18 +70,37 @@ */ #define ALTO2_DISPLAY_TOTAL_WIDTH 768 +//! The display fifo has 16 words. +#define ALTO2_DISPLAY_FIFO 16 -#define ALTO2_DISPLAY_FIFO 16 //!< the display fifo has 16 words -#define ALTO2_DISPLAY_SCANLINE_WORDS (ALTO2_DISPLAY_TOTAL_WIDTH/16) //!< words per scanline -#define ALTO2_DISPLAY_HEIGHT 808 //!< number of visible scanlines per frame; 808 really, but there are some empty lines? -#define ALTO2_DISPLAY_WIDTH 606 //!< visible width of the display; 38 x 16 bit words - 2 pixels -#define ALTO2_DISPLAY_VISIBLE_WORDS ((ALTO2_DISPLAY_WIDTH+15)/16) //!< visible words per scanline -#define ALTO2_DISPLAY_BITCLOCK 20160000ll //!< display bit clock in Hertz (20.16MHz) -#define ALTO2_DISPLAY_BITTIME(n) (U64(1000000000000)*(n)/ALTO2_DISPLAY_BITCLOCK) //!< display bit time in pico seconds (~= 49.6031ns) -#define ALTO2_DISPLAY_SCANLINE_TIME ALTO2_DISPLAY_BITTIME(ALTO2_DISPLAY_TOTAL_WIDTH)//!< time for a scanline in pico seconds (768 * 49.6031ns ~= 38095.1808ns) -#define ALTO2_DISPLAY_VISIBLE_TIME ALTO2_DISPLAY_BITTIME(ALTO2_DISPLAY_WIDTH) //!< time of the visible part of a scanline in pico seconds (606 * 49.6031ns ~= 30059.4786ns) -#define ALTO2_DISPLAY_WORD_TIME ALTO2_DISPLAY_BITTIME(16) //!< time for a word in pico seconds (16 pixels * 49.6031ns ~= 793.6496ns) -#define ALTO2_DISPLAY_VBLANK_TIME ((ALTO2_DISPLAY_TOTAL_HEIGHT-ALTO2_DISPLAY_HEIGHT)*HZ_TO_ATTOSECONDS(26250)/2) +//! Words per scanline. +#define ALTO2_DISPLAY_SCANLINE_WORDS (ALTO2_DISPLAY_TOTAL_WIDTH/16) + +//! Number of visible scanlines per frame; 808 really, but there are some empty lines? +#define ALTO2_DISPLAY_HEIGHT 808 + +//! Visible width of the display; 38 x 16 bit words - 2 pixels. +#define ALTO2_DISPLAY_WIDTH 606 + +//! Visible words per scanline. +#define ALTO2_DISPLAY_VISIBLE_WORDS ((ALTO2_DISPLAY_WIDTH+15)/16) + +//! Display bit clock in Hertz (20.16MHz). +#define ALTO2_DISPLAY_BITCLOCK 20160000ll + +//! Display bit time in pico seconds (~= 49.6031ns). +#define ALTO2_DISPLAY_BITTIME(n) (U64(1000000000000)*(n)/ALTO2_DISPLAY_BITCLOCK) + +//! Time for a scanline in pico seconds (768 * 49.6031ns ~= 38095.1808ns). +#define ALTO2_DISPLAY_SCANLINE_TIME ALTO2_DISPLAY_BITTIME(ALTO2_DISPLAY_TOTAL_WIDTH) + +//!< Time of the visible part of a scanline in pico seconds (606 * 49.6031ns ~= 30059.4786ns). +#define ALTO2_DISPLAY_VISIBLE_TIME ALTO2_DISPLAY_BITTIME(ALTO2_DISPLAY_WIDTH) + +//!< Time for a word in pico seconds (16 pixels * 49.6031ns ~= 793.6496ns). +#define ALTO2_DISPLAY_WORD_TIME ALTO2_DISPLAY_BITTIME(16) + +#define ALTO2_DISPLAY_VBLANK_TIME ((ALTO2_DISPLAY_TOTAL_HEIGHT-ALTO2_DISPLAY_HEIGHT)*HZ_TO_ATTOSECONDS(26250)) #else // ALTO2_DEFINE_CONSTANTS /** @@ -172,31 +193,29 @@ #ifndef _A2DISP_H_ #define _A2DISP_H_ struct { - UINT16 state; //!< current state of the display_state_machine() - UINT16 hlc; //!< horizontal line counter - UINT16 setmode; //!< value written by last SETMODE<- - UINT16 inverse; //!< set to 0xffff if line is inverse, 0x0000 otherwise - bool halfclock; //!< set 0 for normal pixel clock, 1 for half pixel clock + UINT32 state; //!< current state of the display_state_machine() + UINT32 hlc; //!< horizontal line counter + UINT32 setmode; //!< value written by last SETMODE<- + UINT32 inverse; //!< set to 0xffff if line is inverse, 0x0000 otherwise + bool halfclock; //!< false for normal pixel clock, true for half pixel clock UINT16 fifo[ALTO2_DISPLAY_FIFO]; //!< display word fifo - UINT8 wa; //!< fifo input pointer (write address; 4-bit) - UINT8 ra; //!< fifo output pointer (read address; 4-bit) - UINT8 a63; //!< most recent value read from the PROM a63 - UINT8 a66; //!< most recent value read from the PROM a66 - bool dht_blocks; //!< set non-zero, if the DHT executed BLOCK - bool dwt_blocks; //!< set non-zero, if the DWT executed BLOCK - bool curt_blocks; //!< set non-zero, if the CURT executed BLOCK - bool curt_wakeup; //!< set non-zero, if CURT wakeups are generated - UINT16 vblank; //!< most recent HLC with VBLANK still high (11-bit) - UINT16 xpreg; //!< cursor cursor x position register (10-bit) - UINT16 csr; //!< cursor shift register (16-bit) + UINT32 wa; //!< fifo input pointer (write address; 4-bit) + UINT32 ra; //!< fifo output pointer (read address; 4-bit) + UINT32 a63; //!< most recent value read from the PROM a63 + UINT32 a66; //!< most recent value read from the PROM a66 + bool dht_blocks; //!< set true, if the DHT executed BLOCK + bool dwt_blocks; //!< set true, if the DWT executed BLOCK + bool curt_blocks; //!< set true, if the CURT executed BLOCK + bool curt_wakeup; //!< set true, if CURT wakeups are generated + UINT32 vblank; //!< most recent HLC with VBLANK still high (11-bit) + UINT32 xpreg; //!< cursor cursor x position register (10-bit) + UINT32 csr; //!< cursor shift register (16-bit) UINT32 curxpos; //!< helper: first cursor word in scanline - UINT16 cursor0; //!< helper: shifted cursor data for left word - UINT16 cursor1; //!< helper: shifted cursor data for right word - std::unique_ptr raw_bitmap; //!< array of words of the raw bitmap that is displayed + UINT32 cursor0; //!< helper: shifted cursor data for left word + UINT32 cursor1; //!< helper: shifted cursor data for right word + std::unique_ptr framebuf; //!< array of words of the raw bitmap that is displayed UINT8 *patterns; //!< array of 65536 patterns (16 bytes) with 1 byte per pixel - UINT8 **scanline; //!< array of scanlines with 1 byte per pixel std::unique_ptr bitmap; //!< MAME bitmap with 16 bit indices - bool odd_frame; //!< true, if odd frame is drawn } m_dsp; /** @@ -285,9 +304,9 @@ enum { disp_a66_VBLANK_EVEN = (1 << 3) //!< Q4 (010) is VBLANK for the even field (with H1024=0) }; -void update_bitmap_word(UINT16* bitmap, int x, int y, UINT16 word); //!< update a word in the screen bitmap +void update_framebuf_word(UINT16* framebuf, int x, int y, UINT16 word); void unload_word(); //!< unload the next word from the display FIFO and shift it to the screen -void display_state_machine(); //!< function called by the CPU to enter the next display state +void display_state_machine(); //!< function called by the CPU execution loop to enter the next display state void f2_late_evenfield(void); //!< branch on the evenfield flip-flop @@ -295,8 +314,5 @@ void init_disp(); //!< initialize the display context void exit_disp(); //!< deinitialize the display context void reset_disp(); //!< reset the display context -void fake_status_putch(int x, UINT8 ch); -void fake_status_printf(int x, const char* format, ...); - #endif // _A2DISP_H_ #endif // ALTO2_DEFINE_CONSTANTS diff --git a/src/devices/cpu/alto2/a2dvt.cpp b/src/devices/cpu/alto2/a2dvt.cpp index ad019b6b07b..a3800a211a8 100644 --- a/src/devices/cpu/alto2/a2dvt.cpp +++ b/src/devices/cpu/alto2/a2dvt.cpp @@ -7,6 +7,29 @@ *****************************************************************************/ #include "alto2cpu.h" +/* + * Copied from ALTOCODE24.MU + * + * ;Display Vertical Task + * + * DVT: MAR↠L↠DASTART+1; + * CBA↠L, L↠0; + * CURDATA↠L; + * SLC↠L; + * T↠MD; CAUSE A VERTICAL FIELD INTERRUPT + * L↠NWW OR T; + * MAR↠CURLOC; SET UP THE CURSOR + * NWW↠L, T↠0-1; + * L↠MD XOR T; HARDWARE EXPECTS X COMPLEMENTED + * T↠MD, EVENFIELD; + * CURX↠L, :DVT1; + * + * DVT1: L↠BIAS-T-1, TASK, :DVT2; BIAS THE Y COORDINATE + * DVT11: L↠BIAS-T, TASK; + * + * DVT2: YPOS↠L, :DVT; + */ + /** * @brief f1_dvt_block early: disable the display word task */ @@ -30,9 +53,6 @@ void alto2_cpu_device::activate_dvt() */ void alto2_cpu_device::init_dvt(int task) { - set_f1(task, f1_block, &alto2_cpu_device::f1_early_dvt_block, nullptr); - set_f2(task, f2_dvt_evenfield, nullptr, &alto2_cpu_device::f2_late_evenfield); - m_active_callback[task] = &alto2_cpu_device::activate_dvt; } void alto2_cpu_device::exit_dvt() diff --git a/src/devices/cpu/alto2/a2dvt.h b/src/devices/cpu/alto2/a2dvt.h index 3b73ac7bf7e..0d9430b1731 100644 --- a/src/devices/cpu/alto2/a2dvt.h +++ b/src/devices/cpu/alto2/a2dvt.h @@ -16,10 +16,19 @@ enum { f2_dvt_evenfield = f2_task_10 //!< f2 10: load even field }; -void f1_early_dvt_block(); //!< F1 func: disable the display word task -void activate_dvt(); //!< called by the CPU when the display vertical task becomes active -void init_dvt(int task = task_dvt); //!< initialize the display vertical task -void exit_dvt(); //!< deinitialize the display vertical task -void reset_dvt(); //!< reset the display vertical task +//! F1 func: Disable the display word task. +void f1_early_dvt_block(); + +//! Called by the CPU when the display vertical task becomes active. +void activate_dvt(); + +//! Initialize the display vertical task. +void init_dvt(int task = task_dvt); + +//! Deinitialize the display vertical task. +void exit_dvt(); + +//! Reset the display vertical task. +void reset_dvt(); #endif // _A2DVT_H_ #endif // ALTO2_DEFINE_CONSTANTS diff --git a/src/devices/cpu/alto2/a2dwt.cpp b/src/devices/cpu/alto2/a2dwt.cpp index 3c6867b9f05..40bbe456a0e 100644 --- a/src/devices/cpu/alto2/a2dwt.cpp +++ b/src/devices/cpu/alto2/a2dwt.cpp @@ -7,6 +7,37 @@ *****************************************************************************/ #include "alto2cpu.h" +/* + * Copied from ALTOCODE24.MU + * + * ;Display Word Task + * + * DWT: T↠DWA; + * Tâ†-3+T+1; + * L↠AECL+T,BUS=0,TASK; AECL CONTAINS NWRDS AT THIS TIME + * AECLâ†L, :DWTZ; + * + * DWTY: BLOCK; + * TASK, :DWTF; + * + * DWTZ: Lâ†HTAB-1, BUS=0,TASK; + * HTABâ†L, :DOTAB; + * + * DOTAB: DDRâ†0, :DWTZ; + * NOTAB: MARâ†Tâ†DWA; + * Lâ†AECL-T-1; + * ALUCY, Lâ†2+T; + * DWAâ†L, :XNOMORE; + * + * DOMORE: DDRâ†MD, TASK; + * DDRâ†MD, :NOTAB; + * + * XNOMORE:DDR↠MD, BLOCK; + * DDR↠MD, TASK; + * + * DWTF: :DWT; + */ + //! PROM a38 bit O1 is STOPWAKE' (stop DWT if bit is zero) #define FIFO_STOPWAKE(a38) (0 == (a38 & disp_a38_STOPWAKE) ? true : false) @@ -44,8 +75,6 @@ void alto2_cpu_device::f2_late_dwt_load_ddr() void alto2_cpu_device::init_dwt(int task) { - set_f1(task, f1_block, &alto2_cpu_device::f1_early_dwt_block, nullptr); - set_f2(task, f2_dwt_load_ddr, nullptr, &alto2_cpu_device::f2_late_dwt_load_ddr); } void alto2_cpu_device::exit_dwt() diff --git a/src/devices/cpu/alto2/a2emu.cpp b/src/devices/cpu/alto2/a2emu.cpp index 75fe6588d67..8cb0296e512 100644 --- a/src/devices/cpu/alto2/a2emu.cpp +++ b/src/devices/cpu/alto2/a2emu.cpp @@ -365,7 +365,7 @@ void alto2_cpu_device::f2_late_busodd() void alto2_cpu_device::f2_late_magic() { int XC; - switch (m_d_f1) { + switch (f1()) { case f1_l_lsh_1: // <-L MLSH 1 XC = (m_t >> 15) & 1; m_shifter = (m_l << 1) | XC; @@ -441,7 +441,7 @@ void alto2_cpu_device::f2_late_load_dns() UINT8 DSKIP; UINT8 SHZERO; - switch (m_d_f1) { + switch (f1()) { case f1_l_rsh_1: // <-L RSH 1 NEWCARRY = m_l & 1; m_shifter = ((m_l >> 1) | (XC << 15)) & 0177777; @@ -656,28 +656,6 @@ void alto2_cpu_device::init_emu(int task) save_item(NAME(m_emu.cy)); init_ram(task); - - set_bs(task, bs_emu_read_sreg, &alto2_cpu_device::bs_early_read_sreg, nullptr); - set_bs(task, bs_emu_load_sreg, &alto2_cpu_device::bs_early_load_sreg, &alto2_cpu_device::bs_late_load_sreg); - set_bs(task, bs_disp, &alto2_cpu_device::bs_early_emu_disp, nullptr); - - set_f1(task, f1_block, &alto2_cpu_device::f1_early_emu_block, nullptr); // catch the emulator task trying to block (wrong branch) - set_f1(task, f1_emu_swmode, nullptr, &alto2_cpu_device::f1_late_swmode); - set_f1(task, f1_emu_wrtram, nullptr, &alto2_cpu_device::f1_late_wrtram); - set_f1(task, f1_emu_rdram, nullptr, &alto2_cpu_device::f1_late_rdram); - set_f1(task, f1_emu_load_rmr, nullptr, &alto2_cpu_device::f1_late_emu_load_rmr); - set_f1(task, f1_task_14, nullptr, nullptr); // F1 014 is undefined (?) - set_f1(task, f1_emu_load_esrb, nullptr, &alto2_cpu_device::f1_late_emu_load_esrb); - set_f1(task, f1_emu_rsnf, &alto2_cpu_device::f1_early_rsnf, nullptr); - set_f1(task, f1_emu_startf, &alto2_cpu_device::f1_early_startf, nullptr); - - set_f2(task, f2_emu_busodd, nullptr, &alto2_cpu_device::f2_late_busodd); - set_f2(task, f2_emu_magic, nullptr, &alto2_cpu_device::f2_late_magic); - set_f2(task, f2_emu_load_dns, &alto2_cpu_device::f2_early_load_dns, &alto2_cpu_device::f2_late_load_dns); - set_f2(task, f2_emu_acdest, &alto2_cpu_device::f2_early_acdest, nullptr); - set_f2(task, f2_emu_load_ir, nullptr, &alto2_cpu_device::f2_late_load_ir); - set_f2(task, f2_emu_idisp, nullptr, &alto2_cpu_device::f2_late_idisp); - set_f2(task, f2_emu_acsource, &alto2_cpu_device::f2_early_acsource, &alto2_cpu_device::f2_late_acsource); } void alto2_cpu_device::exit_emu() diff --git a/src/devices/cpu/alto2/a2ether.cpp b/src/devices/cpu/alto2/a2ether.cpp index c0922a6b831..3a360f8854e 100644 --- a/src/devices/cpu/alto2/a2ether.cpp +++ b/src/devices/cpu/alto2/a2ether.cpp @@ -863,7 +863,7 @@ void alto2_cpu_device::update_sysclk(int sysclk) * Q' OCMD' */ s0 = m_eth.ff_35a; - s1 = (m_d_f1 == f1_emu_startf && sysclk) ? JKFF_CLK : JKFF_0; + s1 = (f1() == f1_emu_startf && sysclk) ? JKFF_CLK : JKFF_0; if (X_BIT(m_bus,16,15)) s1 |= JKFF_J; s1 |= JKFF_K; @@ -885,7 +885,7 @@ void alto2_cpu_device::update_sysclk(int sysclk) * Q' ICMD' */ s0 = m_eth.ff_35b; - s1 = (m_d_f1 == f1_emu_startf && sysclk) ? JKFF_CLK : JKFF_0; + s1 = (f1() == f1_emu_startf && sysclk) ? JKFF_CLK : JKFF_0; if (X_BIT(m_bus,16,14)) s1 |= JKFF_J; s1 |= JKFF_K; @@ -905,7 +905,7 @@ void alto2_cpu_device::update_sysclk(int sysclk) */ s0 = m_eth.ff_10a; s1 = sysclk ? JKFF_CLK : JKFF_0; - if (m_d_f2 != f2_ether_eisfct) + if (f2() != f2_ether_eisfct) s1 |= JKFF_K; s1 |= JKFF_C; m_eth.ff_10a = update_jkff(s0, s1, "10a IBUSY "); @@ -931,15 +931,15 @@ void alto2_cpu_device::update_sysclk(int sysclk) UINT8 RR; UINT8 WLL0; if (m_eth.ff_10a & JKFF_Q) { - WLLOAD = ~(sysclk & (m_d_f2 == f2_ether_eodfct)) & 1; + WLLOAD = ~(sysclk & (f2() == f2_ether_eodfct)) & 1; RDCNT0 = m_eth.ff_52b & JKFF_Q ? 1 : 0; RR = m_eth.ff_52b & JKFF_Q0 ? 1 : 0; - WLL0 = ~(sysclk & (m_d_f2 == f2_ether_eodfct)) & 1; + WLL0 = ~(sysclk & (f2() == f2_ether_eodfct)) & 1; } else { // ISRFULL WLLOAD = (m_eth.serin >> 1) & 1; - RDCNT0 = ~(sysclk & (m_d_bs == bs_ether_eidfct)) & 1; - RR = m_d_bs == bs_ether_eidfct || m_d_f1 == f1_ether_eilfct; + RDCNT0 = ~(sysclk & (bs() == bs_ether_eidfct)) & 1; + RR = bs() == bs_ether_eidfct || f1() == f1_ether_eilfct; WLL0 = m_eth.ff_77b & JKFF_Q0 ? 1 : 0; } // TODO: use the signals @@ -960,7 +960,7 @@ void alto2_cpu_device::update_sysclk(int sysclk) */ s0 = m_eth.ff_10b; s1 = sysclk ? JKFF_CLK : JKFF_0; - if (m_d_f2 != f2_ether_eosfct) + if (f2() != f2_ether_eosfct) s1 |= JKFF_K; m_eth.ff_10b = update_jkff(s0, s1, "10b OBUSY "); @@ -1321,23 +1321,6 @@ void alto2_cpu_device::init_ether(int task) m_ether_a42 = prom_load(machine(), &pl_enet_a42, memregion("ether_a42")->base()); m_ether_a49 = prom_load(machine(), &pl_enet_a49, memregion("ether_a49")->base()); - set_bs(task, bs_ether_eidfct, &alto2_cpu_device::bs_early_eidfct, nullptr); - - set_f1(task, f1_block, &alto2_cpu_device::f1_early_eth_block, nullptr); - set_f1(task, f1_ether_eilfct, &alto2_cpu_device::f1_early_eilfct, nullptr); - set_f1(task, f1_ether_epfct, &alto2_cpu_device::f1_early_epfct, nullptr); - set_f1(task, f1_ether_ewfct, nullptr, &alto2_cpu_device::f1_late_ewfct); - - set_f2(task, f2_ether_eodfct, nullptr, &alto2_cpu_device::f2_late_eodfct); - set_f2(task, f2_ether_eosfct, nullptr, &alto2_cpu_device::f2_late_eosfct); - set_f2(task, f2_ether_erbfct, nullptr, &alto2_cpu_device::f2_late_erbfct); - set_f2(task, f2_ether_eefct, nullptr, &alto2_cpu_device::f2_late_eefct); - set_f2(task, f2_ether_ebfct, nullptr, &alto2_cpu_device::f2_late_ebfct); - set_f2(task, f2_ether_ecbfct, nullptr, &alto2_cpu_device::f2_late_ecbfct); - set_f2(task, f2_ether_eisfct, nullptr, &alto2_cpu_device::f2_late_eisfct); - - m_active_callback[task] = &alto2_cpu_device::activate_eth; - m_eth.rx_packet = std::make_unique(sizeof(UINT16)*ALTO2_ETHER_PACKET_SIZE); m_eth.tx_packet = std::make_unique(sizeof(UINT16)*ALTO2_ETHER_PACKET_SIZE); diff --git a/src/devices/cpu/alto2/a2ksec.cpp b/src/devices/cpu/alto2/a2ksec.cpp index 9e288aeead9..6ba05395877 100644 --- a/src/devices/cpu/alto2/a2ksec.cpp +++ b/src/devices/cpu/alto2/a2ksec.cpp @@ -17,29 +17,6 @@ void alto2_cpu_device::f1_early_ksec_block() //! disk sector task slot initialization void alto2_cpu_device::init_ksec(int task) { - set_bs(task, bs_ksec_read_kstat, &alto2_cpu_device::bs_early_read_kstat, nullptr); - set_bs(task, bs_ksec_read_kdata, &alto2_cpu_device::bs_early_read_kdata, nullptr); - - set_f1(task, f1_block, &alto2_cpu_device::f1_early_ksec_block, nullptr); - - set_f1(task, f1_task_10, nullptr, nullptr); - set_f1(task, f1_ksec_strobe, nullptr, &alto2_cpu_device::f1_late_strobe); - set_f1(task, f1_ksec_load_kstat, nullptr, &alto2_cpu_device::f1_late_load_kstat); - set_f1(task, f1_ksec_increcno, nullptr, &alto2_cpu_device::f1_late_increcno); - set_f1(task, f1_ksec_clrstat, nullptr, &alto2_cpu_device::f1_late_clrstat); - set_f1(task, f1_ksec_load_kcom, nullptr, &alto2_cpu_device::f1_late_load_kcom); - set_f1(task, f1_ksec_load_kadr, nullptr, &alto2_cpu_device::f1_late_load_kadr); - set_f1(task, f1_ksec_load_kdata, nullptr, &alto2_cpu_device::f1_late_load_kdata); - - set_f2(task, f2_ksec_init, nullptr, &alto2_cpu_device::f2_late_init); - set_f2(task, f2_ksec_rwc, nullptr, &alto2_cpu_device::f2_late_rwc); - set_f2(task, f2_ksec_recno, nullptr, &alto2_cpu_device::f2_late_recno); - set_f2(task, f2_ksec_xfrdat, nullptr, &alto2_cpu_device::f2_late_xfrdat); - set_f2(task, f2_ksec_swrnrdy, nullptr, &alto2_cpu_device::f2_late_swrnrdy); - set_f2(task, f2_ksec_nfer, nullptr, &alto2_cpu_device::f2_late_nfer); - set_f2(task, f2_ksec_strobon, nullptr, &alto2_cpu_device::f2_late_strobon); - set_f2(task, f2_task_17, nullptr, nullptr); - m_task_wakeup |= 1 << task; } diff --git a/src/devices/cpu/alto2/a2kwd.cpp b/src/devices/cpu/alto2/a2kwd.cpp index f93343e908b..e312debecf9 100644 --- a/src/devices/cpu/alto2/a2kwd.cpp +++ b/src/devices/cpu/alto2/a2kwd.cpp @@ -17,28 +17,6 @@ void alto2_cpu_device::f1_early_kwd_block() //! disk word task slot initialization void alto2_cpu_device::init_kwd(int task) { - set_bs(task, bs_kwd_read_kstat, &alto2_cpu_device::bs_early_read_kstat, nullptr); - set_bs(task, bs_kwd_read_kdata, &alto2_cpu_device::bs_early_read_kdata, nullptr); - - set_f1(task, f1_block, &alto2_cpu_device::f1_early_kwd_block, nullptr); - - set_f1(task, f1_task_10, nullptr, nullptr); - set_f1(task, f1_kwd_strobe, nullptr, &alto2_cpu_device::f1_late_strobe); - set_f1(task, f1_kwd_load_kstat, nullptr, &alto2_cpu_device::f1_late_load_kstat); - set_f1(task, f1_kwd_increcno, nullptr, &alto2_cpu_device::f1_late_increcno); - set_f1(task, f1_kwd_clrstat, nullptr, &alto2_cpu_device::f1_late_clrstat); - set_f1(task, f1_kwd_load_kcom, nullptr, &alto2_cpu_device::f1_late_load_kcom); - set_f1(task, f1_kwd_load_kadr, nullptr, &alto2_cpu_device::f1_late_load_kadr); - set_f1(task, f1_kwd_load_kdata, nullptr, &alto2_cpu_device::f1_late_load_kdata); - - set_f2(task, f2_kwd_init, nullptr, &alto2_cpu_device::f2_late_init); - set_f2(task, f2_kwd_rwc, nullptr, &alto2_cpu_device::f2_late_rwc); - set_f2(task, f2_kwd_recno, nullptr, &alto2_cpu_device::f2_late_recno); - set_f2(task, f2_kwd_xfrdat, nullptr, &alto2_cpu_device::f2_late_xfrdat); - set_f2(task, f2_kwd_swrnrdy, nullptr, &alto2_cpu_device::f2_late_swrnrdy); - set_f2(task, f2_kwd_nfer, nullptr, &alto2_cpu_device::f2_late_nfer); - set_f2(task, f2_kwd_strobon, nullptr, &alto2_cpu_device::f2_late_strobon); - set_f2(task, f2_task_17, nullptr, nullptr); } void alto2_cpu_device::exit_kwd() diff --git a/src/devices/cpu/alto2/a2mem.cpp b/src/devices/cpu/alto2/a2mem.cpp index e64dd4a0a28..f31c8d77878 100644 --- a/src/devices/cpu/alto2/a2mem.cpp +++ b/src/devices/cpu/alto2/a2mem.cpp @@ -201,11 +201,11 @@ * * chip A B C D E F G H I even odd * --------------------------------------------------------------------------------- - * a75: WD01 WD04 WD08 WD11 WD15 WD19 WD23 WD26 WD30 --- HC(0)A - * a76: WD00 WD03 WD06 WD10 WD13 WD17 WD21 WD25 WD28 HC(0B1) --- - * a86: WD02 WD05 WD09 WD12 WD16 WD20 WD24 WD27 WD31 HC(1)A --- - * a64: WD01 WD02 WD03 WD07 WD08 WD09 WD10 WD14 WD15 --- HC(2)A - * a85: WD16 WD17 WD22 WD23 WD24 WD25 WD29 WD30 WD31 HC(2)B --- + * A75: WD01 WD04 WD08 WD11 WD15 WD19 WD23 WD26 WD30 --- HC(0)A + * A76: WD00 WD03 WD06 WD10 WD13 WD17 WD21 WD25 WD28 HC(0B1) --- + * A86: WD02 WD05 WD09 WD12 WD16 WD20 WD24 WD27 WD31 HC(1)A --- + * A64: WD01 WD02 WD03 WD07 WD08 WD09 WD10 WD14 WD15 --- HC(2)A + * A85: WD16 WD17 WD22 WD23 WD24 WD25 WD29 WD30 WD31 HC(2)B --- * * H(0) ^ HC(0)A ^ HC(0B1) -> HC(0) * H(1) ^ HC(1)A ^ HC(0B1) -> HC(1) @@ -214,10 +214,10 @@ * * chip A B C D E F G H I even odd * --------------------------------------------------------------------------------- - * a66: WD04 WD05 WD06 WD07 WD08 WD09 WD10 H(3) 0 --- HC(3)A - * a84: WD18 WD19 WD20 WD21 WD22 WD23 WD24 WD25 0 HC(3/4) HCPA - * a63: WD11 WD12 WD13 WD14 WD15 WD16 WD17 H(4) 0 --- HC(4)A - * a87: WD26 WD27 WD28 WD29 WD30 WD31 H(5) 0 0 HC(5) HCPB + * A66: WD04 WD05 WD06 WD07 WD08 WD09 WD10 H(3) 0 --- HC(3)A + * A84: WD18 WD19 WD20 WD21 WD22 WD23 WD24 WD25 0 HC(3/4) HCPA + * A63: WD11 WD12 WD13 WD14 WD15 WD16 WD17 H(4) 0 --- HC(4)A + * A87: WD26 WD27 WD28 WD29 WD30 WD31 H(5) 0 0 HC(5) HCPB * * HC(3)A ^ HC(3/4) -> HC(3) * HC(4)A ^ HC(3/4) -> HC(4) @@ -226,53 +226,52 @@ * * chip A B C D E F G H I even odd * --------------------------------------------------------------------------------- - * a54: HC(3)A HC(4)A HCPA HCPB H(0/2) XX01 WD02 WD03 RP PERR --- - * a65: WD00 WD01 WD02 WD04 WD05 WD07 WD10 WD11 WD12 --- PCA - * a74: WD14 WD17 WD18 WD21 WD23 WD24 WD26 WD27 WD29 PCB --- + * A54: HC(3)A HC(4)A HCPA HCPB H(0/2) XX01 WD02 WD03 RP PERR --- + * A65: WD00 WD01 WD02 WD04 WD05 WD07 WD10 WD11 WD12 --- PCA + * A74: WD14 WD17 WD18 WD21 WD23 WD24 WD26 WD27 WD29 PCB --- * * PCA ^ PCB -> PC + *
* * Whoa ;-) - * */ -#if USE_HAMMING_CHECK #define WD(x) (1ul<<(31-x)) -/* a75: WD01 WD04 WD08 WD11 WD15 WD19 WD23 WD26 WD30 --- HC(0)A */ +//! Data double word mask for chip A75. #define A75 (WD( 1)|WD( 4)|WD( 8)|WD(11)|WD(15)|WD(19)|WD(23)|WD(26)|WD(30)) -/* a76: WD00 WD03 WD06 WD10 WD13 WD17 WD21 WD25 WD29 HC(0B1) --- */ +//! Data double word mask for chip A76. #define A76 (WD( 0)|WD( 3)|WD( 6)|WD(10)|WD(13)|WD(17)|WD(21)|WD(25)|WD(28)) -/* a86: WD02 WD05 WD09 WD12 WD16 WD20 WD24 WD27 WD31 HC(1)A --- */ +//! Data double word mask for chip A86. #define A86 (WD( 2)|WD( 5)|WD( 9)|WD(12)|WD(16)|WD(20)|WD(24)|WD(27)|WD(31)) -/* a64: WD01 WD02 WD03 WD07 WD08 WD09 WD10 WD14 WD15 --- HC(2)A */ +//! Data double word mask for chip A64. #define A64 (WD( 1)|WD( 2)|WD( 3)|WD( 7)|WD( 8)|WD( 9)|WD(10)|WD(14)|WD(15)) -/* a85: WD16 WD17 WD22 WD23 WD24 WD25 WD29 WD30 WD31 HC(2)B --- */ +//! Data double word mask for chip A85. #define A85 (WD(16)|WD(17)|WD(22)|WD(23)|WD(24)|WD(25)|WD(29)|WD(30)|WD(31)) -/* a66: WD04 WD05 WD06 WD07 WD08 WD09 WD10 H(3) 0 --- HC(3)A */ +//! Data double word mask for chip A66. #define A66 (WD( 4)|WD( 5)|WD( 6)|WD( 7)|WD( 8)|WD( 9)|WD(10)) -/* a84: WD18 WD19 WD20 WD21 WD22 WD23 WD24 WD25 0 HC(3/4) HCPA */ +//! Data double word mask for chip A84. #define A84 (WD(18)|WD(19)|WD(20)|WD(21)|WD(22)|WD(23)|WD(24)|WD(25)) -/* a63: WD11 WD12 WD13 WD14 WD15 WD16 WD17 H(4) 0 --- HC(4)A */ +//! Data double word mask for chip A63. #define A63 (WD(11)|WD(12)|WD(13)|WD(14)|WD(15)|WD(16)|WD(17)) -/* a87: WD26 WD27 WD28 WD29 WD30 WD31 H(5) 0 0 HC(5) HCPB */ +//! Data double word mask for chip A87. #define A87 (WD(26)|WD(27)|WD(28)|WD(29)|WD(30)|WD(31)) -/* a54: HC(3)A HC(4)A HCPA HCPB H(0/2) XX01 WD02 WD03 P PERR --- */ +//! Data double word mask for chip A54. #define A54 (WD( 2)|WD( 3)) -/* a65: WD00 WD01 WD02 WD04 WD05 WD07 WD10 WD11 WD12 --- PCA */ +//! Data double word mask for chip A65. #define A65 (WD( 0)|WD( 1)|WD( 2)|WD( 4)|WD( 5)|WD( 7)|WD(10)|WD(11)|WD(12)) -/* a74: WD14 WD17 WD18 WD21 WD23 WD24 WD26 WD27 WD29 PCB --- */ +//! Data double word mask for chip A74. #define A74 (WD(14)|WD(17)|WD(18)|WD(21)|WD(23)|WD(24)|WD(26)|WD(27)|WD(29)) #define H0(hpb) X_BIT(hpb,8,0) //!< get Hamming code bit 0 from hpb data (really bit 32) @@ -283,23 +282,29 @@ #define H5(hpb) X_BIT(hpb,8,5) //!< get Hamming code bit 5 from hpb data (really bit 37) #define RH(hpb) X_RDBITS(hpb,8,0,5) //!< get Hamming code from hpb data (bits 32 to 37) #define RP(hpb) X_BIT(hpb,8,6) //!< get parity bit from hpb data (really bit 38) +#define RU(hpb) X_BIT(hpb,8,7) //!< get unused bit from hpb data (really bit 39) [unused] -/** @brief return even parity of a (masked) 32 bit value */ +/** + * @brief Return even parity of a (masked) 32 bit value. + * @param val 32 bits + * @return 1 for even parity, 0 for odd parity + */ static __inline UINT8 parity_even(UINT32 val) { - val -= ((val >> 1) & 0x55555555); - val = (((val >> 2) & 0x33333333) + (val & 0x33333333)); - val = (((val >> 4) + val) & 0x0f0f0f0f); - val += (val >> 8); - val += (val >> 16); - return (val & 1); + val -= ((val >> 1) & 0x55555555); + val = (((val >> 2) & 0x33333333) + (val & 0x33333333)); + val = (((val >> 4) + val) & 0x0f0f0f0f); + val += (val >> 8); + val += (val >> 16); + // val now has number of 1 bits + return val & 1; } -/** @brief return odd parity of a (masked) 32 bit value */ +/** @brief Return odd parity of a (masked) 32 bit value. */ #define parity_odd(val) (parity_even(val)^1) /** - * @brief lookup table to convert a Hamming syndrome into a bit number to correct + * @brief Lookup table to convert a Hamming syndrome into a bit number to correct. */ static const int hamming_lut[64] = { -1, -1, -1, 0, -1, 1, 2, 3, /* A69: HR(5):0 HR(4):0 HR(3):0 */ @@ -313,100 +318,88 @@ static const int hamming_lut[64] = { }; /** - * @brief read or write a memory double-word and caluclate its Hamming code + * @brief Caluclate a Hamming code after reading or before writing a memory double-word. * - * Hamming code generation according to the schematics described above. + * Hamming code generation is according to the schematics described above. + * * It's certainly overkill to do this on a modern PC, but I think we'll - * need it for perfect emulation anyways (Hamming code hardware checking). + * need it for perfect emulation anyways, e.g. Hamming code hardware checking. * - * @param write non-zero if this is a memory write (don't check for error) + * @param write true, if this is a memory write (don't check for error) * @param dw_addr the double-word address - * @param dw_data the double-word data to write - * @return dw_data + * @param dw_data the double-word data + * @return dw_data, possibly with 1 bit error corrected */ -UINT32 alto2_cpu_device::hamming_code(int write, UINT32 dw_addr, UINT32 dw_data) +UINT32 alto2_cpu_device::hamming_code(bool write, UINT32 dw_addr, UINT32 dw_data) { - UINT8 hpb = write ? 0 : m_mem.hpb[dw_addr]; - UINT8 hc_0_a; - UINT8 hc_0b1; - UINT8 hc_1_a; - UINT8 hc_2_a; - UINT8 hc_2_b; - UINT8 hc_0; - UINT8 hc_1; - UINT8 hc_2; - UINT8 h_0_2; - UINT8 hc_3_a; - UINT8 hc_3_4; - UINT8 hcpa; - UINT8 hc_4_a; - UINT8 hc_3; - UINT8 hc_4; - UINT8 hc_5; - UINT8 hcpb; - UINT8 perr; - UINT8 pca; - UINT8 pcb; - UINT8 pc; - int syndrome; + const UINT8 hpb = write ? 0 : m_mem.hpb[dw_addr]; /* a75: WD01 WD04 WD08 WD11 WD15 WD19 WD23 WD26 WD30 --- HC(0)A */ - hc_0_a = parity_odd (dw_data & A75); - /* a76: WD00 WD03 WD06 WD10 WD13 WD17 WD21 WD25 WD29 HC(0B1) --- */ - hc_0b1 = parity_even(dw_data & A76); - /* a86: WD02 WD05 WD09 WD12 WD16 WD20 WD24 WD27 WD31 HC(1)A --- */ - hc_1_a = parity_even(dw_data & A86); - /* a64: WD01 WD02 WD03 WD07 WD08 WD09 WD10 WD14 WD15 --- HC(2)A */ - hc_2_a = parity_odd (dw_data & A64); - /* a85: WD16 WD17 WD22 WD23 WD24 WD25 WD29 WD30 WD31 HC(2)B --- */ - hc_2_b = parity_even(dw_data & A85); + const UINT8 hc_0_a = parity_odd (dw_data & A75); - hc_0 = H0(hpb) ^ hc_0_a ^ hc_0b1; - hc_1 = H1(hpb) ^ hc_1_a ^ hc_0b1; - hc_2 = hc_2_a ^ hc_2_b ^ H2(hpb); - h_0_2 = H0(hpb) ^ H1(hpb) ^ H2(hpb); + /* a76: WD00 WD03 WD06 WD10 WD13 WD17 WD21 WD25 WD29 HC(0B1) --- */ + const UINT8 hc_0b1 = parity_even(dw_data & A76); + + /* a86: WD02 WD05 WD09 WD12 WD16 WD20 WD24 WD27 WD31 HC(1)A --- */ + const UINT8 hc_1_a = parity_even(dw_data & A86); + + /* a64: WD01 WD02 WD03 WD07 WD08 WD09 WD10 WD14 WD15 --- HC(2)A */ + const UINT8 hc_2_a = parity_odd (dw_data & A64); + + /* a85: WD16 WD17 WD22 WD23 WD24 WD25 WD29 WD30 WD31 HC(2)B --- */ + const UINT8 hc_2_b = parity_even(dw_data & A85); + + const UINT8 hc_0 = H0(hpb) ^ hc_0_a ^ hc_0b1; + const UINT8 hc_1 = H1(hpb) ^ hc_1_a ^ hc_0b1; + const UINT8 hc_2 = hc_2_a ^ hc_2_b ^ H2(hpb); + const UINT8 h_0_2 = H0(hpb) ^ H1(hpb) ^ H2(hpb); /* a66: WD04 WD05 WD06 WD07 WD08 WD09 WD10 H(3) 0 --- HC(3)A */ - hc_3_a = parity_odd ((dw_data & A66) ^ H3(hpb)); + const UINT8 hc_3_a = parity_odd ((dw_data & A66) ^ H3(hpb)); + /* a84: WD18 WD19 WD20 WD21 WD22 WD23 WD24 WD25 0 HC(3/4) HCPA */ - hcpa = parity_odd (dw_data & A84); - hc_3_4 = hcpa ^ 1; + const UINT8 hcpa = parity_odd (dw_data & A84); + const UINT8 hc_3_4 = hcpa ^ 1; + /* a63: WD11 WD12 WD13 WD14 WD15 WD16 WD17 H(4) 0 --- HC(4)A */ - hc_4_a = parity_odd ((dw_data & A63) ^ H4(hpb)); + const UINT8 hc_4_a = parity_odd ((dw_data & A63) ^ H4(hpb)); /* a87: WD26 WD27 WD28 WD29 WD30 WD31 H(5) 0 0 HC(5) HCPB */ - hcpb = parity_odd ((dw_data & A87) ^ H5(hpb)); - hc_3 = hc_3_a ^ hc_3_4; - hc_4 = hc_4_a ^ hc_3_4; - hc_5 = hcpb ^ 1; + const UINT8 hcpb = parity_odd ((dw_data & A87) ^ H5(hpb)); + const UINT8 hc_3 = hc_3_a ^ hc_3_4; + const UINT8 hc_4 = hc_4_a ^ hc_3_4; + const UINT8 hc_5 = hcpb ^ 1; - syndrome = (hc_0<<5)|(hc_1<<4)|(hc_2<<3)|(hc_3<<2)|(hc_4<<1)|(hc_5); + const UINT8 syndrome = 32*hc_0 + 16*hc_1 + 8*hc_2 + 4*hc_3 + 2*hc_4 + hc_5; - /* + + /* a54: HC(3)A HC(4)A HCPA HCPB H(0/2) XX01 WD02 WD03 P PERR --- + * * Note: Here I XOR all the non dw_data inputs into bit 0, * which has the same effect as spreading them over some bits * and then counting them... I hope ;-) */ - /* a54: HC(3)A HC(4)A HCPA HCPB H(0/2) XX01 WD02 WD03 P PERR --- */ - perr = parity_even( + const UINT8 perr = parity_even( hc_3_a ^ hc_4_a ^ hcpa ^ hcpb ^ h_0_2 ^ - (X_RDBITS(dw_data,32,0,0) ^ X_RDBITS(dw_data,32,1,1)) ^ + X_RDBITS(dw_data,32,0,0) ^ + X_RDBITS(dw_data,32,1,1) ^ (dw_data & A54) ^ RP(hpb) ^ 1); /* a65: WD00 WD01 WD02 WD04 WD05 WD07 WD10 WD11 WD12 --- PCA */ - pca = parity_odd (dw_data & A65); + const UINT8 pca = parity_odd (dw_data & A65); + /* a74: WD14 WD17 WD18 WD21 WD23 WD24 WD26 WD27 WD29 PCB --- */ - pcb = parity_even(dw_data & A74); - pc = pca ^ pcb; + const UINT8 pcb = parity_even(dw_data & A74); + const UINT8 pc = pca ^ pcb; if (write) { - /* update the hamming code and parity bit store */ + /* Update the hamming code and parity bit store */ m_mem.hpb[dw_addr] = (syndrome << 2) | (pc << 1); return dw_data; @@ -429,11 +422,11 @@ UINT32 alto2_cpu_device::hamming_code(int write, UINT32 dw_addr, UINT32 dw_data) * output signal * ------------------------- * 8 ERROR + * * - * Remembering De Morgan this can be simplified: + * Using De Morgan this can be simplified: * ERROR is 0, whenever all of PERR and HC(0) to HC(5) are 0. * Or the other way round: any of perr or syndrome non-zero means ERROR=1. - * */ if (perr || syndrome) { /* latch data on the first error */ @@ -478,7 +471,6 @@ UINT32 alto2_cpu_device::hamming_code(int write, UINT32 dw_addr, UINT32 dw_data) } return dw_data; } -#endif /* USE_HAMMING_CHECK */ /** * @brief memory error address register read @@ -522,11 +514,7 @@ READ16_MEMBER( alto2_cpu_device::mesr_r ) 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((this,LOG_MEM,6," Hamming syndrome : %#o (bit #%d)\n", GET_MESR_SYNDROME(data), hamming_lut[GET_MESR_SYNDROME(data)])); -#else - LOG((this,LOG_MEM,6," Hamming syndrome : %#o\n", GET_MESR_SYNDROME(data))); -#endif LOG((this,LOG_MEM,6," Memory bank : %#o\n", GET_MESR_BANK(data))); } return data; @@ -536,10 +524,10 @@ WRITE16_MEMBER( alto2_cpu_device::mesr_w ) { if (!space.debugger_access()) { 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 + m_task_wakeup &= ~(1 << task_part); // clear the task wakeup for the parity error task } - m_mem.mesr = 0; // set all bits to 0 - m_mem.error = 0; // reset the error flag - m_task_wakeup &= ~(1 << task_part); // clear the task wakeup for the parity error task } /** @@ -566,6 +554,7 @@ WRITE16_MEMBER( alto2_cpu_device::mesr_w ) WRITE16_MEMBER( alto2_cpu_device::mecr_w ) { m_mem.mecr = data ^ 0177777; + // clear spare bits X_WRBITS(m_mem.mecr,16, 0, 3,0); X_WRBITS(m_mem.mecr,16,15,15,0); if (!space.debugger_access()) { @@ -584,7 +573,7 @@ WRITE16_MEMBER( alto2_cpu_device::mecr_w ) READ16_MEMBER( alto2_cpu_device::mecr_r ) { UINT16 data = m_mem.mecr ^ 0177777; - /* set all spare bits */ + // all spare bits are set if (!space.debugger_access()) { 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))); @@ -596,25 +585,33 @@ READ16_MEMBER( alto2_cpu_device::mecr_r ) return data; } -//! read i/o space RAM +/** + * @brief Read i/o space RAM. + * Note: This is for debugger access. Regular memory access is + * only through load_mar, read_mem and write_mem. + */ READ16_MEMBER ( alto2_cpu_device::ioram_r ) { - offs_t dword_addr = offset / 2; - return static_cast(offset & 1 ? GET_ODD(m_mem.ram[dword_addr]) : GET_EVEN(m_mem.ram[dword_addr])); -} - -//! write i/o space RAM -WRITE16_MEMBER( alto2_cpu_device::ioram_w ) -{ - offs_t dword_addr = offset / 2; - if (offset & 1) - PUT_ODD(m_mem.ram[dword_addr], data); - else - PUT_EVEN(m_mem.ram[dword_addr], data); + offs_t dw_addr = offset / 2; + return static_cast(offset & 1 ? GET_ODD(m_mem.ram[dw_addr]) : GET_EVEN(m_mem.ram[dw_addr])); } /** - * @brief load the memory address register with some value + * @brief Write i/o space RAM. + * Note: This is for debugger access. Regular memory access is + * only through load_mar, read_mem and write_mem. + */ +WRITE16_MEMBER( alto2_cpu_device::ioram_w ) +{ + offs_t dw_addr = offset / 2; + if (offset & 1) + PUT_ODD(m_mem.ram[dw_addr], data); + else + PUT_EVEN(m_mem.ram[dw_addr], data); +} + +/** + * @brief Load the memory address register with some value. * * @param rsel selected register (to detect refresh cycles) * @param addr memory address @@ -627,7 +624,7 @@ void alto2_cpu_device::load_mar(UINT8 rsel, UINT32 addr) * currently we don't do anything special */ LOG((this,LOG_MEM,5, " MAR<-; refresh cycle @ %#o\n", addr)); - m_mem.mar = addr; + m_mem.mar = addr & ~3; m_mem.access = ALTO2_MEM_REFRESH; m_mem.cycle = cycle(); return; @@ -639,8 +636,7 @@ void alto2_cpu_device::load_mar(UINT8 rsel, UINT32 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]; - // keep track of the current CPU cycle - m_mem.cycle = cycle(); + m_mem.cycle = cycle(); // keep track of the current CPU cycle } else { m_mem.access = ALTO2_MEM_INVALID; m_mem.rmdd = m_mem.wmdd = ~0; @@ -648,26 +644,31 @@ void alto2_cpu_device::load_mar(UINT8 rsel, UINT32 addr) } /** - * @brief read memory or memory mapped I/O from the address in mar to md + * @brief Read RAM or memory mapped I/O from the address in MAR to MD. + * + * Since the Alto II has a latch for the memory dword, + * reading it after cycle +4 is very well possible. + * We simply return the most recent m_mem.md in this case. + * + * This fixes calculator.run and ti55.run, probably others, + * which were making the mouse cursor displaying weird things. + * + * Thanks go to LCM and ContrAlto source for the hint! * * @result returns value from memory (RAM or MMIO) */ UINT16 alto2_cpu_device::read_mem() { - UINT32 base_addr; - if (ALTO2_MEM_NONE == m_mem.access) { LOG((this,LOG_MEM,0," fatal: mem read with no preceding address\n")); return 0177777; } - if (cycle() > m_mem.cycle + 4) { - 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; + if ((m_mem.access & ALTO2_MEM_LATCHED) && cycle() > m_mem.cycle + 4) { + return m_mem.md; } - base_addr = m_mem.mar & 0177777; + const UINT32 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((this,LOG_MEM,6," MD = MMIO[%#o] (%#o)\n", base_addr, m_mem.md)); @@ -678,11 +679,10 @@ UINT16 alto2_cpu_device::read_mem() return m_mem.md; } -#if USE_HAMMING_CHECK - /* check for errors on the first access */ + /* check for errors on the first access (even address) */ if (!(m_mem.access & ALTO2_MEM_ODD)) - m_mem.rmdd = hamming_code(0, m_mem.mar/2, m_mem.rmdd); -#endif + m_mem.rmdd = hamming_code(false, m_mem.mar/2, m_mem.rmdd); + m_mem.md = (m_mem.mar & ALTO2_MEM_ODD) ? GET_ODD(m_mem.rmdd) : GET_EVEN(m_mem.rmdd); LOG((this,LOG_MEM,6," MD = RAM[%#o] (%#o)\n", m_mem.mar, m_mem.md)); @@ -691,11 +691,12 @@ UINT16 alto2_cpu_device::read_mem() #endif if (m_mem.access & ALTO2_MEM_ODD) { - // after reading the odd word, reset the access flag - m_mem.access = ALTO2_MEM_NONE; + // after reading the odd word, set the access flag to LATCHED + m_mem.access = ALTO2_MEM_LATCHED; } else { - // after reading the even word word, toggle access flag (and address) to the odd word - m_mem.mar ^= ALTO2_MEM_ODD; + // after reading the even word word, + // toggle access flag (and address) to the odd word + m_mem.mar ^= 1; m_mem.access ^= ALTO2_MEM_ODD; // extend the read succeeds window by one cycle m_mem.cycle++; @@ -704,7 +705,7 @@ UINT16 alto2_cpu_device::read_mem() } /** - * @brief write memory or memory mapped I/O from md to the address in mar + * @brief Write RAM or memory mapped I/O from MD to the address in MAR. * * @param data data to write to RAM or MMIO */ @@ -719,6 +720,8 @@ void alto2_cpu_device::write_mem(UINT16 data) } if (cycle() > m_mem.cycle + 4) { + // FIXME: what really happens if a write occurs too late? + // Need to revisit the schematics to tell for sure. 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; @@ -741,72 +744,67 @@ void alto2_cpu_device::write_mem(UINT16 data) else PUT_EVEN(m_mem.wmdd, m_mem.md); -#if USE_HAMMING_CHECK if (m_mem.access & ALTO2_MEM_RAM) - m_mem.ram[m_mem.mar/2] = hamming_code(1, m_mem.mar/2, m_mem.wmdd); -#else - if (m_mem.access & ALTO2_MEM_RAM) - m_mem.ram[m_mem.mar/2] = m_mem.wmdd; -#endif + m_mem.ram[m_mem.mar/2] = hamming_code(true, m_mem.mar/2, m_mem.wmdd); #if ALTO2_DEBUG watch_write(m_mem.mar, m_mem.md); #endif + // Toggle the odd/even word access flag // NB: don't reset mem.access to permit double word exchange - m_mem.mar ^= ALTO2_MEM_ODD; + m_mem.mar ^= 1; m_mem.access ^= ALTO2_MEM_ODD; + // extend the write succeeds window by one cycle m_mem.cycle++; } /** - * @brief debugger interface to read memory + * @brief Debugger interface to read memory. * * @param addr address to read * @return memory contents at address (16 bits) */ UINT16 alto2_cpu_device::debug_read_mem(UINT32 addr) { - space(AS_2).set_debugger_access(true); int base_addr = addr & 0177777; int data; - if (base_addr >= ALTO2_IO_PAGE_BASE && addr < ALTO2_RAM_SIZE) { + if (addr >= ALTO2_IO_PAGE_BASE && addr < ALTO2_RAM_SIZE) { + space(AS_2).set_debugger_access(true); data = m_iomem->read_word(m_iomem->address_to_byte(base_addr)); + space(AS_2).set_debugger_access(false); } else { data = (addr & ALTO2_MEM_ODD) ? GET_ODD(m_mem.ram[addr/2]) : GET_EVEN(m_mem.ram[addr/2]); } - space(AS_2).set_debugger_access(false); return data; } /** - * @brief debugger interface to write memory + * @brief Debugger interface to write memory. * * @param addr address to write * @param data data to write (16 bits used) */ void alto2_cpu_device::debug_write_mem(UINT32 addr, UINT16 data) { - space(AS_2).set_debugger_access(true); int base_addr = addr & 0177777; - if (base_addr >= ALTO2_IO_PAGE_BASE && addr < ALTO2_RAM_SIZE) { + if (addr >= ALTO2_IO_PAGE_BASE && addr < ALTO2_RAM_SIZE) { + space(AS_2).set_debugger_access(true); m_iomem->write_word(m_iomem->address_to_byte(base_addr), data); + space(AS_2).set_debugger_access(false); } else if (addr & ALTO2_MEM_ODD) { PUT_ODD(m_mem.ram[addr/2], data); } else { PUT_EVEN(m_mem.ram[addr/2], data); } - space(AS_2).set_debugger_access(false); } /** - * @brief initialize the memory system + * @brief Initialize the memory system. * - * Zeroes the memory context, including RAM and installs dummy - * handlers for the memory mapped I/O area. - * Sets handlers for access to the memory error address, status, - * and control registers at 0177024 to 0177026. + * Zeroes the RAM and registers the memory registers + * for state saving. */ void alto2_cpu_device::init_memory() { @@ -835,25 +833,22 @@ void alto2_cpu_device::reset_memory() if (m_mem.hpb) { m_mem.hpb = nullptr; } + // allocate 64K or 128K words of main memory ioport_port* config = ioport(":CONFIG"); + m_mem.size = ALTO2_RAM_SIZE; // config should be valid, unless the driver doesn't define it - if (config) - m_mem.size = config->read() & 1 ? ALTO2_RAM_SIZE : 2 * ALTO2_RAM_SIZE; - else - m_mem.size = ALTO2_RAM_SIZE; + if (config && 0 == config->read()) + m_mem.size *= 2; logerror("Main memory %u KiB\n", static_cast(sizeof(UINT16) * m_mem.size / 1024)); m_mem.ram = make_unique_clear(sizeof(UINT16) * m_mem.size); - m_mem.hpb = make_unique_clear( sizeof(UINT16) * m_mem.size); + m_mem.hpb = make_unique_clear (sizeof(UINT16) * m_mem.size); + + // Initialize the hamming codes and parity bits + for (UINT32 addr = 0; addr < m_mem.size; addr++) + hamming_code(true, addr, 0); -#if USE_HAMMING_CHECK - // Initialize the hamming codes and parity bit - for (UINT32 addr = 0; addr < ALTO2_IO_PAGE_BASE; addr++) { - hamming_code(1, addr, 0); - hamming_code(1, 0200000 + addr, 0); - } -#endif m_mem.mar = 0; m_mem.rmdd = 0; m_mem.wmdd = 0; diff --git a/src/devices/cpu/alto2/a2mem.h b/src/devices/cpu/alto2/a2mem.h index 50b2b53d345..0f00d16fbeb 100644 --- a/src/devices/cpu/alto2/a2mem.h +++ b/src/devices/cpu/alto2/a2mem.h @@ -19,8 +19,9 @@ enum { ALTO2_MEM_NONE, ALTO2_MEM_ODD = (1 << 0), ALTO2_MEM_RAM = (1 << 1), - ALTO2_MEM_REFRESH = (1 << 2), - ALTO2_MEM_INVALID = (1 << 3) + ALTO2_MEM_LATCHED = (1 << 2), + ALTO2_MEM_REFRESH = (1 << 3), + ALTO2_MEM_INVALID = (1 << 4) }; struct { @@ -30,7 +31,7 @@ struct { UINT32 mar; //!< memory address register UINT32 rmdd; //!< read memory data double-word UINT32 wmdd; //!< write memory data double-word - UINT16 md; //!< memory data register + UINT32 md; //!< memory data register UINT64 cycle; //!< cycle when the memory address register was loaded /** @@ -43,8 +44,8 @@ struct { int access; bool error; //!< non-zero after a memory error was detected UINT32 mear; //!< memory error address register - UINT16 mesr; //!< memory error status register - UINT16 mecr; //!< memory error control register + UINT32 mesr; //!< memory error status register + UINT32 mecr; //!< memory error control register } m_mem; /** @@ -108,8 +109,8 @@ DECLARE_WRITE16_MEMBER( mesr_w ); //!< memory error status register write DECLARE_READ16_MEMBER ( mecr_r ); //!< memory error control register read DECLARE_WRITE16_MEMBER( mecr_w ); //!< memory error control register write -//! Read or write a memory double-word and caluclate its Hamming code. -UINT32 hamming_code(int write, UINT32 dw_addr, UINT32 dw_data); +//! Read or write a memory double-word and caluclate or compare its Hamming code. +UINT32 hamming_code(bool write, UINT32 dw_addr, UINT32 dw_data); //! Load the memory address register with some value. void load_mar(UINT8 rsel, UINT32 addr); diff --git a/src/devices/cpu/alto2/a2mouse.cpp b/src/devices/cpu/alto2/a2mouse.cpp index 6bf0760285c..411e9135b21 100644 --- a/src/devices/cpu/alto2/a2mouse.cpp +++ b/src/devices/cpu/alto2/a2mouse.cpp @@ -120,8 +120,8 @@ UINT16 alto2_cpu_device::mouse_read() break; case 1: m_mouse.latch |= MACTIVE; - m_mouse.x -= SIGN(m_mouse.x - m_mouse.dx); - m_mouse.y -= SIGN(m_mouse.y - m_mouse.dy); + m_mouse.x += SIGN(m_mouse.dx - m_mouse.x); + m_mouse.y += SIGN(m_mouse.dy - m_mouse.y); break; case 2: m_mouse.latch ^= MOVEX(m_mouse.dx - m_mouse.x); @@ -129,8 +129,8 @@ UINT16 alto2_cpu_device::mouse_read() break; case 3: m_mouse.latch |= MACTIVE; - m_mouse.x -= SIGN(m_mouse.x - m_mouse.dx); - m_mouse.y -= SIGN(m_mouse.y - m_mouse.dy); + m_mouse.x += SIGN(m_mouse.dx - m_mouse.x); + m_mouse.y += SIGN(m_mouse.dy - m_mouse.y); } m_mouse.phase = (m_mouse.phase + 1) % 4; return data; @@ -145,10 +145,9 @@ UINT16 alto2_cpu_device::mouse_read() */ INPUT_CHANGED_MEMBER( alto2_cpu_device::mouse_motion_x ) { - // set new destination (absolute) mouse x coordinate - INT32 x = m_mouse.dx + newval - oldval; - x = x < 0 ? 0 : x > 605 ? 605 : x; - m_mouse.dx = x; + INT16 ox = static_cast(oldval); + INT16 nx = static_cast(newval); + m_mouse.dx = std::min(std::max(0, m_mouse.dx + (nx - ox)), 639); } /** @@ -160,10 +159,9 @@ INPUT_CHANGED_MEMBER( alto2_cpu_device::mouse_motion_x ) */ INPUT_CHANGED_MEMBER( alto2_cpu_device::mouse_motion_y ) { - // set new destination (absolute) mouse y coordinate - INT32 y = m_mouse.dy + newval - oldval; - y = y < 0 ? 0 : y > 807 ? 807 : y; - m_mouse.dy = y; + INT16 oy = static_cast(oldval); + INT16 ny = static_cast(newval); + m_mouse.dy = std::min(std::max(0, m_mouse.dy + (ny - oy)), 824); } /** diff --git a/src/devices/cpu/alto2/a2mrt.cpp b/src/devices/cpu/alto2/a2mrt.cpp index 92a7aa6333a..c072a23129c 100644 --- a/src/devices/cpu/alto2/a2mrt.cpp +++ b/src/devices/cpu/alto2/a2mrt.cpp @@ -26,12 +26,9 @@ void alto2_cpu_device::activate_mrt() } } - //! memory refresh task slots initialization +//! memory refresh task slots initialization void alto2_cpu_device::init_mrt(int task) { - set_f1(task, f1_block, &alto2_cpu_device::f1_early_mrt_block, nullptr); - /* auto block */ - m_active_callback[task] = &alto2_cpu_device::activate_mrt; } void alto2_cpu_device::exit_mrt() diff --git a/src/devices/cpu/alto2/a2part.cpp b/src/devices/cpu/alto2/a2part.cpp index ecf9da51ea5..7e28c2d1da7 100644 --- a/src/devices/cpu/alto2/a2part.cpp +++ b/src/devices/cpu/alto2/a2part.cpp @@ -16,7 +16,6 @@ void alto2_cpu_device::activate_part() //! parity task slots initialization void alto2_cpu_device::init_part(int task) { - m_active_callback[task] = &alto2_cpu_device::activate_part; } void alto2_cpu_device::exit_part() diff --git a/src/devices/cpu/alto2/a2ram.cpp b/src/devices/cpu/alto2/a2ram.cpp index 159415d0605..f482b82f94f 100644 --- a/src/devices/cpu/alto2/a2ram.cpp +++ b/src/devices/cpu/alto2/a2ram.cpp @@ -117,21 +117,14 @@ void alto2_cpu_device::wrtram() { UINT32 bank = GET_CRAM_BANKSEL(m_cram_addr); UINT32 wordaddr = GET_CRAM_WORDADDR(m_cram_addr); - UINT32 value = ((m_m << 16) | m_alu) ^ ALTO2_UCODE_INVERTED; + UINT32 value = ((m_myl << 16) | m_alu) ^ ALTO2_UCODE_INVERTED; UINT32 addr = bank * ALTO2_UCODE_PAGE_SIZE + wordaddr; // write RAM 0,1,2 - LOG((this,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_myl, m_alu)); #if DEBUG_WRTRAM - char buff[128]; - UINT8 oprom[4]; - oprom[0] = m_m / 256; - oprom[1] = m_m % 256; - oprom[2] = m_m / 256; - oprom[3] = m_m % 256; - disasm_disassemble(buff, addr, oprom, oprom, 0); - printf("WR CRAM_BANKSEL=%d RAM%d [%04o] upper:%06o lower:%06o *** %s\n", - GET_CRAM_BANKSEL(m_cram_addr), bank, wordaddr, m_m, m_alu, buff); + printf("WR CRAM_BANKSEL=%d RAM%d [%04o] upper:%06o lower:%06o\n", + GET_CRAM_BANKSEL(m_cram_addr), bank, wordaddr, m_myl, m_alu); #endif m_wrtram_flag = false; @@ -153,13 +146,13 @@ void alto2_cpu_device::bs_early_read_sreg() { UINT16 r; - if (m_d_rsel) { + if (rsel()) { UINT8 bank = m_s_reg_bank[m_task]; - r = m_s[bank][m_d_rsel]; - LOG((this,LOG_RAM,2," <-S%02o; bus &= S[%o][%02o] (%#o)\n", m_d_rsel, bank, m_d_rsel, r)); + r = m_s[bank][rsel()]; + LOG((this,LOG_RAM,2," <-S%02o; bus &= S[%o][%02o] (%#o)\n", rsel(), bank, rsel(), r)); } else { - r = m_m; - LOG((this,LOG_RAM,2," <-S%02o; bus &= M (%#o)\n", m_d_rsel, r)); + r = m_myl; + LOG((this,LOG_RAM,2," <-S%02o; bus &= M (%#o)\n", rsel(), r)); } m_bus &= r; } @@ -170,7 +163,7 @@ void alto2_cpu_device::bs_early_read_sreg() void alto2_cpu_device::bs_early_load_sreg() { int r = 0; /* ??? */ - LOG((this,LOG_RAM,2," S%02o<- BUS &= garbage (%#o)\n", m_d_rsel, r)); + LOG((this,LOG_RAM,2," S%02o<- BUS &= garbage (%#o)\n", rsel(), r)); m_bus &= r; } @@ -180,8 +173,8 @@ void alto2_cpu_device::bs_early_load_sreg() 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((this,LOG_RAM,2," S%02o<- S[%o][%02o] := %#o\n", m_d_rsel, bank, m_d_rsel, m_m)); + m_s[bank][rsel()] = m_myl; + LOG((this,LOG_RAM,2," S%02o<- S[%o][%02o] := %#o\n", rsel(), bank, rsel(), m_myl)); } /** @@ -410,18 +403,6 @@ void alto2_cpu_device::f1_late_load_srb() void alto2_cpu_device::init_ram(int task) { m_ram_related[task] = true; - - set_bs(task, bs_ram_read_slocation, &alto2_cpu_device::bs_early_read_sreg, nullptr); - set_bs(task, bs_ram_load_slocation, &alto2_cpu_device::bs_early_load_sreg, &alto2_cpu_device::bs_late_load_sreg); - - set_f1(task, f1_ram_swmode, nullptr, &alto2_cpu_device::f1_late_swmode); - set_f1(task, f1_ram_wrtram, nullptr, &alto2_cpu_device::f1_late_wrtram); - set_f1(task, f1_ram_rdram, nullptr, &alto2_cpu_device::f1_late_rdram); -#if (ALTO2_UCODE_RAM_PAGES == 3) - set_f1(task, f1_ram_load_rmr, 0, &alto2_cpu_device::f1_late_load_rmr); -#else // ALTO2_UCODE_RAM_PAGES != 3 - set_f1(task, f1_ram_load_srb, nullptr, &alto2_cpu_device::f1_late_load_srb); -#endif } void alto2_cpu_device::exit_ram() @@ -433,6 +414,6 @@ void alto2_cpu_device::reset_ram() { m_rdram_flag = false; m_wrtram_flag = false; - m_m = 0; + m_myl = 0; memset(m_s, 0, sizeof(m_s)); } diff --git a/src/devices/cpu/alto2/a2roms.cpp b/src/devices/cpu/alto2/a2roms.cpp index ee46d12c0e5..995d1841da2 100644 --- a/src/devices/cpu/alto2/a2roms.cpp +++ b/src/devices/cpu/alto2/a2roms.cpp @@ -19,12 +19,12 @@ */ static UINT32 ones_u32(UINT32 val) { - val -= ((val >> 1) & 0x55555555); - val = (((val >> 2) & 0x33333333) + (val & 0x33333333)); - val = (((val >> 4) + val) & 0x0f0f0f0f); - val += (val >> 8); - val += (val >> 16); - return (val & 0x0000003f); + val -= ((val >> 1) & 0x55555555); + val = (((val >> 2) & 0x33333333) + (val & 0x33333333)); + val = (((val >> 4) + val) & 0x0f0f0f0f); + val += (val >> 8); + val += (val >> 16); + return val & 0x3f; } /** diff --git a/src/devices/cpu/alto2/alto2cpu.cpp b/src/devices/cpu/alto2/alto2cpu.cpp index 49db9fb2297..ff9b98f66ab 100644 --- a/src/devices/cpu/alto2/alto2cpu.cpp +++ b/src/devices/cpu/alto2/alto2cpu.cpp @@ -135,13 +135,6 @@ alto2_cpu_device::alto2_cpu_device(const machine_config& mconfig, const char* ta m_mpc(0), m_mir(0), m_rsel(0), - m_d_rsel(0), - m_d_aluf(0), - m_d_bs(0), - m_d_f1(0), - m_d_f2(0), - m_d_loadt(0), - m_d_loadl(0), m_next(0), m_next2(0), m_bus(0), @@ -151,7 +144,7 @@ alto2_cpu_device::alto2_cpu_device(const machine_config& mconfig, const char* ta m_l(0), m_shifter(0), m_laluc0(0), - m_m(0), + m_myl(0), m_cram_addr(0), m_task_wakeup(0), m_reset_mode(0xffff), @@ -195,12 +188,8 @@ alto2_cpu_device::alto2_cpu_device(const machine_config& mconfig, const char* ta memset(m_task_next2, 0x00, sizeof(m_task_next2)); memset(m_r, 0x00, sizeof(m_r)); memset(m_s, 0x00, sizeof(m_s)); - memset(m_active_callback, 0x00, sizeof(m_active_callback)); memset(m_s_reg_bank, 0x00, sizeof(m_s_reg_bank)); memset(m_bank_reg, 0x00, sizeof(m_bank_reg)); - memset(m_bs, 0x00, sizeof(m_bs)); - memset(m_f1, 0x00, sizeof(m_f1)); - memset(m_f2, 0x00, sizeof(m_f2)); memset(m_ram_related, 0x00, sizeof(m_ram_related)); memset(m_drive, 0x00, sizeof(m_drive)); memset(m_sysclka0, 0x00, sizeof(m_sysclka0)); @@ -354,7 +343,7 @@ ROM_START( alto2_cpu ) ROM_LOAD( "enet.a49", 00000, 00400, CRC(4d2dcdb2) SHA1(583327a7d70cd02702c941c0e43c1e9408ff7fd0) ) ROM_END -const rom_entry *alto2_cpu_device::device_rom_region() const +const tiny_rom_entry *alto2_cpu_device::device_rom_region() const { return ROM_NAME( alto2_cpu ); } @@ -870,7 +859,7 @@ void alto2_cpu_device::device_start() save_item(NAME(m_l)); save_item(NAME(m_shifter)); save_item(NAME(m_laluc0)); - save_item(NAME(m_m)); + save_item(NAME(m_myl)); save_item(NAME(m_cram_addr)); save_item(NAME(m_task_wakeup)); save_item(NAME(m_reset_mode)); @@ -883,10 +872,8 @@ void alto2_cpu_device::device_start() save_item(NAME(m_dsp_time)); save_item(NAME(m_unload_time)); save_item(NAME(m_unload_word)); -#if (USE_BITCLK_TIMER == 0) save_item(NAME(m_bitclk_time)); save_item(NAME(m_bitclk_index)); -#endif save_item(NAME(m_mouse.x)); save_item(NAME(m_mouse.y)); save_item(NAME(m_mouse.dx)); @@ -906,7 +893,7 @@ void alto2_cpu_device::device_start() state_add( A2_L, "L", m_l).formatstr("%06O"); state_add( A2_SHIFTER, "SHIFTER", m_shifter).formatstr("%06O"); state_add( A2_LALUC0, "LALUC0", m_laluc0).mask(1); - state_add( A2_M, "M", m_m).formatstr("%06O"); + state_add( A2_M, "M", m_myl).formatstr("%06O"); state_add_divider(-1); state_add( A2_AC3, "AC(3)", m_r[000]).formatstr("%06O"); state_add( A2_AC2, "AC(2)", m_r[001]).formatstr("%06O"); @@ -1290,45 +1277,45 @@ void alto2_cpu_device::watch_write(UINT32 addr, UINT32 data) #endif /** @brief fatal exit on unitialized dynamic phase BUS source */ -void alto2_cpu_device::fn_bs_bad_0() +void alto2_cpu_device::bs_early_bad() { fatal(9,"fatal: bad early bus source pointer for task %s, mpc:%05o bs:%s\n", - task_name(m_task), m_mpc, bs_name(m_d_bs)); + task_name(m_task), m_mpc, bs_name(bs())); } /** @brief fatal exit on unitialized latching phase BUS source */ -void alto2_cpu_device::fn_bs_bad_1() +void alto2_cpu_device::bs_late_bad() { fatal(9,"fatal: bad late bus source pointer for task %s, mpc:%05o bs: %s\n", - task_name(m_task), m_mpc, bs_name(m_d_bs)); + task_name(m_task), m_mpc, bs_name(bs())); } /** @brief fatal exit on unitialized dynamic phase F1 function */ -void alto2_cpu_device::fn_f1_bad_0() +void alto2_cpu_device::f1_early_bad() { fatal(9,"fatal: bad early f1 function pointer for task %s, mpc:%05o f1: %s\n", - task_name(m_task), m_mpc, f1_name(m_d_f1)); + task_name(m_task), m_mpc, f1_name(f1())); } /** @brief fatal exit on unitialized latching phase F1 function */ -void alto2_cpu_device::fn_f1_bad_1() +void alto2_cpu_device::f1_late_bad() { fatal(9,"fatal: bad late f1 function pointer for task %s, mpc:%05o f1: %s\n", - task_name(m_task), m_mpc, f1_name(m_d_f1)); + task_name(m_task), m_mpc, f1_name(f1())); } /** @brief fatal exit on unitialized dynamic phase F2 function */ -void alto2_cpu_device::fn_f2_bad_0() +void alto2_cpu_device::f2_early_bad() { fatal(9,"fatal: bad early f2 function pointer for task %s, mpc:%05o f2: %s\n", - task_name(m_task), m_mpc, f2_name(m_d_f2)); + task_name(m_task), m_mpc, f2_name(f2())); } /** @brief fatal exit on unitialized latching phase F2 function */ -void alto2_cpu_device::fn_f2_bad_1() +void alto2_cpu_device::f2_late_bad() { fatal(9,"fatal: bad late f2 function pointer for task %s, mpc:%05o f2: %s\n", - task_name(m_task), m_mpc, f2_name(m_d_f2)); + task_name(m_task), m_mpc, f2_name(f2())); } #if ALTO2_DEBUG @@ -1463,8 +1450,10 @@ void alto2_cpu_device::bs_early_load_r() */ void alto2_cpu_device::bs_late_load_r() { - if (m_d_f2 != f2_emu_load_dns) { + if (f2() != f2_emu_load_dns) { m_r[m_rsel] = m_shifter; + if (m_rsel == 037) + m_r[m_rsel] &= ~3; LOG((this,LOG_CPU,2," R%02o<-; %s = SHIFTER (%#o)\n", m_rsel, r_name(m_rsel), m_shifter)); } } @@ -1513,7 +1502,7 @@ void alto2_cpu_device::f1_late_load_mar() { UINT8 bank = m_bank_reg[m_task]; UINT32 msb; - if (m_d_f2 == f2_load_md) { + if (f2() == f2_load_md) { msb = GET_BANK_EXTENDED(bank) << 16; LOG((this,LOG_CPU,7, " XMAR %#o\n", msb | m_alu)); } else { @@ -1892,7 +1881,7 @@ void alto2_cpu_device::f2_late_load_md() #if ALTO2_DEBUG UINT16 mar = m_mem.mar; #endif - if (m_d_f1 == f1_load_mar) { + if (f1() == f1_load_mar) { /* part of an XMAR */ LOG((this,LOG_CPU,2, " XMAR %#o (%#o)\n", mar, m_bus)); } else { @@ -2286,29 +2275,20 @@ void alto2_cpu_device::execute_run() m_next2 = m_task_next2[m_task]; do { - int do_bs, flags; - m_mpc = m_next; // next instruction's micro program counter m_mir = RD_UCODE(m_mpc); // fetch the micro code - // extract the bit fields - m_d_rsel = m_rsel = X_RDBITS(m_mir, 32, DRSEL0, DRSEL4); - m_d_aluf = X_RDBITS(m_mir, 32, DALUF0, DALUF3); - m_d_bs = X_RDBITS(m_mir, 32, DBS0, DBS2); - m_d_f1 = X_RDBITS(m_mir, 32, DF1_0, DF1_3); - m_d_f2 = X_RDBITS(m_mir, 32, DF2_0, DF2_3); - m_d_loadt = X_BIT(m_mir, 32, DLOADT); - m_d_loadl = X_BIT(m_mir, 32, DLOADL); + m_rsel = rsel(); debugger_instruction_hook(this, m_mpc); m_cycle++; - if (m_d_f1 == f1_load_mar && check_mem_load_mar_stall(m_rsel)) { + if (f1() == f1_load_mar && check_mem_load_mar_stall(m_rsel)) { LOG((this,LOG_CPU,3, " MAR<- stall\n")); continue; } - if (m_d_f2 == f2_load_md && check_mem_write_stall()) { + if (f2() == f2_load_md && check_mem_write_stall()) { LOG((this,LOG_CPU,3, " MD<- stall\n")); continue; } @@ -2317,17 +2297,19 @@ void alto2_cpu_device::execute_run() * or f2 == f2_const. These functions use the MIR BS field to * provide a part of the address to the constant ROM instead. */ - 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()) { + bool do_bs = f1() != f1_const && f2() != f2_const; + if (do_bs && bs() == bs_read_md && check_mem_read_stall()) { 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; + m_next = next() | 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((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)); + task_name(m_task), m_mpc, m_mir, m_rsel, aluf(), bs(), f1(), f2(), loadt(), loadl(), m_next, m_next2)); // BUS is all ones at the start of each cycle m_bus = 0177777; @@ -2336,10 +2318,10 @@ void alto2_cpu_device::execute_run() rdram(); // The constant memory is gated to the bus by F1 == f1_const, F2 == f2_const, or BS >= 4 - if (!do_bs || m_d_bs >= bs_task_4) { - UINT32 addr = 8 * m_rsel + m_d_bs; + if (!do_bs || bs() >= bs_task_4) { + const UINT32 addr = 8 * m_rsel + bs(); // FIXME: is the format of m_const_data endian safe? - UINT16 data = m_const_data[2*addr] | (m_const_data[2*addr+1] << 8); + const UINT16 data = m_const_data[2*addr] | (m_const_data[2*addr+1] << 8); m_bus &= data; LOG((this,LOG_CPU,2," %#o; BUS &= %#o CONST[%03o]\n", m_bus, data, addr)); } @@ -2349,14 +2331,170 @@ void alto2_cpu_device::execute_run() * because the emulator task F2 acsource or acdest may * change the m_rsel */ - ((*this).*m_f2[0][m_task][m_d_f2])(); + switch (f2()) { + case f2_task_12: // f2 12 task specific + switch (m_task) { + case task_emu: // emulator task + f2_early_load_dns(); + break; + } + break; + case f2_task_13: // f2 13 task specific + switch (m_task) { + case task_emu: // emulator task + f2_early_acdest(); + break; + } + break; + case f2_task_16: // f2 16 task specific + switch (m_task) { + case task_emu: // emulator task + f2_early_acsource(); + break; + } + break; + } // early BS function can be done now - if (do_bs) - ((*this).*m_bs[0][m_task][m_d_bs])(); + if (do_bs) { + switch (bs()) { + case bs_read_r: // BUS source is R register + bs_early_read_r(); + break; + case bs_load_r: // load R register from BUS + bs_early_load_r(); + break; + case bs_task_3: // BUS source is task specific + switch (m_task) { + case task_emu: // emulator task + bs_early_read_sreg(); + break; + case task_ksec: // disk sector task + case task_kwd: // disk word task + bs_early_read_kstat(); + break; + case task_ether: // ethernet task + bs_early_eidfct(); + break; + case task_mrt: // memory refresh task + case task_dwt: // display word task + case task_curt: // cursor task + case task_dht: // display horizontal task + case task_dvt: // display vertical task + case task_part: // parity task + break; + default: + bs_early_bad(); + } + break; + case bs_task_4: // BUS source is task specific + switch (m_task) { + case task_emu: // emulator task + bs_early_load_sreg(); + break; + case task_ksec: // disk sector task + case task_kwd: // disk word task + bs_early_read_kdata(); + break; + case task_ether: // ethernet task + case task_mrt: // memory refresh task + case task_dwt: // display word task + case task_curt: // cursor task + case task_dht: // display horizontal task + case task_dvt: // display vertical task + case task_part: // parity task + break; + default: + bs_early_bad(); + } + break; + case bs_read_md: // BUS source is memory data + bs_early_read_md(); + break; + case bs_mouse: // BUS source is mouse data + bs_early_mouse(); + break; + case bs_disp: // BUS source displacement (emulator task) + switch (m_task) { + case task_emu: // emulator task + bs_early_emu_disp(); + break; + default: + bs_early_disp(); + } + break; + } + } // early F1 function - ((*this).*m_f1[0][m_task][m_d_f1])(); + switch (f1()) { + case f1_task: // f1 02 task switch + f1_early_task(); + break; + case f1_block: // f1 03 task block + switch (m_task) { + case task_emu: // emulator task + f1_early_emu_block(); + break; + case task_ksec: // disk sector task + f1_early_ksec_block(); + break; + case task_ether: // ethernet task + f1_early_eth_block(); + break; + case task_mrt: // memory refresh task + f1_early_mrt_block(); + break; + case task_dwt: // display word task + f1_early_dwt_block(); + break; + case task_curt: // cursor task + f1_early_curt_block(); + break; + case task_dht: // display horizontal task + f1_early_dht_block(); + break; + case task_dvt: // display vertical task + f1_early_dvt_block(); + break; + case task_part: // parity task + f1_early_block(); + break; + case task_kwd: // disk word task + f1_early_kwd_block(); + break; + } + break; + + case f1_task_13: // f1 13 task specific + switch (m_task) { + case task_ether: // ethernet task + f1_early_eilfct(); + break; + } + break; + case f1_task_14: // f1 14 task specific + switch (m_task) { + case task_ether: // ethernet task + f1_early_epfct(); + break; + } + break; + case f1_task_16: // f1 16 task specific + switch (m_task) { + case task_emu: // emulator task + f1_early_rsnf(); + break; + } + break; + case f1_task_17: // f1 17 task specific + switch (m_task) { + case task_emu: // emulator task + f1_early_startf(); + break; + } + break; + } /** * The ALU a10 PROM address lines are @@ -2367,10 +2505,10 @@ void alto2_cpu_device::execute_run() * * B1 and B3-B7 are inverted on loading the PROM */ - UINT8 a10 = m_alu_a10[(m_emu.skip << 4) | m_d_aluf]; - UINT32 alu = alu_74181(m_bus, m_t, a10); + const UINT8 a10 = m_alu_a10[(m_emu.skip << 4) | aluf()]; + const UINT32 alu = alu_74181(m_bus, m_t, a10); + const int flags = a10 & (TSELECT | ALUM); m_aluc0 = (alu >> 16) & 1; - flags = a10 & (TSELECT | ALUM); m_alu = static_cast(alu); // WRTRAM must happen now before L is changed @@ -2381,17 +2519,258 @@ void alto2_cpu_device::execute_run() m_shifter = m_l; // late F1 function call now - ((*this).*m_f1[1][m_task][m_d_f1])(); + switch (f1()) { + case f1_load_mar: // f1 01 load memory address register + f1_late_load_mar(); + break; + case f1_l_lsh_1: // f1 04 left shift L once + f1_late_l_lsh_1(); + break; + case f1_l_rsh_1: // f1 05 right shift L once + f1_late_l_rsh_1(); + break; + case f1_l_lcy_8: // f1 06 cycle L 8 times + f1_late_l_lcy_8(); + break; + + case f1_task_10: // f1 10 task specific + switch (m_task) { + case task_emu: // emulator task + f1_late_swmode(); + break; + } + break; + case f1_task_11: // f1 11 task specific + switch (m_task) { + case task_emu: // emulator task + f1_late_wrtram(); + break; + case task_ksec: // disk sector task + case task_kwd: // disk word task + f1_late_strobe(); + break; + } + break; + case f1_task_12: // f1 12 task specific + switch (m_task) { + case task_emu: // emulator task + f1_late_rdram(); + break; + case task_ksec: // disk sector task + case task_kwd: // disk word task + f1_late_load_kstat(); + break; + } + break; + case f1_task_13: // f1 13 task specific + switch (m_task) { + case task_emu: // emulator task +#if (ALTO2_UCODE_RAM_PAGES == 3) + f1_late_load_rmr(); +#else + f1_late_load_srb(); +#endif + break; + case task_ksec: // disk sector task + case task_kwd: // disk word task + f1_late_increcno(); + break; + } + break; + case f1_task_14: // f1 14 task specific + switch (m_task) { + case task_ksec: // disk sector task + case task_kwd: // disk word task + f1_late_clrstat(); + break; + } + break; + case f1_task_15: // f1 15 task specific + switch (m_task) { + case task_emu: // emulator task + f1_late_emu_load_esrb(); + break; + case task_ksec: // disk sector task + case task_kwd: // disk word task + f1_late_load_kcom(); + break; + case task_ether: // ethernet task + f1_late_ewfct(); + break; + } + break; + case f1_task_16: // f1 16 task specific + switch (m_task) { + case task_ksec: // disk sector task + case task_kwd: // disk word task + f1_late_load_kadr(); + break; + } + break; + case f1_task_17: // f1 17 task specific + switch (m_task) { + case task_ksec: // disk sector task + case task_kwd: // disk word task + f1_late_load_kdata(); + break; + } + break; + } // late F2 function call now - ((*this).*m_f2[1][m_task][m_d_f2])(); + switch (f2()) { + case f2_bus_eq_zero: // f2 01 branch on bus equals 0 + f2_late_bus_eq_zero(); + break; + case f2_shifter_lt_zero: // f2 02 branch on shifter less than 0 + f2_late_shifter_lt_zero(); + break; + case f2_shifter_eq_zero: // f2 03 branch on shifter equals 0 + f2_late_shifter_eq_zero(); + break; + case f2_bus: // f2 04 branch on BUS[6-15] + f2_late_bus(); + break; + case f2_alucy: // f2 05 branch on (latched) ALU carry + f2_late_alucy(); + break; + case f2_load_md: // f2 06 load memory data + f2_late_load_md(); + break; + + case f2_task_10: // f2 10 task specific + switch (m_task) { + case task_emu: // emulator task + f2_late_busodd(); + break; + case task_ksec: // disk sector task + case task_kwd: // disk word task + f2_late_init(); + break; + case task_ether: // ethernet task + f2_late_eodfct(); + break; + case task_dwt: // display word task + f2_late_dwt_load_ddr(); + break; + case task_curt: // cursor task + f2_late_load_xpreg(); + break; + case task_dht: // display horizontal task + f2_late_evenfield(); + break; + case task_dvt: // display vertical task + f2_late_evenfield(); + break; + } + break; + case f2_task_11: // f2 11 task specific + switch (m_task) { + case task_emu: // emulator task + f2_late_magic(); + break; + case task_ksec: // disk sector task + case task_kwd: // disk word task + f2_late_rwc(); + break; + case task_ether: // ethernet task + f2_late_eosfct(); + break; + case task_curt: // cursor task + f2_late_load_csr(); + break; + case task_dht: // display horizontal task + f2_late_dht_setmode(); + break; + } + break; + case f2_task_12: // f2 12 task specific + switch (m_task) { + case task_emu: // emulator task + f2_late_load_dns(); + break; + case task_ksec: // disk sector task + case task_kwd: // disk word task + f2_late_recno(); + break; + case task_ether: // ethernet task + f2_late_erbfct(); + break; + } + break; + case f2_task_13: // f2 13 task specific + switch (m_task) { + case task_ksec: // disk sector task + case task_kwd: // disk word task + f2_late_xfrdat(); + break; + case task_ether: // ethernet task + f2_late_eefct(); + break; + } + break; + case f2_task_14: // f2 14 task specific + switch (m_task) { + case task_emu: // emulator task + f2_late_load_ir(); + break; + case task_ksec: // disk sector task + case task_kwd: // disk word task + f2_late_swrnrdy(); + break; + case task_ether: // ethernet task + f2_late_ebfct(); + break; + } + break; + case f2_task_15: // f2 15 task specific + switch (m_task) { + case task_emu: // emulator task + f2_late_idisp(); + break; + case task_ksec: // disk sector task + case task_kwd: // disk word task + f2_late_nfer(); + break; + case task_ether: // ethernet task + f2_late_ecbfct(); + break; + } + break; + case f2_task_16: // f2 16 task specific + switch (m_task) { + case task_emu: // emulator task + f2_late_acsource(); + break; + case task_ksec: // disk sector task + case task_kwd: // disk word task + f2_late_strobon(); + break; + case task_ether: // ethernet task + f2_late_eisfct(); + break; + } + break; + } // late BS function call now, if no constant was put on the bus - if (do_bs) - ((*this).*m_bs[1][m_task][m_d_bs])(); + if (do_bs) { + switch (bs()) { + case bs_load_r: // load R register from BUS + bs_late_load_r(); + break; + case bs_task_4: // BUS source is task specific + switch (m_task) { + case task_emu: // emulator task + bs_late_load_sreg(); + break; + } + break; + } + } // update T register, if LOADT is set - if (m_d_loadt) { + if (loadt()) { m_cram_addr = m_alu; // latch CRAM address if (flags & TSELECT) { m_t = m_alu; // T source is ALU @@ -2403,7 +2782,7 @@ void alto2_cpu_device::execute_run() } // update L register and LALUC0 if LOADL is set - if (m_d_loadl) { + if (loadl()) { m_l = m_alu; // load L from ALU if (flags & ALUM) { m_laluc0 = 0; // logic operation - put 0 into latched carry @@ -2414,7 +2793,7 @@ void alto2_cpu_device::execute_run() } // 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_myl = 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((this,LOG_CPU,2, " M<- ALU (%#o)\n", m_alu)); } @@ -2436,21 +2815,49 @@ void alto2_cpu_device::execute_run() m_next2 = m_task_next2[m_task]; // get address modifier after task switch (needed?) // let the task know it becomes active now and (most probably) reset the wakeup - ((*this).*m_active_callback[m_task])(); + switch (m_task) { + case task_emu: // emulator task + break; + case task_ksec: // disk sector task + break; + case task_ether: // ethernet task + activate_eth(); + break; + case task_mrt: // memory refresh task + activate_mrt(); + break; + case task_dwt: // display word task + break; + case task_curt: // cursor task + activate_curt(); + break; + case task_dht: // display horizontal task + activate_dht(); + break; + case task_dvt: // display vertical task + activate_dvt(); + break; + case task_part: // parity task + activate_part(); + break; + case task_kwd: // disk word task + break; + } } } - /** - * Subtract the microcycle time from the display time accu. - * If it underflows, call the display state machine and add - * the time for 32(!) pixel clocks to the accu. - * This is very close to every seventh CPU cycle (really?) - */ if (m_dsp_time >= 0) { + /** + * Subtract the microcycle time from the display time accu. + * If it underflows, call the display state machine and add + * the time for 32(!) pixel clocks to the accu. + * This is very close to every seventh CPU cycle + */ m_dsp_time -= ALTO2_UCYCLE; if (m_dsp_time < 0) display_state_machine(); } + if (m_unload_time >= 0) { /** * Subtract the microcycle time from the unload time accu. @@ -2462,9 +2869,9 @@ void alto2_cpu_device::execute_run() if (m_unload_time < 0) unload_word(); } -#if (USE_BITCLK_TIMER == 0) + if (m_bitclk_time >= 0) { - /* + /** * Subtract the microcycle time from the bitclk time accu. * If it underflows, call the disk bitclk function which adds * the time for one bit as clocks to the accu, or ends @@ -2473,7 +2880,6 @@ void alto2_cpu_device::execute_run() m_bitclk_time -= ALTO2_UCYCLE; disk_bitclk(nullptr, m_bitclk_index); } -#endif } while (m_icount-- > 0); /* save this task's mpc and address modifier */ @@ -2493,52 +2899,8 @@ void alto2_cpu_device::hard_reset() for (int task = 0; task < ALTO2_TASKS; task++) { // every task starts at mpc = task number, in either ROM0 or RAM0 m_task_mpc[task] = (m_ctl2k_u38[task] >> 4) ^ 017; - m_active_callback[task] = &alto2_cpu_device::noop; if (0 == (m_reset_mode & (1 << task))) m_task_mpc[task] |= ALTO2_UCODE_RAM_BASE; - - set_bs(task, bs_read_r, &alto2_cpu_device::bs_early_read_r, nullptr); - set_bs(task, bs_load_r, &alto2_cpu_device::bs_early_load_r, &alto2_cpu_device::bs_late_load_r); - set_bs(task, bs_no_source, nullptr, nullptr); - set_bs(task, bs_task_3, &alto2_cpu_device::fn_bs_bad_0, &alto2_cpu_device::fn_bs_bad_1); // task specific - set_bs(task, bs_task_4, &alto2_cpu_device::fn_bs_bad_0, &alto2_cpu_device::fn_bs_bad_1); // task specific - set_bs(task, bs_read_md, &alto2_cpu_device::bs_early_read_md, nullptr); - set_bs(task, bs_mouse, &alto2_cpu_device::bs_early_mouse, nullptr); - set_bs(task, bs_disp, &alto2_cpu_device::bs_early_disp, nullptr); - - set_f1(task, f1_nop, nullptr, nullptr); - set_f1(task, f1_load_mar, nullptr, &alto2_cpu_device::f1_late_load_mar); - set_f1(task, f1_task, &alto2_cpu_device::f1_early_task, nullptr); - set_f1(task, f1_block, &alto2_cpu_device::fn_f1_bad_0, &alto2_cpu_device::fn_f1_bad_1); // not all tasks have the f1_block - set_f1(task, f1_l_lsh_1, nullptr, &alto2_cpu_device::f1_late_l_lsh_1); - set_f1(task, f1_l_rsh_1, nullptr, &alto2_cpu_device::f1_late_l_rsh_1); - set_f1(task, f1_l_lcy_8, nullptr, &alto2_cpu_device::f1_late_l_lcy_8); - set_f1(task, f1_const, nullptr, nullptr); - set_f1(task, f1_task_10, &alto2_cpu_device::fn_f1_bad_0, &alto2_cpu_device::fn_f1_bad_1); // f1_task_10 to f1_task_17 are task specific - set_f1(task, f1_task_11, &alto2_cpu_device::fn_f1_bad_0, &alto2_cpu_device::fn_f1_bad_1); // f1_task_10 to f1_task_17 are task specific - set_f1(task, f1_task_12, &alto2_cpu_device::fn_f1_bad_0, &alto2_cpu_device::fn_f1_bad_1); // f1_task_10 to f1_task_17 are task specific - set_f1(task, f1_task_13, &alto2_cpu_device::fn_f1_bad_0, &alto2_cpu_device::fn_f1_bad_1); // f1_task_10 to f1_task_17 are task specific - set_f1(task, f1_task_14, &alto2_cpu_device::fn_f1_bad_0, &alto2_cpu_device::fn_f1_bad_1); // f1_task_10 to f1_task_17 are task specific - set_f1(task, f1_task_15, &alto2_cpu_device::fn_f1_bad_0, &alto2_cpu_device::fn_f1_bad_1); // f1_task_10 to f1_task_17 are task specific - set_f1(task, f1_task_16, &alto2_cpu_device::fn_f1_bad_0, &alto2_cpu_device::fn_f1_bad_1); // f1_task_10 to f1_task_17 are task specific - set_f1(task, f1_task_17, &alto2_cpu_device::fn_f1_bad_0, &alto2_cpu_device::fn_f1_bad_1); // f1_task_10 to f1_task_17 are task specific - - set_f2(task, f2_nop, nullptr, nullptr); - set_f2(task, f2_bus_eq_zero, nullptr, &alto2_cpu_device::f2_late_bus_eq_zero); - set_f2(task, f2_shifter_lt_zero,nullptr, &alto2_cpu_device::f2_late_shifter_lt_zero); - set_f2(task, f2_shifter_eq_zero,nullptr, &alto2_cpu_device::f2_late_shifter_eq_zero); - set_f2(task, f2_bus, nullptr, &alto2_cpu_device::f2_late_bus); - set_f2(task, f2_alucy, nullptr, &alto2_cpu_device::f2_late_alucy); - set_f2(task, f2_load_md, nullptr, &alto2_cpu_device::f2_late_load_md); - set_f2(task, f2_const, nullptr, nullptr); - set_f2(task, f2_task_10, &alto2_cpu_device::fn_f2_bad_0, &alto2_cpu_device::fn_f2_bad_1); // f2_task_10 to f2_task_17 are task specific - set_f2(task, f2_task_11, &alto2_cpu_device::fn_f2_bad_0, &alto2_cpu_device::fn_f2_bad_1); // f2_task_10 to f2_task_17 are task specific - set_f2(task, f2_task_12, &alto2_cpu_device::fn_f2_bad_0, &alto2_cpu_device::fn_f2_bad_1); // f2_task_10 to f2_task_17 are task specific - set_f2(task, f2_task_13, &alto2_cpu_device::fn_f2_bad_0, &alto2_cpu_device::fn_f2_bad_1); // f2_task_10 to f2_task_17 are task specific - set_f2(task, f2_task_14, &alto2_cpu_device::fn_f2_bad_0, &alto2_cpu_device::fn_f2_bad_1); // f2_task_10 to f2_task_17 are task specific - set_f2(task, f2_task_15, &alto2_cpu_device::fn_f2_bad_0, &alto2_cpu_device::fn_f2_bad_1); // f2_task_10 to f2_task_17 are task specific - set_f2(task, f2_task_16, &alto2_cpu_device::fn_f2_bad_0, &alto2_cpu_device::fn_f2_bad_1); // f2_task_10 to f2_task_17 are task specific - set_f2(task, f2_task_17, &alto2_cpu_device::fn_f2_bad_0, &alto2_cpu_device::fn_f2_bad_1); // f2_task_10 to f2_task_17 are task specific } init_memory(); @@ -2560,6 +2922,8 @@ void alto2_cpu_device::hard_reset() init_kwd(); m_dsp_time = 0; // reset the display state timing + m_unload_time = 0; // reset the word unload timing accu + m_bitclk_time = 0; // reset the bitclk timing accu m_task = task_emu; // start with task 0 (emulator) m_task_wakeup |= 1 << task_emu; // set wakeup flag } @@ -2580,7 +2944,5 @@ void alto2_cpu_device::soft_reset() m_dsp_time = 0; // reset the display state machine timing accu m_unload_time = 0; // reset the word unload timing accu -#if (USE_BITCLK_TIMER == 0) m_bitclk_time = 0; // reset the bitclk timing accu -#endif } diff --git a/src/devices/cpu/alto2/alto2cpu.h b/src/devices/cpu/alto2/alto2cpu.h index a0b7af2442a..823500a56cd 100644 --- a/src/devices/cpu/alto2/alto2cpu.h +++ b/src/devices/cpu/alto2/alto2cpu.h @@ -42,18 +42,17 @@ enum { }; #ifndef ALTO2_DEBUG -#define ALTO2_DEBUG 1 //!< define to 1 to enable logerror() output +//! Define to 1 to enable logerror() output. +#define ALTO2_DEBUG 1 #endif #ifndef ALTO2_CRAM_CONFIG -#define ALTO2_CRAM_CONFIG 2 //!< use default CROM/CRAM configuration 2 +//! Use default CROM/CRAM configuration 2. +#define ALTO2_CRAM_CONFIG 2 #endif -#define ALTO2_FAKE_STATUS_H 12 //!< number of extra scanlines to display some status info - -#define USE_PRIO_F9318 0 //!< define to 1 to use the F9318 priority encoder code (broken) -#define USE_BITCLK_TIMER 0 //!< define to 1 to use a very high rate timer for the disk bit clock -#define USE_HAMMING_CHECK 1 //!< define to 1 to use the Hamming code and Parity check in a2mem +//!< Define to 1 to use the F9318 priority encoder code (broken). +#define USE_PRIO_F9318 0 #define ALTO2_TASKS 16 //!< 16 task slots #define ALTO2_REGS 32 //!< 32 16-bit words in the R register file @@ -65,7 +64,7 @@ enum { #define ALTO2_CONST_SIZE 256 //!< number words in the constant ROM -//! inverted bits in the micro instruction 32 bit word +//! Inverted bits in the micro instruction 32 bit word. #define ALTO2_UCODE_INVERTED ((1 << 10) | (1 << 15) | (1 << 19)) /******************************************************************************** @@ -237,7 +236,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override; //! device (P)ROMs - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; //! device_state_interface overrides void state_string_export(const device_state_entry &entry, std::string &str) const override; @@ -282,8 +281,6 @@ private: speaker_sound_device* m_speaker; - typedef void (alto2_cpu_device::*a2func)(); - //! task numbers enum { task_emu, //!< emulator task @@ -552,6 +549,15 @@ private: UINT16 m_mpc; //!< micro program counter UINT32 m_mir; //!< micro instruction register + inline UINT32 rsel() const { return X_RDBITS(m_mir, 32, DRSEL0, DRSEL4); } + inline UINT32 aluf() const { return X_RDBITS(m_mir, 32, DALUF0, DALUF3); } + inline UINT32 bs() const { return X_RDBITS(m_mir, 32, DBS0, DBS2); } + inline UINT32 f1() const { return X_RDBITS(m_mir, 32, DF1_0, DF1_3); } + inline UINT32 f2() const { return X_RDBITS(m_mir, 32, DF2_0, DF2_3); } + inline UINT32 loadt() const { return X_BIT(m_mir, 32, DLOADT); } + inline UINT32 loadl() const { return X_BIT(m_mir, 32, DLOADL); } + inline UINT32 next() const { return X_RDBITS(m_mir, 32, NEXT0, NEXT9); } + /** * \brief current micro instruction's register selection * The emulator F2s ACSOURCE and ACDEST modify this. @@ -559,13 +565,6 @@ private: * even when the emulator modifies this. */ UINT8 m_rsel; - UINT8 m_d_rsel; //!< decoded RSEL[0-4] - UINT8 m_d_aluf; //!< decoded ALUF[0-3] function - UINT8 m_d_bs; //!< decoded BS[0-2] bus source - UINT8 m_d_f1; //!< decoded F1[0-3] function - UINT8 m_d_f2; //!< decoded F2[0-3] function - UINT8 m_d_loadt; //!< decoded LOADT flag - UINT8 m_d_loadl; //!< decoded LOADL flag UINT16 m_next; //!< current micro instruction's next UINT16 m_next2; //!< next micro instruction's next UINT16 m_r[ALTO2_REGS]; //!< R register file @@ -577,10 +576,9 @@ private: UINT16 m_l; //!< L register UINT16 m_shifter; //!< shifter output UINT16 m_laluc0; //!< the latched ALU carry output - UINT16 m_m; //!< M register of RAM related tasks (MYL latch in the schematics) + UINT16 m_myl; //!< M register of RAM related tasks (MYL latch in the schematics) UINT16 m_cram_addr; //!< constant RAM address UINT16 m_task_wakeup; //!< task wakeup: bit 1<(oprom[1]) << 16) | (static_cast(oprom[2]) << 8) | (static_cast(oprom[3]) << 0); - UINT8 rsel = static_cast((mir >> 27) & 31); - UINT8 aluf = static_cast((mir >> 23) & 15); - UINT8 bs = static_cast((mir >> 20) & 7); - UINT8 f1 = static_cast((mir >> 16) & 15); - UINT8 f2 = static_cast((mir >> 12) & 15); - UINT8 t = static_cast((mir >> 11) & 1); - UINT8 l = static_cast((mir >> 10) & 1); - offs_t next = static_cast(mir & 1023); + int rsel = (mir >> 27) & 31; + int aluf = (mir >> 23) & 15; + int bs = (mir >> 20) & 7; + int f1 = (mir >> 16) & 15; + int f2 = (mir >> 12) & 15; + int t = (mir >> 11) & 1; + int l = (mir >> 10) & 1; + offs_t next = mir & 1023; const UINT8* src = oprom - 4 * pc + 4 * next; UINT32 next2 = (static_cast(src[0]) << 24) | (static_cast(src[1]) << 16) | @@ -244,52 +244,52 @@ offs_t alto2_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 switch (aluf) { case 0: // T?: BUS // this is somehow redundant and just wasting space - dst += snprintf(dst, len - (size_t)(dst - buffer), "ALUF(BUS) "); + // dst += snprintf(dst, len - (size_t)(dst - buffer), "ALUF(BUS) "); break; case 1: // : T - dst += snprintf(dst, len - (size_t)(dst - buffer), "ALUF(T) "); + dst += snprintf(dst, len - (size_t)(dst - buffer), "T "); break; case 2: // T?: BUS OR T - dst += snprintf(dst, len - (size_t)(dst - buffer), "ALUF(BUS|T) "); + dst += snprintf(dst, len - (size_t)(dst - buffer), "BUS|T "); break; case 3: // : BUS AND T - dst += snprintf(dst, len - (size_t)(dst - buffer), "ALUF(BUS&T) "); + dst += snprintf(dst, len - (size_t)(dst - buffer), "BUS&T "); break; case 4: // : BUS XOR T - dst += snprintf(dst, len - (size_t)(dst - buffer), "ALUF(BUS^T) "); + dst += snprintf(dst, len - (size_t)(dst - buffer), "BUS^T "); break; case 5: // T?: BUS + 1 - dst += snprintf(dst, len - (size_t)(dst - buffer), "ALUF(BUS+1) "); + dst += snprintf(dst, len - (size_t)(dst - buffer), "BUS+1 "); break; case 6: // T?: BUS - 1 - dst += snprintf(dst, len - (size_t)(dst - buffer), "ALUF(BUS-1) "); + dst += snprintf(dst, len - (size_t)(dst - buffer), "BUS-1 "); break; case 7: // : BUS + T - dst += snprintf(dst, len - (size_t)(dst - buffer), "ALUF(BUS+T) "); + dst += snprintf(dst, len - (size_t)(dst - buffer), "BUS+T "); break; case 8: // : BUS - T - dst += snprintf(dst, len - (size_t)(dst - buffer), "ALUF(BUS-T) "); + dst += snprintf(dst, len - (size_t)(dst - buffer), "BUS-T "); break; case 9: // : BUS - T - 1 - dst += snprintf(dst, len - (size_t)(dst - buffer), "ALUF(BUS-T-1) "); + dst += snprintf(dst, len - (size_t)(dst - buffer), "BUS-T-1 "); break; case 10: // T?: BUS + T + 1 - dst += snprintf(dst, len - (size_t)(dst - buffer), "ALUF(BUS+T+1) "); + dst += snprintf(dst, len - (size_t)(dst - buffer), "BUS+T+1 "); break; case 11: // T?: BUS + SKIP - dst += snprintf(dst, len - (size_t)(dst - buffer), "ALUF(BUS+SKIP) "); + dst += snprintf(dst, len - (size_t)(dst - buffer), "BUS+SKIP "); break; case 12: // T?: BUS, T (AND) - dst += snprintf(dst, len - (size_t)(dst - buffer), "ALUF(BUS,T) "); + dst += snprintf(dst, len - (size_t)(dst - buffer), "BUS,T "); break; case 13: // : BUS AND NOT T - dst += snprintf(dst, len - (size_t)(dst - buffer), "ALUF(BUS&~T) "); + dst += snprintf(dst, len - (size_t)(dst - buffer), "BUS&~T "); break; case 14: // : undefined - dst += snprintf(dst, len - (size_t)(dst - buffer), "*ALUF(BUS) "); + dst += snprintf(dst, len - (size_t)(dst - buffer), "*BUS "); break; case 15: // : undefined - dst += snprintf(dst, len - (size_t)(dst - buffer), "*ALUF(BUS) "); + dst += snprintf(dst, len - (size_t)(dst - buffer), "*BUS "); break; } @@ -344,7 +344,7 @@ offs_t alto2_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 break; case 7: // put the constant from PROM (RSELECT,BS) on the bus pa = (rsel << 3) | bs; - dst += snprintf(dst, len - (size_t)(dst - buffer), "BUS<-%05o CONST[%03o]", const_prom[pa], pa); + dst += snprintf(dst, len - (size_t)(dst - buffer), "BUS<-%05o", const_prom[pa]); break; default: dst += snprintf(dst, len - (size_t)(dst - buffer), "F1_%02o ", f1); @@ -373,18 +373,19 @@ offs_t alto2_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 dst += snprintf(dst, len - (size_t)(dst - buffer), "[ALUC0 ? %s:%s] ", addrname((prefetch | 1) & MCODE_MASK), addrname(prefetch & MCODE_MASK)); break; - case 6: // deliver BUS data to memory + case 6: // write BUS data to memory dst += snprintf(dst, len - (size_t)(dst - buffer), "MD<-BUS "); break; - case 7: // put on the bus the constant from PROM (RSELECT,BS) + case 7: // put the constant from PROM (RSELECT,BS) on the bus if (f1 != 7) { pa = 8 * rsel + bs; - dst += snprintf(dst, len - (size_t)(dst - buffer), "BUS<-%05o CONST[%03o]", const_prom[pa], pa); + dst += snprintf(dst, len - (size_t)(dst - buffer), "BUS<-%05o", const_prom[pa]); } break; default: dst += snprintf(dst, len - (size_t)(dst - buffer), "BUS<-F2_%02o ", f2); break; } + return result; } diff --git a/src/devices/cpu/tms32031/tms32031.cpp b/src/devices/cpu/tms32031/tms32031.cpp index f826df04246..6a90630b5a1 100644 --- a/src/devices/cpu/tms32031/tms32031.cpp +++ b/src/devices/cpu/tms32031/tms32031.cpp @@ -323,7 +323,7 @@ tms3203x_device::~tms3203x_device() // internal ROM region //------------------------------------------------- -const rom_entry *tms3203x_device::device_rom_region() const +const tiny_rom_entry *tms3203x_device::device_rom_region() const { switch (m_chip_type) { diff --git a/src/devices/cpu/tms32031/tms32031.h b/src/devices/cpu/tms32031/tms32031.h index 4ce0decf010..d8fa5125c3d 100644 --- a/src/devices/cpu/tms32031/tms32031.h +++ b/src/devices/cpu/tms32031/tms32031.h @@ -164,7 +164,7 @@ protected: virtual void device_start() override; virtual void device_reset() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; // device_execute_interface overrides virtual UINT32 execute_min_cycles() const override; diff --git a/src/devices/imagedev/cassette.cpp b/src/devices/imagedev/cassette.cpp index 57b7068d49a..adf59ca95eb 100644 --- a/src/devices/imagedev/cassette.cpp +++ b/src/devices/imagedev/cassette.cpp @@ -285,10 +285,6 @@ image_init_result cassette_image_device::internal_load(bool is_create) cassette_flags = is_writable ? (CASSETTE_FLAG_READWRITE|CASSETTE_FLAG_SAVEONEXIT) : CASSETTE_FLAG_READONLY; std::string fname; err = cassette_open_choices((void *)image, &image_ioprocs, filetype().c_str(), m_formats, cassette_flags, &m_cassette); - - /* this is kind of a hack */ - if (err && is_writable) - make_readonly(); } while(err && is_writable); diff --git a/src/devices/imagedev/cassette.h b/src/devices/imagedev/cassette.h index 1e6198ddeed..036fc77c534 100644 --- a/src/devices/imagedev/cassette.h +++ b/src/devices/imagedev/cassette.h @@ -12,6 +12,7 @@ #define CASSETTE_H #include "formats/cassimg.h" +#include "softlist_dev.h" enum cassette_state diff --git a/src/devices/imagedev/chd_cd.h b/src/devices/imagedev/chd_cd.h index 02d39071604..9e2ec9f9a29 100644 --- a/src/devices/imagedev/chd_cd.h +++ b/src/devices/imagedev/chd_cd.h @@ -12,6 +12,7 @@ #define CHD_CD_H #include "cdrom.h" +#include "softlist_dev.h" /*************************************************************************** TYPE DEFINITIONS diff --git a/src/devices/imagedev/diablo.h b/src/devices/imagedev/diablo.h index 806a825a1fe..8ab2ac1addc 100644 --- a/src/devices/imagedev/diablo.h +++ b/src/devices/imagedev/diablo.h @@ -8,6 +8,7 @@ #define _IMAGEDEV_DIABLO_H_ #include "harddisk.h" +#include "softlist_dev.h" #define DIABLO_TAG(_id) "diablo"#_id diff --git a/src/devices/imagedev/flopdrv.h b/src/devices/imagedev/flopdrv.h index 9d571c9f390..34e54100364 100644 --- a/src/devices/imagedev/flopdrv.h +++ b/src/devices/imagedev/flopdrv.h @@ -7,6 +7,7 @@ #define __FLOPDRV_H__ #include "formats/flopimg.h" +#include "softlist_dev.h" #define FLOPPY_TYPE_REGULAR 0 #define FLOPPY_TYPE_APPLE 1 diff --git a/src/devices/imagedev/floppy.h b/src/devices/imagedev/floppy.h index ec5e4b983e2..5e93da56c69 100644 --- a/src/devices/imagedev/floppy.h +++ b/src/devices/imagedev/floppy.h @@ -20,6 +20,7 @@ #include "formats/cqm_dsk.h" #include "formats/dsk_dsk.h" #include "sound/samples.h" +#include "softlist_dev.h" #define MCFG_FLOPPY_DRIVE_ADD(_tag, _slot_intf, _def_slot, _formats) \ MCFG_DEVICE_ADD(_tag, FLOPPY_CONNECTOR, 0) \ diff --git a/src/devices/imagedev/harddriv.h b/src/devices/imagedev/harddriv.h index 583a5f53e9f..d2ce6aeaef9 100644 --- a/src/devices/imagedev/harddriv.h +++ b/src/devices/imagedev/harddriv.h @@ -12,6 +12,7 @@ #define HARDDRIV_H #include "harddisk.h" +#include "softlist_dev.h" /*************************************************************************** TYPE DEFINITIONS diff --git a/src/devices/imagedev/mfmhd.cpp b/src/devices/imagedev/mfmhd.cpp index d7e5306f57f..9c3f27d50d6 100644 --- a/src/devices/imagedev/mfmhd.cpp +++ b/src/devices/imagedev/mfmhd.cpp @@ -406,7 +406,7 @@ image_init_result mfm_harddisk_device::call_load() if (chdfile==nullptr) { - logerror("%s: chdfile is null\n", tag()); + logerror("chdfile is null\n"); return image_init_result::FAIL; } @@ -414,24 +414,24 @@ image_init_result mfm_harddisk_device::call_load() chd_error state = chdfile->read_metadata(HARD_DISK_METADATA_TAG, 0, metadata); if (state != CHDERR_NONE) { - logerror("%s: Failed to read CHD metadata\n", tag()); + logerror("Failed to read CHD metadata\n"); return image_init_result::FAIL; } - if (TRACE_CONFIG) logerror("%s: CHD metadata: %s\n", tag(), metadata.c_str()); + if (TRACE_CONFIG) logerror("CHD metadata: %s\n", metadata.c_str()); // Parse the metadata mfmhd_layout_params param; param.encoding = m_encoding; - if (TRACE_CONFIG) logerror("%s: Set encoding to %d\n", tag(), m_encoding); + if (TRACE_CONFIG) logerror("Set encoding to %d\n", m_encoding); if (sscanf(metadata.c_str(), HARD_DISK_METADATA_FORMAT, ¶m.cylinders, ¶m.heads, ¶m.sectors_per_track, ¶m.sector_size) != 4) { - logerror("%s: Invalid CHD metadata\n", tag()); + logerror("Invalid CHD metadata\n"); return image_init_result::FAIL; } - if (TRACE_CONFIG) logerror("%s: CHD image has geometry cyl=%d, head=%d, sect=%d, size=%d\n", tag(), param.cylinders, param.heads, param.sectors_per_track, param.sector_size); + if (TRACE_CONFIG) logerror("CHD image has geometry cyl=%d, head=%d, sect=%d, size=%d\n", param.cylinders, param.heads, param.sectors_per_track, param.sector_size); if (m_max_cylinders != 0 && (param.cylinders != m_max_cylinders || param.heads != m_max_heads)) { @@ -448,7 +448,7 @@ image_init_result mfm_harddisk_device::call_load() state = chdfile->read_metadata(MFM_HARD_DISK_METADATA_TAG, 0, metadata); if (state != CHDERR_NONE) { - logerror("%s: Failed to read CHD sector arrangement/recording specs, applying defaults\n", tag()); + logerror("Failed to read CHD sector arrangement/recording specs, applying defaults\n"); } else { @@ -457,17 +457,17 @@ image_init_result mfm_harddisk_device::call_load() if (!param.sane_rec()) { - if (TRACE_CONFIG) logerror("%s: Sector arrangement/recording specs have invalid values, applying defaults\n", tag()); + if (TRACE_CONFIG) logerror("Sector arrangement/recording specs have invalid values, applying defaults\n"); param.reset_rec(); } else - if (TRACE_CONFIG) logerror("%s: MFM HD rec specs: interleave=%d, cylskew=%d, headskew=%d, wpcom=%d, rwc=%d\n", + if (TRACE_CONFIG) logerror("MFM HD rec specs: interleave=%d, cylskew=%d, headskew=%d, wpcom=%d, rwc=%d\n", tag(), param.interleave, param.cylskew, param.headskew, param.write_precomp_cylinder, param.reduced_wcurr_cylinder); state = chdfile->read_metadata(MFM_HARD_DISK_METADATA_TAG, 1, metadata); if (state != CHDERR_NONE) { - logerror("%s: Failed to read CHD track gap specs, applying defaults\n", tag()); + logerror("Failed to read CHD track gap specs, applying defaults\n"); } else { @@ -476,11 +476,11 @@ image_init_result mfm_harddisk_device::call_load() if (!param.sane_gap()) { - if (TRACE_CONFIG) logerror("%s: MFM HD gap specs have invalid values, applying defaults\n", tag()); + if (TRACE_CONFIG) logerror("MFM HD gap specs have invalid values, applying defaults\n"); param.reset_gap(); } else - if (TRACE_CONFIG) logerror("%s: MFM HD gap specs: gap1=%d, gap2=%d, gap3=%d, sync=%d, headerlen=%d, ecctype=%d\n", + if (TRACE_CONFIG) logerror("MFM HD gap specs: gap1=%d, gap2=%d, gap3=%d, sync=%d, headerlen=%d, ecctype=%d\n", tag(), param.gap1, param.gap2, param.gap3, param.sync, param.headerlen, param.ecctype); m_format->set_layout_params(param); @@ -501,7 +501,7 @@ image_init_result mfm_harddisk_device::call_load() float realmax = (m_maxseek_time==0)? (m_actual_cylinders * 0.2) : (m_maxseek_time * 0.8); float settle_us = ((m_actual_cylinders-1.0) * realnext - realmax) / (m_actual_cylinders-2.0) * 1000; float step_us = realnext * 1000 - settle_us; - if (TRACE_CONFIG) logerror("%s: Calculated settle time: %0.2f ms, step: %d us\n", tag(), settle_us/1000, (int)step_us); + if (TRACE_CONFIG) logerror("Calculated settle time: %0.2f ms, step: %d us\n", settle_us/1000, (int)step_us); m_settle_time = attotime::from_usec((int)settle_us); m_step_time = attotime::from_usec((int)step_us); @@ -510,7 +510,7 @@ image_init_result mfm_harddisk_device::call_load() } else { - logerror("%s: Could not load CHD\n", tag()); + logerror("Could not load CHD\n"); } return loaded; } @@ -529,25 +529,25 @@ void mfm_harddisk_device::call_unload() if (m_format->save_param(MFMHD_IL) && !params->equals_rec(oldparams)) { - logerror("%s: MFM HD sector arrangement and recording specs have changed; updating CHD metadata\n", tag()); + logerror("MFM HD sector arrangement and recording specs have changed; updating CHD metadata\n"); chd_file* chdfile = get_chd_file(); chd_error err = chdfile->write_metadata(MFM_HARD_DISK_METADATA_TAG, 0, string_format(MFMHD_REC_METADATA_FORMAT, params->interleave, params->cylskew, params->headskew, params->write_precomp_cylinder, params->reduced_wcurr_cylinder), 0); if (err != CHDERR_NONE) { - logerror("%s: Failed to save MFM HD sector arrangement/recording specs to CHD\n", tag()); + logerror("Failed to save MFM HD sector arrangement/recording specs to CHD\n"); } } if (m_format->save_param(MFMHD_GAP1) && !params->equals_gap(oldparams)) { - logerror("%s: MFM HD track gap specs have changed; updating CHD metadata\n", tag()); + logerror("MFM HD track gap specs have changed; updating CHD metadata\n"); chd_file* chdfile = get_chd_file(); chd_error err = chdfile->write_metadata(MFM_HARD_DISK_METADATA_TAG, 1, string_format(MFMHD_GAP_METADATA_FORMAT, params->gap1, params->gap2, params->gap3, params->sync, params->headerlen, params->ecctype), 0); if (err != CHDERR_NONE) { - logerror("%s: Failed to save MFM HD track gap specs to CHD\n", tag()); + logerror("Failed to save MFM HD track gap specs to CHD\n"); } } } @@ -586,7 +586,7 @@ attotime mfm_harddisk_device::track_end_time() if (!m_revolution_start_time.is_never()) { endtime = m_revolution_start_time + nexttime; - if (TRACE_TIMING) logerror("%s: Track start time = %s, end time = %s\n", tag(), tts(m_revolution_start_time).c_str(), tts(endtime).c_str()); + if (TRACE_TIMING) logerror("Track start time = %s, end time = %s\n", tts(m_revolution_start_time).c_str(), tts(endtime).c_str()); } return endtime; } @@ -628,7 +628,7 @@ void mfm_harddisk_device::device_timer(emu_timer &timer, device_timer_id id, int // Start the settle timer m_step_phase = STEP_SETTLE; m_seek_timer->adjust(m_settle_time); - if (TRACE_STEPS && TRACE_DETAIL) logerror("%s: Arrived at target cylinder %d, settling ...\n", tag(), m_current_cylinder); + if (TRACE_STEPS && TRACE_DETAIL) logerror("Arrived at target cylinder %d, settling ...\n", m_current_cylinder); } else { @@ -646,12 +646,12 @@ void mfm_harddisk_device::device_timer(emu_timer &timer, device_timer_id id, int { m_ready = true; m_recalibrated = true; - if (TRACE_STATE) logerror("%s: Spinup complete, drive recalibrated and positioned at cylinder %d; drive is READY\n", tag(), m_current_cylinder); + if (TRACE_STATE) logerror("Spinup complete, drive recalibrated and positioned at cylinder %d; drive is READY\n", m_current_cylinder); if (!m_ready_cb.isnull()) m_ready_cb(this, ASSERT_LINE); } else { - if (TRACE_SIGNALS) logerror("%s: Settling done at cylinder %d, seek complete\n", tag(), m_current_cylinder); + if (TRACE_SIGNALS) logerror("Settling done at cylinder %d, seek complete\n", m_current_cylinder); } m_seek_complete = true; if (!m_seek_complete_cb.isnull()) m_seek_complete_cb(this, ASSERT_LINE); @@ -664,7 +664,7 @@ void mfm_harddisk_device::device_timer(emu_timer &timer, device_timer_id id, int void mfm_harddisk_device::recalibrate() { - if (TRACE_STEPS) logerror("%s: Recalibrate to track 0\n", tag()); + if (TRACE_STEPS) logerror("Recalibrate to track 0\n"); direction_in_w(CLEAR_LINE); while (-m_track_delta < m_phys_cylinders) { @@ -677,13 +677,13 @@ void mfm_harddisk_device::head_move() { int steps = m_track_delta; if (steps < 0) steps = -steps; - if (TRACE_STEPS) logerror("%s: Moving head by %d step(s) %s\n", tag(), steps, (m_track_delta<0)? "outward" : "inward"); + if (TRACE_STEPS) logerror("Moving head by %d step(s) %s\n", steps, (m_track_delta<0)? "outward" : "inward"); // We simulate the head movement by pausing for n*step_time with n being the cylinder delta m_step_phase = STEP_MOVING; m_seek_timer->adjust(m_step_time * steps); - if (TRACE_TIMING) logerror("%s: Head movement takes %s time\n", tag(), tts(m_step_time * steps).c_str()); + if (TRACE_TIMING) logerror("Head movement takes %s time\n", tts(m_step_time * steps).c_str()); // We pretend that we already arrived // TODO: Check auto truncation? m_current_cylinder += m_track_delta; @@ -695,7 +695,7 @@ void mfm_harddisk_device::head_move() void mfm_harddisk_device::direction_in_w(line_state line) { m_seek_inward = (line == ASSERT_LINE); - if (TRACE_STEPS && TRACE_DETAIL) logerror("%s: Setting seek direction %s\n", tag(), m_seek_inward? "inward" : "outward"); + if (TRACE_STEPS && TRACE_DETAIL) logerror("Setting seek direction %s\n", m_seek_inward? "inward" : "outward"); } /* @@ -746,10 +746,10 @@ void mfm_harddisk_device::step_w(line_state line) // Counter will be adjusted according to the direction (+-1) m_track_delta += (m_seek_inward)? +1 : -1; - if (TRACE_STEPS && TRACE_DETAIL) logerror("%s: Got seek pulse; track delta %d\n", tag(), m_track_delta); + if (TRACE_STEPS && TRACE_DETAIL) logerror("Got seek pulse; track delta %d\n", m_track_delta); if (m_track_delta < -m_phys_cylinders || m_track_delta > m_phys_cylinders) { - if (TRACE_STEPS) logerror("%s: Excessive step pulses - doing auto-truncation\n", tag()); + if (TRACE_STEPS) logerror("Excessive step pulses - doing auto-truncation\n"); m_autotruncation = true; } m_seek_timer->adjust(attotime::from_usec(250)); // Start step collect timer @@ -782,7 +782,7 @@ bool mfm_harddisk_device::find_position(attotime &from_when, const attotime &lim // Reached the end if (bytepos >= m_trackimage_size) { - if (TRACE_TIMING) logerror("%s: Reached end: rev_start = %s, live = %s\n", tag(), tts(m_revolution_start_time).c_str(), tts(from_when).c_str()); + if (TRACE_TIMING) logerror("Reached end: rev_start = %s, live = %s\n", tts(m_revolution_start_time).c_str(), tts(from_when).c_str()); m_revolution_start_time += m_rev_time; cell = (from_when - m_revolution_start_time).as_ticks(freq); bytepos = cell / 16; @@ -790,7 +790,7 @@ bool mfm_harddisk_device::find_position(attotime &from_when, const attotime &lim if (bytepos < 0) { - if (TRACE_TIMING) logerror("%s: Negative cell number: rev_start = %s, live = %s\n", tag(), tts(m_revolution_start_time).c_str(), tts(from_when).c_str()); + if (TRACE_TIMING) logerror("Negative cell number: rev_start = %s, live = %s\n", tts(m_revolution_start_time).c_str(), tts(from_when).c_str()); bytepos = 0; } bit = cell % 16; @@ -827,12 +827,12 @@ bool mfm_harddisk_device::read(attotime &from_when, const attotime &limit, UINT1 { // We will deliver a single bit cdata = ((track[bytepos] << bitpos) & 0x8000) >> 15; - if (TRACE_BITS) logerror("%s: Reading (c=%d,h=%d,bit=%d) at cell %d [%s] = %d\n", tag(), m_current_cylinder, m_current_head, bitpos, ((bytepos<<4) + bitpos), tts(fw).c_str(), cdata); + if (TRACE_BITS) logerror("Reading (c=%d,h=%d,bit=%d) at cell %d [%s] = %d\n", m_current_cylinder, m_current_head, bitpos, ((bytepos<<4) + bitpos), tts(fw).c_str(), cdata); } else { // We will deliver a whole byte - if (TRACE_READ) logerror("%s: Reading (c=%d,h=%d) at position %d\n", tag(), m_current_cylinder, m_current_head, bytepos); + if (TRACE_READ) logerror("Reading (c=%d,h=%d) at position %d\n", m_current_cylinder, m_current_head, bytepos); cdata = track[bytepos]; } return false; @@ -885,7 +885,7 @@ bool mfm_harddisk_device::write(attotime &from_when, const attotime &limit, UINT if (wpcom && (params->write_precomp_cylinder == -1 || m_current_cylinder < params->write_precomp_cylinder)) params->write_precomp_cylinder = m_current_cylinder; - if (TRACE_WRITE) if ((bitpos&0x0f)==0) logerror("%s: Wrote data=%04x (c=%d,h=%d) at position %04x, wpcom=%d, rwc=%d\n", tag(), track[bytepos], m_current_cylinder, m_current_head, bytepos, wpcom, reduced_wc); + if (TRACE_WRITE) if ((bitpos&0x0f)==0) logerror("Wrote data=%04x (c=%d,h=%d) at position %04x, wpcom=%d, rwc=%d\n", track[bytepos], m_current_cylinder, m_current_head, bytepos, wpcom, reduced_wc); return false; } diff --git a/src/devices/imagedev/snapquik.h b/src/devices/imagedev/snapquik.h index e14b1d6da6a..1c1a9a3b3df 100644 --- a/src/devices/imagedev/snapquik.h +++ b/src/devices/imagedev/snapquik.h @@ -11,6 +11,8 @@ #ifndef __SNAPQUIK_H__ #define __SNAPQUIK_H__ +#include "softlist_dev.h" + typedef delegate snapquick_load_delegate; // ======================> snapshot_image_device diff --git a/src/devices/machine/64h156.cpp b/src/devices/machine/64h156.cpp index fbbe84d7383..243627e1f1e 100644 --- a/src/devices/machine/64h156.cpp +++ b/src/devices/machine/64h156.cpp @@ -282,73 +282,73 @@ void c64h156_device::live_run(const attotime &limit) cur_live.cell_counter = 0; } else { cur_live.cycle_counter++; - } - if (cur_live.cycle_counter == 16) { - cur_live.cycle_counter = cur_live.ds; + if (cur_live.cycle_counter == 16) { + cur_live.cycle_counter = cur_live.ds; - cur_live.cell_counter++; - cur_live.cell_counter &= 0xf; - } - - if (!BIT(cell_counter, 1) && BIT(cur_live.cell_counter, 1)) { - // read bit - cur_live.shift_reg <<= 1; - cur_live.shift_reg |= !(BIT(cur_live.cell_counter, 3) || BIT(cur_live.cell_counter, 2)); - cur_live.shift_reg &= 0x3ff; - - if (LOG) logerror("%s read bit %u (%u) >> %03x, oe=%u soe=%u sync=%u byte=%u\n", cur_live.tm.as_string(), cur_live.bit_counter, - !(BIT(cur_live.cell_counter, 3) || BIT(cur_live.cell_counter, 2)), cur_live.shift_reg, cur_live.oe, cur_live.soe, cur_live.sync, cur_live.byte); - - syncpoint = true; - } - - if (BIT(cell_counter, 1) && !BIT(cur_live.cell_counter, 1) && !cur_live.oe) { // TODO WPS - write_next_bit(BIT(cur_live.shift_reg_write, 7), limit); - } - - int sync = !((cur_live.shift_reg == 0x3ff) && cur_live.oe); - - if (!sync) { - cur_live.bit_counter = 8; - } else if (!BIT(cell_counter, 1) && BIT(cur_live.cell_counter, 1) && cur_live.sync) { - cur_live.bit_counter++; - cur_live.bit_counter &= 0xf; - } - - int byte = !(((cur_live.bit_counter & 7) == 7) && cur_live.soe && !(cur_live.cell_counter & 2)); - int load = !(((cur_live.bit_counter & 7) == 7) && ((cur_live.cell_counter & 3) == 3)); - - if (!load) { - if (cur_live.oe) { - cur_live.shift_reg_write = cur_live.shift_reg; - if (LOG) logerror("%s load write shift register from read shift register %02x\n",cur_live.tm.as_string(),cur_live.shift_reg_write); - } else { - cur_live.shift_reg_write = cur_live.yb; - if (LOG) logerror("%s load write shift register from YB %02x\n",cur_live.tm.as_string(),cur_live.shift_reg_write); + cur_live.cell_counter++; + cur_live.cell_counter &= 0xf; } - } else if (!BIT(cell_counter, 1) && BIT(cur_live.cell_counter, 1)) { - cur_live.shift_reg_write <<= 1; - cur_live.shift_reg_write &= 0xff; - if (LOG) logerror("%s shift write register << %02x\n", cur_live.tm.as_string(), cur_live.shift_reg_write); - } - // update signals - if (byte != cur_live.byte) { - if (!byte || !cur_live.accl) { - if (LOG) logerror("%s BYTE %02x\n", cur_live.tm.as_string(), cur_live.shift_reg & 0xff); - cur_live.byte = byte; + if (!BIT(cell_counter, 1) && BIT(cur_live.cell_counter, 1)) { + // read bit + cur_live.shift_reg <<= 1; + cur_live.shift_reg |= !(BIT(cur_live.cell_counter, 3) || BIT(cur_live.cell_counter, 2)); + cur_live.shift_reg &= 0x3ff; + + if (LOG) logerror("%s read bit %u (%u) >> %03x, oe=%u soe=%u sync=%u byte=%u\n", cur_live.tm.as_string(), cur_live.bit_counter, + !(BIT(cur_live.cell_counter, 3) || BIT(cur_live.cell_counter, 2)), cur_live.shift_reg, cur_live.oe, cur_live.soe, cur_live.sync, cur_live.byte); + syncpoint = true; } - if (!byte) { - cur_live.accl_yb = cur_live.shift_reg & 0xff; - } - } - if (sync != cur_live.sync) { - if (LOG) logerror("%s SYNC %u\n", cur_live.tm.as_string(),sync); - cur_live.sync = sync; - syncpoint = true; + if (BIT(cell_counter, 1) && !BIT(cur_live.cell_counter, 1) && !cur_live.oe) { // TODO WPS + write_next_bit(BIT(cur_live.shift_reg_write, 7), limit); + } + + int sync = !((cur_live.shift_reg == 0x3ff) && cur_live.oe); + + if (!sync) { + cur_live.bit_counter = 8; + } else if (!BIT(cell_counter, 1) && BIT(cur_live.cell_counter, 1) && cur_live.sync) { + cur_live.bit_counter++; + cur_live.bit_counter &= 0xf; + } + + int byte = !(((cur_live.bit_counter & 7) == 7) && cur_live.soe && !(cur_live.cell_counter & 2)); + int load = !(((cur_live.bit_counter & 7) == 7) && ((cur_live.cell_counter & 3) == 3)); + + if (!load) { + if (cur_live.oe) { + cur_live.shift_reg_write = cur_live.shift_reg; + if (LOG) logerror("%s load write shift register from read shift register %02x\n",cur_live.tm.as_string(),cur_live.shift_reg_write); + } else { + cur_live.shift_reg_write = cur_live.yb; + if (LOG) logerror("%s load write shift register from YB %02x\n",cur_live.tm.as_string(),cur_live.shift_reg_write); + } + } else if (!BIT(cell_counter, 1) && BIT(cur_live.cell_counter, 1)) { + cur_live.shift_reg_write <<= 1; + cur_live.shift_reg_write &= 0xff; + if (LOG) logerror("%s shift write register << %02x\n", cur_live.tm.as_string(), cur_live.shift_reg_write); + } + + // update signals + if (byte != cur_live.byte) { + if (!byte || !cur_live.accl) { + if (LOG) logerror("%s BYTE %02x\n", cur_live.tm.as_string(), cur_live.shift_reg & 0xff); + cur_live.byte = byte; + syncpoint = true; + } + if (!byte) { + cur_live.accl_yb = cur_live.shift_reg & 0xff; + } + } + + if (sync != cur_live.sync) { + if (LOG) logerror("%s SYNC %u\n", cur_live.tm.as_string(),sync); + cur_live.sync = sync; + syncpoint = true; + } } if (syncpoint) { diff --git a/src/devices/machine/at_keybc.cpp b/src/devices/machine/at_keybc.cpp index c77e6c8eed2..f6e5b76283c 100644 --- a/src/devices/machine/at_keybc.cpp +++ b/src/devices/machine/at_keybc.cpp @@ -75,7 +75,7 @@ at_keyboard_controller_device::at_keyboard_controller_device(const machine_confi // internal ROM region //------------------------------------------------- -const rom_entry *at_keyboard_controller_device::device_rom_region() const +const tiny_rom_entry *at_keyboard_controller_device::device_rom_region() const { return ROM_NAME(at_keybc); } diff --git a/src/devices/machine/at_keybc.h b/src/devices/machine/at_keybc.h index d6ff52d6975..5854f0f4f5d 100644 --- a/src/devices/machine/at_keybc.h +++ b/src/devices/machine/at_keybc.h @@ -78,7 +78,7 @@ protected: virtual void device_start() override; virtual void device_reset() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; virtual machine_config_constructor device_mconfig_additions() const override; diff --git a/src/devices/machine/hdc92x4.cpp b/src/devices/machine/hdc92x4.cpp index 9579f33bf7c..4701f8c7711 100644 --- a/src/devices/machine/hdc92x4.cpp +++ b/src/devices/machine/hdc92x4.cpp @@ -16,6 +16,56 @@ Michael Zapf, August 2015 + ================================== + Specifics of both controller types + + ** 9224 ** + - Defines a special "ST506" type for hard disks with a fixed 512 byte sector length + - No specific IDENT; uses HEAD field for cylinder MSBs (both ST and user-defined types); + - Different buffered step rate for SEEK and RESTORE + - POLL_DRIVES + - must be preceded by DESELECT + - DRIVE_SELECT + - 00 = ST506 + - READ_SECTORS_LOGICAL + - Bit 1 = Bad sector bypass/terminate + - Multi-sector read requires ECC correction disable + - WRITE_SECTOR_* + - Bit 6 = Bad sector bypass/terminate + - FORMAT_TRACK + - 3-byte header for ST506, 4-byte otherwise + - No IDENT byte in the format parameters; the IDENT field (after the IDAM) is locked to FE + + ** 9234 ** + - Defines a special "PC-AT" type for hard disks with a selectable sector length (128, 256, 512, 1024) + - IDENT field in the sector header encodes cylinder MSBs (HD and MFM floppy) + - Defines R6 as CURRENT IDENT byte register + - Uses HEAD field for cylinder MSBs (only user-defined type) + - Faster step rates, no different rates for SEEK/RESTORE + - PC-AT mode: + - R/W reg A contains specs for sector length and zone + - HEAD register contains sector size code provided by system (W4) + or read from disk (R4) + - POLL_DRIVES + - must be preceded by SEEK or DESELECT + - DRIVE_SELECT + - 00 = PC-AT + - READ_SECTORS_PHYSICAL + - PC-AT: Requires W10 to be set appropriately + - READ_SECTORS_LOGICAL + - Bit 1 = Implied seek enabled/disabled + - PC-AT: Requires W10 to be set appropriately + - WRITE_SECTOR_* + - Bit 6 = Implied seek enable/disable + - PC-AT: Requires W10 to be set appropriately + - WRITE LONG mode for extended ECC code + - MODE register (8) allows for setting WRITE LONG mode + - FORMAT_TRACK + - 4-byte header for PC-AT, 5-byte otherwise + - IDENT byte must be set for MFM floppy and MFM/PC-AT HD + - No Bad Sector Flag for PC-AT + - HEAD field contains sector size for PC-AT + ***************************************************************************/ #include "emu.h" @@ -67,7 +117,6 @@ ECC Write long (see MODE register; only useful with ECC) Tape operations - AT mode (HD) FM-encoded HD === Implemented but untested === @@ -75,6 +124,7 @@ Poll drives Seek/Read ID Read track + AT mode (HD) === TODO === Create a common state machine for HD and floppy @@ -232,7 +282,8 @@ enum TYPE_AT = 0x00, TYPE_HD = 0x01, TYPE_FLOPPY8 = 0x02, - TYPE_FLOPPY5 = 0x03 + TYPE_FLOPPY5 = 0x03, + TYPE_ST = 0x04 }; /* @@ -241,8 +292,7 @@ enum enum { GEN_TIMER = 1, - COM_TIMER /*, - LIVE_TIMER */ + COM_TIMER }; /* @@ -256,14 +306,6 @@ enum { MO_STEPRATE = 0x07 // Step rates }; -/* - Step rates in microseconds for MFM. This is set in the mode register, - bits 0-2. FM mode doubles all values. -*/ -static const int step_hd[] = { 22, 50, 100, 200, 400, 800, 1600, 3200 }; -static const int step_flop8[] = { 218, 500, 1000, 2000, 4000, 8000, 16000, 32000 }; -static const int step_flop5[] = { 436, 1000, 2000, 4000, 8000, 16000, 32000, 64000 }; - /* Head load timer increments in usec. Delay value is calculated from this value multiplied by the factor in the DATA/DELAY register. For FM mode all @@ -271,11 +313,6 @@ static const int step_flop5[] = { 436, 1000, 2000, 4000, 8000, 16000, 32000, 6 */ static const int head_load_timer_increment[] = { 200, 200, 2000, 4000 }; -/* - ID fields association to registers -*/ -static const int id_field[] = { CURRENT_CYLINDER, CURRENT_HEAD, CURRENT_SECTOR, CURRENT_SIZE, CURRENT_CRC1, CURRENT_CRC2 }; - /* Pulse widths for stepping in usec */ @@ -518,19 +555,32 @@ bool hdc92x4_device::reading_track() */ /* - In SMC mode, the cylinder number is stored in bit positions 4,5,6 of the - head register and in the 8 bits of the cylinder register. - This is true for the desired cyl/head, current cyl/head, and the header - fields on the track. + The desired head is specified by the last 4 bits of the desired head + register in all modes. */ int hdc92x4_device::desired_head() { return m_register_w[DESIRED_HEAD] & 0x0f; } +/* + PC-AT mode: Cylinder number is specified by the least significant two + bits of the R/W register A (DATA) and the 8 bits of the desired cylinder + register. + + SMC mode: Cylinder number is stored in bit positions 4,5,6 of the + head register and in the 8 bits of the desired cylinder register. +*/ int hdc92x4_device::desired_cylinder() { - return (m_register_w[DESIRED_CYLINDER] & 0xff) | ((m_register_w[DESIRED_HEAD] & 0x70) << 4); + if (m_selected_drive_type == TYPE_AT) + { + return (m_register_w[DESIRED_CYLINDER] & 0xff) | ((m_register_w[DATA] & 0x03) << 8); + } + else + { + return (m_register_w[DESIRED_CYLINDER] & 0xff) | ((m_register_w[DESIRED_HEAD] & 0x70) << 4); + } } int hdc92x4_device::desired_sector() @@ -538,14 +588,34 @@ int hdc92x4_device::desired_sector() return m_register_w[DESIRED_SECTOR] & 0xff; } +/* + The current head is specified by the last 4 bits of the current head + register in all modes. +*/ int hdc92x4_device::current_head() { return m_register_r[CURRENT_HEAD] & 0x0f; } +/* + PC-AT mode: The current cylinder number is specified by the IDENT field + as read from the sector header and the 8 bits of the desired cylinder + register. + IDENT: FE->0, FF->1, FC->2, FD->3 + + SMC mode: The current cylinder number is stored in bit positions 4,5,6 of + the head register and in the 8 bits of the desired cylinder register. +*/ int hdc92x4_device::current_cylinder() { - return (m_register_r[CURRENT_CYLINDER] & 0xff) | ((m_register_r[CURRENT_HEAD] & 0x70) << 4); + if (m_selected_drive_type == TYPE_AT) + { + return (m_register_r[CURRENT_CYLINDER] & 0xff) | (((m_register_r[CURRENT_IDENT] + 2) & 0x03) << 8); + } + else + { + return (m_register_r[CURRENT_CYLINDER] & 0xff) | ((m_register_r[CURRENT_HEAD] & 0x70) << 4); + } } int hdc92x4_device::current_sector() @@ -563,12 +633,77 @@ bool hdc92x4_device::using_floppy() return (m_selected_drive_type == TYPE_FLOPPY5 || m_selected_drive_type == TYPE_FLOPPY8); } +int hdc92x4_device::header_length() +{ + return (m_selected_drive_type == TYPE_AT)? 4 : 5; +} + /* - Delivers the step time (in microseconds) minus the pulse width + Returns the index of the register where the sector header field shall be stored */ -int hdc92x4_device::step_time() +int hdc92x4_device::register_number(int slot) +{ + // The id_field is an array of indexes into the chip registers. + // Thus we get the values properly assigned to the registers. + // The PC-AT mode does not use a size field. + const int id_field[] = { CURRENT_CYLINDER, CURRENT_HEAD, CURRENT_SECTOR, CURRENT_SIZE, CURRENT_CRC1, CURRENT_CRC2 }; + int index = slot; + + // Skip size for PC-AT + if (m_selected_drive_type == TYPE_AT && slot > 2) index++; + if (index > 5) + { + logerror("BUG: Invalid index for header field: %d", index); + index = 5; + } + return id_field[index]; +} + +/* + Delivers the step time (in microseconds) minus the pulse width (9224). + The first two values in the list apply for index==0 (buffered step), + but the first one is used for the RESTORE command, the second one is used + for SEEK. [2] +*/ +int hdc9224_device::step_time() { int time; + // Step rates in microseconds for MFM. This is set in the mode register, + // bits 0-2. FM mode doubles all values. + const int step_hd[] = { 22, 18, 200, 400, 800, 1600, 3200, 6400, 12800 }; + const int step_flop8[] = { 218, 176, 2000, 4000, 8000, 16000, 32000, 64000, 128000 }; + const int step_flop5[] = { 436, 352, 4000, 8000, 16000, 32000, 64000, 128000, 256000 }; + + int index = m_register_w[MODE] & MO_STEPRATE; + // First value is used only for RESTORE (02, 03) + if ((index > 0) || ((current_command() & 0xfe)!=0x02)) index++; + + // Get seek time. + if (m_selected_drive_type == TYPE_FLOPPY8) + time = step_flop8[index] - pulse_flop8; + + else if (m_selected_drive_type == TYPE_FLOPPY5) + time = step_flop5[index] - pulse_flop5; + else + time = step_hd[index] - pulse_hd; + + if (fm_mode()) time = time * 2; + return time; +} + +/* + Delivers the step time (in microseconds) minus the pulse width (9234). + The 9234 does not use different values for buffered steps. +*/ +int hdc9234_device::step_time() +{ + int time; + // Step rates in microseconds for MFM. This is set in the mode register, + // bits 0-2. FM mode doubles all values. + const int step_hd[] = { 22, 50, 100, 200, 400, 800, 1600, 3200 }; + const int step_flop8[] = { 218, 500, 1000, 2000, 4000, 8000, 16000, 32000 }; + const int step_flop5[] = { 436, 1000, 2000, 4000, 8000, 16000, 32000, 64000 }; + int index = m_register_w[MODE] & MO_STEPRATE; // Get seek time. if (m_selected_drive_type == TYPE_FLOPPY8) @@ -603,11 +738,24 @@ int hdc92x4_device::pulse_width() } /* - Delivers the sector size + Delivers the sector size. The register has been either loaded from the + sector header (floppy / generic HD) or from register A (PC-AT mode). For + the 9224, 512 bytes is returned when TYPE_ST was selected. */ -int hdc92x4_device::calc_sector_size() +int hdc92x4_device::sector_size() { - return 128 << (m_register_r[CURRENT_SIZE] & 3); + // TYPE_AT: + // CURRENT_HEAD + // x S S x x x x x, where SS =0 (256), =1 (512), =2(1024), =3 (128) + if (m_selected_drive_type==TYPE_AT) + return 128 << (((m_register_r[CURRENT_HEAD] >> 5) + 1) & 0x03); + else + { + if (m_selected_drive_type==TYPE_ST) + return 512; + else + return 128 << (m_register_r[CURRENT_SIZE] & 7); + } } // =========================================================================== @@ -1006,7 +1154,7 @@ void hdc92x4_device::data_transfer(int& cont) (m_register_w[DMA15_8] & 0xff) << 8 | (m_register_w[DMA7_0] & 0xff); - dma_address = (dma_address + calc_sector_size()) & 0xffffff; + dma_address = (dma_address + sector_size()) & 0xffffff; m_register_w[DMA23_16] = m_register_r[DMA23_16] = (dma_address & 0xff0000) >> 16; m_register_w[DMA15_8] = m_register_r[DMA15_8] = (dma_address & 0x00ff00) >> 8; @@ -1049,7 +1197,7 @@ void hdc92x4_device::data_transfer(int& cont) (m_register_w[DMA15_8] & 0xff) << 8 | (m_register_w[DMA7_0] & 0xff); - dma_address = (dma_address + calc_sector_size()) & 0xffffff; + dma_address = (dma_address + sector_size()) & 0xffffff; m_register_w[DMA23_16] = m_register_r[DMA23_16] = (dma_address & 0xff0000) >> 16; m_register_w[DMA15_8] = m_register_r[DMA15_8] = (dma_address & 0x00ff00) >> 8; @@ -1087,6 +1235,56 @@ void hdc92x4_device::data_transfer(int& cont) } } +/* + Presets the CRC register, depending on the flag in the Interrupt/Command + Termination Register. + If this flag is set to 0, the CRC calculation is preset with 0, which + means that only media with the same setting will be readable (all others + will yield CRC errors). + This method simply provides preset values for some particular situations. + When value=0, the CRC is preset to 0 or FFFF. Other defined values are: + a1 = data value of MFM IDAM + a1a1a1 = all three a1s + fe = data value of FM IDAM + f56a = cell pattern of f8 (DAM, FM) + f56b = cell pattern of f9 (DAM, FM) + f56e = cell pattern of fa (DAM, FM) + f56f = cell pattern of fb (DAM, FM) +*/ +void hdc92x4_device::preset_crc(live_info& live, int value) +{ + if ((m_register_w[INT_COMM_TERM] & 0x80)!=0) + { + // Preset -1 + switch (value) + { + case 0xa1: live.crc = 0x443b; break; + case 0xfe: live.crc = 0xef21; break; + case 0xf56a: live.crc = 0x8fe7; break; // F8 + case 0xf56b: live.crc = 0x9fc6; break; // F9 + case 0xf56e: live.crc = 0xafa5; break; // FA + case 0xf56f: live.crc = 0xbf84; break; // FB + case 0xa1a1a1: live.crc = 0xcdb4; break; // A1A1A1 + default: live.crc = 0xffff; break; + } + } + else + { + // Preset 0 + switch (value) + { + case 0xa1: live.crc = 0xc1a9; break; + case 0xfe: live.crc = 0x736d; break; + case 0xf56a: live.crc = 0x6e17; break; // F8 + case 0xf56b: live.crc = 0x7e36; break; // F9 + case 0xf56e: live.crc = 0x4e55; break; // FA + case 0xf56f: live.crc = 0x5e74; break; // FB + case 0xa1a1a1: live.crc = 0x0128; break; // A1A1A1 + default: live.crc = 0x0000; break; + } + } +}; + // =========================================================================== // Commands // =========================================================================== @@ -1954,7 +2152,7 @@ void hdc92x4_device::live_start(int state) m_live_state.next_state = -1; m_live_state.shift_reg = 0; - m_live_state.crc = 0xffff; + preset_crc(m_live_state, 0); m_live_state.bit_counter = 0; m_live_state.byte_counter = 0; m_live_state.data_separator_phase = false; @@ -2063,7 +2261,7 @@ void hdc92x4_device::live_run_until(attotime limit) if (m_live_state.shift_reg == 0x4489) { if (TRACE_LIVE) logerror("%s: [%s live] Found an A1 mark\n", tag(),tts(m_live_state.time).c_str()); - m_live_state.crc = 0x443b; + preset_crc(m_live_state, 0xa1); m_live_state.data_separator_phase = false; m_live_state.bit_counter = 0; // Next task: find the next two A1 marks @@ -2076,7 +2274,7 @@ void hdc92x4_device::live_run_until(attotime limit) if (m_live_state.shift_reg == 0xf57e) { if (TRACE_LIVE) logerror("%s: SEARCH_IDAM: IDAM found\n", tag()); - m_live_state.crc = 0xef21; + preset_crc(m_live_state, 0xfe); m_live_state.data_separator_phase = false; m_live_state.bit_counter = 0; m_live_state.state = READ_ID_FIELDS_INTO_REGS; @@ -2174,11 +2372,9 @@ void hdc92x4_device::live_run_until(attotime limit) if (TRACE_LIVE) logerror("%s: slot %d = %02x, crc=%04x\n", tag(), slot, m_live_state.data_reg, m_live_state.crc); - // The id_field is an array of indexes into the chip registers. - // Thus we get the values properly assigned to the registers. - m_register_r[id_field[slot]] = m_live_state.data_reg; + m_register_r[register_number(slot)] = m_live_state.data_reg; - if(slot > 4) + if (slot > 4) // this includes both CRC bytes. There are no different lengths for the floppy headers (excluding the ident byte) { // We successfully read the ID fields; let's wait for the machine time to catch up. if (reading_track()) @@ -2222,7 +2418,7 @@ void hdc92x4_device::live_run_until(attotime limit) if (m_live_state.bit_counter >= 28*16 && m_live_state.shift_reg == 0x4489) { if (TRACE_LIVE) logerror("%s: [%s live] Found an A1 mark\n", tag(),tts(m_live_state.time).c_str()); - m_live_state.crc = 0x443b; + preset_crc(m_live_state, 0xa1); m_live_state.data_separator_phase = false; m_live_state.bit_counter = 0; m_live_state.state = READ_TWO_MORE_A1_DAM; @@ -2240,11 +2436,7 @@ void hdc92x4_device::live_run_until(attotime limit) if (m_live_state.bit_counter >= 11*16 && (m_live_state.shift_reg == 0xf56a || m_live_state.shift_reg == 0xf56b || m_live_state.shift_reg == 0xf56e || m_live_state.shift_reg == 0xf56f)) { if (TRACE_LIVE) logerror("%s: SEARCH_DAM: found DAM = %04x\n", tag(), m_live_state.shift_reg); - m_live_state.crc = - m_live_state.shift_reg == 0xf56a ? 0x8fe7 : - m_live_state.shift_reg == 0xf56b ? 0x9fc6 : - m_live_state.shift_reg == 0xf56e ? 0xafa5 : - 0xbf84; + preset_crc(m_live_state, m_live_state.shift_reg); m_live_state.data_separator_phase = false; m_live_state.bit_counter = 0; m_live_state.state = READ_SECTOR_DATA; @@ -2342,16 +2534,16 @@ void hdc92x4_device::live_run_until(attotime limit) if (TRACE_LIVE) logerror("%s: [%s live] Found data value %02X, CRC=%04x\n", tag(),tts(m_live_state.time).c_str(), m_live_state.data_reg, m_live_state.crc); int slot = (m_live_state.bit_counter >> 4)-1; - if (slot < calc_sector_size()) + if (slot < sector_size()) { // Sector data wait_for_realtime(READ_SECTOR_DATA_CONT); return; } - else if (slot < calc_sector_size()+2) + else if (slot < sector_size()+2) { // CRC - if (slot == calc_sector_size()+1) + if (slot == sector_size()+1) { if (reading_track()) { @@ -2395,7 +2587,7 @@ void hdc92x4_device::live_run_until(attotime limit) m_out_dma(0, m_register_r[DATA], 0xff); // And again, for floppies, clear line after writing each byte, for hard disk, only after the last byte - if (using_floppy() || (m_live_state.bit_counter >> 4)==calc_sector_size()-1) + if (using_floppy() || (m_live_state.bit_counter >> 4)==sector_size()-1) { m_out_dip(CLEAR_LINE); m_out_dmarq(CLEAR_LINE); @@ -2441,7 +2633,7 @@ void hdc92x4_device::live_run_until(attotime limit) if (fm_mode()) { // Init the CRC for the DAM and sector - m_live_state.crc = 0xffff; + preset_crc(m_live_state, 0); // 1111 0101 0110 1010 = F8 deleted // 1111 0101 0110 1111 = FB normal @@ -2450,10 +2642,10 @@ void hdc92x4_device::live_run_until(attotime limit) else { // Init the CRC for the ident byte and sector - m_live_state.crc = 0xcdb4; // value for 3*A1 + preset_crc(m_live_state, 0xa1a1a1); write_on_track(encode(m_deleted? 0xf8 : 0xfb), 1, WRITE_SECDATA); } - m_live_state.byte_counter = calc_sector_size(); + m_live_state.byte_counter = sector_size(); // Set the over/underrun flag and hope that it will be cleared before we start writing // (only for sector writing) @@ -2476,7 +2668,7 @@ void hdc92x4_device::live_run_until(attotime limit) else { // For floppies, set this for each byte; for hard disk, set it only at the beginning - if (using_floppy() || m_live_state.byte_counter == calc_sector_size()) + if (using_floppy() || m_live_state.byte_counter == sector_size()) m_out_dip(ASSERT_LINE); m_register_r[DATA] = m_register_w[DATA] = m_in_dma(0, 0xff); @@ -2624,7 +2816,7 @@ void hdc92x4_device::live_run_until(attotime limit) write_on_track(0x4489, 3, WRITE_HEADER); m_live_state.byte_counter = 5; } - m_live_state.crc = 0xffff; + preset_crc(m_live_state, 0); break; case WRITE_HEADER: @@ -2721,8 +2913,8 @@ void hdc92x4_device::live_run_until(attotime limit) m_out_dip(ASSERT_LINE); // Write the header via DMA - for (auto & elem : id_field) - m_out_dma(0, m_register_r[elem], 0xff); + for (int i=0; i < header_length(); i++) + m_out_dma(0, m_register_r[register_number(i)], 0xff); m_out_dip(CLEAR_LINE); m_out_dmarq(CLEAR_LINE); @@ -2877,7 +3069,7 @@ void hdc92x4_device::live_run_hd_until(attotime limit) if (found_mark(SEARCH_IDAM)) { if (TRACE_LIVE) logerror("%s: [%s live] Found an A1 mark\n", tag(), tts(m_live_state.time).c_str()); - m_live_state.crc = 0x443b; + preset_crc(m_live_state, 0xa1); m_live_state.data_separator_phase = false; m_live_state.bit_counter = 0; @@ -2934,7 +3126,7 @@ void hdc92x4_device::live_run_hd_until(attotime limit) if (m_live_state.bit_counter & 15) break; if (TRACE_LIVE) logerror("%s: slot %d = %02x, crc=%04x\n", tag(), slot, m_live_state.data_reg, m_live_state.crc); - m_register_r[id_field[slot++]] = m_live_state.data_reg; + m_register_r[register_number(slot++)] = m_live_state.data_reg; if(slot > 5) { @@ -2972,7 +3164,7 @@ void hdc92x4_device::live_run_hd_until(attotime limit) if (found_mark(SEARCH_DAM)) { if (TRACE_LIVE) logerror("%s: [%s live] Found an A1 mark\n", tag(),tts(m_live_state.time).c_str()); - m_live_state.crc = 0x443b; + preset_crc(m_live_state, 0xa1); m_live_state.data_separator_phase = false; m_live_state.bit_counter = 0; m_live_state.state = READ_DATADEL_FLAG; @@ -3030,9 +3222,9 @@ void hdc92x4_device::live_run_hd_until(attotime limit) if (m_live_state.bit_counter & 15) break; slot = (m_live_state.bit_counter >> 4)-1; - if (TRACE_LIVE) logerror("%s: [%s live] Found data value [%d/%d] = %02X, CRC=%04x\n", tag(),tts(m_live_state.time).c_str(), slot, calc_sector_size(), m_live_state.data_reg, m_live_state.crc); + if (TRACE_LIVE) logerror("%s: [%s live] Found data value [%d/%d] = %02X, CRC=%04x\n", tag(),tts(m_live_state.time).c_str(), slot, sector_size(), m_live_state.data_reg, m_live_state.crc); - if (slot < calc_sector_size()) + if (slot < sector_size()) { // For the first byte, allow for the DMA acknowledge to be set. if (slot == 0) @@ -3042,10 +3234,10 @@ void hdc92x4_device::live_run_hd_until(attotime limit) } else m_live_state.state = READ_SECTOR_DATA_CONT; } - else if (slot < calc_sector_size()+2) + else if (slot < sector_size()+2) { // CRC - if (slot == calc_sector_size()+1) + if (slot == sector_size()+1) { m_out_dip(CLEAR_LINE); m_out_dmarq(CLEAR_LINE); @@ -3176,11 +3368,11 @@ void hdc92x4_device::live_run_hd_until(attotime limit) if (TRACE_WRITE && TRACE_DETAIL) logerror("%s: Write data mark\n", tag()); // Init the CRC for the ident byte and sector - m_live_state.crc = 0x443b; // value for 1*A1 + preset_crc(m_live_state, 0xa1); // only one A1 write_on_track(encode_hd(m_deleted? 0xf8 : 0xfb), 1, WRITE_SECDATA); - m_live_state.byte_counter = calc_sector_size(); + m_live_state.byte_counter = sector_size(); // Set the over/underrun flag and hope that it will be cleared before we start writing // (only for sector writing) @@ -3204,8 +3396,8 @@ void hdc92x4_device::live_run_hd_until(attotime limit) { if (TRACE_WRITE && TRACE_DETAIL) logerror("%s: Write sector byte, %d to go\n", tag(), m_live_state.byte_counter); - // For floppies, set this for each byte; for hard disk, set it only at the beginning - if (m_live_state.byte_counter == calc_sector_size()) + // This is hard disk, so set DIP only at the beginning + if (m_live_state.byte_counter == sector_size()) m_out_dip(ASSERT_LINE); m_register_r[DATA] = m_register_w[DATA] = m_in_dma(0, 0xff); @@ -3296,8 +3488,8 @@ void hdc92x4_device::live_run_hd_until(attotime limit) m_out_dip(ASSERT_LINE); // Write the header via DMA - for (auto & elem : id_field) - m_out_dma(0, m_register_r[elem], 0xff); + for (int i=0; i < header_length(); i++) + m_out_dma(0, m_register_r[register_number(i)], 0xff); // Continue with reading the sector data m_live_state.state = SEARCH_DAM; @@ -3341,7 +3533,7 @@ void hdc92x4_device::live_run_hd_until(attotime limit) if (TRACE_HEADER) logerror("%s: Writing IDAM and header: ", tag()); write_on_track(encode_a1_hd(), 1, WRITE_HEADER); m_live_state.byte_counter = 5; // TODO: Check this for AT mode - m_live_state.crc = 0xffff; + preset_crc(m_live_state, 0); break; case WRITE_HEADER: @@ -3997,6 +4189,12 @@ void hdc92x4_device::process_command() // write are identical, so in that case we copy the contents if (m_register_pointer < DESIRED_HEAD) m_register_r[m_register_pointer] = m_regvalue; + // Note for the PC-AT mode: The DATA register contains two bits (5,4) + // that are defined as "Actual sector size" ([1] p. 7). The + // specification does not say anything about the meaning of these + // bits. The desired sector size is already specified by bits 6 and 5 + // of the DESIRED_HEAD register, so we ignore these bits for now. + // Autoincrement until DATA is reached. if (m_register_pointer < DATA) m_register_pointer++; } diff --git a/src/devices/machine/hdc92x4.h b/src/devices/machine/hdc92x4.h index fccf23666d7..fc862101919 100644 --- a/src/devices/machine/hdc92x4.h +++ b/src/devices/machine/hdc92x4.h @@ -232,6 +232,9 @@ protected: live_info m_live_state, m_checkpoint_state; int m_last_live_state; + // Presets CRC. + void preset_crc(live_info& live, int value); + // Starts the live run void live_start(int state); @@ -433,13 +436,19 @@ protected: UINT8 current_command(); // Step time (minus pulse width) - int step_time(); + virtual int step_time() =0; // Step pulse width int pulse_width(); - // Sector size as read from the track - int calc_sector_size(); + // Sector size as read from the track or given by register A (PC-AT mode) + int sector_size(); + + // Returns the sector header length + int header_length(); + + // Returns the index of the register for the header field + int register_number(int slot); // Is the currently selected drive a floppy drive? bool using_floppy(); @@ -476,12 +485,18 @@ class hdc9224_device : public hdc92x4_device { public: hdc9224_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + +protected: + int step_time() override; }; class hdc9234_device : public hdc92x4_device { public: hdc9234_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + +protected: + int step_time() override; }; #endif diff --git a/src/devices/machine/i80130.cpp b/src/devices/machine/i80130.cpp index fee62312f7e..83c840fa30d 100644 --- a/src/devices/machine/i80130.cpp +++ b/src/devices/machine/i80130.cpp @@ -87,7 +87,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *i80130_device::device_rom_region() const +const tiny_rom_entry *i80130_device::device_rom_region() const { return ROM_NAME( i80130 ); } diff --git a/src/devices/machine/i80130.h b/src/devices/machine/i80130.h index 1625fd8fc45..d5ef5800011 100644 --- a/src/devices/machine/i80130.h +++ b/src/devices/machine/i80130.h @@ -64,7 +64,7 @@ public: virtual DECLARE_ADDRESS_MAP(io_map, 16); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; UINT8 inta_r() { return m_pic->acknowledge(); } diff --git a/src/devices/machine/im6402.cpp b/src/devices/machine/im6402.cpp index f713a048517..4d3a7696b46 100644 --- a/src/devices/machine/im6402.cpp +++ b/src/devices/machine/im6402.cpp @@ -340,6 +340,9 @@ WRITE_LINE_MEMBER( im6402_device::crl_w ) else parity = PARITY_ODD; set_data_frame(1, data_bit_count, parity, stop_bits); + + receive_register_reset(); + transmit_register_reset(); } } diff --git a/src/devices/machine/keyboard.cpp b/src/devices/machine/keyboard.cpp index 3d62e53bfad..d244bfc4d32 100644 --- a/src/devices/machine/keyboard.cpp +++ b/src/devices/machine/keyboard.cpp @@ -190,15 +190,15 @@ INPUT_PORTS_START( generic_keyboard ) PORT_START("GENKBD_ROW2") PORT_BIT( 0x0001U, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x0002U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('Q') - PORT_BIT( 0x0004U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('W') - PORT_BIT( 0x0008U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('E') - PORT_BIT( 0x0010U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('R') - PORT_BIT( 0x0020U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('T') - PORT_BIT( 0x0040U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('Y') - PORT_BIT( 0x0080U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('U') - PORT_BIT( 0x0100U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('I') - PORT_BIT( 0x0200U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('O') + PORT_BIT( 0x0002U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') + PORT_BIT( 0x0004U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') + PORT_BIT( 0x0008U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') + PORT_BIT( 0x0010U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') + PORT_BIT( 0x0020U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') + PORT_BIT( 0x0040U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') + PORT_BIT( 0x0080U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') + PORT_BIT( 0x0100U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') + PORT_BIT( 0x0200U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') PORT_BIT( 0x0400U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CONDITION("GENKBD_CFG", 0x01, EQUALS, 0x00) PORT_CHAR(';') PORT_CHAR(':') PORT_BIT( 0x0400U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CONDITION("GENKBD_CFG", 0x01, EQUALS, 0x01) PORT_CHAR(';') PORT_CHAR('+') PORT_BIT( 0x0800U, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CONDITION("GENKBD_CFG", 0x01, EQUALS, 0x00) PORT_CHAR('\'') PORT_CHAR('"') diff --git a/src/devices/machine/ldp1000.cpp b/src/devices/machine/ldp1000.cpp index df211f56d5a..5e04009b1fa 100644 --- a/src/devices/machine/ldp1000.cpp +++ b/src/devices/machine/ldp1000.cpp @@ -82,7 +82,7 @@ void sony_ldp1000_device::device_reset() // ROM region definitions //------------------------------------------------- -const rom_entry *sony_ldp1000_device::device_rom_region() const +const tiny_rom_entry *sony_ldp1000_device::device_rom_region() const { return ROM_NAME(ldp1000); } diff --git a/src/devices/machine/ldp1000.h b/src/devices/machine/ldp1000.h index e759442fa57..6d6f94a62c3 100644 --- a/src/devices/machine/ldp1000.h +++ b/src/devices/machine/ldp1000.h @@ -45,7 +45,7 @@ protected: virtual void device_validity_check(validity_checker &valid) const override; virtual void device_start() override; virtual void device_reset() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override; virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override; diff --git a/src/devices/machine/ldp1450.cpp b/src/devices/machine/ldp1450.cpp new file mode 100644 index 00000000000..477d3e3421b --- /dev/null +++ b/src/devices/machine/ldp1450.cpp @@ -0,0 +1,355 @@ +// license:BSD-3-Clause +/*************************************************************************** + + Sony LDP-1450 laserdisc emulation. + + TODO: + - Dump MCU BIOS(more than one?) + - Many players support this command set, split out other device stubs (such as LDP-1550P, PAL) + - Text overlay (needed for practically everything) +***************************************************************************/ + +#include "emu.h" +#include "machine/ldp1450.h" + +#define DUMP_BCD 1 +#define FIFO_MAX 0x10 + +#define LDP_STAT_UNDEF 0x00 +#define LDP_STAT_COMPLETION 0x01 +#define LDP_STAT_ERROR 0x02 +#define LDP_STAT_PGM_END 0x04 +#define LDP_STAT_NOT_TARGET 0x05 +#define LDP_STAT_NO_FRAME 0x06 +#define LDP_STAT_ACK 0x0a +#define LDP_STAT_NAK 0x0b + +ROM_START( ldp1450 ) + ROM_REGION( 0x2000, "ldp1450", 0 ) + ROM_LOAD( "ldp1450_bios.bin", 0x0000, 0x2000, NO_DUMP ) +ROM_END + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +// device type definition +const device_type SONY_LDP1450 = &device_creator; + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// ldp1450_device - constructor +//------------------------------------------------- + +sony_ldp1450_device::sony_ldp1450_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : laserdisc_device(mconfig, SONY_LDP1450, "Sony LDP-1450", tag, owner, clock, "ldp1450", __FILE__) +{ +} + + +//------------------------------------------------- +// device_validity_check - perform validity checks +// on this device +//------------------------------------------------- + +void sony_ldp1450_device::device_validity_check(validity_checker &valid) const +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void sony_ldp1450_device::device_start() +{ + laserdisc_device::device_start(); +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void sony_ldp1450_device::device_reset() +{ + laserdisc_device::device_reset(); + + for(int i=0;i<0x10;i++) + m_internal_bcd[i] = 0; + + m_ld_input_state = LD_INPUT_GET_COMMAND; + m_ld_command_current_byte = m_ld_command_total_bytes = 0; + m_ld_frame_index = 0; + +} + +//------------------------------------------------- +// device_rom_region - return a pointer to our +// ROM region definitions +//------------------------------------------------- + +const tiny_rom_entry *sony_ldp1450_device::device_rom_region() const +{ + return ROM_NAME(ldp1450); +} + + +//------------------------------------------------- +// player_vsync - VSYNC callback, called at the +// start of the blanking period +//------------------------------------------------- + +void sony_ldp1450_device::player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) +{ + //printf("%d vsync\n",fieldnum); +} + + +//------------------------------------------------- +// player_update - update callback, called on +// the first visible line of the frame +//------------------------------------------------- + +INT32 sony_ldp1450_device::player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) +{ + //printf("%d update\n",fieldnum); + + return fieldnum; +} + + +//************************************************************************** +// READ/WRITE HANDLERS +//************************************************************************** + +void sony_ldp1450_device::set_new_player_state(ldp1450_player_state which) +{ + m_player_state = which; + m_index_state = 0; +} + +void sony_ldp1450_device::set_new_player_bcd(UINT8 data) +{ + printf("Frame data BCD %02x\n",data); + + m_internal_bcd[m_index_state] = data; + m_index_state ++; + if(m_index_state >= FIFO_MAX) + throw emu_fatalerror("FIFO MAX reached"); + + m_status = LDP_STAT_ACK; +} + +UINT32 sony_ldp1450_device::bcd_to_raw() +{ + UINT32 res = 0; + for(int i=0;i<6;i++) + res |= (m_internal_bcd[i] & 0xf) << i*4; + return res; +} + +void sony_ldp1450_device::exec_enter_cmd() +{ + const UINT32 saved_frame = bcd_to_raw(); + + switch(m_player_state) + { + case player_standby: + throw emu_fatalerror("Unimplemented standby state detected"); + + case player_search: + // TODO: move to timer + advance_slider(1); + set_slider_speed(saved_frame); + break; + + default: + //not handling all states yet + break; + } + m_player_state = player_standby; +} + +void sony_ldp1450_device::command_w(UINT8 data) +{ + printf("CMD %02x\n",data); + m_command = data; + + if((m_command & 0xf0) == 0x30 && (m_command & 0xf) < 0x0a) + { + set_new_player_bcd(data); + return; + } + + switch(m_command) + { + + case 0x00: /* text handling (start gotoxy) */ + if ( m_ld_input_state == LD_INPUT_TEXT_COMMAND ) + { + m_ld_input_state = LD_INPUT_TEXT_GET_X; + } + break; + case 0x01: /* text handling (end of text)*/ + if ( m_ld_input_state == LD_INPUT_TEXT_COMMAND ) + { + m_ld_input_state = LD_INPUT_TEXT_GET_STRING; + } + break; + case 0x02: /* text 'set window' command */ + if ( m_ld_input_state == LD_INPUT_TEXT_COMMAND ) + { + m_ld_input_state = LD_INPUT_TEXT_GET_SET_WINDOW; + } + break; + case 0x1a: /* text sent */ + break; + case 0x24: /* Audio On */ + m_status = LDP_STAT_ACK; + break; + case 0x25: /* Audio Off */ + m_status = LDP_STAT_ACK; + break; + case 0x26: /* Video off */ + printf("Video OFF \n"); + m_status = LDP_STAT_ACK; + break; + case 0x27: /* Video on */ + printf("Video ON \n"); + m_status = LDP_STAT_ACK; + break; + case 0x28: /* Stop Codes Enable */ + printf("Stop Code ON \n"); + break; + case 0x29: /* Stop Codes Disable */ + printf("Stop Code OFF \n"); + break; + case 0x2a: /* Eject */ + break; + case 0x2b: /* Step forward */ + break; + case 0x2c: /* Step reverse */ + break; + //30 to 39 handled separately, as they are the frame commands + case 0x3a: /* Play (answer should have delay) */ + printf("play\n"); + set_new_player_state(player_play); + m_status = LDP_STAT_ACK; + break; + case 0x3b: /* Play fast */ + break; + case 0x3c: /* Play slow */ + break; + case 0x3d: /* Play step */ + break; + case 0x3e: /* Play scan */ + break; + case 0x3f: /* Stop */ + printf("stop\n"); + set_new_player_state(player_stop); + m_status = LDP_STAT_ACK; + break; + + case 0x40: // enter, process BCD command + printf("CMD Enter\n"); + exec_enter_cmd(); + m_status = LDP_STAT_ACK; + break; + case 0x41: /* CE */ + break; + + case 0x43: // search + printf("Search \n"); + set_new_player_state(player_search); + m_status = LDP_STAT_ACK; + break; + + case 0x44: // repeat play + printf("CMD Repeat\n"); + set_new_player_state(player_repeat); + m_status = LDP_STAT_ACK; + break; + + /* + audio channels absolute enable / disable + ---- --x- select channel + ---- ---x enable channel (active low) + */ + case 0x46: + case 0x47: + case 0x48: + case 0x49: + printf("Audio channel %x\n",(m_command & 2) >> 1); + printf("Audio status %x\n",(m_command & 1) == 0); + m_audio_enable[(m_command & 2) >> 1] = (m_command & 1) == 0; + m_status = LDP_STAT_ACK; + break; + case 0x4a: /* Play reverse(answer should have delay) */ + printf("play reverse\n"); + break; + case 0x4b: /* Play rev fast */ + break; + case 0x4c: /* Play rev slow */ + break; + case 0x4d: /* Play rev step */ + break; + case 0x4e: /* Play rev scan */ + break; + + case 0x4f: /* Still (not implemented)*/ + if (m_player_state == player_stop) + { + m_status = LDP_STAT_NAK; + } + else + { + m_status = LDP_STAT_ACK; + } + break; + case 0x55: /* 'frame mode' (unknown function) */ + break; + + case 0x56: // Clear All + if (m_player_state == player_search) + { + printf("clear all\n"); + + set_new_player_state(player_search_clr); + } + + m_status = LDP_STAT_ACK; + // reset any pending operation here + break; + + case 0x60: /* Addr Inq (get current frame number) */ + for (UINT8 & elem : m_internal_bcd) + { + printf("Return frame %02x\n",elem); + m_status = elem; + } + break; + case 0x62: /* Motor on */ + break; + case 0x6e: // CX enable - anything use it? + break; + + case 0x80: /* text start */ + printf("CMD Start text\n"); + m_ld_input_state = LD_INPUT_TEXT_COMMAND; + break; + case 0x81: /* Turn on text */ + break; + case 0x82: /* Turn off text */ + break; + + default: + m_status = LDP_STAT_UNDEF; + break; + } + return; +} diff --git a/src/devices/machine/ldp1450.h b/src/devices/machine/ldp1450.h new file mode 100644 index 00000000000..0cc7291c5ec --- /dev/null +++ b/src/devices/machine/ldp1450.h @@ -0,0 +1,104 @@ +// license:BSD-3-Clause +/*************************************************************************** + + Sony LDP-1450 laserdisc emulation. + +***************************************************************************/ + +#pragma once + +#ifndef __LDP1450DEV_H__ +#define __LDP1450DEV_H__ + +#include "laserdsc.h" + + +//************************************************************************** +// INTERFACE CONFIGURATION MACROS +//************************************************************************** + +#define MCFG_LASERDISC_LDP1450_ADD(_tag, clock) \ + MCFG_DEVICE_ADD(_tag, SONY_LDP1450, clock) + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// device type definition +extern const device_type SONY_LDP1450; + +// ======================> sony_ldp1450_device + +class sony_ldp1450_device : public laserdisc_device +{ +public: + // construction/destruction + sony_ldp1450_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // I/O operations TODO: both actually protected + void command_w(UINT8 data); + UINT8 status_r() const { return m_status; } + +protected: + // device-level overrides + virtual void device_validity_check(validity_checker &valid) const override; + virtual void device_start() override; + virtual void device_reset() override; + virtual const tiny_rom_entry *device_rom_region() const override; + + virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override; + virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override; + virtual void player_overlay(bitmap_yuy16 &bitmap) override { } + + UINT8 m_ld_frame_index; + UINT8 m_ld_frame[5]; + UINT8 m_ld_command_current_byte; + UINT8 m_ld_command_to_send[5]; + UINT8 m_ld_command_total_bytes; + + enum LD_INPUT_STATE + { + LD_INPUT_GET_COMMAND = 0, + LD_INPUT_TEXT_COMMAND, + LD_INPUT_TEXT_GET_X, + LD_INPUT_TEXT_GET_Y, + LD_INPUT_TEXT_GET_MODE, + LD_INPUT_TEXT_GET_STRING, + LD_INPUT_TEXT_GET_SET_WINDOW + } m_ld_input_state; + + enum ldp1450_player_state { + player_standby = 0, + player_search, + player_search_clr, + player_play, + player_stop, + player_repeat + }; + +private: + UINT8 m_command; + UINT8 m_status; + ldp1450_player_state m_player_state; + bool m_audio_enable[2]; + void set_new_player_state(ldp1450_player_state which); + void set_new_player_bcd(UINT8 data); + UINT32 bcd_to_raw(); + void exec_enter_cmd(); + UINT8 m_internal_bcd[0x10]; + UINT8 m_index_state; + +}; + + + + + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + + + +#endif diff --git a/src/devices/machine/ldpr8210.cpp b/src/devices/machine/ldpr8210.cpp index 17b02edf276..12518a3ded9 100644 --- a/src/devices/machine/ldpr8210.cpp +++ b/src/devices/machine/ldpr8210.cpp @@ -385,7 +385,7 @@ void pioneer_pr8210_device::device_timer(emu_timer &timer, device_timer_id id, i // ROM region definitions //------------------------------------------------- -const rom_entry *pioneer_pr8210_device::device_rom_region() const +const tiny_rom_entry *pioneer_pr8210_device::device_rom_region() const { return ROM_NAME(pr8210); } @@ -1018,7 +1018,7 @@ void simutrek_special_device::device_timer(emu_timer &timer, device_timer_id id, // ROM region definitions //------------------------------------------------- -const rom_entry *simutrek_special_device::device_rom_region() const +const tiny_rom_entry *simutrek_special_device::device_rom_region() const { return ROM_NAME(simutrek); } diff --git a/src/devices/machine/ldpr8210.h b/src/devices/machine/ldpr8210.h index 7418df3336d..3cca97ce7b7 100644 --- a/src/devices/machine/ldpr8210.h +++ b/src/devices/machine/ldpr8210.h @@ -83,7 +83,7 @@ protected: virtual void device_start() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; // subclass overrides @@ -164,7 +164,7 @@ protected: virtual void device_start() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; // internal helpers diff --git a/src/devices/machine/ldstub.cpp b/src/devices/machine/ldstub.cpp index 14dd42fdc2b..7c9e0cb0033 100644 --- a/src/devices/machine/ldstub.cpp +++ b/src/devices/machine/ldstub.cpp @@ -17,6 +17,5 @@ //************************************************************************** // device type definition -const device_type SONY_LDP1450 = &device_creator; const device_type PIONEER_PR7820 = &device_creator; const device_type PHILLIPS_22VP932 = &device_creator; diff --git a/src/devices/machine/ldstub.h b/src/devices/machine/ldstub.h index ee49e382583..e7ffe1898cd 100644 --- a/src/devices/machine/ldstub.h +++ b/src/devices/machine/ldstub.h @@ -20,8 +20,6 @@ // DEVICE CONFIGURATION MACROS //************************************************************************** -#define MCFG_LASERDISC_LDP1450_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, SONY_LDP1450, 0) #define MCFG_LASERDISC_PR7820_ADD(_tag) \ MCFG_DEVICE_ADD(_tag, PIONEER_PR7820, 0) #define MCFG_LASERDISC_22VP932_ADD(_tag) \ @@ -33,7 +31,6 @@ //************************************************************************** // device type definition -extern const device_type SONY_LDP1450; extern const device_type PIONEER_PR7820; extern const device_type PHILLIPS_22VP932; @@ -43,28 +40,6 @@ extern const device_type PHILLIPS_22VP932; // TYPE DEFINITIONS //************************************************************************** -// ======================> sony_ldp1450_device - -class sony_ldp1450_device : public laserdisc_device -{ -public: - // construction/destruction - sony_ldp1450_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : laserdisc_device(mconfig, SONY_LDP1450, "Sony LDP-1450", tag, owner, clock, "ldp1450", __FILE__) { } - - // input/output - UINT8 data_available_r() { return CLEAR_LINE; } - UINT8 data_r() { return 0; } - void data_w(UINT8 data) { } - -protected: - // subclass overrides - virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override { } - virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override { return fieldnum; } - virtual void player_overlay(bitmap_yuy16 &bitmap) override { } -}; - - // ======================> pioneer_pr7820_device class pioneer_pr7820_device : public laserdisc_device diff --git a/src/devices/machine/ldv1000.cpp b/src/devices/machine/ldv1000.cpp index fb4cec974dd..81947c2b73f 100644 --- a/src/devices/machine/ldv1000.cpp +++ b/src/devices/machine/ldv1000.cpp @@ -282,7 +282,7 @@ void pioneer_ldv1000_device::device_timer(emu_timer &timer, device_timer_id id, // ROM region definitions //------------------------------------------------- -const rom_entry *pioneer_ldv1000_device::device_rom_region() const +const tiny_rom_entry *pioneer_ldv1000_device::device_rom_region() const { return ROM_NAME(ldv1000); } diff --git a/src/devices/machine/ldv1000.h b/src/devices/machine/ldv1000.h index 36f84f096a1..0ea017d4214 100644 --- a/src/devices/machine/ldv1000.h +++ b/src/devices/machine/ldv1000.h @@ -75,7 +75,7 @@ protected: virtual void device_start() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; // subclass overrides diff --git a/src/devices/machine/ldvp931.cpp b/src/devices/machine/ldvp931.cpp index 716728b638b..712f70c2b2e 100644 --- a/src/devices/machine/ldvp931.cpp +++ b/src/devices/machine/ldvp931.cpp @@ -285,7 +285,7 @@ void phillips_22vp931_device::device_timer(emu_timer &timer, device_timer_id id, // ROM region definitions //------------------------------------------------- -const rom_entry *phillips_22vp931_device::device_rom_region() const +const tiny_rom_entry *phillips_22vp931_device::device_rom_region() const { return ROM_NAME(vp931); } diff --git a/src/devices/machine/ldvp931.h b/src/devices/machine/ldvp931.h index 8acd7ebf6bd..b35fa988039 100644 --- a/src/devices/machine/ldvp931.h +++ b/src/devices/machine/ldvp931.h @@ -76,7 +76,7 @@ protected: virtual void device_start() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; // subclass overrides diff --git a/src/devices/machine/mpu401.cpp b/src/devices/machine/mpu401.cpp index 98e4bb90b76..1dcbf1233f3 100644 --- a/src/devices/machine/mpu401.cpp +++ b/src/devices/machine/mpu401.cpp @@ -106,7 +106,7 @@ machine_config_constructor mpu401_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *mpu401_device::device_rom_region() const +const tiny_rom_entry *mpu401_device::device_rom_region() const { return ROM_NAME( mpu401 ); } diff --git a/src/devices/machine/mpu401.h b/src/devices/machine/mpu401.h index 4d3b8347eda..899ba727822 100644 --- a/src/devices/machine/mpu401.h +++ b/src/devices/machine/mpu401.h @@ -55,7 +55,7 @@ protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; private: diff --git a/src/devices/machine/nmc9306.cpp b/src/devices/machine/nmc9306.cpp index 0b23eda21d7..85580a6a621 100644 --- a/src/devices/machine/nmc9306.cpp +++ b/src/devices/machine/nmc9306.cpp @@ -15,7 +15,7 @@ // MACROS / CONSTANTS //************************************************************************** -#define LOG 1 +#define LOG 0 #define RAM_SIZE 32 diff --git a/src/devices/machine/pckeybrd.cpp b/src/devices/machine/pckeybrd.cpp index 0650fc8cea3..122677cfc64 100644 --- a/src/devices/machine/pckeybrd.cpp +++ b/src/devices/machine/pckeybrd.cpp @@ -528,35 +528,35 @@ UINT32 pc_keyboard_device::readport(int port) switch(port) { case 0: - if(m_ioport_0) + if (m_ioport_0.found()) result = m_ioport_0->read(); break; case 1: - if(m_ioport_1) + if (m_ioport_1.found()) result = m_ioport_1->read(); break; case 2: - if(m_ioport_2) + if (m_ioport_2.found()) result = m_ioport_2->read(); break; case 3: - if(m_ioport_3) + if (m_ioport_3.found()) result = m_ioport_3->read(); break; case 4: - if(m_ioport_4) + if (m_ioport_4.found()) result = m_ioport_4->read(); break; case 5: - if(m_ioport_5) + if (m_ioport_5.found()) result = m_ioport_5->read(); break; case 6: - if(m_ioport_6) + if (m_ioport_6.found()) result = m_ioport_6->read(); break; case 7: - if(m_ioport_7) + if (m_ioport_7.found()) result = m_ioport_7->read(); break; } diff --git a/src/devices/machine/pdc.cpp b/src/devices/machine/pdc.cpp index f5a75d87f72..445aeae094b 100644 --- a/src/devices/machine/pdc.cpp +++ b/src/devices/machine/pdc.cpp @@ -127,7 +127,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *pdc_device::device_rom_region() const +const tiny_rom_entry *pdc_device::device_rom_region() const { return ROM_NAME( pdc ); } diff --git a/src/devices/machine/pdc.h b/src/devices/machine/pdc.h index 1b3533af393..23cee250dcc 100644 --- a/src/devices/machine/pdc.h +++ b/src/devices/machine/pdc.h @@ -40,7 +40,7 @@ public: /* Optional information overrides */ virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; /* Callbacks */ template static devcb_base &m68k_r_callback(device_t &device, _Object object) { return downcast(device).m_m68k_r_cb.set_callback(object); } diff --git a/src/devices/machine/smartmed.h b/src/devices/machine/smartmed.h index 0b69fd05886..f1da965c4e9 100644 --- a/src/devices/machine/smartmed.h +++ b/src/devices/machine/smartmed.h @@ -8,6 +8,7 @@ #define __SMARTMEDIA_H__ #include "formats/imageutl.h" +#include "softlist_dev.h" //#define SMARTMEDIA_IMAGE_SAVE diff --git a/src/devices/machine/tms9902.cpp b/src/devices/machine/tms9902.cpp index 7702eeadf1d..424bcfdd821 100644 --- a/src/devices/machine/tms9902.cpp +++ b/src/devices/machine/tms9902.cpp @@ -135,7 +135,7 @@ void tms9902_device::rcv_cts(line_state state) else { m_DSCH = false; - if (TRACE_LINES) logerror("no change in CTS line, no interrupt."); + if (TRACE_LINES) logerror("no change in CTS line, no interrupt.\n"); } } @@ -165,7 +165,7 @@ void tms9902_device::rcv_dsr(line_state state) else { m_DSCH = false; - if (TRACE_LINES) logerror("no change in DSR line, no interrupt."); + if (TRACE_LINES) logerror("no change in DSR line, no interrupt.\n"); } } @@ -188,7 +188,7 @@ void tms9902_device::rcv_data(UINT8 data) // Receive buffer was empty m_RBRL = true; m_ROVER = false; - if (TRACE_BUFFER) logerror("Receive buffer loaded with byte %02x\n", data); + if (TRACE_BUFFER) logerror("Receive buffer loaded with byte %02x; RIENB=%d\n", data, m_RIENB); field_interrupts(); } else @@ -387,7 +387,7 @@ void tms9902_device::transmit_line_state() // The 9902 only outputs RTS and BRK if (TRACE_SETTING) logerror("transmitting line state (only RTS) = %02x\n", (m_RTSout)? 1:0); m_last_config_value = (m_RTSout)? RTS : 0; - m_ctrl_cb((offs_t)LINES, RTS); + m_ctrl_cb((offs_t)(LINES | RTS), RTS); } void tms9902_device::set_rts(line_state state) @@ -422,7 +422,6 @@ void tms9902_device::initiate_transmit() set_rts(CLEAR_LINE); else { - if (TRACE_BUFFER) logerror("transferring XBR to XSR; XSRE=false, XBRE=true\n"); m_XSR = m_XBR; m_XSRE = false; m_XBRE = true; @@ -502,10 +501,11 @@ READ8_MEMBER( tms9902_device::cruread ) break; case 0: // Bits 7-0 + if (TRACE_CRU) logerror("Reading received byte = %02x\n", m_RBR); answer = m_RBR; break; } - if (TRACE_CRU) logerror("Reading flag bits %d - %d = %02x\n", ((offset+1)*8-1), offset*8, answer); + if (TRACE_CRU && TRACE_DETAIL) logerror("Reading flag bits %d - %d = %02x\n", ((offset+1)*8-1), offset*8, answer); return answer; } @@ -560,7 +560,7 @@ void tms9902_device::reset_uart() m_DSCH = false; m_TIMELP = false; - m_CTSin = false; +// m_CTSin = false; // not a good idea - this is the latch of an incoming line m_TMR = 0; m_STOPB = 0; @@ -585,7 +585,7 @@ WRITE8_MEMBER( tms9902_device::cruwrite ) data &= 1; /* clear extra bits */ offset &= 0x1F; - if (TRACE_CRU) logerror("Setting bit %d = %02x\n", offset, data); + if (TRACE_CRU && TRACE_DETAIL) logerror("Setting bit %d = %02x\n", offset, data); if (offset <= 10) { @@ -777,7 +777,7 @@ WRITE8_MEMBER( tms9902_device::cruwrite ) // (the only way to clear the flag!) m_RIENB = (data!=0); m_RBRL = false; - if (TRACE_CRU) logerror("set RBRL=0, set RIENB=%d\n", data); + if (TRACE_CRU) logerror("Set RBRL=0, set RIENB=%d\n", data); field_interrupts(); return; case 19: @@ -828,6 +828,9 @@ void tms9902_device::device_stop() void tms9902_device::device_reset() { + // This must be true because we may have missed a CTS* assertion + // on startup, and the whole implementation relies on pushing + m_CTSin = true; reset_uart(); } diff --git a/src/devices/machine/wozfdc.cpp b/src/devices/machine/wozfdc.cpp index 6428aae26c6..d85b8110e82 100644 --- a/src/devices/machine/wozfdc.cpp +++ b/src/devices/machine/wozfdc.cpp @@ -35,7 +35,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *wozfdc_device::device_rom_region() const +const tiny_rom_entry *wozfdc_device::device_rom_region() const { return ROM_NAME( diskiing ); } diff --git a/src/devices/machine/wozfdc.h b/src/devices/machine/wozfdc.h index 75247f62c8b..99e4177c7fb 100644 --- a/src/devices/machine/wozfdc.h +++ b/src/devices/machine/wozfdc.h @@ -33,7 +33,7 @@ public: wozfdc_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); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(read); DECLARE_WRITE8_MEMBER(write); diff --git a/src/devices/sound/2608intf.cpp b/src/devices/sound/2608intf.cpp index 7c4a9d0739c..618a8aea4a8 100644 --- a/src/devices/sound/2608intf.cpp +++ b/src/devices/sound/2608intf.cpp @@ -226,7 +226,7 @@ ROM_START( ym2608 ) ROM_END -const rom_entry *ym2608_device::device_rom_region() const +const tiny_rom_entry *ym2608_device::device_rom_region() const { return ROM_NAME( ym2608 ); } diff --git a/src/devices/sound/2608intf.h b/src/devices/sound/2608intf.h index 0ec973b69ff..ea9f8a1cd4a 100644 --- a/src/devices/sound/2608intf.h +++ b/src/devices/sound/2608intf.h @@ -30,7 +30,7 @@ public: protected: // device-level overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_start() override; virtual void device_post_load() override; virtual void device_stop() override; diff --git a/src/devices/sound/bsmt2000.cpp b/src/devices/sound/bsmt2000.cpp index 00850252503..26df9eb080f 100644 --- a/src/devices/sound/bsmt2000.cpp +++ b/src/devices/sound/bsmt2000.cpp @@ -114,7 +114,7 @@ void bsmt2000_device::static_set_ready_callback(device_t &device, ready_callback // internal ROM region //------------------------------------------------- -const rom_entry *bsmt2000_device::device_rom_region() const +const tiny_rom_entry *bsmt2000_device::device_rom_region() const { return ROM_NAME( bsmt2000 ); } diff --git a/src/devices/sound/bsmt2000.h b/src/devices/sound/bsmt2000.h index befd8619d2d..41490230566 100644 --- a/src/devices/sound/bsmt2000.h +++ b/src/devices/sound/bsmt2000.h @@ -55,7 +55,7 @@ public: protected: // device-level overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/sound/pcd3311.cpp b/src/devices/sound/pcd3311.cpp new file mode 100644 index 00000000000..840cdb7ee2f --- /dev/null +++ b/src/devices/sound/pcd3311.cpp @@ -0,0 +1,56 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + PCD3311 DTMF/modem/musical tone generator emulation + +**********************************************************************/ + +#include "pcd3311.h" + + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type PCD3311 = &device_creator; + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// pcd3311_t - constructor +//------------------------------------------------- + +pcd3311_t::pcd3311_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, PCD3311, "PCD3311", tag, owner, clock, "pcd3311", __FILE__), + device_sound_interface(mconfig, *this) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void pcd3311_t::device_start() +{ + save_item(NAME(m_a0)); + save_item(NAME(m_mode)); + save_item(NAME(m_strobe)); + save_item(NAME(m_data)); +} + + +//------------------------------------------------- +// sound_stream_update - handle update requests for +// our sound stream +//------------------------------------------------- + +void pcd3311_t::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) +{ +} diff --git a/src/devices/sound/pcd3311.h b/src/devices/sound/pcd3311.h new file mode 100644 index 00000000000..2c50a0a987a --- /dev/null +++ b/src/devices/sound/pcd3311.h @@ -0,0 +1,67 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + PCD3311 DTMF/modem/musical tone generator emulation + +********************************************************************** + _____ _____ + OSCI 1 |* \_/ | 16 Vdd + OSCO 2 | | 15 Vss + MODE 3 | | 14 D4 + D5 4 | PCD3311T | 13 N/C + N/C 5 | | 12 D3 + STROBE 6 | | 11 D2 + TONE 7 | | 10 D1/SDA + A0 8 |_____________| 9 D0/SCL + +**********************************************************************/ + +#pragma once + +#ifndef __PCD3311__ +#define __PCD3311__ + +#include "emu.h" + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> pcd3311_t + +class pcd3311_t : public device_t, + public device_sound_interface +{ +public: + // construction/destruction + pcd3311_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + DECLARE_WRITE8_MEMBER( write ) { m_data = data; } + DECLARE_WRITE_LINE_MEMBER( strobe_w ) { m_strobe = state; } + DECLARE_WRITE_LINE_MEMBER( mode_w ) { m_mode = state; } + DECLARE_WRITE_LINE_MEMBER( a0_w ) { m_a0 = state; } + +protected: + // device-level overrides + virtual void device_start() override; + + // internal callbacks + virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override; + +private: + int m_a0; + int m_mode; + int m_strobe; + UINT8 m_data; +}; + + +// device type definition +extern const device_type PCD3311; + + + +#endif diff --git a/src/devices/sound/qs1000.cpp b/src/devices/sound/qs1000.cpp index edb717b0c6c..07a8fc1223e 100644 --- a/src/devices/sound/qs1000.cpp +++ b/src/devices/sound/qs1000.cpp @@ -205,7 +205,7 @@ qs1000_device::qs1000_device(const machine_config &mconfig, const char *tag, dev // rom_region - return a pointer to the device's // internal ROM region //------------------------------------------------- -const rom_entry *qs1000_device::device_rom_region() const +const tiny_rom_entry *qs1000_device::device_rom_region() const { return m_external_rom ? nullptr : ROM_NAME( qs1000 ); } diff --git a/src/devices/sound/qs1000.h b/src/devices/sound/qs1000.h index d94d964ed19..48545485169 100644 --- a/src/devices/sound/qs1000.h +++ b/src/devices/sound/qs1000.h @@ -76,7 +76,7 @@ public: protected: // device-level overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/sound/qsound.cpp b/src/devices/sound/qsound.cpp index cc5fc28560a..43bad4aa960 100644 --- a/src/devices/sound/qsound.cpp +++ b/src/devices/sound/qsound.cpp @@ -83,7 +83,7 @@ qsound_device::qsound_device(const machine_config &mconfig, const char *tag, dev // internal ROM region //------------------------------------------------- -const rom_entry *qsound_device::device_rom_region() const +const tiny_rom_entry *qsound_device::device_rom_region() const { return ROM_NAME( qsound ); } diff --git a/src/devices/sound/qsound.h b/src/devices/sound/qsound.h index cd90136238e..3b2e3d82c50 100644 --- a/src/devices/sound/qsound.h +++ b/src/devices/sound/qsound.h @@ -40,7 +40,7 @@ public: protected: // device-level overrides - const rom_entry *device_rom_region() const override; + const tiny_rom_entry *device_rom_region() const override; machine_config_constructor device_mconfig_additions() const override; virtual void device_start() override; diff --git a/src/devices/sound/votrax.cpp b/src/devices/sound/votrax.cpp index cfd512782c7..3ce91bf6de8 100644 --- a/src/devices/sound/votrax.cpp +++ b/src/devices/sound/votrax.cpp @@ -1124,7 +1124,7 @@ osd_printf_debug("[PH=%02X]\n", m_latch_80); // internal ROM region //------------------------------------------------- -const rom_entry *votrax_sc01_device::device_rom_region() const +const tiny_rom_entry *votrax_sc01_device::device_rom_region() const { return ROM_NAME( votrax_sc01 ); } diff --git a/src/devices/sound/votrax.h b/src/devices/sound/votrax.h index 471a42873f9..6c8a75763ca 100644 --- a/src/devices/sound/votrax.h +++ b/src/devices/sound/votrax.h @@ -46,7 +46,7 @@ public: protected: // device-level overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_start() override; virtual void device_reset() override; virtual void device_clock_changed() override; diff --git a/src/devices/video/ef9365.cpp b/src/devices/video/ef9365.cpp index d7277e82604..ae32d6a59c3 100644 --- a/src/devices/video/ef9365.cpp +++ b/src/devices/video/ef9365.cpp @@ -134,7 +134,7 @@ ROM_END // internal ROM region //------------------------------------------------- -const rom_entry *ef9365_device::device_rom_region() const +const tiny_rom_entry *ef9365_device::device_rom_region() const { return ROM_NAME( ef9365 ); } diff --git a/src/devices/video/ef9365.h b/src/devices/video/ef9365.h index 4e28f672b1f..2a75636ca0a 100644 --- a/src/devices/video/ef9365.h +++ b/src/devices/video/ef9365.h @@ -65,7 +65,7 @@ protected: virtual void device_start() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; // device_config_memory_interface overrides virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override; diff --git a/src/devices/video/hd44780.cpp b/src/devices/video/hd44780.cpp index ea6a63ca415..b793bb51089 100644 --- a/src/devices/video/hd44780.cpp +++ b/src/devices/video/hd44780.cpp @@ -69,7 +69,7 @@ ks0066_f05_device::ks0066_f05_device(const machine_config &mconfig, const char * // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *hd44780_device::device_rom_region() const +const tiny_rom_entry *hd44780_device::device_rom_region() const { switch (m_charset_type) { diff --git a/src/devices/video/hd44780.h b/src/devices/video/hd44780.h index 9e7ff763eac..2c6eec873b6 100644 --- a/src/devices/video/hd44780.h +++ b/src/devices/video/hd44780.h @@ -63,7 +63,7 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; // charset enum diff --git a/src/devices/video/hd61830.cpp b/src/devices/video/hd61830.cpp index d60354ef8a8..82b19051def 100644 --- a/src/devices/video/hd61830.cpp +++ b/src/devices/video/hd61830.cpp @@ -35,7 +35,7 @@ ROM_END // device_rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *hd61830_device::device_rom_region() const +const tiny_rom_entry *hd61830_device::device_rom_region() const { return ROM_NAME(hd61830); } diff --git a/src/devices/video/hd61830.h b/src/devices/video/hd61830.h index 5e060fe9539..18a2b2e5cc2 100644 --- a/src/devices/video/hd61830.h +++ b/src/devices/video/hd61830.h @@ -50,7 +50,7 @@ public: protected: // device-level overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_start() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; diff --git a/src/devices/video/hd63484.cpp b/src/devices/video/hd63484.cpp index 74f06cc734d..1c42ab62266 100644 --- a/src/devices/video/hd63484.cpp +++ b/src/devices/video/hd63484.cpp @@ -351,7 +351,7 @@ const address_space_config *hd63484_device::memory_space_config(address_spacenum // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *hd63484_device::device_rom_region() const +const tiny_rom_entry *hd63484_device::device_rom_region() const { return ROM_NAME( hd63484 ); } diff --git a/src/devices/video/hd63484.h b/src/devices/video/hd63484.h index 226a21f12d9..c2d927f96a7 100644 --- a/src/devices/video/hd63484.h +++ b/src/devices/video/hd63484.h @@ -63,7 +63,7 @@ public: DECLARE_READ8_MEMBER( data_r ); UINT32 update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override; protected: diff --git a/src/devices/video/m50458.cpp b/src/devices/video/m50458.cpp index 38e5eeb6e9a..25d3d04fba8 100644 --- a/src/devices/video/m50458.cpp +++ b/src/devices/video/m50458.cpp @@ -126,7 +126,7 @@ WRITE16_MEMBER( m50458_device::vreg_127_w) // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *m50458_device::device_rom_region() const +const tiny_rom_entry *m50458_device::device_rom_region() const { return ROM_NAME( m50458 ); } diff --git a/src/devices/video/m50458.h b/src/devices/video/m50458.h index 9744ff6d361..d11f39cedec 100644 --- a/src/devices/video/m50458.h +++ b/src/devices/video/m50458.h @@ -56,7 +56,7 @@ public: DECLARE_WRITE16_MEMBER(vreg_127_w); UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/video/mb90082.cpp b/src/devices/video/mb90082.cpp index b65590b6db8..8fe8749e422 100644 --- a/src/devices/video/mb90082.cpp +++ b/src/devices/video/mb90082.cpp @@ -40,7 +40,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *mb90082_device::device_rom_region() const +const tiny_rom_entry *mb90082_device::device_rom_region() const { return ROM_NAME( mb90082 ); } diff --git a/src/devices/video/mb90082.h b/src/devices/video/mb90082.h index 61d6cc17a7a..905d906055f 100644 --- a/src/devices/video/mb90082.h +++ b/src/devices/video/mb90082.h @@ -45,7 +45,7 @@ public: DECLARE_WRITE_LINE_MEMBER( set_cs_line ); UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides diff --git a/src/devices/video/msm6222b.cpp b/src/devices/video/msm6222b.cpp index 17ee6897400..422f6cb50c3 100644 --- a/src/devices/video/msm6222b.cpp +++ b/src/devices/video/msm6222b.cpp @@ -40,7 +40,7 @@ msm6222b_01_device::msm6222b_01_device(const machine_config &mconfig, const char m_cgrom.set_tag("cgrom"); } -const rom_entry *msm6222b_01_device::device_rom_region() const +const tiny_rom_entry *msm6222b_01_device::device_rom_region() const { return ROM_NAME(msm6222b_01); } diff --git a/src/devices/video/msm6222b.h b/src/devices/video/msm6222b.h index 3324dda3b06..aecd70f3931 100644 --- a/src/devices/video/msm6222b.h +++ b/src/devices/video/msm6222b.h @@ -54,7 +54,7 @@ public: msm6222b_01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); protected: - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; extern const device_type MSM6222B; diff --git a/src/devices/video/saa5050.cpp b/src/devices/video/saa5050.cpp index 071fbf52ec9..17bed03ffca 100644 --- a/src/devices/video/saa5050.cpp +++ b/src/devices/video/saa5050.cpp @@ -119,42 +119,42 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *saa5050_device::device_rom_region() const +const tiny_rom_entry *saa5050_device::device_rom_region() const { return ROM_NAME( saa5050 ); } -const rom_entry *saa5051_device::device_rom_region() const +const tiny_rom_entry *saa5051_device::device_rom_region() const { return ROM_NAME( saa5051 ); } -const rom_entry *saa5052_device::device_rom_region() const +const tiny_rom_entry *saa5052_device::device_rom_region() const { return ROM_NAME( saa5052 ); } -const rom_entry *saa5053_device::device_rom_region() const +const tiny_rom_entry *saa5053_device::device_rom_region() const { return ROM_NAME( saa5053 ); } -const rom_entry *saa5054_device::device_rom_region() const +const tiny_rom_entry *saa5054_device::device_rom_region() const { return ROM_NAME( saa5054 ); } -const rom_entry *saa5055_device::device_rom_region() const +const tiny_rom_entry *saa5055_device::device_rom_region() const { return ROM_NAME( saa5055 ); } -const rom_entry *saa5056_device::device_rom_region() const +const tiny_rom_entry *saa5056_device::device_rom_region() const { return ROM_NAME( saa5056 ); } -const rom_entry *saa5057_device::device_rom_region() const +const tiny_rom_entry *saa5057_device::device_rom_region() const { return ROM_NAME( saa5057 ); } diff --git a/src/devices/video/saa5050.h b/src/devices/video/saa5050.h index 30b1e8b0e4a..9c53ba896c6 100644 --- a/src/devices/video/saa5050.h +++ b/src/devices/video/saa5050.h @@ -63,7 +63,7 @@ public: template static devcb_base &set_d_rd_callback(device_t &device, _Object object) { return downcast(device).m_read_d.set_callback(object); } // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_WRITE_LINE_MEMBER( crs_w ); DECLARE_WRITE_LINE_MEMBER( dew_w ); @@ -172,7 +172,7 @@ public: saa5051_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -185,7 +185,7 @@ public: saa5052_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -198,7 +198,7 @@ public: saa5053_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -211,7 +211,7 @@ public: saa5054_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -224,7 +224,7 @@ public: saa5055_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -237,7 +237,7 @@ public: saa5056_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -250,7 +250,7 @@ public: saa5057_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; diff --git a/src/devices/video/sed1200.cpp b/src/devices/video/sed1200.cpp index 06cd7ba7e83..6d88b288714 100644 --- a/src/devices/video/sed1200.cpp +++ b/src/devices/video/sed1200.cpp @@ -56,22 +56,22 @@ sed1200f0b_device::sed1200f0b_device(const machine_config &mconfig, const char * { } -const rom_entry *sed1200d0a_device::device_rom_region() const +const tiny_rom_entry *sed1200d0a_device::device_rom_region() const { return ROM_NAME(sed1200x0a); } -const rom_entry *sed1200f0a_device::device_rom_region() const +const tiny_rom_entry *sed1200f0a_device::device_rom_region() const { return ROM_NAME(sed1200x0a); } -const rom_entry *sed1200d0b_device::device_rom_region() const +const tiny_rom_entry *sed1200d0b_device::device_rom_region() const { return ROM_NAME(sed1200x0b); } -const rom_entry *sed1200f0b_device::device_rom_region() const +const tiny_rom_entry *sed1200f0b_device::device_rom_region() const { return ROM_NAME(sed1200x0b); } diff --git a/src/devices/video/sed1200.h b/src/devices/video/sed1200.h index c39f223e331..d82461fe6da 100644 --- a/src/devices/video/sed1200.h +++ b/src/devices/video/sed1200.h @@ -57,7 +57,7 @@ public: sed1200d0a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); protected: - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; class sed1200f0a_device : public sed1200_device { @@ -65,7 +65,7 @@ public: sed1200f0a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); protected: - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; class sed1200d0b_device : public sed1200_device { @@ -73,7 +73,7 @@ public: sed1200d0b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); protected: - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; class sed1200f0b_device : public sed1200_device { @@ -81,7 +81,7 @@ public: sed1200f0b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); protected: - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; extern const device_type SED1200D0A; diff --git a/src/devices/video/sed1330.cpp b/src/devices/video/sed1330.cpp index d368c38b1f2..71c4a9fd069 100644 --- a/src/devices/video/sed1330.cpp +++ b/src/devices/video/sed1330.cpp @@ -152,7 +152,7 @@ sed1330_device::sed1330_device(const machine_config &mconfig, const char *tag, d // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *sed1330_device::device_rom_region() const +const tiny_rom_entry *sed1330_device::device_rom_region() const { return ROM_NAME( sed1330 ); } diff --git a/src/devices/video/sed1330.h b/src/devices/video/sed1330.h index 5b6cbc19521..135caeca01b 100644 --- a/src/devices/video/sed1330.h +++ b/src/devices/video/sed1330.h @@ -41,7 +41,7 @@ public: sed1330_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER( status_r ); DECLARE_WRITE8_MEMBER( command_w ); diff --git a/src/devices/video/snes_ppu.cpp b/src/devices/video/snes_ppu.cpp index fa7c85e3f7c..603b19e1a93 100644 --- a/src/devices/video/snes_ppu.cpp +++ b/src/devices/video/snes_ppu.cpp @@ -203,7 +203,12 @@ const device_type SNES_PPU = &device_creator; snes_ppu_device::snes_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, SNES_PPU, "SNES PPU", tag, owner, clock, "snes_ppu", __FILE__), device_video_interface(mconfig, *this), - m_openbus_cb(*this) + m_openbus_cb(*this), + m_options(*this, ":OPTIONS"), + m_debug1(*this, ":DEBUG1"), + m_debug2(*this, ":DEBUG2"), + m_debug3(*this, ":DEBUG3"), + m_debug4(*this, ":DEBUG4") { } @@ -1819,7 +1824,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 = read_safe(machine().root_device().ioport("OPTIONS"), 0) & 0x01; + int blurring = m_options.read_safe(0) & 0x01; g_profiler.start(PROFILER_VIDEO); @@ -2831,13 +2836,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 = read_safe(machine().root_device().ioport("DEBUG1"), 0); + UINT8 toggles = m_debug1.read_safe(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 = read_safe(machine().root_device().ioport("DEBUG2"), 0); + toggles = m_debug2.read_safe(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")) @@ -2845,11 +2850,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 = read_safe(machine().root_device().ioport("DEBUG4"), 0); + toggles = m_debug4.read_safe(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 = read_safe(machine().root_device().ioport("DEBUG3"), 0); + toggles = m_debug3.read_safe(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/snes_ppu.h b/src/devices/video/snes_ppu.h index cc1f2a3311d..79bcf34f7b7 100644 --- a/src/devices/video/snes_ppu.h +++ b/src/devices/video/snes_ppu.h @@ -278,6 +278,11 @@ protected: private: devcb_read16 m_openbus_cb; + optional_ioport m_options; + optional_ioport m_debug1; + optional_ioport m_debug2; + optional_ioport m_debug3; + optional_ioport m_debug4; }; diff --git a/src/devices/video/upd7220.cpp b/src/devices/video/upd7220.cpp index f9ee91a7140..3fae2079570 100644 --- a/src/devices/video/upd7220.cpp +++ b/src/devices/video/upd7220.cpp @@ -175,7 +175,7 @@ const address_space_config *upd7220_device::memory_space_config(address_spacenum // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *upd7220_device::device_rom_region() const +const tiny_rom_entry *upd7220_device::device_rom_region() const { return ROM_NAME( upd7220 ); } diff --git a/src/devices/video/upd7220.h b/src/devices/video/upd7220.h index dbde33a93f8..efad745aa4b 100644 --- a/src/devices/video/upd7220.h +++ b/src/devices/video/upd7220.h @@ -102,7 +102,7 @@ public: DECLARE_WRITE_LINE_MEMBER( lpen_w ); UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override; protected: diff --git a/src/emu/addrmap.cpp b/src/emu/addrmap.cpp index 2b3f45b1795..a8fe7281d1d 100644 --- a/src/emu/addrmap.cpp +++ b/src/emu/addrmap.cpp @@ -32,8 +32,8 @@ address_map_entry::address_map_entry(device_t &device, address_map &map, offs_t : m_next(nullptr), m_map(map), m_devbase(device), - m_addrstart((map.m_globalmask == 0) ? start : start & map.m_globalmask), - m_addrend((map.m_globalmask == 0) ? end : end & map.m_globalmask), + m_addrstart(start), + m_addrend(end), m_addrmirror(0), m_addrmask(0), m_addrselect(0), @@ -47,6 +47,17 @@ address_map_entry::address_map_entry(device_t &device, address_map &map, offs_t m_bytemirror(0), m_bytemask(0) { + if (map.m_globalmask != 0 && (start & ~map.m_globalmask) != 0) + { + osd_printf_warning("AS_%d map entry start %08X lies outside global address mask %08X\n", map.m_spacenum, start, map.m_globalmask); + m_addrstart &= map.m_globalmask; + } + + if (map.m_globalmask != 0 && (end & ~map.m_globalmask) != 0) + { + osd_printf_warning("AS_%d map entry end %08X lies outside global address mask %08X\n", map.m_spacenum, end, map.m_globalmask); + m_addrend &= map.m_globalmask; + } } diff --git a/src/emu/devfind.h b/src/emu/devfind.h index af2626c9797..08a5b6fcccb 100644 --- a/src/emu/devfind.h +++ b/src/emu/devfind.h @@ -80,11 +80,6 @@ public: : finder_base(base, tag), m_target(nullptr) { } - // operators to make use transparent - operator _ObjectClass *() const { return m_target; } - - virtual _ObjectClass *operator->() const { assert(m_target != nullptr); return m_target; } - // getters for explicit fetching _ObjectClass *target() const { return m_target; } bool found() const { return m_target != nullptr; } @@ -109,6 +104,10 @@ public: device_finder(device_t &base, const char *tag = FINDER_DUMMY_TAG) : object_finder_base<_DeviceClass>(base, tag) { } + // operators to make pointer use transparent + operator _DeviceClass *() const { return object_finder_base<_DeviceClass>::m_target; } + virtual _DeviceClass *operator->() const { assert(object_finder_base<_DeviceClass>::m_target != nullptr); return object_finder_base<_DeviceClass>::m_target; } + // make reference use transparent as well operator _DeviceClass &() { assert(object_finder_base<_DeviceClass>::m_target != nullptr); return *object_finder_base<_DeviceClass>::m_target; } @@ -153,6 +152,10 @@ public: memory_region_finder(device_t &base, const char *tag = FINDER_DUMMY_TAG) : object_finder_base(base, tag) { } + // operators to make pointer use transparent + operator memory_region *() const { return m_target; } + virtual memory_region *operator->() const { assert(m_target != nullptr); return m_target; } + // make reference use transparent as well operator memory_region &() const { assert(object_finder_base::m_target != nullptr); return *object_finder_base::m_target; } @@ -191,6 +194,10 @@ public: memory_bank_finder(device_t &base, const char *tag = FINDER_DUMMY_TAG) : object_finder_base(base, tag) { } + // operators to make pointer use transparent + operator memory_bank *() const { return m_target; } + virtual memory_bank *operator->() const { assert(m_target != nullptr); return m_target; } + // make reference use transparent as well operator memory_bank &() const { assert(object_finder_base::m_target != nullptr); return *object_finder_base::m_target; } @@ -229,11 +236,12 @@ public: ioport_finder(device_t &base, const char *tag = FINDER_DUMMY_TAG) : object_finder_base(base, tag) { } - // make reference use transparent as well - operator ioport_port &() const { assert(object_finder_base::m_target != nullptr); return *object_finder_base::m_target; } + // operators to make use transparent + ioport_port &operator*() const { assert(m_target != nullptr); return *m_target; } + virtual ioport_port *operator->() const { assert(m_target != nullptr); return m_target; } - // allow dereference even when target is nullptr so read_safe() can be used - ioport_port *operator->() const override { return object_finder_base::m_target; } + // read if found, or else return a default value + ioport_value read_safe(ioport_value defval) { return m_target != nullptr ? m_target->read() : defval; } // finder virtual bool findit(bool isvalidation = false) override @@ -284,6 +292,16 @@ public: m_array[index] = std::make_unique(base, tags[index]); } + ioport_array_finder(device_t &base, std::initializer_list taglist) + { + assert(taglist.size() <= _Count); + int index = 0; + for (const char *tag : taglist) + m_array[index++] = std::make_unique(base, tag); + while (index < _Count) + m_array[index++] = std::make_unique(base, FINDER_DUMMY_TAG); + } + // array accessors const ioport_finder_type &operator[](int index) const { assert(index < _Count); return *m_array[index]; } ioport_finder_type &operator[](int index) { assert(index < _Count); return *m_array[index]; } @@ -301,6 +319,7 @@ class optional_ioport_array: public ioport_array_finder<_Count, false> public: optional_ioport_array(device_t &base, const char *basetag) : ioport_array_finder<_Count, false>(base, basetag) { } optional_ioport_array(device_t &base, const char * const *tags) : ioport_array_finder<_Count, false>(base, tags) { } + optional_ioport_array(device_t &base, std::initializer_list taglist) : ioport_array_finder<_Count, false>(base, taglist) { } }; // required ioport array finder @@ -310,6 +329,7 @@ class required_ioport_array: public ioport_array_finder<_Count, true> public: required_ioport_array(device_t &base, const char *basetag) : ioport_array_finder<_Count, true>(base, basetag) { } required_ioport_array(device_t &base, const char * const *tags) : ioport_array_finder<_Count, true>(base, tags) { } + required_ioport_array(device_t &base, std::initializer_list taglist) : ioport_array_finder<_Count, true>(base, taglist) { } }; @@ -329,6 +349,7 @@ public: m_length(length) { } // operators to make use transparent + operator _PointerType *() const { return this->m_target; } _PointerType operator[](int index) const { assert(index < m_length); return this->m_target[index]; } _PointerType &operator[](int index) { assert(index < m_length); return this->m_target[index]; } @@ -387,6 +408,7 @@ public: m_width(width) { } // operators to make use transparent + operator _PointerType *() const { return this->m_target; } _PointerType operator[](int index) const { return this->m_target[index]; } _PointerType &operator[](int index) { return this->m_target[index]; } diff --git a/src/emu/device.cpp b/src/emu/device.cpp index 2ca2db31e36..6bc7ff40345 100644 --- a/src/emu/device.cpp +++ b/src/emu/device.cpp @@ -530,7 +530,7 @@ void device_t::device_validity_check(validity_checker &valid) const // rom region description for this device //------------------------------------------------- -const rom_entry *device_t::device_rom_region() const +const tiny_rom_entry *device_t::device_rom_region() const { // none by default return nullptr; @@ -921,3 +921,17 @@ void device_interface::interface_debug_setup() { // do nothing by default } + + +//------------------------------------------------- +// rom_region_vector +//------------------------------------------------- + +const std::vector &device_t::rom_region_vector() const +{ + if (m_rom_entries.empty()) + { + m_rom_entries = rom_build_entries(device_rom_region()); + } + return m_rom_entries; +} \ No newline at end of file diff --git a/src/emu/device.h b/src/emu/device.h index b3134d0b36f..6892157e084 100644 --- a/src/emu/device.h +++ b/src/emu/device.h @@ -203,7 +203,8 @@ public: UINT32 configured_clock() const { return m_configured_clock; } const machine_config &mconfig() const { return m_machine_config; } const input_device_default *input_ports_defaults() const { return m_input_defaults; } - const rom_entry *rom_region() const { return device_rom_region(); } + const std::vector &rom_region_vector() const; + const rom_entry *rom_region() const { return rom_region_vector().data(); } machine_config_constructor machine_config_additions() const { return device_mconfig_additions(); } ioport_constructor input_ports() const { return device_input_ports(); } UINT8 default_bios() const { return m_default_bios; } @@ -304,7 +305,7 @@ protected: //------------------- begin derived class overrides // device-level overrides - virtual const rom_entry *device_rom_region() const; + virtual const tiny_rom_entry *device_rom_region() const; virtual machine_config_constructor device_mconfig_additions() const; virtual ioport_constructor device_input_ports() const; virtual void device_config_complete(); @@ -361,6 +362,7 @@ private: bool m_config_complete; // have we completed our configuration? bool m_started; // true if the start function has succeeded finder_base * m_auto_finder_list; // list of objects to auto-find + mutable std::vector m_rom_entries; // string formatting buffer for logerror mutable util::ovectorstream m_string_buffer; diff --git a/src/emu/diimage.cpp b/src/emu/diimage.cpp index 748d455c665..97c9559e9a9 100644 --- a/src/emu/diimage.cpp +++ b/src/emu/diimage.cpp @@ -15,6 +15,7 @@ #include "ui/uimain.h" #include "zippath.h" #include "softlist.h" +#include "softlist_dev.h" #include "formats/ioprocs.h" #include @@ -398,13 +399,13 @@ void device_image_interface::setup_working_directory() // valid even if not mounted //------------------------------------------------- -const char * device_image_interface::working_directory() +const std::string &device_image_interface::working_directory() { // check to see if we've never initialized the working directory if (m_working_directory.empty()) setup_working_directory(); - return m_working_directory.c_str(); + return m_working_directory; } @@ -509,7 +510,7 @@ void device_image_interface::image_checkhash() // only calculate CRC if it hasn't been calculated, and the open_mode is read only UINT32 crcval; - if (!m_hash.crc(crcval) && m_readonly && !m_created) + if (!m_hash.crc(crcval) && is_readonly() && !m_created) { // do not cause a linear read of 600 megs please // TODO: use SHA1 in the CHD header as the hash @@ -840,9 +841,9 @@ bool device_image_interface::load_software(software_list_device &swlist, const c UINT32 supported = swinfo->supported(); if (supported == SOFTWARE_SUPPORTED_PARTIAL) - osd_printf_error("WARNING: support for software %s (in list %s) is only partial\n", swname, swlist.list_name()); + osd_printf_error("WARNING: support for software %s (in list %s) is only partial\n", swname, swlist.list_name().c_str()); if (supported == SOFTWARE_SUPPORTED_NO) - osd_printf_error("WARNING: support for software %s (in list %s) is only preliminary\n", swname, swlist.list_name()); + osd_printf_error("WARNING: support for software %s (in list %s) is only preliminary\n", swname, swlist.list_name().c_str()); // attempt reading up the chain through the parents and create a locationtag std::string in the format // " swlist % clonename % parentname " @@ -1036,7 +1037,8 @@ image_init_result device_image_interface::load_software(const std::string &softl m_is_loading = true; // Check if there's a software list defined for this device and use that if we're not creating an image - bool softload = load_software_part(softlist_name.c_str(), m_software_part_ptr); + std::string list_name; + bool softload = load_software_part(softlist_name, m_software_part_ptr, &list_name); if (!softload) { m_is_loading = false; @@ -1045,8 +1047,8 @@ image_init_result device_image_interface::load_software(const std::string &softl // set up softlist stuff m_software_info_ptr = &m_software_part_ptr->info(); - m_software_list_name.assign(m_software_info_ptr->list().list_name()); - m_full_software_name.assign(m_software_part_ptr->info().shortname()); + m_software_list_name = std::move(list_name); + m_full_software_name = m_software_part_ptr->info().shortname(); // specify image name with softlist-derived names m_image_name = m_full_software_name; @@ -1058,8 +1060,6 @@ image_init_result device_image_interface::load_software(const std::string &softl const char *read_only = get_feature("read_only"); if (read_only && !strcmp(read_only, "true")) { - make_readonly(); - // Copy some image information when we have been loaded through a software list if (m_software_info_ptr) { @@ -1270,7 +1270,7 @@ void device_image_interface::update_names(const device_type device_type, const c // case. //------------------------------------------------- -void device_image_interface::software_name_split(const char *swlist_swname, std::string &swlist_name, std::string &swname, std::string &swpart) +void device_image_interface::software_name_split(const std::string &swlist_swname, std::string &swlist_name, std::string &swname, std::string &swpart) { // reset all output parameters swlist_name.clear(); @@ -1278,30 +1278,34 @@ void device_image_interface::software_name_split(const char *swlist_swname, std: swpart.clear(); // if no colon, this is the swname by itself - const char *split1 = strchr(swlist_swname, ':'); - if (split1 == nullptr) + auto split1 = swlist_swname.find_first_of(':'); + if (split1 == std::string::npos) { - swname.assign(swlist_swname); + swname = swlist_swname; return; } // if one colon, it is the swname and swpart alone - const char *split2 = strchr(split1 + 1, ':'); - if (split2 == nullptr) + auto split2 = swlist_swname.find_first_of(':', split1 + 1); + if (split2 == std::string::npos) { - swname.assign(swlist_swname, split1 - swlist_swname); - swpart.assign(split1 + 1); + swname = swlist_swname.substr(0, split1); + swpart = swlist_swname.substr(split1 + 1); return; } // if two colons present, split into 3 parts - swlist_name.assign(swlist_swname, split1 - swlist_swname); - swname.assign(split1 + 1, split2 - (split1 + 1)); - swpart.assign(split2 + 1); + swlist_name = swlist_swname.substr(0, split1); + swname = swlist_swname.substr(split1 + 1, split2 - (split1 + 1)); + swpart = swlist_swname.substr(split2 + 1); } -const software_part *device_image_interface::find_software_item(const char *path, bool restrict_to_interface) const +//------------------------------------------------- +// find_software_item +//------------------------------------------------- + +const software_part *device_image_interface::find_software_item(const std::string &path, bool restrict_to_interface, software_list_device **dev) const { // split full software name into software list name and short software name std::string swlist_name, swinfo_name, swpart_name; @@ -1317,12 +1321,16 @@ const software_part *device_image_interface::find_software_item(const char *path { if (swlist_name.compare(swlistdev.list_name())==0 || !(swlist_name.length() > 0)) { - const software_info *info = swlistdev.find(swinfo_name.c_str()); + const software_info *info = swlistdev.find(swinfo_name); if (info != nullptr) { - const software_part *part = info->find_part(swpart_name.c_str(), interface); + const software_part *part = info->find_part(swpart_name, interface); if (part != nullptr) + { + if (dev != nullptr) + *dev = &swlistdev; return part; + } } } @@ -1332,21 +1340,37 @@ const software_part *device_image_interface::find_software_item(const char *path // gameboy:sml) which is not handled properly by software_name_split // since the function cannot distinguish between this and the case // path = swinfo_name:swpart_name - const software_info *info = swlistdev.find(swpart_name.c_str()); + const software_info *info = swlistdev.find(swpart_name); if (info != nullptr) { - const software_part *part = info->find_part(nullptr, interface); + const software_part *part = info->find_part("", interface); if (part != nullptr) + { + if (dev != nullptr) + *dev = &swlistdev; return part; + } } } } // if explicitly specified and not found, just error here + if (dev != nullptr) + *dev = nullptr; return nullptr; } +//------------------------------------------------- +// get_software_list_loader +//------------------------------------------------- + +const software_list_loader &device_image_interface::get_software_list_loader() const +{ + return false_software_list_loader::instance(); +} + + //------------------------------------------------- // load_software_part // @@ -1360,10 +1384,11 @@ const software_part *device_image_interface::find_software_item(const char *path // sw_info and sw_part are also set. //------------------------------------------------- -bool device_image_interface::load_software_part(const char *path, const software_part *&swpart) +bool device_image_interface::load_software_part(const std::string &path, const software_part *&swpart, std::string *list_name) { // if no match has been found, we suggest similar shortnames - swpart = find_software_item(path, true); + software_list_device *swlist; + swpart = find_software_item(path, true, &swlist); if (swpart == nullptr) { software_list_device::display_matches(device().machine().config(), image_interface(), path); @@ -1375,11 +1400,10 @@ bool device_image_interface::load_software_part(const char *path, const software set_init_phase(); // Load the software part - software_list_device &swlist = swpart->info().list(); const char *swname = swpart->info().shortname().c_str(); - const rom_entry *start_entry = swpart->romdata(); + const rom_entry *start_entry = swpart->romdata().data(); const software_list_loader &loader = get_software_list_loader(); - bool result = loader.load_software(*this, swlist, swname, start_entry); + bool result = loader.load_software(*this, *swlist, swname, start_entry); #ifdef UNUSED_VARIABLE // Tell the world which part we actually loaded @@ -1387,17 +1411,17 @@ bool device_image_interface::load_software_part(const char *path, const software #endif // check compatibility - switch (swpart->is_compatible(swlist)) + switch (swlist->is_compatible(*swpart)) { case SOFTWARE_IS_COMPATIBLE: break; case SOFTWARE_IS_INCOMPATIBLE: - swlist.popmessage("WARNING! the set %s might not work on this system due to incompatible filter(s) '%s'\n", swpart->info().shortname(), swlist.filter()); + swlist->popmessage("WARNING! the set %s might not work on this system due to incompatible filter(s) '%s'\n", swpart->info().shortname(), swlist->filter()); break; case SOFTWARE_NOT_COMPATIBLE: - swlist.popmessage("WARNING! the set %s might not work on this system due to missing filter(s) '%s'\n", swpart->info().shortname(), swlist.filter()); + swlist->popmessage("WARNING! the set %s might not work on this system due to missing filter(s) '%s'\n", swpart->info().shortname(), swlist->filter()); break; } @@ -1408,7 +1432,7 @@ bool device_image_interface::load_software_part(const char *path, const software const software_part *req_swpart = find_software_item(requirement, false); if (req_swpart != nullptr) { - device_image_interface *req_image = req_swpart->find_mountable_image(device().mconfig()); + device_image_interface *req_image = software_list_device::find_mountable_image(device().mconfig(), *req_swpart); if (req_image != nullptr) { req_image->set_init_phase(); @@ -1416,6 +1440,8 @@ bool device_image_interface::load_software_part(const char *path, const software } } } + if (list_name != nullptr) + *list_name = swlist->list_name(); return result; } diff --git a/src/emu/diimage.h b/src/emu/diimage.h index 1d066527b49..d2ea51c47e7 100644 --- a/src/emu/diimage.h +++ b/src/emu/diimage.h @@ -21,8 +21,6 @@ #include #include -#include "softlist.h" - //************************************************************************** // TYPE DEFINITIONS @@ -31,6 +29,7 @@ extern struct io_procs image_ioprocs; class software_list; +class software_list_loader; enum iodevice_t { @@ -181,7 +180,6 @@ public: util::core_file &image_core_file() const { return *m_file; } UINT64 length() { check_for_file(); return m_file->size(); } bool is_readonly() const { return m_readonly; } - void make_readonly() { m_readonly = true; } UINT32 fread(void *buffer, UINT32 length) { check_for_file(); return m_file->read(buffer, length); } UINT32 fread(optional_shared_ptr &ptr, UINT32 length) { ptr.allocate(length); return fread(ptr.target(), length); } UINT32 fread(optional_shared_ptr &ptr, UINT32 length, offs_t offset) { ptr.allocate(length); return fread(ptr + offset, length - offset); } @@ -195,9 +193,9 @@ public: // configuration access void set_init_phase() { m_init_phase = true; } - const char* longname() const { return m_longname.c_str(); } - const char* manufacturer() const { return m_manufacturer.c_str(); } - const char* year() const { return m_year.c_str(); } + const std::string &longname() const { return m_longname; } + const std::string &manufacturer() const { return m_manufacturer; } + const std::string &year() const { return m_year; } UINT32 supported() const { return m_supported; } const software_info *software_entry() const { return m_software_info_ptr; } @@ -206,7 +204,7 @@ public: bool loaded_through_softlist() const { return m_software_info_ptr != nullptr; } void set_working_directory(const char *working_directory) { m_working_directory = working_directory; } - const char * working_directory(); + const std::string &working_directory(); UINT8 *get_software_region(const char *tag); UINT32 get_software_region_length(const char *tag); @@ -240,7 +238,7 @@ public: bool load_software(software_list_device &swlist, const char *swname, const rom_entry *entry); int reopen_for_write(const std::string &path); - static void software_name_split(const char *swlist_swname, std::string &swlist_name, std::string &swname, std::string &swpart); + static void software_name_split(const std::string &swlist_swname, std::string &swlist_name, std::string &swname, std::string &swpart); static void static_set_user_loadable(device_t &device, bool user_loadable) { device_image_interface *img; if (!device.interface(img)) @@ -252,7 +250,7 @@ public: bool user_loadable() const { return m_user_loadable; } protected: - virtual const software_list_loader &get_software_list_loader() const { return false_software_list_loader::instance(); } + virtual const software_list_loader &get_software_list_loader() const; image_init_result load_internal(const std::string &path, bool is_create, int create_format, util::option_resolution *create_args, bool just_load); void determine_open_plan(int is_create, UINT32 *open_plan); @@ -273,8 +271,8 @@ protected: void image_checkhash(); void update_names(const device_type device_type = nullptr, const char *inst = nullptr, const char *brief = nullptr); - const software_part *find_software_item(const char *path, bool restrict_to_interface) const; - bool load_software_part(const char *path, const software_part *&swpart); + const software_part *find_software_item(const std::string &path, bool restrict_to_interface, software_list_device **device = nullptr) const; + bool load_software_part(const std::string &path, const software_part *&swpart, std::string *list_name = nullptr); std::string software_get_default_slot(const char *default_card_slot) const; void add_format(std::unique_ptr &&format); diff --git a/src/emu/drivenum.cpp b/src/emu/drivenum.cpp index 1d2f6d79f06..450790eb55a 100644 --- a/src/emu/drivenum.cpp +++ b/src/emu/drivenum.cpp @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles /*************************************************************************** - drivenum.c + drivenum.cpp Driver enumeration helpers. @@ -10,7 +10,7 @@ #include "emu.h" #include "drivenum.h" -#include "softlist.h" +#include "softlist_dev.h" #include diff --git a/src/emu/driver.cpp b/src/emu/driver.cpp index 510cf8d9199..ba48683eb91 100644 --- a/src/emu/driver.cpp +++ b/src/emu/driver.cpp @@ -173,7 +173,7 @@ void driver_device::video_reset() // game's ROMs //------------------------------------------------- -const rom_entry *driver_device::device_rom_region() const +const tiny_rom_entry *driver_device::device_rom_region() const { return m_system->rom; } diff --git a/src/emu/driver.h b/src/emu/driver.h index 9d1bd42727e..27cd8bb9518 100644 --- a/src/emu/driver.h +++ b/src/emu/driver.h @@ -210,7 +210,7 @@ protected: virtual void video_reset(); // device-level overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; virtual void device_start() override; virtual void device_reset_after_children() override; diff --git a/src/emu/drivers/xtal.h b/src/emu/drivers/xtal.h index 5cb8b901db8..c74c9ec24b8 100644 --- a/src/emu/drivers/xtal.h +++ b/src/emu/drivers/xtal.h @@ -60,6 +60,7 @@ enum XTAL_3_12MHz = 3120000, /* SP0250 clock on Gottlieb games */ XTAL_3_5MHz = 3500000, /* Reported by Commodore 65 document, true xtal unchecked on PCB */ XTAL_3_52128MHz = 3521280, /* RCA COSMAC VIP */ + XTAL_3_57864MHz = 3578640, /* Atari Portfolio PCD3311T */ XTAL_3_579545MHz = 3579545, /* NTSC color subcarrier, extremely common, used on 100's of PCBs (Keytronic custom part #48-300-010 is equivalent) */ XTAL_3_6864MHz = 3686400, /* CPS3 */ XTAL_4MHz = 4000000, diff --git a/src/emu/gamedrv.h b/src/emu/gamedrv.h index d5b7f15f32c..30b0cdd91a1 100644 --- a/src/emu/gamedrv.h +++ b/src/emu/gamedrv.h @@ -71,7 +71,7 @@ struct game_driver machine_config_constructor machine_config; // machine driver tokens ioport_constructor ipt; // pointer to constructor for input ports void (*driver_init)(running_machine &machine); // DRIVER_INIT callback - const rom_entry * rom; // pointer to list of ROMs for the game + const tiny_rom_entry * rom; // pointer to list of ROMs for the game const char * compatible_with; UINT32 flags; // orientation and other flags; see defines below const internal_layout * default_layout; // default internally defined layout diff --git a/src/emu/image.cpp b/src/emu/image.cpp index af46f9d51f3..5fbc5844b9d 100644 --- a/src/emu/image.cpp +++ b/src/emu/image.cpp @@ -145,7 +145,7 @@ void image_manager::config_save(config_type cfg_type, xml_data_node *parentnode) if (node != nullptr) { xml_set_attribute(node, "instance", dev_instance); - xml_set_attribute(node, "directory", image.working_directory()); + xml_set_attribute(node, "directory", image.working_directory().c_str()); } } } @@ -208,23 +208,6 @@ void image_manager::options_extract() } -/*------------------------------------------------- - image_mandatory_scan - search for devices which - need an image to be loaded - -------------------------------------------------*/ - -std::string &image_manager::mandatory_scan(std::string &mandatory) -{ - mandatory.clear(); - // make sure that any required image has a mounted file - for (device_image_interface &image : image_interface_iterator(machine().root_device())) - { - if (image.filename() == nullptr && image.must_be_loaded()) - mandatory.append("\"").append(image.instance_name()).append("\", "); - } - return mandatory; -} - /*------------------------------------------------- postdevice_init - initialize devices for a specific running_machine diff --git a/src/emu/image.h b/src/emu/image.h index 32b8035d14d..4a9e55e4c80 100644 --- a/src/emu/image.h +++ b/src/emu/image.h @@ -23,7 +23,6 @@ public: void unload_all(); void postdevice_init(); - std::string &mandatory_scan(std::string &mandatory); // getters running_machine &machine() const { return m_machine; } diff --git a/src/emu/inpttype.h b/src/emu/inpttype.h index 605abe0b024..d8258c02605 100644 --- a/src/emu/inpttype.h +++ b/src/emu/inpttype.h @@ -555,6 +555,7 @@ inline void construct_core_types_other(simple_list &typelist) INPUT_PORT_DIGITAL_TYPE( 0, OTHER, SERVICE, "Service", input_seq(KEYCODE_F2) ) INPUT_PORT_DIGITAL_TYPE( 0, OTHER, TILT, "Tilt", input_seq(KEYCODE_T) ) INPUT_PORT_DIGITAL_TYPE( 0, OTHER, INTERLOCK, "Door Interlock", input_seq() ) + INPUT_PORT_DIGITAL_TYPE( 0, OTHER, MEMORY_RESET, "Memory Reset", input_seq(KEYCODE_F1) ) INPUT_PORT_DIGITAL_TYPE( 0, OTHER, VOLUME_DOWN, "Volume Down", input_seq(KEYCODE_MINUS) ) INPUT_PORT_DIGITAL_TYPE( 0, OTHER, VOLUME_UP, "Volume Up", input_seq(KEYCODE_EQUALS) ) } diff --git a/src/emu/input.cpp b/src/emu/input.cpp index 6e87f0826b3..bbae55fcd34 100644 --- a/src/emu/input.cpp +++ b/src/emu/input.cpp @@ -240,6 +240,11 @@ static const code_string_table itemid_token_table[] = { ITEM_ID_F13, "F13" }, { ITEM_ID_F14, "F14" }, { ITEM_ID_F15, "F15" }, + { ITEM_ID_F16, "F16" }, + { ITEM_ID_F17, "F17" }, + { ITEM_ID_F18, "F18" }, + { ITEM_ID_F19, "F19" }, + { ITEM_ID_F20, "F20" }, { ITEM_ID_ESC, "ESC" }, { ITEM_ID_TILDE, "TILDE" }, { ITEM_ID_MINUS, "MINUS" }, diff --git a/src/emu/input.h b/src/emu/input.h index a14f08099c0..d7012c1f779 100644 --- a/src/emu/input.h +++ b/src/emu/input.h @@ -141,6 +141,11 @@ enum input_item_id ITEM_ID_F13, ITEM_ID_F14, ITEM_ID_F15, + ITEM_ID_F16, + ITEM_ID_F17, + ITEM_ID_F18, + ITEM_ID_F19, + ITEM_ID_F20, ITEM_ID_ESC, ITEM_ID_TILDE, ITEM_ID_MINUS, @@ -758,6 +763,11 @@ private: #define KEYCODE_F13_INDEXED(n) input_code(DEVICE_CLASS_KEYBOARD, n, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, ITEM_ID_F13) #define KEYCODE_F14_INDEXED(n) input_code(DEVICE_CLASS_KEYBOARD, n, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, ITEM_ID_F14) #define KEYCODE_F15_INDEXED(n) input_code(DEVICE_CLASS_KEYBOARD, n, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, ITEM_ID_F15) +#define KEYCODE_F16_INDEXED(n) input_code(DEVICE_CLASS_KEYBOARD, n, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, ITEM_ID_F16) +#define KEYCODE_F17_INDEXED(n) input_code(DEVICE_CLASS_KEYBOARD, n, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, ITEM_ID_F17) +#define KEYCODE_F18_INDEXED(n) input_code(DEVICE_CLASS_KEYBOARD, n, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, ITEM_ID_F18) +#define KEYCODE_F19_INDEXED(n) input_code(DEVICE_CLASS_KEYBOARD, n, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, ITEM_ID_F19) +#define KEYCODE_F20_INDEXED(n) input_code(DEVICE_CLASS_KEYBOARD, n, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, ITEM_ID_F20) #define KEYCODE_ESC_INDEXED(n) input_code(DEVICE_CLASS_KEYBOARD, n, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, ITEM_ID_ESC) #define KEYCODE_TILDE_INDEXED(n) input_code(DEVICE_CLASS_KEYBOARD, n, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, ITEM_ID_TILDE) #define KEYCODE_MINUS_INDEXED(n) input_code(DEVICE_CLASS_KEYBOARD, n, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, ITEM_ID_MINUS) @@ -868,6 +878,11 @@ private: #define KEYCODE_F13 KEYCODE_F13_INDEXED(0) #define KEYCODE_F14 KEYCODE_F14_INDEXED(0) #define KEYCODE_F15 KEYCODE_F15_INDEXED(0) +#define KEYCODE_F16 KEYCODE_F16_INDEXED(0) +#define KEYCODE_F17 KEYCODE_F17_INDEXED(0) +#define KEYCODE_F18 KEYCODE_F18_INDEXED(0) +#define KEYCODE_F19 KEYCODE_F19_INDEXED(0) +#define KEYCODE_F20 KEYCODE_F20_INDEXED(0) #define KEYCODE_ESC KEYCODE_ESC_INDEXED(0) #define KEYCODE_TILDE KEYCODE_TILDE_INDEXED(0) #define KEYCODE_MINUS KEYCODE_MINUS_INDEXED(0) diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp index 43649e3f886..44e758b5752 100644 --- a/src/emu/ioport.cpp +++ b/src/emu/ioport.cpp @@ -439,6 +439,11 @@ const char_info charinfo[] = { UCHAR_MAMEKEY(F13), "F13", nullptr }, // F13 function key { UCHAR_MAMEKEY(F14), "F14", nullptr }, // F14 function key { UCHAR_MAMEKEY(F15), "F15", nullptr }, // F15 function key + { UCHAR_MAMEKEY(F16), "F16", nullptr }, // F16 function key + { UCHAR_MAMEKEY(F17), "F17", nullptr }, // F17 function key + { UCHAR_MAMEKEY(F18), "F18", nullptr }, // F18 function key + { UCHAR_MAMEKEY(F19), "F19", nullptr }, // F19 function key + { UCHAR_MAMEKEY(F20), "F20", nullptr }, // F20 function key { UCHAR_MAMEKEY(ESC), "Esc", "\033" }, // Esc key { UCHAR_MAMEKEY(INSERT), "Insert", nullptr }, // Insert key { UCHAR_MAMEKEY(DEL), "Delete", "\010" }, // Delete key @@ -2445,10 +2450,6 @@ ioport_manager::ioport_manager(running_machine &machine) m_timecode_file(machine.options().input_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS), m_timecode_count(0), m_timecode_last_time(attotime::zero), - m_has_configs(false), - m_has_analog(false), - m_has_dips(false), - m_has_bioses(false), m_autofire_toggle(false), m_autofire_delay(3) // 1 seems too fast for a bunch of games { @@ -2529,30 +2530,6 @@ time_t ioport_manager::initialize() // register callbacks for when we load configurations machine().configuration().config_register("input", config_saveload_delegate(FUNC(ioport_manager::load_config), this), config_saveload_delegate(FUNC(ioport_manager::save_config), this)); - // calculate "has..." values - { - m_has_configs = false; - m_has_analog = false; - m_has_dips = false; - m_has_bioses = false; - - // scan the input port array to see what options we need to enable - for (auto &port : m_portlist) - for (ioport_field &field : port.second->fields()) - { - if (field.type() == IPT_DIPSWITCH) - m_has_dips = true; - if (field.type() == IPT_CONFIG) - m_has_configs = true; - if (field.is_analog()) - m_has_analog = true; - } - for (device_t &device : device_iterator(machine().root_device())) - if (device.rom_region()) - for (const rom_entry *rom = device.rom_region(); !ROMENTRY_ISEND(rom); rom++) - if (ROMENTRY_ISSYSTEM_BIOS(rom)) { m_has_bioses= true; break; } - } - // open playback and record files if specified time_t basetime = playback_init(); record_init(); diff --git a/src/emu/ioport.h b/src/emu/ioport.h index ea5415dd343..419b603b239 100644 --- a/src/emu/ioport.h +++ b/src/emu/ioport.h @@ -143,6 +143,7 @@ enum ioport_type IPT_SERVICE, IPT_TILT, IPT_INTERLOCK, + IPT_MEMORY_RESET, IPT_VOLUME_UP, IPT_VOLUME_DOWN, IPT_START, // use the numbered start button(s) for coin-ops @@ -1325,8 +1326,6 @@ private: std::unique_ptr m_live; // live state of port (nullptr if not live) }; -inline ioport_value read_safe(ioport_port *port, ioport_value defval) { return (port == nullptr) ? defval : port->read(); } - // ======================> analog_field @@ -1475,12 +1474,6 @@ public: bool safe_to_read() const { return m_safe_to_read; } natural_keyboard &natkeyboard() { return m_natkeyboard; } - // has... getters - bool has_configs() const { return m_has_configs; } - bool has_analog() const { return m_has_analog; } - bool has_dips() const { return m_has_dips; } - bool has_bioses() const { return m_has_bioses; } - // type helpers const simple_list &types() const { return m_typelist; } bool type_pressed(ioport_type type, int player = 0); @@ -1571,12 +1564,6 @@ private: int m_timecode_count; attotime m_timecode_last_time; - // has... - bool m_has_configs; - bool m_has_analog; - bool m_has_dips; - bool m_has_bioses; - // autofire bool m_autofire_toggle; // autofire toggle int m_autofire_delay; // autofire delay diff --git a/src/emu/rendersw.hxx b/src/emu/rendersw.hxx index a7dcbac0191..bcd827aa446 100644 --- a/src/emu/rendersw.hxx +++ b/src/emu/rendersw.hxx @@ -902,7 +902,6 @@ private: static void draw_quad_yuy16_none(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup) { - const rgb_t *palbase = prim.texture.palette; INT32 dudx = setup.dudx; INT32 dvdx = setup.dvdx; INT32 endx = setup.endx; @@ -917,30 +916,13 @@ private: INT32 curu = setup.startu + (y - setup.starty) * setup.dudy; INT32 curv = setup.startv + (y - setup.starty) * setup.dvdy; - // no lookup case - if (palbase == nullptr) + // loop over cols + for (INT32 x = setup.startx; x < endx; x++) { - // loop over cols - for (INT32 x = setup.startx; x < endx; x++) - { - UINT32 pix = ycc_to_rgb(get_texel_yuy16(prim.texture, curu, curv)); - *dest++ = source32_to_dest(pix); - curu += dudx; - curv += dvdx; - } - } - - // lookup case - else - { - // loop over cols - for (INT32 x = setup.startx; x < endx; x++) - { - UINT32 pix = ycc_to_rgb(get_texel_yuy16(prim.texture, curu, curv)); - *dest++ = source32_to_dest(pix); - curu += dudx; - curv += dvdx; - } + UINT32 pix = ycc_to_rgb(get_texel_yuy16(prim.texture, curu, curv)); + *dest++ = source32_to_dest(pix); + curu += dudx; + curv += dvdx; } } } @@ -964,38 +946,17 @@ private: INT32 curu = setup.startu + (y - setup.starty) * setup.dudy; INT32 curv = setup.startv + (y - setup.starty) * setup.dvdy; - // no lookup case - if (palbase == nullptr) + // loop over cols + for (INT32 x = setup.startx; x < endx; x++) { - // loop over cols - for (INT32 x = setup.startx; x < endx; x++) - { - UINT32 pix = ycc_to_rgb(get_texel_yuy16(prim.texture, curu, curv)); - UINT32 r = (source32_r(pix) * sr) >> 8; - UINT32 g = (source32_g(pix) * sg) >> 8; - UINT32 b = (source32_b(pix) * sb) >> 8; + UINT32 pix = ycc_to_rgb(get_texel_yuy16(prim.texture, curu, curv)); + UINT32 r = (source32_r(pix) * sr) >> 8; + UINT32 g = (source32_g(pix) * sg) >> 8; + UINT32 b = (source32_b(pix) * sb) >> 8; - *dest++ = dest_assemble_rgb(r, g, b); - curu += dudx; - curv += dvdx; - } - } - - // lookup case - else - { - // loop over cols - for (INT32 x = setup.startx; x < endx; x++) - { - UINT32 pix = ycc_to_rgb(get_texel_yuy16(prim.texture, curu, curv)); - UINT32 r = (source32_r(pix) * sr) >> 8; - UINT32 g = (source32_g(pix) * sg) >> 8; - UINT32 b = (source32_b(pix) * sb) >> 8; - - *dest++ = dest_assemble_rgb(r, g, b); - curu += dudx; - curv += dvdx; - } + *dest++ = dest_assemble_rgb(r, g, b); + curu += dudx; + curv += dvdx; } } } @@ -1021,40 +982,103 @@ private: INT32 curu = setup.startu + (y - setup.starty) * setup.dudy; INT32 curv = setup.startv + (y - setup.starty) * setup.dvdy; - // no lookup case - if (palbase == nullptr) + // loop over cols + for (INT32 x = setup.startx; x < endx; x++) { - // loop over cols - for (INT32 x = setup.startx; x < endx; x++) - { - UINT32 pix = ycc_to_rgb(get_texel_yuy16(prim.texture, curu, curv)); - UINT32 dpix = _NoDestRead ? 0 : *dest; - UINT32 r = (source32_r(pix) * sr + dest_r(dpix) * invsa) >> 8; - UINT32 g = (source32_g(pix) * sg + dest_g(dpix) * invsa) >> 8; - UINT32 b = (source32_b(pix) * sb + dest_b(dpix) * invsa) >> 8; + UINT32 pix = ycc_to_rgb(get_texel_yuy16(prim.texture, curu, curv)); + UINT32 dpix = _NoDestRead ? 0 : *dest; + UINT32 r = (source32_r(pix) * sr + dest_r(dpix) * invsa) >> 8; + UINT32 g = (source32_g(pix) * sg + dest_g(dpix) * invsa) >> 8; + UINT32 b = (source32_b(pix) * sb + dest_b(dpix) * invsa) >> 8; - *dest++ = dest_assemble_rgb(r, g, b); - curu += dudx; - curv += dvdx; - } + *dest++ = dest_assemble_rgb(r, g, b); + curu += dudx; + curv += dvdx; } + } + } + } - // lookup case - else + + //------------------------------------------------- + // draw_quad_yuy16_add - perform + // rasterization by using RGB add after YUY + // conversion + //------------------------------------------------- + + static void draw_quad_yuy16_add(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup) + { + INT32 dudx = setup.dudx; + INT32 dvdx = setup.dvdx; + INT32 endx = setup.endx; + + // simply can't do this without reading from the dest + if (_NoDestRead) + return; + + // fast case: no coloring, no alpha + if (prim.color.r >= 1.0f && prim.color.g >= 1.0f && prim.color.b >= 1.0f && is_opaque(prim.color.a)) + { + // loop over rows + for (INT32 y = setup.starty; y < setup.endy; y++) + { + _PixelType *dest = dstdata + y * pitch + setup.startx; + INT32 curu = setup.startu + (y - setup.starty) * setup.dudy; + INT32 curv = setup.startv + (y - setup.starty) * setup.dvdy; + + // loop over cols + for (INT32 x = setup.startx; x < endx; x++) { - // loop over cols - for (INT32 x = setup.startx; x < endx; x++) - { - UINT32 pix = ycc_to_rgb(get_texel_yuy16(prim.texture, curu, curv)); - UINT32 dpix = _NoDestRead ? 0 : *dest; - UINT32 r = (source32_r(pix) * sr + dest_r(dpix) * invsa) >> 8; - UINT32 g = (source32_g(pix) * sg + dest_g(dpix) * invsa) >> 8; - UINT32 b = (source32_b(pix) * sb + dest_b(dpix) * invsa) >> 8; + UINT32 pix = ycc_to_rgb(get_texel_yuy16(prim.texture, curu, curv)); + UINT32 dpix = _NoDestRead ? 0 : *dest; + UINT32 r = source32_r(pix) + dest_r(dpix); + UINT32 g = source32_g(pix) + dest_g(dpix); + UINT32 b = source32_b(pix) + dest_b(dpix); + r = (r | -(r >> (8 - _SrcShiftR))) & (0xff >> _SrcShiftR); + g = (g | -(g >> (8 - _SrcShiftG))) & (0xff >> _SrcShiftG); + b = (b | -(b >> (8 - _SrcShiftB))) & (0xff >> _SrcShiftB); + *dest++ = dest_assemble_rgb(r, g, b); + curu += dudx; + curv += dvdx; + } + } + } - *dest++ = dest_assemble_rgb(r, g, b); - curu += dudx; - curv += dvdx; - } + // alpha and/or coloring case + else + { + UINT32 sr = UINT32(256.0f * prim.color.r); + UINT32 sg = UINT32(256.0f * prim.color.g); + UINT32 sb = UINT32(256.0f * prim.color.b); + UINT32 sa = UINT32(256.0f * prim.color.a); + + // clamp R,G,B and inverse A to 0-256 range + if (sr > 0x100) { if (INT32(sr) < 0) sr = 0; else sr = 0x100; } + if (sg > 0x100) { if (INT32(sg) < 0) sg = 0; else sg = 0x100; } + if (sb > 0x100) { if (INT32(sb) < 0) sb = 0; else sb = 0x100; } + if (sa > 0x100) { if (INT32(sa) < 0) sa = 0; else sa = 0x100; } + + // loop over rows + for (INT32 y = setup.starty; y < setup.endy; y++) + { + _PixelType *dest = dstdata + y * pitch + setup.startx; + INT32 curu = setup.startu + (y - setup.starty) * setup.dudy; + INT32 curv = setup.startv + (y - setup.starty) * setup.dvdy; + + // loop over cols + for (INT32 x = setup.startx; x < endx; x++) + { + UINT32 pix = ycc_to_rgb(get_texel_yuy16(prim.texture, curu, curv)); + UINT32 dpix = _NoDestRead ? 0 : *dest; + UINT32 r = ((source32_r(pix) * sr * sa) >> 16) + dest_r(dpix); + UINT32 g = ((source32_g(pix) * sg * sa) >> 16) + dest_g(dpix); + UINT32 b = ((source32_b(pix) * sb * sa) >> 16) + dest_b(dpix); + r = (r | -(r >> (8 - _SrcShiftR))) & (0xff >> _SrcShiftR); + g = (g | -(g >> (8 - _SrcShiftG))) & (0xff >> _SrcShiftG); + b = (b | -(b >> (8 - _SrcShiftB))) & (0xff >> _SrcShiftB); + *dest++ = dest_assemble_rgb(r, g, b); + curu += dudx; + curv += dvdx; } } } @@ -1865,9 +1889,14 @@ private: break; case PRIMFLAG_TEXFORMAT(TEXFORMAT_YUY16) | PRIMFLAG_BLENDMODE(BLENDMODE_NONE): + case PRIMFLAG_TEXFORMAT(TEXFORMAT_YUY16) | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA): draw_quad_yuy16_none(prim, dstdata, pitch, setup); break; + case PRIMFLAG_TEXFORMAT(TEXFORMAT_YUY16) | PRIMFLAG_BLENDMODE(BLENDMODE_ADD): + draw_quad_yuy16_add(prim, dstdata, pitch, setup); + break; + case PRIMFLAG_TEXFORMAT(TEXFORMAT_RGB32) | PRIMFLAG_BLENDMODE(BLENDMODE_NONE): case PRIMFLAG_TEXFORMAT(TEXFORMAT_RGB32) | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA): case PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32) | PRIMFLAG_BLENDMODE(BLENDMODE_NONE): diff --git a/src/emu/rendfont.cpp b/src/emu/rendfont.cpp index 2f27fd0e506..7aebe9d9b35 100644 --- a/src/emu/rendfont.cpp +++ b/src/emu/rendfont.cpp @@ -18,6 +18,10 @@ #include "ui/cmdrender.h" +#include +#include + + const UINT64 render_font::CACHED_BDF_HASH_SIZE; //************************************************************************** @@ -55,6 +59,8 @@ inline render_font::glyph &render_font::get_char(unicode_char chnum) static glyph dummy_glyph; // grab the table; if none, return the dummy character + if ((chnum / 256) >= ARRAY_LENGTH(m_glyphs)) + return dummy_glyph; if (!m_glyphs[chnum / 256] && m_format == FF_OSD) m_glyphs[chnum / 256] = new glyph[256]; if (!m_glyphs[chnum / 256]) @@ -444,19 +450,19 @@ float render_font::string_width(float height, float aspect, const char *string) float render_font::utf8string_width(float height, float aspect, const char *utf8string) { - int length = strlen(utf8string); + std::size_t const length = std::strlen(utf8string); // loop over the string and accumulate widths int count; - int totwidth = 0; - for (int offset = 0; offset < length; offset += count) + INT32 totwidth = 0; + for (std::size_t offset = 0U; offset < length; offset += unsigned(count)) { unicode_char uchar; count = uchar_from_utf8(&uchar, utf8string + offset, length - offset); - if (count == -1) + if (count < 0) break; - if (uchar < 0x10000) - totwidth += get_char(uchar).width; + + totwidth += get_char(uchar).width; } // scale the final result based on height @@ -617,7 +623,7 @@ bool render_font::load_bdf() } // if we have everything, allocate a new character - if (charnum >= 0 && charnum < 65536 && rawdata != nullptr && bmwidth >= 0 && bmheight >= 0) + if (charnum >= 0 && charnum < (256 * ARRAY_LENGTH(m_glyphs)) && rawdata != nullptr && bmwidth >= 0 && bmheight >= 0) { // if we don't have a subtable yet, make one if (!m_glyphs[charnum / 256]) @@ -741,7 +747,7 @@ bool render_font::save_cached(const char *filename, UINT32 hash) // determine the number of characters int numchars = 0; - for (int chnum = 0; chnum < 65536; chnum++) + for (int chnum = 0; chnum < (256 * ARRAY_LENGTH(m_glyphs)); chnum++) { if (m_glyphs[chnum / 256]) { @@ -789,7 +795,7 @@ bool render_font::save_cached(const char *filename, UINT32 hash) // loop over all characters int tableindex = 0; - for (int chnum = 0; chnum < 65536; chnum++) + for (int chnum = 0; chnum < (256 * ARRAY_LENGTH(m_glyphs)); chnum++) { glyph &gl = get_char(chnum); if (gl.width > 0) diff --git a/src/emu/rendfont.h b/src/emu/rendfont.h index 88445510a45..52a65527282 100644 --- a/src/emu/rendfont.h +++ b/src/emu/rendfont.h @@ -96,14 +96,14 @@ private: int m_height; // height of the font, from ascent to descent int m_yoffs; // y offset from baseline to descent float m_scale; // 1 / height precomputed - glyph *m_glyphs[256]; // array of glyph subtables + glyph *m_glyphs[17*256]; // array of glyph subtables std::vector m_rawdata; // pointer to the raw data for the font UINT64 m_rawsize; // size of the raw font data std::unique_ptr m_osdfont; // handle to the OSD font int m_height_cmd; // height of the font, from ascent to descent int m_yoffs_cmd; // y offset from baseline to descent - glyph *m_glyphs_cmd[256]; // array of glyph subtables + EQUIVALENT_ARRAY(m_glyphs, glyph *) m_glyphs_cmd; // array of glyph subtables std::vector m_rawdata_cmd; // pointer to the raw data for the font // constants diff --git a/src/emu/romentry.h b/src/emu/romentry.h index b4d8fce33a5..fb364fe0a9e 100644 --- a/src/emu/romentry.h +++ b/src/emu/romentry.h @@ -115,17 +115,29 @@ enum // TYPE DEFINITIONS //************************************************************************** +// ======================> tiny_rom_entry + +struct tiny_rom_entry +{ + const char *name; + const char *hashdata; + UINT32 offset; + UINT32 length; + UINT32 flags; +}; + + // ======================> rom_entry class rom_entry { public: - rom_entry(const char *name, const char *hashdata, UINT32 offset, UINT32 length, UINT32 flags) - : m_name(name != nullptr ? name : "") - , m_hashdata(hashdata != nullptr ? hashdata : "") - , m_offset(offset) - , m_length(length) - , m_flags(flags) {} + rom_entry(const tiny_rom_entry &ent) + : m_name(ent.name != nullptr ? ent.name : "") + , m_hashdata(ent.hashdata != nullptr ? ent.hashdata : "") + , m_offset(ent.offset) + , m_length(ent.length) + , m_flags(ent.flags) {} rom_entry(std::string &&name, std::string &&hashdata, UINT32 offset, UINT32 length, UINT32 flags) : m_name(std::move(name)) , m_hashdata(std::move(hashdata)) diff --git a/src/emu/romload.cpp b/src/emu/romload.cpp index 989539259cc..7a983118e8a 100644 --- a/src/emu/romload.cpp +++ b/src/emu/romload.cpp @@ -2,7 +2,7 @@ // copyright-holders:Nicola Salmoria,Paul Priest,Aaron Giles /********************************************************************* - romload.c + romload.cpp ROM loading functions. *********************************************************************/ @@ -10,7 +10,7 @@ #include "emu.h" #include "emuopts.h" #include "drivenum.h" -#include "softlist.h" +#include "softlist_dev.h" #include "ui/uimain.h" @@ -268,23 +268,22 @@ int rom_load_manager::set_disk_handle(const char *region, const char *fullpath) void rom_load_manager::determine_bios_rom(device_t &device, const char *specbios) { const char *defaultname = nullptr; - const rom_entry *rom; int default_no = 1; int bios_count = 0; device.set_system_bios(0); /* first determine the default BIOS name */ - for (rom = device.rom_region(); !ROMENTRY_ISEND(rom); rom++) - if (ROMENTRY_ISDEFAULT_BIOS(rom)) - defaultname = ROM_GETNAME(rom); + for (const rom_entry &rom : device.rom_region_vector()) + if (ROMENTRY_ISDEFAULT_BIOS(&rom)) + defaultname = ROM_GETNAME(&rom); /* look for a BIOS with a matching name */ - for (rom = device.rom_region(); !ROMENTRY_ISEND(rom); rom++) - if (ROMENTRY_ISSYSTEM_BIOS(rom)) + for (const rom_entry &rom : device.rom_region_vector()) + if (ROMENTRY_ISSYSTEM_BIOS(&rom)) { - const char *biosname = ROM_GETNAME(rom); - int bios_flags = ROM_GETBIOSFLAGS(rom); + const char *biosname = ROM_GETNAME(&rom); + int bios_flags = ROM_GETBIOSFLAGS(&rom); char bios_number[20]; /* Allow '-bios n' to still be used */ @@ -813,7 +812,7 @@ void rom_load_manager::fill_rom_data(const rom_entry *romp) fatalerror("Error in RomModule definition: FILL has an invalid length\n"); // for fill bytes, the byte that gets filled is the first byte of the hashdata string - UINT8 fill_byte = (UINT8)atoi(ROM_GETHASHDATA(romp)); + UINT8 fill_byte = (UINT8)strtol(ROM_GETHASHDATA(romp), nullptr, 0); // fill the data (filling value is stored in place of the hashdata) if(skip != 0) @@ -1488,3 +1487,30 @@ rom_load_manager::rom_load_manager(running_machine &machine) /* display the results and exit */ display_rom_load_results(false); } + + +// ------------------------------------------------- +// rom_build_entries - builds a rom_entry vector +// from a tiny_rom_entry array +// ------------------------------------------------- + +std::vector rom_build_entries(const tiny_rom_entry *tinyentries) +{ + std::vector result; + + if (tinyentries != nullptr) + { + int i = 0; + do + { + result.emplace_back(tinyentries[i]); + } while ((tinyentries[i++].flags & ROMENTRY_TYPEMASK) != ROMENTRYTYPE_END); + } + else + { + const tiny_rom_entry end_entry = { nullptr, nullptr, 0, 0, ROMENTRYTYPE_END }; + result.emplace_back(end_entry); + } + return result; +} + diff --git a/src/emu/romload.h b/src/emu/romload.h index 9364477d6aa..8fb736cc527 100644 --- a/src/emu/romload.h +++ b/src/emu/romload.h @@ -90,7 +90,7 @@ class software_list_device; /* ----- start/stop macros ----- */ #define ROM_NAME(name) rom_##name -#define ROM_START(name) static const rom_entry ROM_NAME(name)[] = { +#define ROM_START(name) static const tiny_rom_entry ROM_NAME(name)[] = { #define ROM_END { nullptr, nullptr, 0, 0, ROMENTRYTYPE_END } }; @@ -280,6 +280,9 @@ std::string rom_parameter_name(const device_t &device, const rom_entry *romp); /* return the value for a per-game parameter */ std::string rom_parameter_value(const rom_entry *romp); +// builds a rom_entry vector from a tiny_rom_entry array +std::vector rom_build_entries(const tiny_rom_entry *tinyentries); + /* open a disk image, searching up the parent and loading by checksum */ int open_disk_image(emu_options &options, const game_driver *gamedrv, const rom_entry *romp, chd_file &image_chd, const char *locationtag); diff --git a/src/emu/softlist.cpp b/src/emu/softlist.cpp index 2d6793db3af..d7a8b8d86d8 100644 --- a/src/emu/softlist.cpp +++ b/src/emu/softlist.cpp @@ -2,137 +2,16 @@ // copyright-holders:Wilbert Pol /*************************************************************************** - softlist.c + softlist.cpp Software list construction helpers. ***************************************************************************/ -#include "emu.h" -#include "emuopts.h" #include "softlist.h" -#include "validity.h" +#include "hash.h" #include "expat.h" -#include - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -typedef std::unordered_map softlist_map; - - -// ======================> softlist_parser - -class softlist_parser -{ -public: - // construction (== execution) - softlist_parser(software_list_device &list, std::ostringstream &errors); - -private: - enum parse_position - { - POS_ROOT, - POS_MAIN, - POS_SOFT, - POS_PART, - POS_DATA - }; - - // internal parsing helpers - const char *filename() const { return m_list.filename(); } - const char *infoname() const { return (m_current_info != nullptr) ? m_current_info->shortname().c_str() : "???"; } - int line() const { return XML_GetCurrentLineNumber(m_parser); } - int column() const { return XML_GetCurrentColumnNumber(m_parser); } - const char *parser_error() const { return XML_ErrorString(XML_GetErrorCode(m_parser)); } - - // internal error helpers - template void parse_error(Format &&fmt, Params &&... args); - void unknown_tag(const char *tagname) { parse_error("Unknown tag: %s", tagname); } - void unknown_attribute(const char *attrname) { parse_error("Unknown attribute: %s", attrname); } - - // internal helpers - template std::vector parse_attributes(const char **attributes, const T &attrlist); - bool parse_name_and_value(const char **attributes, std::string &name, std::string &value); - void add_rom_entry(std::string &&name, std::string &&hashdata, UINT32 offset, UINT32 length, UINT32 flags); - - // expat callbacks - static void start_handler(void *data, const char *tagname, const char **attributes); - static void data_handler(void *data, const XML_Char *s, int len); - static void end_handler(void *data, const char *name); - - // internal parsing - void parse_root_start(const char *tagname, const char **attributes); - void parse_main_start(const char *tagname, const char **attributes); - void parse_soft_start(const char *tagname, const char **attributes); - void parse_part_start(const char *tagname, const char **attributes); - void parse_data_start(const char *tagname, const char **attributes); - void parse_soft_end(const char *name); - - // internal parsing state - software_list_device & m_list; - std::ostringstream & m_errors; - XML_Parser m_parser; - bool m_done; - bool m_data_accum_expected; - std::string m_data_accum; - software_info * m_current_info; - software_part * m_current_part; - parse_position m_pos; -}; - - - -//************************************************************************** -// GLOBAL VARIABLES -//************************************************************************** - -// device type definition -const device_type SOFTWARE_LIST = &device_creator; -false_software_list_loader false_software_list_loader::s_instance; -rom_software_list_loader rom_software_list_loader::s_instance; -image_software_list_loader image_software_list_loader::s_instance; - - - -//************************************************************************** -// SOFTWARE LIST LOADER -//************************************************************************** - -//------------------------------------------------- -// false_software_list_loader::load_software -//------------------------------------------------- - -bool false_software_list_loader::load_software(device_image_interface &device, software_list_device &swlist, const char *swname, const rom_entry *start_entry) const -{ - return false; -} - - -//------------------------------------------------- -// rom_software_list_loader::load_software -//------------------------------------------------- - -bool rom_software_list_loader::load_software(device_image_interface &device, software_list_device &swlist, const char *swname, const rom_entry *start_entry) const -{ - swlist.machine().rom_load().load_software_part_region(device, swlist, swname, start_entry); - return true; -} - - -//------------------------------------------------- -// image_software_list_loader::load_software -//------------------------------------------------- - -bool image_software_list_loader::load_software(device_image_interface &device, software_list_device &swlist, const char *swname, const rom_entry *start_entry) const -{ - return device.load_software(swlist, swname, start_entry); -} - - //************************************************************************** // FEATURE LIST ITEM //************************************************************************** @@ -194,56 +73,6 @@ const char *software_part::feature(const std::string &feature_name) const } -//------------------------------------------------- -// is_compatible - determine if we are compatible -// with the given software_list_device -//------------------------------------------------- - -software_compatibility software_part::is_compatible(const software_list_device &swlistdev) const -{ - // get the softlist filter; if null, assume compatible - const char *filter = swlistdev.filter(); - if (filter == nullptr) - return SOFTWARE_IS_COMPATIBLE; - - // copy the comma-delimited string and ensure it ends with a final comma - std::string filt = std::string(filter).append(","); - - // get the incompatibility filter and test against it first if it exists - const char *incompatibility = feature("incompatibility"); - if (incompatibility != nullptr) - { - // copy the comma-delimited string and ensure it ends with a final comma - std::string incomp = std::string(incompatibility).append(","); - - // iterate over filter items and see if they exist in the list; if so, it's incompatible - 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 (incomp.find(token) != -1) - return SOFTWARE_IS_INCOMPATIBLE; - } - } - - // get the compatibility feature; if null, assume compatible - const char *compatibility = feature("compatibility"); - if (compatibility == nullptr) - return SOFTWARE_IS_COMPATIBLE; - - // copy the comma-delimited string and ensure it ends with a final comma - std::string comp = std::string(compatibility).append(","); - - // iterate over filter items and see if they exist in the compatibility list; if so, it's compatible - 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) != -1) - return SOFTWARE_IS_COMPATIBLE; - } - return SOFTWARE_NOT_COMPATIBLE; -} - - //------------------------------------------------- // matches_interface - determine if we match // an interface in the provided list @@ -264,35 +93,6 @@ bool software_part::matches_interface(const char *interface_list) const } -//------------------------------------------------- -// find_mountable_image - find an image interface -// that can automatically mount this software part -//------------------------------------------------- - -device_image_interface *software_part::find_mountable_image(const machine_config &mconfig) const -{ - // if automount="no", don't bother - const char *mount = feature("automount"); - if (mount != nullptr && strcmp(mount, "no") == 0) - return nullptr; - - for (device_image_interface &image : image_interface_iterator(mconfig.root_device())) - { - const char *interface = image.image_interface(); - if (interface != nullptr && matches_interface(interface)) - { - // mount only if not already mounted - const char *option = mconfig.options().value(image.brief_instance_name()); - if (*option == '\0' && !image.filename()) - - return ℑ - } - } - return nullptr; -} - - - //************************************************************************** // SOFTWARE INFO //************************************************************************** @@ -301,21 +101,16 @@ device_image_interface *software_part::find_mountable_image(const machine_config // software_info - constructor //------------------------------------------------- -software_info::software_info(software_list_device &list, std::string &&name, std::string &&parent, const char *supported) - : m_next(nullptr), - m_list(list), - m_supported(SOFTWARE_SUPPORTED_YES), +software_info::software_info(std::string &&name, std::string &&parent, const std::string &supported) + : m_supported(SOFTWARE_SUPPORTED_YES), m_shortname(std::move(name)), m_parentname(std::move(parent)) { // handle the supported flag if provided - if (supported != nullptr) - { - if (strcmp(supported, "partial") == 0) - m_supported = SOFTWARE_SUPPORTED_PARTIAL; - else if (strcmp(supported, "no") == 0) - m_supported = SOFTWARE_SUPPORTED_NO; - } + if (supported == "partial") + m_supported = SOFTWARE_SUPPORTED_PARTIAL; + else if (supported == "no") + m_supported = SOFTWARE_SUPPORTED_NO; } @@ -324,22 +119,20 @@ software_info::software_info(software_list_device &list, std::string &&name, std // optional interface match //------------------------------------------------- -const software_part *software_info::find_part(const char *partname, const char *interface) const +const software_part *software_info::find_part(const std::string &partname, const char *interface) const { // if neither partname nor interface supplied, then we just return the first entry - if (partname != nullptr && strlen(partname)==0) partname = nullptr; - - if (partname == nullptr && interface == nullptr) + if (partname.empty() && interface == nullptr) return &m_partdata.front(); // look for the part by name and match against the interface if provided for (const software_part &part : m_partdata) - if (partname != nullptr && (partname == part.name())) + if (!partname.empty() && (partname == part.name())) { if (interface == nullptr || part.matches_interface(interface)) return ∂ } - else if (partname == nullptr && part.matches_interface(interface)) + else if (partname.empty() && part.matches_interface(interface)) return ∂ return nullptr; } @@ -365,383 +158,6 @@ bool software_info::has_multiple_parts(const char *interface) const } - -//************************************************************************** -// SOFTWARE LIST DEVICE -//************************************************************************** - -//------------------------------------------------- -// software_list_device - constructor -//------------------------------------------------- - -software_list_device::software_list_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, SOFTWARE_LIST, "Software list", tag, owner, clock, "software_list", __FILE__), - m_list_type(SOFTWARE_LIST_ORIGINAL_SYSTEM), - m_filter(nullptr), - m_parsed(false), - m_file(mconfig.options().hash_path(), OPEN_FLAG_READ), - m_description("") -{ -} - - -//------------------------------------------------- -// static_set_type - configuration helper -// to set the list type -//------------------------------------------------- - -void software_list_device::static_set_type(device_t &device, const char *list, softlist_type list_type) -{ - software_list_device &swlistdev = downcast(device); - swlistdev.m_list_name.assign(list); - swlistdev.m_list_type = list_type; -} - - -//------------------------------------------------- -// static_set_custom_handler - configuration -// helper to set a custom callback -//------------------------------------------------- - -void software_list_device::static_set_filter(device_t &device, const char *filter) -{ - downcast(device).m_filter = filter; -} - - -//------------------------------------------------- -// device_start - device-specific startup -//------------------------------------------------- - -void software_list_device::device_start() -{ -} - - -//------------------------------------------------- -// find_approx_matches - search ourselves for -// a list of possible matches of the given name -// and optional interface -//------------------------------------------------- - -void software_list_device::find_approx_matches(const char *name, int matches, const software_info **list, const char *interface) -{ - // if no name, return - if (name == nullptr || name[0] == 0) - return; - - // initialize everyone's states - std::vector penalty(matches); - for (int matchnum = 0; matchnum < matches; matchnum++) - { - penalty[matchnum] = 9999; - list[matchnum] = nullptr; - } - - // iterate over our info (will cause a parse if needed) - for (const software_info &swinfo : get_info()) - { - const software_part &part = swinfo.parts().front(); - if ((interface == nullptr || part.matches_interface(interface)) && part.is_compatible(*this) == SOFTWARE_IS_COMPATIBLE) - { - // pick the best match between driver name and description - int longpenalty = driver_list::penalty_compare(name, swinfo.longname().c_str()); - int shortpenalty = driver_list::penalty_compare(name, swinfo.shortname().c_str()); - int curpenalty = std::min(longpenalty, shortpenalty); - - // insert into the sorted table of matches - for (int matchnum = matches - 1; matchnum >= 0; matchnum--) - { - // stop if we're worse than the current entry - if (curpenalty >= penalty[matchnum]) - break; - - // as long as this isn't the last entry, bump this one down - if (matchnum < matches - 1) - { - penalty[matchnum + 1] = penalty[matchnum]; - list[matchnum + 1] = list[matchnum]; - } - list[matchnum] = &swinfo; - penalty[matchnum] = curpenalty; - } - } - } -} - - -//------------------------------------------------- -// release - reset to a pre-parsed state -//------------------------------------------------- - -void software_list_device::release() -{ - osd_printf_verbose("Resetting %s\n", m_file.filename()); - m_parsed = false; - m_description.clear(); - m_errors.clear(); - m_infolist.clear(); -} - - -//------------------------------------------------- -// find_by_name - find a software list by name -// across all software list devices -//------------------------------------------------- - -software_list_device *software_list_device::find_by_name(const machine_config &config, const char *name) -{ - // iterate over each device in the system and find a match - for (software_list_device &swlistdev : software_list_device_iterator(config.root_device())) - if (strcmp(swlistdev.list_name(), name) == 0) - return &swlistdev; - return nullptr; -} - - -//------------------------------------------------- -// software_display_matches - display a list of -// possible matches in the system to the given -// name, across all software list devices -//------------------------------------------------- - -void software_list_device::display_matches(const machine_config &config, const char *interface, const char *name) -{ - // check if there is at least one software list - software_list_device_iterator deviter(config.root_device()); - if (deviter.first() != nullptr) - osd_printf_error("\n\"%s\" approximately matches the following\n" - "supported software items (best match first):\n\n", name); - - // iterate through lists - for (software_list_device &swlistdev : deviter) - { - // get the top 16 approximate matches for the selected device interface (i.e. only carts for cartslot, etc.) - const software_info *matches[16] = { nullptr }; - swlistdev.find_approx_matches(name, ARRAY_LENGTH(matches), matches, interface); - - // if we found some, print them - if (matches[0] != nullptr) - { - // different output depending on original system or compatible - if (swlistdev.list_type() == SOFTWARE_LIST_ORIGINAL_SYSTEM) - osd_printf_error("* Software list \"%s\" (%s) matches: \n", swlistdev.list_name(), swlistdev.description()); - else - osd_printf_error("* Compatible software list \"%s\" (%s) matches: \n", swlistdev.list_name(), swlistdev.description()); - - // print them out - for (auto &match : matches) - { - if (match != nullptr) - osd_printf_error("%-18s%s\n", match->shortname().c_str(), match->longname().c_str()); - } - - osd_printf_error("\n"); - } - } -} - - -//------------------------------------------------- -// find - find an item by name in the software -// list, using wildcards and optionally starting -// from an intermediate point -//------------------------------------------------- - -const software_info *software_list_device::find(const char *look_for) -{ - // nullptr search returns nothing - if (look_for == nullptr) - return nullptr; - - bool iswild = strchr(look_for, '*') != nullptr || strchr(look_for, '?'); - - // find a match (will cause a parse if needed when calling get_info) - const auto &info_list = get_info(); - auto iter = std::find_if( - info_list.begin(), - info_list.end(), - [&](const software_info &info) - { - const char *shortname = info.shortname().c_str(); - return (iswild && core_strwildcmp(look_for, shortname) == 0) - || core_stricmp(look_for, shortname) == 0; - }); - - return iter != info_list.end() - ? &*iter - : nullptr; -} - - -//------------------------------------------------- -// parse - parse our softlist file -//------------------------------------------------- - -void software_list_device::parse() -{ - // skip if done - if (m_parsed) - return; - - // reset the errors - m_errors.clear(); - - // attempt to open the file - osd_file::error filerr = m_file.open(m_list_name.c_str(), ".xml"); - if (filerr == osd_file::error::NONE) - { - // parse if no error - std::ostringstream errs; - softlist_parser parser(*this, errs); - m_file.close(); - m_errors = errs.str(); - } - else - m_errors = string_format("Error opening file: %s\n", filename()); - - // indicate that we've been parsed - m_parsed = true; -} - - -//------------------------------------------------- -// device_validity_check - validate the device -// configuration -//------------------------------------------------- - -void software_list_device::device_validity_check(validity_checker &valid) const -{ - // add to the global map whenever we check a list so we don't re-check - // it in the future - if (valid.already_checked(std::string("softlist/").append(m_list_name).c_str())) - return; - - // do device validation only in case of validate command - if (!valid.validate_all()) - return; - - // actually do the validate - const_cast(this)->internal_validity_check(valid); -} - - -//------------------------------------------------- -// internal_validity_check - internal helper to -// check the list -//------------------------------------------------- - -void software_list_device::internal_validity_check(validity_checker &valid) -{ - enum { NAME_LEN_PARENT = 8, NAME_LEN_CLONE = 16 }; - - softlist_map names; - softlist_map descriptions; - for (const software_info &swinfo : get_info()) - { - // first parse and output core errors if any - if (m_errors.length() > 0) - { - osd_printf_error("%s: Errors parsing software list:\n%s", filename(), errors_string()); - break; - } - - // Now check if the xml data is valid: - - // Did we lost any description? - if (swinfo.longname().empty()) - { - osd_printf_error("%s: %s has no description\n", filename(), swinfo.shortname().c_str()); - break; - } - - // Did we lost any year? - if (swinfo.year().empty()) - { - osd_printf_error("%s: %s has no year\n", filename(), swinfo.shortname().c_str()); - break; - } - - // Did we lost any publisher? - if (swinfo.publisher().empty()) - { - osd_printf_error("%s: %s has no publisher\n", filename(), swinfo.shortname().c_str()); - break; - } - - // Did we lost the software parts? - if (swinfo.parts().empty()) - { - osd_printf_error("%s: %s has no part\n", filename(), swinfo.shortname().c_str()); - break; - } - - // Second, since the xml is fine, run additional checks: - - // check for duplicate names - if (!names.insert(std::make_pair(swinfo.shortname(), &swinfo)).second) - { - const software_info *match = names.find(swinfo.shortname())->second; - osd_printf_error("%s: %s is a duplicate name (%s)\n", filename(), swinfo.shortname().c_str(), match->shortname().c_str()); - } - - // check for duplicate descriptions - std::string longname = std::string(swinfo.longname()); - if (!descriptions.insert(std::make_pair(strmakelower(longname), &swinfo)).second) - osd_printf_error("%s: %s is a duplicate description (%s)\n", filename(), swinfo.longname().c_str(), swinfo.shortname().c_str()); - - bool is_clone = false; - if (!swinfo.parentname().empty()) - { - is_clone = true; - if (swinfo.parentname() == swinfo.shortname()) - { - osd_printf_error("%s: %s is set as a clone of itself\n", filename(), swinfo.shortname().c_str()); - break; - } - - // make sure the parent exists - const software_info *swinfo2 = find(swinfo.parentname().c_str()); - - if (swinfo2 == nullptr) - osd_printf_error("%s: parent '%s' software for '%s' not found\n", filename(), swinfo.parentname().c_str(), swinfo.shortname().c_str()); - else if (!swinfo2->parentname().empty()) - osd_printf_error("%s: %s is a clone of a clone\n", filename(), swinfo.shortname().c_str()); - } - - // make sure the driver name is 8 chars or less - if ((is_clone && swinfo.shortname().length() > NAME_LEN_CLONE) || (!is_clone && swinfo.shortname().length() > NAME_LEN_PARENT)) - osd_printf_error("%s: %s %s driver name must be %d characters or less\n", filename(), swinfo.shortname().c_str(), - is_clone ? "clone" : "parent", is_clone ? NAME_LEN_CLONE : NAME_LEN_PARENT); - - // make sure the year is only digits, '?' or '+' - for (const char *s = swinfo.year().c_str(); *s != 0; s++) - if (!isdigit((UINT8)*s) && *s != '?' && *s != '+') - { - osd_printf_error("%s: %s has an invalid year '%s'\n", filename(), swinfo.shortname().c_str(), swinfo.year().c_str()); - break; - } - - softlist_map part_names; - for (const software_part &part : swinfo.parts()) - { - if (part.interface().empty()) - osd_printf_error("%s: %s has a part (%s) without interface\n", filename(), swinfo.shortname().c_str(), part.name().c_str()); - - if (part.romdata() == nullptr) - osd_printf_error("%s: %s has a part (%s) with no data\n", filename(), swinfo.shortname().c_str(), part.name().c_str()); - - if (!part_names.insert(std::make_pair(part.name(), &swinfo)).second) - osd_printf_error("%s: %s has a part (%s) whose name is duplicate\n", filename(), swinfo.shortname().c_str(), part.name().c_str()); - } - } - - // release all the memory - release(); -} - - - //************************************************************************** // SOFTWARE LIST PARSER //************************************************************************** @@ -750,17 +166,18 @@ void software_list_device::internal_validity_check(validity_checker &valid) // softlist_parser - constructor //------------------------------------------------- -softlist_parser::softlist_parser(software_list_device &list, std::ostringstream &errors) - : m_list(list), +softlist_parser::softlist_parser(util::core_file &file, const std::string &filename, std::string &description, std::list &infolist, std::ostringstream &errors) + : m_file(file), + m_filename(filename), + m_infolist(infolist), m_errors(errors), m_done(false), + m_description(description), m_data_accum_expected(false), m_current_info(nullptr), m_current_part(nullptr), m_pos(POS_ROOT) { - osd_printf_verbose("Parsing %s\n", m_list.m_file.filename()); - // create the parser m_parser = XML_ParserCreate_MM(nullptr, nullptr, nullptr); if (m_parser == nullptr) @@ -772,12 +189,12 @@ softlist_parser::softlist_parser(software_list_device &list, std::ostringstream XML_SetCharacterDataHandler(m_parser, &softlist_parser::data_handler); // parse the file contents - m_list.m_file.seek(0, SEEK_SET); + m_file.seek(0, SEEK_SET); char buffer[1024]; while (!m_done) { - UINT32 length = m_list.m_file.read(buffer, sizeof(buffer)); - m_done = m_list.m_file.eof(); + UINT32 length = m_file.read(buffer, sizeof(buffer)); + m_done = m_file.eof(); if (XML_Parse(m_parser, buffer, length, m_done) == XML_STATUS_ERROR) { parse_error("%s", parser_error()); @@ -787,9 +204,39 @@ softlist_parser::softlist_parser(software_list_device &list, std::ostringstream // free the parser XML_ParserFree(m_parser); - osd_printf_verbose("Parsing complete\n"); } + +//------------------------------------------------- +// line +//------------------------------------------------- + +int softlist_parser::line() const +{ + return XML_GetCurrentLineNumber(m_parser); +} + + +//------------------------------------------------- +// column +//------------------------------------------------- + +int softlist_parser::column() const +{ + return XML_GetCurrentColumnNumber(m_parser); +} + + +//------------------------------------------------- +// parser_error +//------------------------------------------------- + +const char *softlist_parser::parser_error() const +{ + return XML_ErrorString(XML_GetErrorCode(m_parser)); +} + + //------------------------------------------------- // parse_error - append a parsing error with // filename, line and column information @@ -799,7 +246,7 @@ template inline void softlist_parser::parse_error(Format &&fmt, Params &&... args) { // always start with filename(line.column): - util::stream_format(m_errors, "%s(%d.%d): ", filename(), line(), column()); + util::stream_format(m_errors, "%s(%d.%d): ", m_filename, line(), column()); // append the remainder of the string util::stream_format(m_errors, std::forward(fmt), std::forward(args)...); @@ -894,17 +341,13 @@ void softlist_parser::add_rom_entry(std::string &&name, std::string &&hashdata, // make sure we don't add duplicate regions if (!name.empty() && (flags & ROMENTRY_TYPEMASK) == ROMENTRYTYPE_REGION) + { for (auto &elem : m_current_part->m_romdata) - if (!elem.name().empty() && elem.name() == name) + if (elem.name() == name) parse_error("Duplicated dataarea %s in software %s", name, infoname()); + } - // create the new entry and append it - m_current_part->m_romdata.emplace_back( - std::move(name), - std::move(hashdata), - offset, - length, - flags); + m_current_part->m_romdata.emplace_back(std::move(name), std::move(hashdata), offset, length, flags); } @@ -986,7 +429,7 @@ void softlist_parser::end_handler(void *data, const char *name) // data_handler - expat data handler //------------------------------------------------- -void softlist_parser::data_handler(void *data, const XML_Char *s, int len) +void softlist_parser::data_handler(void *data, const char *s, int len) { softlist_parser *state = reinterpret_cast(data); @@ -1018,7 +461,7 @@ void softlist_parser::parse_root_start(const char *tagname, const char **attribu const auto attrvalues = parse_attributes(attributes, attrnames); if (!attrvalues[1].empty()) - m_list.m_description = attrvalues[1]; + m_description = attrvalues[1]; } else unknown_tag(tagname); @@ -1040,8 +483,8 @@ void softlist_parser::parse_main_start(const char *tagname, const char **attribu if (!attrvalues[0].empty()) { - m_list.m_infolist.emplace_back(m_list, std::move(attrvalues[0]), std::move(attrvalues[1]), attrvalues[2].c_str()); - m_current_info = &m_list.m_infolist.back(); + m_infolist.emplace_back(std::move(attrvalues[0]), std::move(attrvalues[1]), attrvalues[2].c_str()); + m_current_info = &m_infolist.back(); } else parse_error("No name defined for item"); @@ -1354,7 +797,7 @@ void softlist_parser::parse_soft_end(const char *tagname) return; // was any dataarea/rom information encountered? if so, add a terminator - if (m_current_part->romdata() != nullptr) + if (!m_current_part->m_romdata.empty()) add_rom_entry("", "", 0, 0, ROMENTRYTYPE_END); // get the info; if present, copy shared data (we assume name/value strings live @@ -1364,3 +807,4 @@ void softlist_parser::parse_soft_end(const char *tagname) m_current_part->m_featurelist.emplace_back(item.name(), item.value()); } } + diff --git a/src/emu/softlist.h b/src/emu/softlist.h index 9b6cfd829bf..6f3b69deaa7 100644 --- a/src/emu/softlist.h +++ b/src/emu/softlist.h @@ -4,15 +4,16 @@ softlist.h - Software and software list information. + Software list file format. *********************************************************************/ #ifndef __SOFTLIST_H_ #define __SOFTLIST_H_ -#include "cstrpool.h" - +#include +#include "romentry.h" +#include "corefile.h" //************************************************************************** @@ -23,108 +24,13 @@ #define SOFTWARE_SUPPORTED_PARTIAL 1 #define SOFTWARE_SUPPORTED_NO 2 -enum softlist_type -{ - SOFTWARE_LIST_ORIGINAL_SYSTEM, - SOFTWARE_LIST_COMPATIBLE_SYSTEM -}; - -enum software_compatibility -{ - SOFTWARE_IS_COMPATIBLE, - SOFTWARE_IS_INCOMPATIBLE, - SOFTWARE_NOT_COMPATIBLE -}; - - -//************************************************************************** -// MACROS -//************************************************************************** - -#define MCFG_SOFTWARE_LIST_CONFIG(_list,_list_type) \ - software_list_device::static_set_type(*device, _list, _list_type); - -#define MCFG_SOFTWARE_LIST_ADD( _tag, _list ) \ - MCFG_DEVICE_ADD( _tag, SOFTWARE_LIST, 0 ) \ - MCFG_SOFTWARE_LIST_CONFIG(_list, SOFTWARE_LIST_ORIGINAL_SYSTEM) - -#define MCFG_SOFTWARE_LIST_COMPATIBLE_ADD( _tag, _list ) \ - MCFG_DEVICE_ADD( _tag, SOFTWARE_LIST, 0 ) \ - MCFG_SOFTWARE_LIST_CONFIG(_list, SOFTWARE_LIST_COMPATIBLE_SYSTEM) - -#define MCFG_SOFTWARE_LIST_MODIFY( _tag, _list ) \ - MCFG_DEVICE_MODIFY( _tag ) \ - MCFG_SOFTWARE_LIST_CONFIG(_list, SOFTWARE_LIST_ORIGINAL_SYSTEM) - -#define MCFG_SOFTWARE_LIST_COMPATIBLE_MODIFY( _tag, _list ) \ - MCFG_DEVICE_MODIFY( _tag ) \ - MCFG_SOFTWARE_LIST_CONFIG(_list, SOFTWARE_LIST_COMPATIBLE_SYSTEM) - -#define MCFG_SOFTWARE_LIST_FILTER( _tag, _filter ) \ - MCFG_DEVICE_MODIFY( _tag ) \ - software_list_device::static_set_filter(*device, _filter); - -#define MCFG_SOFTWARE_LIST_REMOVE( _tag ) \ - MCFG_DEVICE_REMOVE( _tag ) - - //************************************************************************** // TYPE DEFINITIONS //************************************************************************** -class rom_entry; +struct XML_ParserStruct; class software_info; -class device_image_interface; -class software_list_device; - -// ======================> software_list_loader - -class software_list_loader -{ -public: - virtual bool load_software(device_image_interface &device, software_list_device &swlist, const char *swname, const rom_entry *start_entry) const = 0; -}; - - -// ======================> false_software_list_loader - -class false_software_list_loader : public software_list_loader -{ -public: - virtual bool load_software(device_image_interface &device, software_list_device &swlist, const char *swname, const rom_entry *start_entry) const override; - static const software_list_loader &instance() { return s_instance; } - -private: - static false_software_list_loader s_instance; -}; - - -// ======================> rom_software_list_loader - -class rom_software_list_loader : public software_list_loader -{ -public: - virtual bool load_software(device_image_interface &device, software_list_device &swlist, const char *swname, const rom_entry *start_entry) const override; - static const software_list_loader &instance() { return s_instance; } - -private: - static rom_software_list_loader s_instance; -}; - - -// ======================> image_software_list_loader - -class image_software_list_loader : public software_list_loader -{ -public: - virtual bool load_software(device_image_interface &device, software_list_device &swlist, const char *swname, const rom_entry *start_entry) const override; - static const software_list_loader &instance() { return s_instance; } - -private: - static image_software_list_loader s_instance; -}; - // ======================> feature_list_item @@ -174,13 +80,11 @@ public: const std::string &name() const { return m_name; } const std::string &interface() const { return m_interface; } const std::list &featurelist() const { return m_featurelist; } - const rom_entry *romdata(unsigned int index = 0) const { return (index < m_romdata.size()) ? &m_romdata[index] : nullptr; } + const std::vector &romdata() const { return m_romdata; } // helpers - software_compatibility is_compatible(const software_list_device &swlist) const; bool matches_interface(const char *interface) const; const char *feature(const std::string &feature_name) const; - device_image_interface *find_mountable_image(const machine_config &mconfig) const; private: // internal state @@ -202,15 +106,13 @@ class software_info public: // construction/destruction - software_info(software_list_device &list, std::string &&name, std::string &&parent, const char *supported); + software_info(std::string &&name, std::string &&parent, const std::string &supported); software_info(software_info const &) = delete; software_info(software_info &&) = delete; software_info& operator=(software_info const &) = delete; software_info& operator=(software_info &&) = delete; // getters - software_info *next() const { return m_next; } - software_list_device &list() const { return m_list; } const std::string &shortname() const { return m_shortname; } const std::string &longname() const { return m_longname; } const std::string &parentname() const { return m_parentname; } @@ -222,13 +124,11 @@ public: const std::list &parts() const { return m_partdata; } // additional operations - const software_part *find_part(const char *partname, const char *interface = nullptr) const; + const software_part *find_part(const std::string &partname, const char *interface = nullptr) const; bool has_multiple_parts(const char *interface) const; private: // internal state - software_info * m_next; - software_list_device & m_list; UINT32 m_supported; std::string m_shortname; std::string m_longname; @@ -242,74 +142,68 @@ private: }; -// ======================> software_list_device +// ======================> softlist_parser -// device representing a software list -class software_list_device : public device_t +class softlist_parser { - friend class softlist_parser; - public: - // construction/destruction - software_list_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + // construction (== execution) + softlist_parser(util::core_file &file, const std::string &filename, std::string &description, std::list &infolist, std::ostringstream &errors); - // inline configuration helpers - static void static_set_type(device_t &device, const char *list, softlist_type list_type); - static void static_set_filter(device_t &device, const char *filter); +private: + enum parse_position + { + POS_ROOT, + POS_MAIN, + POS_SOFT, + POS_PART, + POS_DATA + }; - // getters - const char *list_name() const { return m_list_name.c_str(); } - softlist_type list_type() const { return m_list_type; } - const char *filter() const { return m_filter; } - const char *filename() { return m_file.filename(); } + // internal parsing helpers + const char *infoname() const { return (m_current_info != nullptr) ? m_current_info->shortname().c_str() : "???"; } + int line() const; + int column() const; + const char *parser_error() const; - // getters that may trigger a parse - const char *description() { if (!m_parsed) parse(); return m_description.c_str(); } - bool valid() { if (!m_parsed) parse(); return !m_infolist.empty(); } - const char *errors_string() { if (!m_parsed) parse(); return m_errors.c_str(); } - const std::list &get_info() { if (!m_parsed) parse(); return m_infolist; } + // internal error helpers + template void parse_error(Format &&fmt, Params &&... args); + void unknown_tag(const char *tagname) { parse_error("Unknown tag: %s", tagname); } + void unknown_attribute(const char *attrname) { parse_error("Unknown attribute: %s", attrname); } - // operations - const software_info *find(const char *look_for); - void find_approx_matches(const char *name, int matches, const software_info **list, const char *interface); - void release(); - - // string pool helpers - const char *add_string(const char *string) { return m_stringpool.add(string); } - - // static helpers - static software_list_device *find_by_name(const machine_config &mconfig, const char *name); - static void display_matches(const machine_config &config, const char *interface, const char *name); - -protected: // internal helpers - void parse(); - void internal_validity_check(validity_checker &valid) ATTR_COLD; + template std::vector parse_attributes(const char **attributes, const T &attrlist); + bool parse_name_and_value(const char **attributes, std::string &name, std::string &value); + void add_rom_entry(std::string &&name, std::string &&hashdata, UINT32 offset, UINT32 length, UINT32 flags); - // device-level overrides - virtual void device_start() override; - virtual void device_validity_check(validity_checker &valid) const override ATTR_COLD; + // expat callbacks + static void start_handler(void *data, const char *tagname, const char **attributes); + static void data_handler(void *data, const char *s, int len); + static void end_handler(void *data, const char *name); - // configuration state - std::string m_list_name; - softlist_type m_list_type; - const char * m_filter; + // internal parsing + void parse_root_start(const char *tagname, const char **attributes); + void parse_main_start(const char *tagname, const char **attributes); + void parse_soft_start(const char *tagname, const char **attributes); + void parse_part_start(const char *tagname, const char **attributes); + void parse_data_start(const char *tagname, const char **attributes); + void parse_soft_end(const char *name); - // internal state - bool m_parsed; - emu_file m_file; - std::string m_description; - std::string m_errors; - std::list m_infolist; - const_string_pool m_stringpool; + // internal parsing state + util::core_file & m_file; + std::string m_filename; + std::list & m_infolist; + std::ostringstream & m_errors; + struct XML_ParserStruct * m_parser; + bool m_done; + std::string & m_description; + bool m_data_accum_expected; + std::string m_data_accum; + software_info * m_current_info; + software_part * m_current_part; + parse_position m_pos; }; -// device type definition -extern const device_type SOFTWARE_LIST; +#endif // __SOFTLIST_H_ -// device type iterator -typedef device_type_iterator<&device_creator, software_list_device> software_list_device_iterator; - - -#endif diff --git a/src/emu/softlist_dev.cpp b/src/emu/softlist_dev.cpp new file mode 100644 index 00000000000..ce6d96a24d2 --- /dev/null +++ b/src/emu/softlist_dev.cpp @@ -0,0 +1,523 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol +/*************************************************************************** + + softlist_dev.cpp + + Software list construction helpers. + +***************************************************************************/ + +#include "emu.h" +#include "emuopts.h" +#include "diimage.h" +#include "softlist_dev.h" +#include "validity.h" + +#include + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +typedef std::unordered_map softlist_map; + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +// device type definition +const device_type SOFTWARE_LIST = &device_creator; +false_software_list_loader false_software_list_loader::s_instance; +rom_software_list_loader rom_software_list_loader::s_instance; +image_software_list_loader image_software_list_loader::s_instance; + + +//************************************************************************** +// SOFTWARE LIST LOADER +//************************************************************************** + +//------------------------------------------------- +// false_software_list_loader::load_software +//------------------------------------------------- + +bool false_software_list_loader::load_software(device_image_interface &device, software_list_device &swlist, const char *swname, const rom_entry *start_entry) const +{ + return false; +} + + +//------------------------------------------------- +// rom_software_list_loader::load_software +//------------------------------------------------- + +bool rom_software_list_loader::load_software(device_image_interface &device, software_list_device &swlist, const char *swname, const rom_entry *start_entry) const +{ + swlist.machine().rom_load().load_software_part_region(device, swlist, swname, start_entry); + return true; +} + + +//------------------------------------------------- +// image_software_list_loader::load_software +//------------------------------------------------- + +bool image_software_list_loader::load_software(device_image_interface &device, software_list_device &swlist, const char *swname, const rom_entry *start_entry) const +{ + return device.load_software(swlist, swname, start_entry); +} + + +//************************************************************************** +// SOFTWARE LIST DEVICE +//************************************************************************** + +//------------------------------------------------- +// software_list_device - constructor +//------------------------------------------------- + +software_list_device::software_list_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, SOFTWARE_LIST, "Software list", tag, owner, clock, "software_list", __FILE__), + m_list_type(SOFTWARE_LIST_ORIGINAL_SYSTEM), + m_filter(nullptr), + m_parsed(false), + m_file(mconfig.options().hash_path(), OPEN_FLAG_READ), + m_description("") +{ +} + + +//------------------------------------------------- +// static_set_type - configuration helper +// to set the list type +//------------------------------------------------- + +void software_list_device::static_set_type(device_t &device, const char *list, softlist_type list_type) +{ + software_list_device &swlistdev = downcast(device); + swlistdev.m_list_name.assign(list); + swlistdev.m_list_type = list_type; +} + + +//------------------------------------------------- +// static_set_custom_handler - configuration +// helper to set a custom callback +//------------------------------------------------- + +void software_list_device::static_set_filter(device_t &device, const char *filter) +{ + downcast(device).m_filter = filter; +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void software_list_device::device_start() +{ +} + + +//------------------------------------------------- +// find_approx_matches - search ourselves for +// a list of possible matches of the given name +// and optional interface +//------------------------------------------------- + +void software_list_device::find_approx_matches(const std::string &name, int matches, const software_info **list, const char *interface) +{ + // if no name, return + if (name.empty()) + return; + + // initialize everyone's states + std::vector penalty(matches); + for (int matchnum = 0; matchnum < matches; matchnum++) + { + penalty[matchnum] = 9999; + list[matchnum] = nullptr; + } + + // iterate over our info (will cause a parse if needed) + for (const software_info &swinfo : get_info()) + { + const software_part &part = swinfo.parts().front(); + if ((interface == nullptr || part.matches_interface(interface)) && is_compatible(part) == SOFTWARE_IS_COMPATIBLE) + { + // pick the best match between driver name and description + int longpenalty = driver_list::penalty_compare(name.c_str(), swinfo.longname().c_str()); + int shortpenalty = driver_list::penalty_compare(name.c_str(), swinfo.shortname().c_str()); + int curpenalty = std::min(longpenalty, shortpenalty); + + // insert into the sorted table of matches + for (int matchnum = matches - 1; matchnum >= 0; matchnum--) + { + // stop if we're worse than the current entry + if (curpenalty >= penalty[matchnum]) + break; + + // as long as this isn't the last entry, bump this one down + if (matchnum < matches - 1) + { + penalty[matchnum + 1] = penalty[matchnum]; + list[matchnum + 1] = list[matchnum]; + } + list[matchnum] = &swinfo; + penalty[matchnum] = curpenalty; + } + } + } +} + + +//------------------------------------------------- +// release - reset to a pre-parsed state +//------------------------------------------------- + +void software_list_device::release() +{ + osd_printf_verbose("Resetting %s\n", m_file.filename()); + m_parsed = false; + m_description.clear(); + m_errors.clear(); + m_infolist.clear(); +} + + +//------------------------------------------------- +// find_by_name - find a software list by name +// across all software list devices +//------------------------------------------------- + +software_list_device *software_list_device::find_by_name(const machine_config &config, const std::string &name) +{ + // iterate over each device in the system and find a match + for (software_list_device &swlistdev : software_list_device_iterator(config.root_device())) + if (swlistdev.list_name() == name) + return &swlistdev; + return nullptr; +} + + +//------------------------------------------------- +// software_display_matches - display a list of +// possible matches in the system to the given +// name, across all software list devices +//------------------------------------------------- + +void software_list_device::display_matches(const machine_config &config, const char *interface, const std::string &name) +{ + // check if there is at least one software list + software_list_device_iterator deviter(config.root_device()); + if (deviter.first() != nullptr) + osd_printf_error("\n\"%s\" approximately matches the following\n" + "supported software items (best match first):\n\n", name.c_str()); + + // iterate through lists + for (software_list_device &swlistdev : deviter) + { + // get the top 16 approximate matches for the selected device interface (i.e. only carts for cartslot, etc.) + const software_info *matches[16] = { nullptr }; + swlistdev.find_approx_matches(name, ARRAY_LENGTH(matches), matches, interface); + + // if we found some, print them + if (matches[0] != nullptr) + { + // different output depending on original system or compatible + if (swlistdev.list_type() == SOFTWARE_LIST_ORIGINAL_SYSTEM) + osd_printf_error("* Software list \"%s\" (%s) matches: \n", swlistdev.list_name().c_str(), swlistdev.description().c_str()); + else + osd_printf_error("* Compatible software list \"%s\" (%s) matches: \n", swlistdev.list_name().c_str(), swlistdev.description().c_str()); + + // print them out + for (auto &match : matches) + { + if (match != nullptr) + osd_printf_error("%-18s%s\n", match->shortname().c_str(), match->longname().c_str()); + } + + osd_printf_error("\n"); + } + } +} + + +//------------------------------------------------- +// find - find an item by name in the software +// list, using wildcards and optionally starting +// from an intermediate point +//------------------------------------------------- + +const software_info *software_list_device::find(const std::string &look_for) +{ + // empty search returns nothing + if (look_for.empty()) + return nullptr; + + const bool iswild = look_for.find_first_of("*?") != std::string::npos; + + // find a match (will cause a parse if needed when calling get_info) + const auto &info_list = get_info(); + auto iter = std::find_if( + info_list.begin(), + info_list.end(), + [&](const software_info &info) + { + const char *shortname = info.shortname().c_str(); + return (iswild && core_strwildcmp(look_for.c_str(), shortname) == 0) + || core_stricmp(look_for.c_str(), shortname) == 0; + }); + + return iter != info_list.end() + ? &*iter + : nullptr; +} + + +//------------------------------------------------- +// parse - parse our softlist file +//------------------------------------------------- + +void software_list_device::parse() +{ + // skip if done + if (m_parsed) + return; + + // reset the errors + m_errors.clear(); + + // attempt to open the file + osd_file::error filerr = m_file.open(m_list_name.c_str(), ".xml"); + if (filerr == osd_file::error::NONE) + { + // parse if no error + std::ostringstream errs; + softlist_parser parser(m_file, m_file.filename(), m_description, m_infolist, errs); + m_file.close(); + m_errors = errs.str(); + } + else + m_errors = string_format("Error opening file: %s\n", filename()); + + // indicate that we've been parsed + m_parsed = true; +} + + +//------------------------------------------------- +// is_compatible - determine if we are compatible +// with the given software_list_device +//------------------------------------------------- + +software_compatibility software_list_device::is_compatible(const software_part &swpart) const +{ + // get the softlist filter; if null, assume compatible + if (m_filter == nullptr) + return SOFTWARE_IS_COMPATIBLE; + + // copy the comma-delimited string and ensure it ends with a final comma + std::string filt = std::string(m_filter).append(","); + + // get the incompatibility filter and test against it first if it exists + const char *incompatibility = swpart.feature("incompatibility"); + if (incompatibility != nullptr) + { + // copy the comma-delimited string and ensure it ends with a final comma + std::string incomp = std::string(incompatibility).append(","); + + // iterate over filter items and see if they exist in the list; if so, it's incompatible + 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 (incomp.find(token) != -1) + return SOFTWARE_IS_INCOMPATIBLE; + } + } + + // get the compatibility feature; if null, assume compatible + const char *compatibility = swpart.feature("compatibility"); + if (compatibility == nullptr) + return SOFTWARE_IS_COMPATIBLE; + + // copy the comma-delimited string and ensure it ends with a final comma + std::string comp = std::string(compatibility).append(","); + + // iterate over filter items and see if they exist in the compatibility list; if so, it's compatible + 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) != -1) + return SOFTWARE_IS_COMPATIBLE; + } + return SOFTWARE_NOT_COMPATIBLE; +} + + +//------------------------------------------------- +// find_mountable_image - find an image interface +// that can automatically mount this software part +//------------------------------------------------- + +device_image_interface *software_list_device::find_mountable_image(const machine_config &mconfig, const software_part &part) +{ + // if automount="no", don't bother + const char *mount = part.feature("automount"); + if (mount != nullptr && strcmp(mount, "no") == 0) + return nullptr; + + for (device_image_interface &image : image_interface_iterator(mconfig.root_device())) + { + const char *interface = image.image_interface(); + if (interface != nullptr && part.matches_interface(interface)) + { + // mount only if not already mounted + const char *option = mconfig.options().value(image.brief_instance_name()); + if (*option == '\0' && !image.filename()) + return ℑ + } + } + return nullptr; +} + + +//------------------------------------------------- +// device_validity_check - validate the device +// configuration +//------------------------------------------------- + +void software_list_device::device_validity_check(validity_checker &valid) const +{ + // add to the global map whenever we check a list so we don't re-check + // it in the future + if (valid.already_checked(std::string("softlist/").append(m_list_name).c_str())) + return; + + // do device validation only in case of validate command + if (!valid.validate_all()) + return; + + // actually do the validate + const_cast(this)->internal_validity_check(valid); +} + + +//------------------------------------------------- +// internal_validity_check - internal helper to +// check the list +//------------------------------------------------- + +void software_list_device::internal_validity_check(validity_checker &valid) +{ + enum { NAME_LEN_PARENT = 8, NAME_LEN_CLONE = 16 }; + + softlist_map names; + softlist_map descriptions; + for (const software_info &swinfo : get_info()) + { + // first parse and output core errors if any + if (m_errors.length() > 0) + { + osd_printf_error("%s: Errors parsing software list:\n%s", filename(), errors_string()); + break; + } + + // Now check if the xml data is valid: + + // Did we lost any description? + if (swinfo.longname().empty()) + { + osd_printf_error("%s: %s has no description\n", filename(), swinfo.shortname().c_str()); + break; + } + + // Did we lost any year? + if (swinfo.year().empty()) + { + osd_printf_error("%s: %s has no year\n", filename(), swinfo.shortname().c_str()); + break; + } + + // Did we lost any publisher? + if (swinfo.publisher().empty()) + { + osd_printf_error("%s: %s has no publisher\n", filename(), swinfo.shortname().c_str()); + break; + } + + // Did we lost the software parts? + if (swinfo.parts().empty()) + { + osd_printf_error("%s: %s has no part\n", filename(), swinfo.shortname().c_str()); + break; + } + + // Second, since the xml is fine, run additional checks: + + // check for duplicate names + if (!names.insert(std::make_pair(swinfo.shortname(), &swinfo)).second) + { + const software_info *match = names.find(swinfo.shortname())->second; + osd_printf_error("%s: %s is a duplicate name (%s)\n", filename(), swinfo.shortname().c_str(), match->shortname().c_str()); + } + + // check for duplicate descriptions + std::string longname = std::string(swinfo.longname()); + if (!descriptions.insert(std::make_pair(strmakelower(longname), &swinfo)).second) + osd_printf_error("%s: %s is a duplicate description (%s)\n", filename(), swinfo.longname().c_str(), swinfo.shortname().c_str()); + + bool is_clone = false; + if (!swinfo.parentname().empty()) + { + is_clone = true; + if (swinfo.parentname() == swinfo.shortname()) + { + osd_printf_error("%s: %s is set as a clone of itself\n", filename(), swinfo.shortname().c_str()); + break; + } + + // make sure the parent exists + const software_info *swinfo2 = find(swinfo.parentname().c_str()); + + if (swinfo2 == nullptr) + osd_printf_error("%s: parent '%s' software for '%s' not found\n", filename(), swinfo.parentname().c_str(), swinfo.shortname().c_str()); + else if (!swinfo2->parentname().empty()) + osd_printf_error("%s: %s is a clone of a clone\n", filename(), swinfo.shortname().c_str()); + } + + // make sure the driver name is 8 chars or less + if ((is_clone && swinfo.shortname().length() > NAME_LEN_CLONE) || (!is_clone && swinfo.shortname().length() > NAME_LEN_PARENT)) + osd_printf_error("%s: %s %s driver name must be %d characters or less\n", filename(), swinfo.shortname().c_str(), + is_clone ? "clone" : "parent", is_clone ? NAME_LEN_CLONE : NAME_LEN_PARENT); + + // make sure the year is only digits, '?' or '+' + for (const char *s = swinfo.year().c_str(); *s != 0; s++) + if (!isdigit((UINT8)*s) && *s != '?' && *s != '+') + { + osd_printf_error("%s: %s has an invalid year '%s'\n", filename(), swinfo.shortname().c_str(), swinfo.year().c_str()); + break; + } + + softlist_map part_names; + for (const software_part &part : swinfo.parts()) + { + if (part.interface().empty()) + osd_printf_error("%s: %s has a part (%s) without interface\n", filename(), swinfo.shortname().c_str(), part.name().c_str()); + + if (part.romdata().empty()) + osd_printf_error("%s: %s has a part (%s) with no data\n", filename(), swinfo.shortname().c_str(), part.name().c_str()); + + if (!part_names.insert(std::make_pair(part.name(), &swinfo)).second) + osd_printf_error("%s: %s has a part (%s) whose name is duplicate\n", filename(), swinfo.shortname().c_str(), part.name().c_str()); + } + } + + // release all the memory + release(); +} + + diff --git a/src/emu/softlist_dev.h b/src/emu/softlist_dev.h new file mode 100644 index 00000000000..c144c93bc4a --- /dev/null +++ b/src/emu/softlist_dev.h @@ -0,0 +1,195 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol +/********************************************************************* + + softlist_dev.h + + Software and software list information. + +*********************************************************************/ + +#ifndef __SOFTLIST_DEV_H_ +#define __SOFTLIST_DEV_H_ + +#include "softlist.h" + + +//************************************************************************** +// CONSTANTS +//************************************************************************** + +#define SOFTWARE_SUPPORTED_YES 0 +#define SOFTWARE_SUPPORTED_PARTIAL 1 +#define SOFTWARE_SUPPORTED_NO 2 + +enum softlist_type +{ + SOFTWARE_LIST_ORIGINAL_SYSTEM, + SOFTWARE_LIST_COMPATIBLE_SYSTEM +}; + +enum software_compatibility +{ + SOFTWARE_IS_COMPATIBLE, + SOFTWARE_IS_INCOMPATIBLE, + SOFTWARE_NOT_COMPATIBLE +}; + + +//************************************************************************** +// MACROS +//************************************************************************** + +#define MCFG_SOFTWARE_LIST_CONFIG(_list,_list_type) \ + software_list_device::static_set_type(*device, _list, _list_type); + +#define MCFG_SOFTWARE_LIST_ADD( _tag, _list ) \ + MCFG_DEVICE_ADD( _tag, SOFTWARE_LIST, 0 ) \ + MCFG_SOFTWARE_LIST_CONFIG(_list, SOFTWARE_LIST_ORIGINAL_SYSTEM) + +#define MCFG_SOFTWARE_LIST_COMPATIBLE_ADD( _tag, _list ) \ + MCFG_DEVICE_ADD( _tag, SOFTWARE_LIST, 0 ) \ + MCFG_SOFTWARE_LIST_CONFIG(_list, SOFTWARE_LIST_COMPATIBLE_SYSTEM) + +#define MCFG_SOFTWARE_LIST_MODIFY( _tag, _list ) \ + MCFG_DEVICE_MODIFY( _tag ) \ + MCFG_SOFTWARE_LIST_CONFIG(_list, SOFTWARE_LIST_ORIGINAL_SYSTEM) + +#define MCFG_SOFTWARE_LIST_COMPATIBLE_MODIFY( _tag, _list ) \ + MCFG_DEVICE_MODIFY( _tag ) \ + MCFG_SOFTWARE_LIST_CONFIG(_list, SOFTWARE_LIST_COMPATIBLE_SYSTEM) + +#define MCFG_SOFTWARE_LIST_FILTER( _tag, _filter ) \ + MCFG_DEVICE_MODIFY( _tag ) \ + software_list_device::static_set_filter(*device, _filter); + +#define MCFG_SOFTWARE_LIST_REMOVE( _tag ) \ + MCFG_DEVICE_REMOVE( _tag ) + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +class device_image_interface; +class software_list_device; + + +// ======================> software_list_loader + +class software_list_loader +{ +public: + virtual bool load_software(device_image_interface &device, software_list_device &swlist, const char *swname, const rom_entry *start_entry) const = 0; +}; + + +// ======================> false_software_list_loader + +class false_software_list_loader : public software_list_loader +{ +public: + virtual bool load_software(device_image_interface &device, software_list_device &swlist, const char *swname, const rom_entry *start_entry) const override; + static const software_list_loader &instance() { return s_instance; } + +private: + static false_software_list_loader s_instance; +}; + + +// ======================> rom_software_list_loader + +class rom_software_list_loader : public software_list_loader +{ +public: + virtual bool load_software(device_image_interface &device, software_list_device &swlist, const char *swname, const rom_entry *start_entry) const override; + static const software_list_loader &instance() { return s_instance; } + +private: + static rom_software_list_loader s_instance; +}; + + +// ======================> image_software_list_loader + +class image_software_list_loader : public software_list_loader +{ +public: + virtual bool load_software(device_image_interface &device, software_list_device &swlist, const char *swname, const rom_entry *start_entry) const override; + static const software_list_loader &instance() { return s_instance; } + +private: + static image_software_list_loader s_instance; +}; + + +// ======================> software_list_device + +// device representing a software list +class software_list_device : public device_t +{ + friend class softlist_parser; + +public: + // construction/destruction + software_list_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // inline configuration helpers + static void static_set_type(device_t &device, const char *list, softlist_type list_type); + static void static_set_filter(device_t &device, const char *filter); + + // getters + const std::string &list_name() const { return m_list_name; } + softlist_type list_type() const { return m_list_type; } + const char *filter() const { return m_filter; } + const char *filename() { return m_file.filename(); } + + // getters that may trigger a parse + const std::string &description() { if (!m_parsed) parse(); return m_description; } + bool valid() { if (!m_parsed) parse(); return !m_infolist.empty(); } + const char *errors_string() { if (!m_parsed) parse(); return m_errors.c_str(); } + const std::list &get_info() { if (!m_parsed) parse(); return m_infolist; } + + // operations + const software_info *find(const std::string &look_for); + void find_approx_matches(const std::string &name, int matches, const software_info **list, const char *interface); + void release(); + software_compatibility is_compatible(const software_part &part) const; + + // static helpers + static software_list_device *find_by_name(const machine_config &mconfig, const std::string &name); + static void display_matches(const machine_config &config, const char *interface, const std::string &name); + static device_image_interface *find_mountable_image(const machine_config &mconfig, const software_part &part); + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_validity_check(validity_checker &valid) const override ATTR_COLD; + +private: + // internal helpers + void parse(); + void internal_validity_check(validity_checker &valid) ATTR_COLD; + + // configuration state + std::string m_list_name; + softlist_type m_list_type; + const char * m_filter; + + // internal state + bool m_parsed; + emu_file m_file; + std::string m_description; + std::string m_errors; + std::list m_infolist; +}; + + +// device type definition +extern const device_type SOFTWARE_LIST; + +// device type iterator +typedef device_type_iterator<&device_creator, software_list_device> software_list_device_iterator; + + +#endif // __SOFTLIST_DEV_H_ diff --git a/src/frontend/mame/audit.cpp b/src/frontend/mame/audit.cpp index 9dfc99940f2..6adb5539747 100644 --- a/src/frontend/mame/audit.cpp +++ b/src/frontend/mame/audit.cpp @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles /*************************************************************************** - audit.c + audit.cpp ROM set auditing functions. @@ -14,7 +14,8 @@ #include "chd.h" #include "drivenum.h" #include "sound/samples.h" -#include "softlist.h" +#include "softlist_dev.h" + //************************************************************************** // CORE FUNCTIONS @@ -149,7 +150,7 @@ media_auditor::summary media_auditor::audit_device(device_t &device, const char //------------------------------------------------- // audit_software //------------------------------------------------- -media_auditor::summary media_auditor::audit_software(const char *list_name, const software_info *swinfo, const char *validation) +media_auditor::summary media_auditor::audit_software(const std::string &list_name, const software_info *swinfo, const char *validation) { // start fresh m_record_list.clear(); @@ -171,7 +172,7 @@ media_auditor::summary media_auditor::audit_software(const char *list_name, cons // now iterate over software parts for (const software_part &part : swinfo->parts()) - audit_regions(part.romdata(), locationtag.c_str(), found, required); + audit_regions(part.romdata().data(), locationtag.c_str(), found, required); if ((found == 0) && (required > 0)) { @@ -180,7 +181,7 @@ media_auditor::summary media_auditor::audit_software(const char *list_name, cons } // return a summary - return summarize(list_name); + return summarize(list_name.c_str()); } diff --git a/src/frontend/mame/audit.h b/src/frontend/mame/audit.h index 1999fb229fa..9e0e131e2ca 100644 --- a/src/frontend/mame/audit.h +++ b/src/frontend/mame/audit.h @@ -158,7 +158,7 @@ public: // audit operations summary audit_media(const char *validation = AUDIT_VALIDATE_FULL); summary audit_device(device_t &device, const char *validation = AUDIT_VALIDATE_FULL); - summary audit_software(const char *list_name, const software_info *swinfo, const char *validation = AUDIT_VALIDATE_FULL); + summary audit_software(const std::string &list_name, const software_info *swinfo, const char *validation = AUDIT_VALIDATE_FULL); summary audit_samples(); summary summarize(const char *name, std::ostream *output = nullptr) const; diff --git a/src/frontend/mame/clifront.cpp b/src/frontend/mame/clifront.cpp index 2ce5a6a5581..a274326fac2 100644 --- a/src/frontend/mame/clifront.cpp +++ b/src/frontend/mame/clifront.cpp @@ -25,7 +25,7 @@ #include "drivenum.h" #include "osdepend.h" -#include "softlist.h" +#include "softlist_dev.h" #include "ui/moptions.h" #include "language.h" @@ -374,7 +374,7 @@ int media_identifier::find_by_hash(const util::hash_collection &hashes, int leng { for (const software_info &swinfo : swlistdev.get_info()) for (const software_part &part : swinfo.parts()) - for (const rom_entry *region = part.romdata(); region != nullptr; region = rom_next_region(region)) + for (const rom_entry *region = part.romdata().data(); region != nullptr; region = rom_next_region(region)) for (const rom_entry *rom = rom_first_file(region); rom != nullptr; rom = rom_next_file(rom)) { util::hash_collection romhashes(ROM_GETHASHDATA(rom)); @@ -385,7 +385,7 @@ int media_identifier::find_by_hash(const util::hash_collection &hashes, int leng // output information about the match if (found) osd_printf_info(" "); - osd_printf_info("= %s%-20s %s:%s %s\n", baddump ? "(BAD) " : "", ROM_GETNAME(rom), swlistdev.list_name(), swinfo.shortname().c_str(), swinfo.longname().c_str()); + osd_printf_info("= %s%-20s %s:%s %s\n", baddump ? "(BAD) " : "", ROM_GETNAME(rom), swlistdev.list_name().c_str(), swinfo.shortname().c_str(), swinfo.longname().c_str()); found++; } } @@ -527,9 +527,9 @@ int cli_frontend::execute(int argc, char **argv) for (const software_part &swpart : swinfo->parts()) { // only load compatible software this way - if (swpart.is_compatible(swlistdev) == SOFTWARE_IS_COMPATIBLE) + if (swlistdev.is_compatible(swpart) == SOFTWARE_IS_COMPATIBLE) { - device_image_interface *image = swpart.find_mountable_image(config); + device_image_interface *image = software_list_device::find_mountable_image(config, swpart); if (image != nullptr) { std::string val = string_format("%s:%s:%s", swlistdev.list_name(), m_options.software_name(), swpart.name()); @@ -1387,7 +1387,7 @@ void cli_frontend::verifysamples(const char *gamename) void cli_frontend::output_single_softlist(FILE *out, software_list_device &swlistdev) { - fprintf(out, "\t\n", swlistdev.list_name(), xml_normalize_string(swlistdev.description())); + fprintf(out, "\t\n", swlistdev.list_name().c_str(), xml_normalize_string(swlistdev.description().c_str())); for (const software_info &swinfo : swlistdev.get_info()) { fprintf(out, "\t\t\n", flist.name().c_str(), xml_normalize_string(flist.value().c_str())); /* TODO: display rom region information */ - for (const rom_entry *region = part.romdata(); region; region = rom_next_region(region)) + for (const rom_entry *region = part.romdata().data(); region; region = rom_next_region(region)) { int is_disk = ROMREGION_ISDISKDATA(region); @@ -1626,7 +1626,7 @@ void cli_frontend::getsoftlist(const char *gamename) while (drivlist.next()) { for (software_list_device &swlistdev : software_list_device_iterator(drivlist.config().root_device())) - if (core_strwildcmp(gamename, swlistdev.list_name()) == 0 && list_map.insert(swlistdev.list_name()).second) + if (core_strwildcmp(gamename, swlistdev.list_name().c_str()) == 0 && list_map.insert(swlistdev.list_name()).second) if (!swlistdev.get_info().empty()) { if (isfirst) { fprintf( out, SOFTLIST_XML_BEGIN); isfirst = false; } @@ -1660,7 +1660,7 @@ void cli_frontend::verifysoftlist(const char *gamename) { for (software_list_device &swlistdev : software_list_device_iterator(drivlist.config().root_device())) { - if (core_strwildcmp(gamename, swlistdev.list_name()) == 0 && list_map.insert(swlistdev.list_name()).second) + if (core_strwildcmp(gamename, swlistdev.list_name().c_str()) == 0 && list_map.insert(swlistdev.list_name()).second) { if (!swlistdev.get_info().empty()) { diff --git a/src/frontend/mame/info.cpp b/src/frontend/mame/info.cpp index 918cd07f673..1d1468643c6 100644 --- a/src/frontend/mame/info.cpp +++ b/src/frontend/mame/info.cpp @@ -16,7 +16,7 @@ #include "xmlfile.h" #include "config.h" #include "drivenum.h" -#include "softlist.h" +#include "softlist_dev.h" #include @@ -515,21 +515,23 @@ void info_xml_creator::output_bios() if (m_drivlist.driver().rom == nullptr) return; + auto rom_entries = rom_build_entries(m_drivlist.driver().rom); + // first determine the default BIOS name std::string defaultname; - for (const rom_entry *rom = m_drivlist.driver().rom; !ROMENTRY_ISEND(rom); rom++) - if (ROMENTRY_ISDEFAULT_BIOS(rom)) - defaultname = ROM_GETNAME(rom); + for (const rom_entry &rom : rom_entries) + if (ROMENTRY_ISDEFAULT_BIOS(&rom)) + defaultname = ROM_GETNAME(&rom); // iterate over ROM entries and look for BIOSes - for (const rom_entry *rom = m_drivlist.driver().rom; !ROMENTRY_ISEND(rom); rom++) - if (ROMENTRY_ISSYSTEM_BIOS(rom)) + for (const rom_entry &rom : rom_entries) + if (ROMENTRY_ISSYSTEM_BIOS(&rom)) { // output extracted name and descriptions fprintf(m_output, "\t\t\n"); } @@ -577,7 +579,7 @@ void info_xml_creator::output_rom(device_t &device) if (!is_disk && is_bios) { // scan backwards through the ROM entries - for (const rom_entry *brom = rom - 1; brom != m_drivlist.driver().rom; brom--) + for (const rom_entry *brom = rom - 1; brom != device.rom_region(); brom--) if (ROMENTRY_ISSYSTEM_BIOS(brom)) { strcpy(bios_name, ROM_GETNAME(brom)); @@ -1561,7 +1563,7 @@ void info_xml_creator::output_software_list() { for (const software_list_device &swlist : software_list_device_iterator(m_drivlist.config().root_device())) { - fprintf(m_output, "\t\t ("ioport") - .addFunction ("has_configs", &ioport_manager::has_configs) - .addFunction ("has_analog", &ioport_manager::has_analog) - .addFunction ("has_dips", &ioport_manager::has_dips) - .addFunction ("has_bioses", &ioport_manager::has_bioses) .addFunction ("has_keyboard", &ioport_manager::has_keyboard) .addFunction ("count_players", &ioport_manager::count_players) .addProperty ("ports", &lua_engine::l_ioport_get_ports) diff --git a/src/frontend/mame/mameopts.cpp b/src/frontend/mame/mameopts.cpp index c64b8fd7ebc..9b1150a9590 100644 --- a/src/frontend/mame/mameopts.cpp +++ b/src/frontend/mame/mameopts.cpp @@ -11,7 +11,7 @@ #include "emu.h" #include "mameopts.h" #include "drivenum.h" -#include "softlist.h" +#include "softlist_dev.h" #include diff --git a/src/frontend/mame/ui/devopt.cpp b/src/frontend/mame/ui/devopt.cpp index 099c62428f0..9ebfd7f70e5 100644 --- a/src/frontend/mame/ui/devopt.cpp +++ b/src/frontend/mame/ui/devopt.cpp @@ -147,18 +147,18 @@ void menu_device_config::populate() { std::string bios_str; // first loop through roms in search of default bios (shortname) - for (const rom_entry *rom = dev->rom_region(); !ROMENTRY_ISEND(rom); rom++) - if (ROMENTRY_ISDEFAULT_BIOS(rom)) - bios_str.assign(ROM_GETNAME(rom)); + for (const rom_entry &rom : dev->rom_region_vector()) + if (ROMENTRY_ISDEFAULT_BIOS(&rom)) + bios_str.assign(ROM_GETNAME(&rom)); // then loop again to count bios options and to get the default bios complete name - for (const rom_entry *rom = dev->rom_region(); !ROMENTRY_ISEND(rom); rom++) + for (const rom_entry &rom : dev->rom_region_vector()) { - if (ROMENTRY_ISSYSTEM_BIOS(rom)) + if (ROMENTRY_ISSYSTEM_BIOS(&rom)) { bios++; - if (bios_str.compare(ROM_GETNAME(rom))==0) - bios_str.assign(ROM_GETHASHDATA(rom)); + if (bios_str.compare(ROM_GETNAME(&rom))==0) + bios_str.assign(ROM_GETHASHDATA(&rom)); } } diff --git a/src/frontend/mame/ui/filecreate.cpp b/src/frontend/mame/ui/filecreate.cpp index 07f0abdf9c5..aa2de97ad1c 100644 --- a/src/frontend/mame/ui/filecreate.cpp +++ b/src/frontend/mame/ui/filecreate.cpp @@ -15,6 +15,7 @@ #include "ui/filecreate.h" #include "ui/ui.h" +#include "ui/utils.h" #include "imagedev/floppy.h" @@ -44,34 +45,6 @@ CONSTANTS MENU HELPERS ***************************************************************************/ -//------------------------------------------------- -// input_character - inputs a typed character -// into a buffer -//------------------------------------------------- - -template -static void input_character(std::string &buffer, unicode_char unichar, F &&filter) -{ - auto buflen = buffer.size(); - - if ((unichar == 8) || (unichar == 0x7f)) - { - // backspace - if (0 < buflen) - { - auto buffer_oldend = buffer.c_str() + buflen; - auto buffer_newend = utf8_previous_char(buffer_oldend); - buffer.resize(buffer_newend - buffer.c_str()); - } - } - else if ((unichar >= ' ') && (!filter || filter(unichar))) - { - // append this character - buffer += utf8_from_uchar(unichar); - } -} - - /*************************************************************************** CONFIRM SAVE AS MENU ***************************************************************************/ diff --git a/src/frontend/mame/ui/imgcntrl.cpp b/src/frontend/mame/ui/imgcntrl.cpp index ca6d4f55724..59e20eb1cee 100644 --- a/src/frontend/mame/ui/imgcntrl.cpp +++ b/src/frontend/mame/ui/imgcntrl.cpp @@ -20,7 +20,7 @@ #include "audit.h" #include "drivenum.h" #include "emuopts.h" -#include "softlist.h" +#include "softlist_dev.h" #include "zippath.h" @@ -51,7 +51,7 @@ menu_control_device_image::menu_control_device_image(mame_ui_manager &mui, rende if (m_swi != nullptr) { m_state = START_OTHER_PART; - m_current_directory.assign(m_image.working_directory()); + m_current_directory = m_image.working_directory(); } else { @@ -65,7 +65,7 @@ menu_control_device_image::menu_control_device_image(mame_ui_manager &mui, rende } else { - m_current_directory.assign(m_image.working_directory()); + m_current_directory = m_image.working_directory(); } // check to see if the path exists; if not clear it diff --git a/src/frontend/mame/ui/info.cpp b/src/frontend/mame/ui/info.cpp index 9461f566d71..1048ac426ce 100644 --- a/src/frontend/mame/ui/info.cpp +++ b/src/frontend/mame/ui/info.cpp @@ -13,9 +13,328 @@ #include "ui/info.h" #include "ui/ui.h" +#include "drivenum.h" #include "softlist.h" namespace ui { + + +//------------------------------------------------- +// machine_info - constructor +//------------------------------------------------- + +machine_info::machine_info(running_machine &machine) + : m_machine(machine) +{ + // calculate "has..." values + m_has_configs = false; + m_has_analog = false; + m_has_dips = false; + m_has_bioses = false; + + // scan the input port array to see what options we need to enable + for (auto &port : machine.ioport().ports()) + for (ioport_field &field : port.second->fields()) + { + if (field.type() == IPT_DIPSWITCH) + m_has_dips = true; + if (field.type() == IPT_CONFIG) + m_has_configs = true; + if (field.is_analog()) + m_has_analog = true; + } + + for (device_t &device : device_iterator(machine.root_device())) + for (const rom_entry &rom : device.rom_region_vector()) + if (ROMENTRY_ISSYSTEM_BIOS(&rom)) { m_has_bioses = true; break; } +} + + +/*************************************************************************** + TEXT GENERATORS +***************************************************************************/ + +//------------------------------------------------- +// warnings_string - print the warning flags +// text to the given buffer +//------------------------------------------------- + +std::string machine_info::warnings_string() +{ + constexpr UINT32 warning_flags = ( MACHINE_NOT_WORKING | + MACHINE_UNEMULATED_PROTECTION | + MACHINE_MECHANICAL | + MACHINE_WRONG_COLORS | + MACHINE_IMPERFECT_COLORS | + MACHINE_REQUIRES_ARTWORK | + MACHINE_NO_SOUND | + MACHINE_IMPERFECT_SOUND | + MACHINE_IMPERFECT_GRAPHICS | + MACHINE_IMPERFECT_KEYBOARD | + MACHINE_NO_COCKTAIL | + MACHINE_IS_INCOMPLETE | + MACHINE_NO_SOUND_HW ); + + // if no warnings, nothing to return + if (m_machine.rom_load().warnings() == 0 && m_machine.rom_load().knownbad() == 0 && !(m_machine.system().flags & warning_flags) && m_machine.rom_load().software_load_warnings_message().length() == 0) + return std::string(); + + std::ostringstream buf; + + // add a warning if any ROMs were loaded with warnings + if (m_machine.rom_load().warnings() > 0) + { + buf << _("One or more ROMs/CHDs for this machine are incorrect. The machine may not run correctly.\n"); + if (m_machine.system().flags & warning_flags) + buf << "\n"; + } + + if (m_machine.rom_load().software_load_warnings_message().length()>0) { + buf << m_machine.rom_load().software_load_warnings_message(); + if (m_machine.system().flags & warning_flags) + buf << "\n"; + } + // if we have at least one warning flag, print the general header + if ((m_machine.system().flags & warning_flags) || m_machine.rom_load().knownbad() > 0) + { + buf << _("There are known problems with this machine\n\n"); + + // add a warning if any ROMs are flagged BAD_DUMP/NO_DUMP + if (m_machine.rom_load().knownbad() > 0) { + buf << _("One or more ROMs/CHDs for this machine have not been correctly dumped.\n"); + } + // add one line per warning flag + if (m_machine.system().flags & MACHINE_IMPERFECT_KEYBOARD) + buf << _("The keyboard emulation may not be 100% accurate.\n"); + if (m_machine.system().flags & MACHINE_IMPERFECT_COLORS) + buf << _("The colors aren't 100% accurate.\n"); + if (m_machine.system().flags & MACHINE_WRONG_COLORS) + buf << _("The colors are completely wrong.\n"); + if (m_machine.system().flags & MACHINE_IMPERFECT_GRAPHICS) + buf << _("The video emulation isn't 100% accurate.\n"); + if (m_machine.system().flags & MACHINE_IMPERFECT_SOUND) + buf << _("The sound emulation isn't 100% accurate.\n"); + if (m_machine.system().flags & MACHINE_NO_SOUND) { + buf << _("The machine lacks sound.\n"); + } + if (m_machine.system().flags & MACHINE_NO_COCKTAIL) + buf << _("Screen flipping in cocktail mode is not supported.\n"); + + // check if external artwork is present before displaying this warning? + if (m_machine.system().flags & MACHINE_REQUIRES_ARTWORK) { + buf << _("The machine requires external artwork files\n"); + } + + if (m_machine.system().flags & MACHINE_IS_INCOMPLETE ) + { + buf << _("This machine was never completed. It may exhibit strange behavior or missing elements that are not bugs in the emulation.\n"); + } + + if (m_machine.system().flags & MACHINE_NO_SOUND_HW ) + { + buf << _("This machine has no sound hardware, MAME will produce no sounds, this is expected behaviour.\n"); + } + + // if there's a NOT WORKING, UNEMULATED PROTECTION or GAME MECHANICAL warning, make it stronger + if (m_machine.system().flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_MECHANICAL)) + { + // add the strings for these warnings + if (m_machine.system().flags & MACHINE_UNEMULATED_PROTECTION) { + buf << _("The machine has protection which isn't fully emulated.\n"); + } + if (m_machine.system().flags & MACHINE_NOT_WORKING) { + buf << _("\nTHIS MACHINE DOESN'T WORK. The emulation for this machine is not yet complete. " + "There is nothing you can do to fix this problem except wait for the developers to improve the emulation.\n"); + } + if (m_machine.system().flags & MACHINE_MECHANICAL) { + buf << _("\nCertain elements of this machine cannot be emulated as it requires actual physical interaction or consists of mechanical devices. " + "It is not possible to fully play this machine.\n"); + } + + // find the parent of this driver + driver_enumerator drivlist(m_machine.options()); + int maindrv = drivlist.find(m_machine.system()); + int clone_of = drivlist.non_bios_clone(maindrv); + if (clone_of != -1) + maindrv = clone_of; + + // scan the driver list for any working clones and add them + bool foundworking = false; + while (drivlist.next()) + if (drivlist.current() == maindrv || drivlist.clone() == maindrv) + if ((drivlist.driver().flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_MECHANICAL)) == 0) + { + // this one works, add a header and display the name of the clone + if (!foundworking) { + buf << _("\n\nThere are working clones of this machine: "); + } + else + buf << ", "; + buf << drivlist.driver().name; + foundworking = true; + } + + if (foundworking) + buf << "\n"; + } + } + + // add the 'press OK' string + buf << _("\n\nPress any key to continue"); + return buf.str(); +} + + +//------------------------------------------------- +// game_info_string - return the game info text +//------------------------------------------------- + +std::string machine_info::game_info_string() +{ + std::ostringstream buf; + + // print description, manufacturer, and CPU: + util::stream_format(buf, _("%1$s\n%2$s %3$s\nDriver: %4$s\n\nCPU:\n"), + m_machine.system().description, + m_machine.system().year, + m_machine.system().manufacturer, + core_filename_extract_base(m_machine.system().source_file)); + + // loop over all CPUs + execute_interface_iterator execiter(m_machine.root_device()); + std::unordered_set exectags; + for (device_execute_interface &exec : execiter) + { + if (!exectags.insert(exec.device().tag()).second) + continue; + // get cpu specific clock that takes internal multiplier/dividers into account + int clock = exec.device().clock(); + + // count how many identical CPUs we have + int count = 1; + const char *name = exec.device().name(); + for (device_execute_interface &scan : execiter) + { + if (exec.device().type() == scan.device().type() && strcmp(name, scan.device().name()) == 0 && exec.device().clock() == scan.device().clock()) + if (exectags.insert(scan.device().tag()).second) + count++; + } + + // if more than one, prepend a #x in front of the CPU name + // display clock in kHz or MHz + util::stream_format(buf, + (count > 1) ? "%1$d" UTF8_MULTIPLY "%2$s %3$d.%4$0*5$d%6$s\n" : "%2$s %3$d.%4$0*5$d%6$s\n", + count, + name, + (clock >= 1000000) ? (clock / 1000000) : (clock / 1000), + (clock >= 1000000) ? (clock % 1000000) : (clock % 1000), + (clock >= 1000000) ? 6 : 3, + (clock >= 1000000) ? _("MHz") : _("kHz")); + } + + // loop over all sound chips + sound_interface_iterator snditer(m_machine.root_device()); + std::unordered_set soundtags; + bool found_sound = false; + for (device_sound_interface &sound : snditer) + { + if (!soundtags.insert(sound.device().tag()).second) + continue; + + // append the Sound: string + if (!found_sound) + buf << _("\nSound:\n"); + found_sound = true; + + // count how many identical sound chips we have + int count = 1; + for (device_sound_interface &scan : snditer) + { + if (sound.device().type() == scan.device().type() && sound.device().clock() == scan.device().clock()) + if (soundtags.insert(scan.device().tag()).second) + count++; + } + + // if more than one, prepend a #x in front of the CPU name + // display clock in kHz or MHz + int clock = sound.device().clock(); + util::stream_format(buf, + (count > 1) + ? ((clock != 0) ? "%1$d" UTF8_MULTIPLY "%2$s %3$d.%4$0*5$d%6$s\n" : "%1$d" UTF8_MULTIPLY "%2$s\n") + : ((clock != 0) ? "%2$s %3$d.%4$0*5$d%6$s\n" : "%2$s\n"), + count, + sound.device().name(), + (clock >= 1000000) ? (clock / 1000000) : (clock / 1000), + (clock >= 1000000) ? (clock % 1000000) : (clock % 1000), + (clock >= 1000000) ? 6 : 3, + (clock >= 1000000) ? _("MHz") : _("kHz")); + } + + // display screen information + buf << _("\nVideo:\n"); + screen_device_iterator scriter(m_machine.root_device()); + int scrcount = scriter.count(); + if (scrcount == 0) + buf << _("None\n"); + else + { + for (screen_device &screen : scriter) + { + std::string detail; + if (screen.screen_type() == SCREEN_TYPE_VECTOR) + detail = _("Vector"); + else + { + const rectangle &visarea = screen.visible_area(); + detail = string_format("%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz", + visarea.width(), visarea.height(), + (m_machine.system().flags & ORIENTATION_SWAP_XY) ? "V" : "H", + ATTOSECONDS_TO_HZ(screen.frame_period().attoseconds())); + } + + util::stream_format(buf, + (scrcount > 1) ? _("%1$s: %2$s\n") : _("%2$s\n"), + get_screen_desc(screen), detail); + } + } + + return buf.str(); +} + + +//------------------------------------------------- +// mandatory_images - search for devices which +// need an image to be loaded +//------------------------------------------------- + +std::string machine_info::mandatory_images() +{ + std::ostringstream buf; + + // make sure that any required image has a mounted file + for (device_image_interface &image : image_interface_iterator(m_machine.root_device())) + { + if (image.filename() == nullptr && image.must_be_loaded()) + buf << "\"" << image.instance_name() << "\", "; + } + return buf.str(); +} + + +//------------------------------------------------- +// get_screen_desc - returns the description for +// a given screen +//------------------------------------------------- + +std::string machine_info::get_screen_desc(screen_device &screen) +{ + if (screen_device_iterator(m_machine.root_device()).count() > 1) + return string_format(_("Screen '%1$s'"), screen.tag()); + else + return _("Screen"); +} + + /*------------------------------------------------- menu_game_info - handle the game information menu @@ -31,8 +350,8 @@ menu_game_info::~menu_game_info() void menu_game_info::populate() { - std::string tempstring; - item_append(ui().game_info_astring(tempstring), "", FLAG_MULTILINE, nullptr); + std::string tempstring = ui().machine_info().game_info_string(); + item_append(std::move(tempstring), "", FLAG_MULTILINE, nullptr); } void menu_game_info::handle() diff --git a/src/frontend/mame/ui/info.h b/src/frontend/mame/ui/info.h index 2fbd9de3683..8a1d339dc73 100644 --- a/src/frontend/mame/ui/info.h +++ b/src/frontend/mame/ui/info.h @@ -16,6 +16,36 @@ #include "ui/menu.h" namespace ui { + +class machine_info +{ +public: + // construction + machine_info(running_machine &machine); + + // has... getters + bool has_configs() const { return m_has_configs; } + bool has_analog() const { return m_has_analog; } + bool has_dips() const { return m_has_dips; } + bool has_bioses() const { return m_has_bioses; } + + // text generators + std::string warnings_string(); + std::string game_info_string(); + std::string mandatory_images(); + std::string get_screen_desc(screen_device &screen); + +private: + // reference to machine + running_machine & m_machine; + + // has... + bool m_has_configs; + bool m_has_analog; + bool m_has_dips; + bool m_has_bioses; +}; + class menu_game_info : public menu { public: diff --git a/src/frontend/mame/ui/inifile.cpp b/src/frontend/mame/ui/inifile.cpp index fd93bb6d1f7..e1bf2604733 100644 --- a/src/frontend/mame/ui/inifile.cpp +++ b/src/frontend/mame/ui/inifile.cpp @@ -11,7 +11,7 @@ #include "emu.h" #include "ui/moptions.h" #include "ui/inifile.h" -#include "softlist.h" +#include "softlist_dev.h" #include "drivenum.h" //------------------------------------------------- @@ -195,10 +195,10 @@ void favorite_manager::add_favorite_game() auto part = image.part_entry(); ui_software_info tmpmatches; tmpmatches.shortname = swinfo->shortname(); - tmpmatches.longname = strensure(image.longname()); + tmpmatches.longname = image.longname(); tmpmatches.parentname = swinfo->parentname(); - tmpmatches.year = strensure(image.year()); - tmpmatches.publisher = strensure(image.manufacturer()); + tmpmatches.year = image.year(); + tmpmatches.publisher = image.manufacturer(); tmpmatches.supported = image.supported(); tmpmatches.part = part->name(); tmpmatches.driver = &machine().system(); diff --git a/src/frontend/mame/ui/mainmenu.cpp b/src/frontend/mame/ui/mainmenu.cpp index 3bf5e5cb7b6..92d7db18d4c 100644 --- a/src/frontend/mame/ui/mainmenu.cpp +++ b/src/frontend/mame/ui/mainmenu.cpp @@ -56,11 +56,11 @@ void menu_main::populate() item_append(_("Input (this Machine)"), "", 0, (void *)INPUT_SPECIFIC); /* add optional input-related menus */ - if (machine().ioport().has_analog()) + if (ui().machine_info().has_analog()) item_append(_("Analog Controls"), "", 0, (void *)ANALOG); - if (machine().ioport().has_dips()) + if (ui().machine_info().has_dips()) item_append(_("Dip Switches"), "", 0, (void *)SETTINGS_DIP_SWITCHES); - if (machine().ioport().has_configs()) + if (ui().machine_info().has_configs()) { item_append(_("Machine Configuration"), "", 0, (void *)SETTINGS_DRIVER_CONFIG); } @@ -92,7 +92,7 @@ void menu_main::populate() if (pty_interface_iterator(machine().root_device()).first() != nullptr) item_append(_("Pseudo terminals"), "", 0, (void *)PTY_INFO); - if (machine().ioport().has_bioses()) + if (ui().machine_info().has_bioses()) item_append(_("Bios Selection"), "", 0, (void *)BIOS_SELECTION); /* add slot info menu */ diff --git a/src/frontend/mame/ui/menu.cpp b/src/frontend/mame/ui/menu.cpp index 154fda55e31..32039886450 100644 --- a/src/frontend/mame/ui/menu.cpp +++ b/src/frontend/mame/ui/menu.cpp @@ -53,7 +53,6 @@ menu::global_state_ptr menu::get_global_state(running_machine &machine) std::lock_guard guard(s_global_state_guard); auto const it(s_global_states.find(&machine)); return (it != s_global_states.end()) ? it->second : global_state_ptr(); - } //------------------------------------------------- diff --git a/src/frontend/mame/ui/miscmenu.cpp b/src/frontend/mame/ui/miscmenu.cpp index d90a5502250..3da9d91ee4e 100644 --- a/src/frontend/mame/ui/miscmenu.cpp +++ b/src/frontend/mame/ui/miscmenu.cpp @@ -78,7 +78,7 @@ void menu_bios_selection::populate() /* cycle through all devices for this system */ for (device_t &device : device_iterator(machine().root_device())) { - if (device.rom_region()) + if (device.rom_region() != nullptr && !ROMENTRY_ISEND(device.rom_region())) { const char *val = "default"; for (const rom_entry *rom = device.rom_region(); !ROMENTRY_ISEND(rom); rom++) @@ -117,9 +117,9 @@ void menu_bios_selection::handle() { device_t *dev = (device_t *)menu_event->itemref; int cnt = 0; - for (const rom_entry *rom = dev->rom_region(); !ROMENTRY_ISEND(rom); rom++) + for (const rom_entry &rom : dev->rom_region_vector()) { - if (ROMENTRY_ISSYSTEM_BIOS(rom)) cnt ++; + if (ROMENTRY_ISSYSTEM_BIOS(&rom)) cnt ++; } int val = dev->system_bios() + ((menu_event->iptkey == IPT_UI_LEFT) ? -1 : +1); if (val<1) val=cnt; @@ -838,20 +838,22 @@ void menu_machine_configure::setup_bios() if (m_drv->rom == nullptr) return; + auto entries = rom_build_entries(m_drv->rom); + std::string specbios(m_opts.bios()); std::string default_name; - for (const rom_entry *rom = m_drv->rom; !ROMENTRY_ISEND(rom); ++rom) - if (ROMENTRY_ISDEFAULT_BIOS(rom)) - default_name = ROM_GETNAME(rom); + for (const rom_entry &rom : entries) + if (ROMENTRY_ISDEFAULT_BIOS(&rom)) + default_name = ROM_GETNAME(&rom); std::size_t bios_count = 0; - for (const rom_entry *rom = m_drv->rom; !ROMENTRY_ISEND(rom); ++rom) + for (const rom_entry &rom : entries) { - if (ROMENTRY_ISSYSTEM_BIOS(rom)) + if (ROMENTRY_ISSYSTEM_BIOS(&rom)) { - std::string name(ROM_GETHASHDATA(rom)); - std::string biosname(ROM_GETNAME(rom)); - int bios_flags = ROM_GETBIOSFLAGS(rom); + std::string name(ROM_GETHASHDATA(&rom)); + std::string biosname(ROM_GETNAME(&rom)); + int bios_flags = ROM_GETBIOSFLAGS(&rom); std::string bios_number = std::to_string(bios_flags - 1); // check biosnumber and name diff --git a/src/frontend/mame/ui/selgame.cpp b/src/frontend/mame/ui/selgame.cpp index 3019bff9d0f..7357d3f66c2 100644 --- a/src/frontend/mame/ui/selgame.cpp +++ b/src/frontend/mame/ui/selgame.cpp @@ -31,7 +31,7 @@ #include "mame.h" #include "rendfont.h" #include "rendutil.h" -#include "softlist.h" +#include "softlist_dev.h" #include "uiinput.h" extern const char UI_VERSION_TAG[]; @@ -680,7 +680,8 @@ void menu_select_game::build_available_list() auto driver = &driver_list::driver(x); if (!m_included[x] && driver != &GAME_NAME(___empty)) { - const rom_entry *rom = driver->rom; + auto entries = rom_build_entries(driver->rom); + const rom_entry *rom = entries.data(); bool noroms = true; // check NO-DUMP @@ -699,8 +700,7 @@ void menu_select_game::build_available_list() if (cx != -1 && m_included[cx]) { auto drv = &driver_list::driver(cx); - auto parentrom = drv->rom; - if ((rom = driver->rom) == parentrom) + if (driver->rom == drv->rom) noroms = true; // check if clone < parent @@ -717,7 +717,8 @@ void menu_select_game::build_available_list() UINT64 lenght = ROM_GETLENGTH(rom); auto found = false; - for (parentrom = drv->rom; !ROMENTRY_ISEND(parentrom) && found == false; ++parentrom) + auto parent_entries = rom_build_entries(drv->rom); + for (auto parentrom = parent_entries.data(); !ROMENTRY_ISEND(parentrom) && found == false; ++parentrom) { if (ROMENTRY_ISFILE(parentrom) && ROM_GETLENGTH(parentrom) == lenght) { @@ -1026,6 +1027,7 @@ void menu_select_game::build_list(const char *filter_text, int filter, bool bios for (auto & s_driver : s_drivers) { + auto entries = rom_build_entries(s_driver->rom); if (!bioscheck && filter != FILTER_BIOS && (s_driver->flags & MACHINE_IS_BIOS_ROOT) != 0) continue; @@ -1111,8 +1113,8 @@ void menu_select_game::build_list(const char *filter_text, int filter, bool bios } break; case FILTER_CHD: - for (const rom_entry *rom = s_driver->rom; !ROMENTRY_ISEND(rom); ++rom) - if (ROMENTRY_ISREGION(rom) && ROMREGION_ISDISKDATA(rom)) + for (const rom_entry &rom : entries) + if (ROMENTRY_ISREGION(&rom) && ROMREGION_ISDISKDATA(&rom)) { m_displaylist.push_back(s_driver); break; @@ -1121,8 +1123,8 @@ void menu_select_game::build_list(const char *filter_text, int filter, bool bios case FILTER_NOCHD: { bool found = false; - for (const rom_entry *rom = s_driver->rom; !ROMENTRY_ISEND(rom); ++rom) - if (ROMENTRY_ISREGION(rom) && ROMREGION_ISDISKDATA(rom)) + for (const rom_entry &rom : entries) + if (ROMENTRY_ISREGION(&rom) && ROMREGION_ISDISKDATA(&rom)) { found = true; break; @@ -1301,8 +1303,9 @@ void menu_select_game::general_info(const game_driver *driver, std::string &buff util::stream_format(str, _("Support Save: %1$s\n"), ((driver->flags & MACHINE_SUPPORTS_SAVE) ? _("Yes") : _("No"))); util::stream_format(str, _("Screen Orientation: %1$s\n"), ((driver->flags & ORIENTATION_SWAP_XY) ? _("Vertical") : _("Horizontal"))); bool found = false; - for (const rom_entry *rom = driver->rom; !ROMENTRY_ISEND(rom); ++rom) - if (ROMENTRY_ISREGION(rom) && ROMREGION_ISDISKDATA(rom)) + auto entries = rom_build_entries(driver->rom); + for (const rom_entry &rom : entries) + if (ROMENTRY_ISREGION(&rom) && ROMREGION_ISDISKDATA(&rom)) { found = true; break; diff --git a/src/frontend/mame/ui/selsoft.cpp b/src/frontend/mame/ui/selsoft.cpp index 1a6b6842df5..858a29e36fe 100644 --- a/src/frontend/mame/ui/selsoft.cpp +++ b/src/frontend/mame/ui/selsoft.cpp @@ -24,7 +24,7 @@ #include "mame.h" #include "rendfont.h" #include "rendutil.h" -#include "softlist.h" +#include "softlist_dev.h" #include "uiinput.h" @@ -96,18 +96,20 @@ bool has_multiple_bios(const game_driver *driver, s_bios &biosname) if (driver->rom == nullptr) return false; - std::string default_name; - for (const rom_entry *rom = driver->rom; !ROMENTRY_ISEND(rom); ++rom) - if (ROMENTRY_ISDEFAULT_BIOS(rom)) - default_name = ROM_GETNAME(rom); + auto entries = rom_build_entries(driver->rom); - for (const rom_entry *rom = driver->rom; !ROMENTRY_ISEND(rom); ++rom) + std::string default_name; + for (const rom_entry &rom : entries) + if (ROMENTRY_ISDEFAULT_BIOS(&rom)) + default_name = ROM_GETNAME(&rom); + + for (const rom_entry &rom : entries) { - if (ROMENTRY_ISSYSTEM_BIOS(rom)) + if (ROMENTRY_ISSYSTEM_BIOS(&rom)) { - std::string name(ROM_GETHASHDATA(rom)); - std::string bname(ROM_GETNAME(rom)); - int bios_flags = ROM_GETBIOSFLAGS(rom); + std::string name(ROM_GETHASHDATA(&rom)); + std::string bname(ROM_GETNAME(&rom)); + int bios_flags = ROM_GETBIOSFLAGS(&rom); if (bname == default_name) { @@ -528,7 +530,7 @@ void menu_select_software::build_software_list() for (const software_info &swinfo : swlist.get_info()) { const software_part &part = swinfo.parts().front(); - if (part.is_compatible(swlist) == SOFTWARE_IS_COMPATIBLE) + if (swlist.is_compatible(part) == SOFTWARE_IS_COMPATIBLE) { const char *instance_name = nullptr; const char *type_name = nullptr; @@ -560,7 +562,7 @@ void menu_select_software::build_software_list() tmpmatches.supported = swinfo.supported(); tmpmatches.part = part.name(); tmpmatches.driver = m_driver; - tmpmatches.listname = strensure(swlist.list_name()); + tmpmatches.listname = swlist.list_name(); tmpmatches.interface = part.interface(); tmpmatches.startempty = 0; tmpmatches.parentlongname.clear(); diff --git a/src/frontend/mame/ui/swlist.cpp b/src/frontend/mame/ui/swlist.cpp index b9a25a18535..6126f433e39 100644 --- a/src/frontend/mame/ui/swlist.cpp +++ b/src/frontend/mame/ui/swlist.cpp @@ -12,8 +12,9 @@ #include "ui/ui.h" #include "ui/swlist.h" +#include "ui/utils.h" -#include "softlist.h" +#include "softlist_dev.h" namespace ui { @@ -29,6 +30,18 @@ namespace ui { SOFTWARE PARTS ***************************************************************************/ +//------------------------------------------------- +// is_valid_softlist_part_char - returns whether +// this character is a valid char for a softlist +// part +//------------------------------------------------- + +static bool is_valid_softlist_part_char(unicode_char ch) +{ + return (ch == (char)ch) && isalnum(ch); +} + + //------------------------------------------------- // ctor //------------------------------------------------- @@ -173,7 +186,7 @@ void menu_software_list::append_software_entry(const software_info &swinfo) // check if at least one of the parts has the correct interface and add a menu entry only in this case for (const software_part &swpart : swinfo.parts()) { - if (swpart.matches_interface(m_interface) && swpart.is_compatible(*m_swlist) == SOFTWARE_IS_COMPATIBLE) + if (swpart.matches_interface(m_interface) && m_swlist->is_compatible(swpart) == SOFTWARE_IS_COMPATIBLE) { entry_updated = true; entry.short_name.assign(swinfo.shortname()); @@ -233,7 +246,7 @@ void menu_software_list::handle() m_ordered_by_shortname = !m_ordered_by_shortname; // reset the char buffer if we change ordering criterion - memset(m_filename_buffer, '\0', ARRAY_LENGTH(m_filename_buffer)); + m_filename_buffer.clear(); // reload the menu with the new order reset(reset_options::REMEMBER_REF); @@ -248,33 +261,11 @@ void menu_software_list::handle() } else if (event->iptkey == IPT_SPECIAL) { - auto const buflen = std::strlen(m_filename_buffer); - bool update_selected = false; - - if ((event->unichar == 8) || (event->unichar == 0x7f)) + if (input_character(m_filename_buffer, event->unichar, &is_valid_softlist_part_char)) { - // if it's a backspace and we can handle it, do so - if (0 < buflen) - { - *const_cast(utf8_previous_char(&m_filename_buffer[buflen])) = 0; - update_selected = true; + // display the popup + ui().popup_time(ERROR_MESSAGE_TIME, "%s", m_filename_buffer); - ui().popup_time(ERROR_MESSAGE_TIME, "%s", m_filename_buffer); - } - } - else if (event->is_char_printable()) - { - // if it's any other key and we're not maxed out, update - if (event->append_char(m_filename_buffer, buflen)) - { - update_selected = true; - - ui().popup_time(ERROR_MESSAGE_TIME, "%s", m_filename_buffer); - } - } - - if (update_selected) - { // identify the selected entry entry_info const *const cur_selected = (FPTR(event->itemref) != 1) ? reinterpret_cast(get_selection_ref()) @@ -289,9 +280,9 @@ void menu_software_list::handle() auto &compare_name = m_ordered_by_shortname ? entry.short_name : entry.long_name; int match = 0; - for (int i = 0; i < ARRAY_LENGTH(m_filename_buffer); i++) + for (int i = 0; i < m_filename_buffer.length(); i++) { - if (core_strnicmp(compare_name.c_str(), m_filename_buffer, i) == 0) + if (core_strnicmp(compare_name.c_str(), m_filename_buffer.c_str(), i) == 0) match = i; } @@ -313,8 +304,7 @@ void menu_software_list::handle() else if (event->iptkey == IPT_UI_CANCEL) { // reset the char buffer also in this case - if (m_filename_buffer[0] != '\0') - memset(m_filename_buffer, '\0', ARRAY_LENGTH(m_filename_buffer)); + m_filename_buffer.clear(); m_result = m_filename_buffer; stack_pop(); } diff --git a/src/frontend/mame/ui/swlist.h b/src/frontend/mame/ui/swlist.h index eef09f1c03d..77b2267f7da 100644 --- a/src/frontend/mame/ui/swlist.h +++ b/src/frontend/mame/ui/swlist.h @@ -77,8 +77,8 @@ private: software_list_device * m_swlist; // currently selected list const char * m_interface; std::string & m_result; - std::vector m_entrylist; - char m_filename_buffer[1024]; + std::list m_entrylist; + std::string m_filename_buffer; bool m_ordered_by_shortname; // functions diff --git a/src/frontend/mame/ui/text.cpp b/src/frontend/mame/ui/text.cpp index ea6ebc743df..50e7cf6bbfe 100644 --- a/src/frontend/mame/ui/text.cpp +++ b/src/frontend/mame/ui/text.cpp @@ -12,6 +12,10 @@ #include "rendfont.h" #include "render.h" +#include +#include + + namespace ui { /*************************************************************************** INLINE FUNCTIONS @@ -111,10 +115,10 @@ text_layout::~text_layout() void text_layout::add_text(const char *text, const char_style &style) { - int position = 0; - int text_length = strlen(text); + std::size_t position = 0; + std::size_t const text_length = std::strlen(text); - while(position < text_length) + while (position < text_length) { // adding a character - we might change the width invalidate_calculated_actual_width(); @@ -124,16 +128,15 @@ void text_layout::add_text(const char *text, const char_style &style) { // get the current character unicode_char schar; - int scharcount; - scharcount = uchar_from_utf8(&schar, &text[position], text_length - position); - if (scharcount == -1) + int const scharcount = uchar_from_utf8(&schar, &text[position], text_length - position); + if (scharcount < 0) break; // if the line starts with a tab character, center it regardless text_justify line_justify = justify(); if (schar == '\t') { - position += scharcount; + position += unsigned(scharcount); line_justify = text_layout::CENTER; } @@ -142,12 +145,11 @@ void text_layout::add_text(const char *text, const char_style &style) } // get the current character - int scharcount; unicode_char ch; - scharcount = uchar_from_utf8(&ch, &text[position], text_length - position); + int const scharcount = uchar_from_utf8(&ch, &text[position], text_length - position); if (scharcount < 0) break; - position += scharcount; + position += unsigned(scharcount); // set up source information source_info source = { 0, }; diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index 7394f03be2f..5c7f4a54a39 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -21,13 +21,13 @@ #include "rendfont.h" #include "uiinput.h" #include "ui/ui.h" +#include "ui/info.h" #include "ui/menu.h" #include "ui/mainmenu.h" #include "ui/filemngr.h" #include "ui/sliders.h" #include "ui/viewgfx.h" #include "imagedev/cassette.h" -#include "image.h" /*************************************************************************** @@ -186,6 +186,10 @@ mame_ui_manager::mame_ui_manager(running_machine &machine) { } +mame_ui_manager::~mame_ui_manager() +{ +} + void mame_ui_manager::init() { load_ui_options(); @@ -240,6 +244,8 @@ void mame_ui_manager::exit() void mame_ui_manager::initialize(running_machine &machine) { + m_machine_info = std::make_unique(machine); + // initialize the on-screen display system slider_list = slider_init(machine); if (slider_list.size() > 0) @@ -295,12 +301,15 @@ void mame_ui_manager::display_startup_screens(bool first_time) { // default to standard colors messagebox_backcolor = UI_BACKGROUND_COLOR; + messagebox_text.clear(); // pick the next state switch (state) { case 0: - if (show_warnings && warnings_string(messagebox_text).length() > 0) + if (show_warnings) + messagebox_text = machine_info().warnings_string(); + if (!messagebox_text.empty()) { set_handler(ui_callback_type::MODAL, std::bind(&mame_ui_manager::handler_messagebox_anykey, this, _1)); if (machine().system().flags & (MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS | MACHINE_REQUIRES_ARTWORK | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_KEYBOARD | MACHINE_NO_SOUND)) @@ -311,12 +320,16 @@ void mame_ui_manager::display_startup_screens(bool first_time) break; case 1: - if (show_gameinfo && game_info_astring(messagebox_text).length() > 0) + if (show_gameinfo) + messagebox_text = machine_info().game_info_string(); + if (!messagebox_text.empty()) set_handler(ui_callback_type::MODAL, std::bind(&mame_ui_manager::handler_messagebox_anykey, this, _1)); break; case 2: - if (show_mandatory_fileman && machine().image().mandatory_scan(messagebox_text).length() > 0) + if (show_mandatory_fileman) + messagebox_text = machine_info().mandatory_images(); + if (!messagebox_text.empty()) { std::string warning; warning.assign(_("This driver requires images to be loaded in the following device(s): ")).append(messagebox_text.substr(0, messagebox_text.length() - 2)); @@ -745,259 +758,6 @@ bool mame_ui_manager::is_menu_active(void) } -/*************************************************************************** - TEXT GENERATORS -***************************************************************************/ - -//------------------------------------------------- -// warnings_string - print the warning flags -// text to the given buffer -//------------------------------------------------- - -std::string &mame_ui_manager::warnings_string(std::string &str) -{ -#define WARNING_FLAGS ( MACHINE_NOT_WORKING | \ - MACHINE_UNEMULATED_PROTECTION | \ - MACHINE_MECHANICAL | \ - MACHINE_WRONG_COLORS | \ - MACHINE_IMPERFECT_COLORS | \ - MACHINE_REQUIRES_ARTWORK | \ - MACHINE_NO_SOUND | \ - MACHINE_IMPERFECT_SOUND | \ - MACHINE_IMPERFECT_GRAPHICS | \ - MACHINE_IMPERFECT_KEYBOARD | \ - MACHINE_NO_COCKTAIL| \ - MACHINE_IS_INCOMPLETE| \ - MACHINE_NO_SOUND_HW ) - - str.clear(); - - // if no warnings, nothing to return - if (machine().rom_load().warnings() == 0 && machine().rom_load().knownbad() == 0 && !(machine().system().flags & WARNING_FLAGS) && machine().rom_load().software_load_warnings_message().length() == 0) - return str; - - // add a warning if any ROMs were loaded with warnings - if (machine().rom_load().warnings() > 0) - { - str.append(_("One or more ROMs/CHDs for this machine are incorrect. The machine may not run correctly.\n")); - if (machine().system().flags & WARNING_FLAGS) - str.append("\n"); - } - - if (machine().rom_load().software_load_warnings_message().length()>0) { - str.append(machine().rom_load().software_load_warnings_message()); - if (machine().system().flags & WARNING_FLAGS) - str.append("\n"); - } - // if we have at least one warning flag, print the general header - if ((machine().system().flags & WARNING_FLAGS) || machine().rom_load().knownbad() > 0) - { - str.append(_("There are known problems with this machine\n\n")); - - // add a warning if any ROMs are flagged BAD_DUMP/NO_DUMP - if (machine().rom_load().knownbad() > 0) { - str.append(_("One or more ROMs/CHDs for this machine have not been correctly dumped.\n")); - } - // add one line per warning flag - if (machine().system().flags & MACHINE_IMPERFECT_KEYBOARD) - str.append(_("The keyboard emulation may not be 100% accurate.\n")); - if (machine().system().flags & MACHINE_IMPERFECT_COLORS) - str.append(_("The colors aren't 100% accurate.\n")); - if (machine().system().flags & MACHINE_WRONG_COLORS) - str.append(_("The colors are completely wrong.\n")); - if (machine().system().flags & MACHINE_IMPERFECT_GRAPHICS) - str.append(_("The video emulation isn't 100% accurate.\n")); - if (machine().system().flags & MACHINE_IMPERFECT_SOUND) - str.append(_("The sound emulation isn't 100% accurate.\n")); - if (machine().system().flags & MACHINE_NO_SOUND) { - str.append(_("The machine lacks sound.\n")); - } - if (machine().system().flags & MACHINE_NO_COCKTAIL) - str.append(_("Screen flipping in cocktail mode is not supported.\n")); - - // check if external artwork is present before displaying this warning? - if (machine().system().flags & MACHINE_REQUIRES_ARTWORK) { - str.append(_("The machine requires external artwork files\n")); - } - - if (machine().system().flags & MACHINE_IS_INCOMPLETE ) - { - str.append(_("This machine was never completed. It may exhibit strange behavior or missing elements that are not bugs in the emulation.\n")); - } - - if (machine().system().flags & MACHINE_NO_SOUND_HW ) - { - str.append(_("This machine has no sound hardware, MAME will produce no sounds, this is expected behaviour.\n")); - } - - // if there's a NOT WORKING, UNEMULATED PROTECTION or GAME MECHANICAL warning, make it stronger - if (machine().system().flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_MECHANICAL)) - { - // add the strings for these warnings - if (machine().system().flags & MACHINE_UNEMULATED_PROTECTION) { - str.append(_("The machine has protection which isn't fully emulated.\n")); - } - if (machine().system().flags & MACHINE_NOT_WORKING) { - str.append(_("\nTHIS MACHINE DOESN'T WORK. The emulation for this machine is not yet complete. " - "There is nothing you can do to fix this problem except wait for the developers to improve the emulation.\n")); - } - if (machine().system().flags & MACHINE_MECHANICAL) { - str.append(_("\nCertain elements of this machine cannot be emulated as it requires actual physical interaction or consists of mechanical devices. " - "It is not possible to fully play this machine.\n")); - } - - // find the parent of this driver - driver_enumerator drivlist(machine().options()); - int maindrv = drivlist.find(machine().system()); - int clone_of = drivlist.non_bios_clone(maindrv); - if (clone_of != -1) - maindrv = clone_of; - - // scan the driver list for any working clones and add them - bool foundworking = false; - while (drivlist.next()) - if (drivlist.current() == maindrv || drivlist.clone() == maindrv) - if ((drivlist.driver().flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_MECHANICAL)) == 0) - { - // this one works, add a header and display the name of the clone - if (!foundworking) { - str.append(_("\n\nThere are working clones of this machine: ")); - } - else - str.append(", "); - str.append(drivlist.driver().name); - foundworking = true; - } - - if (foundworking) - str.append("\n"); - } - } - - // add the 'press OK' string - str.append(_("\n\nPress any key to continue")); - return str; -} - - -//------------------------------------------------- -// game_info_std::string - populate an allocated -// string with the game info text -//------------------------------------------------- - -std::string &mame_ui_manager::game_info_astring(std::string &str) -{ - std::ostringstream buf; - - // print description, manufacturer, and CPU: - util::stream_format(buf, _("%1$s\n%2$s %3$s\nDriver: %4$s\n\nCPU:\n"), - machine().system().description, - machine().system().year, - machine().system().manufacturer, - core_filename_extract_base(machine().system().source_file)); - - // loop over all CPUs - execute_interface_iterator execiter(machine().root_device()); - std::unordered_set exectags; - for (device_execute_interface &exec : execiter) - { - if (!exectags.insert(exec.device().tag()).second) - continue; - // get cpu specific clock that takes internal multiplier/dividers into account - int clock = exec.device().clock(); - - // count how many identical CPUs we have - int count = 1; - const char *name = exec.device().name(); - for (device_execute_interface &scan : execiter) - { - if (exec.device().type() == scan.device().type() && strcmp(name, scan.device().name()) == 0 && exec.device().clock() == scan.device().clock()) - if (exectags.insert(scan.device().tag()).second) - count++; - } - - // if more than one, prepend a #x in front of the CPU name - // display clock in kHz or MHz - util::stream_format(buf, - (count > 1) ? "%1$d" UTF8_MULTIPLY "%2$s %3$d.%4$0*5$d%6$s\n" : "%2$s %3$d.%4$0*5$d%6$s\n", - count, - name, - (clock >= 1000000) ? (clock / 1000000) : (clock / 1000), - (clock >= 1000000) ? (clock % 1000000) : (clock % 1000), - (clock >= 1000000) ? 6 : 3, - (clock >= 1000000) ? _("MHz") : _("kHz")); - } - - // loop over all sound chips - sound_interface_iterator snditer(machine().root_device()); - std::unordered_set soundtags; - bool found_sound = false; - for (device_sound_interface &sound : snditer) - { - if (!soundtags.insert(sound.device().tag()).second) - continue; - - // append the Sound: string - if (!found_sound) - buf << _("\nSound:\n"); - found_sound = true; - - // count how many identical sound chips we have - int count = 1; - for (device_sound_interface &scan : snditer) - { - if (sound.device().type() == scan.device().type() && sound.device().clock() == scan.device().clock()) - if (soundtags.insert(scan.device().tag()).second) - count++; - } - - // if more than one, prepend a #x in front of the CPU name - // display clock in kHz or MHz - int clock = sound.device().clock(); - util::stream_format(buf, - (count > 1) - ? ((clock != 0) ? "%1$d" UTF8_MULTIPLY "%2$s %3$d.%4$0*5$d%6$s\n" : "%1$d" UTF8_MULTIPLY "%2$s\n") - : ((clock != 0) ? "%2$s %3$d.%4$0*5$d%6$s\n" : "%2$s\n"), - count, - sound.device().name(), - (clock >= 1000000) ? (clock / 1000000) : (clock / 1000), - (clock >= 1000000) ? (clock % 1000000) : (clock % 1000), - (clock >= 1000000) ? 6 : 3, - (clock >= 1000000) ? _("MHz") : _("kHz")); - } - - // display screen information - buf << _("\nVideo:\n"); - screen_device_iterator scriter(machine().root_device()); - int scrcount = scriter.count(); - if (scrcount == 0) - buf << _("None\n"); - else - { - for (screen_device &screen : scriter) - { - std::string detail; - if (screen.screen_type() == SCREEN_TYPE_VECTOR) - detail = _("Vector"); - else - { - const rectangle &visarea = screen.visible_area(); - detail = string_format("%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz", - visarea.width(), visarea.height(), - (machine().system().flags & ORIENTATION_SWAP_XY) ? "V" : "H", - ATTOSECONDS_TO_HZ(screen.frame_period().attoseconds())); - } - - util::stream_format(buf, - (scrcount > 1) ? _("%1$s: %2$s\n") : _("%2$s\n"), - slider_get_screen_desc(screen), detail); - } - } - - return str = buf.str(); -} - - /*************************************************************************** UI HANDLERS @@ -1043,7 +803,7 @@ UINT32 mame_ui_manager::handler_messagebox_anykey(render_container &container) } -//-------------------------------------------------3 +//------------------------------------------------- // process_natural_keyboard - processes any // natural keyboard input //------------------------------------------------- @@ -1758,7 +1518,7 @@ std::vector mame_ui_manager::slider_init(running_machine &machine int defxoffset = floor(screen.xoffset() * 1000.0f + 0.5f); int defyoffset = floor(screen.yoffset() * 1000.0f + 0.5f); void *param = (void *)&screen; - std::string screen_desc = slider_get_screen_desc(screen); + std::string screen_desc = machine_info().get_screen_desc(screen); // add refresh rate tweaker if (machine.options().cheat()) @@ -2317,19 +2077,6 @@ INT32 mame_ui_manager::slider_beam_intensity_weight(running_machine &machine, vo } -//------------------------------------------------- -// slider_get_screen_desc - returns the -// description for a given screen -//------------------------------------------------- - -std::string mame_ui_manager::slider_get_screen_desc(screen_device &screen) -{ - if (screen_device_iterator(screen.machine().root_device()).count() > 1) - return string_format(_("Screen '%1$s'"), screen.tag()); - else - return _("Screen"); -} - //------------------------------------------------- // slider_crossscale - crosshair scale slider // callback diff --git a/src/frontend/mame/ui/ui.h b/src/frontend/mame/ui/ui.h index 0c45dd08405..3baa5db61c2 100644 --- a/src/frontend/mame/ui/ui.h +++ b/src/frontend/mame/ui/ui.h @@ -26,7 +26,7 @@ namespace ui { class menu_item; - +class machine_info; } // namespace ui /*************************************************************************** @@ -152,6 +152,7 @@ public: // construction/destruction mame_ui_manager(running_machine &machine); + ~mame_ui_manager(); void init(); @@ -159,6 +160,7 @@ public: running_machine &machine() const { return m_machine; } bool single_step() const { return m_single_step; } ui_options &options() { return m_ui_options; } + ui::machine_info &machine_info() const { assert(m_machine_info != nullptr); return *m_machine_info; } // setters void set_single_step(bool single_step) { m_single_step = single_step; } @@ -213,9 +215,6 @@ public: void start_save_state(); void start_load_state(); - // print the game info string into a buffer - std::string &game_info_astring(std::string &str); - // slider controls std::vector& get_slider_list(void); @@ -249,6 +248,8 @@ private: bool m_load_save_hold; ui_options m_ui_options; + std::unique_ptr m_machine_info; + // static variables static std::string messagebox_text; static std::string messagebox_poptext; @@ -257,9 +258,6 @@ private: static std::vector slider_list; static slider_state *slider_current; - // text generators - std::string &warnings_string(std::string &buffer); - // UI handlers UINT32 handler_messagebox(render_container &container); UINT32 handler_messagebox_anykey(render_container &container); diff --git a/src/frontend/mame/ui/utils.h b/src/frontend/mame/ui/utils.h index d2cd12c1beb..0c63d3961fe 100644 --- a/src/frontend/mame/ui/utils.h +++ b/src/frontend/mame/ui/utils.h @@ -13,6 +13,8 @@ #ifndef __UI_UTILS_H__ #define __UI_UTILS_H__ +#include "unicode.h" + #define MAX_CHAR_INFO 256 #define MAX_CUST_FILTER 8 @@ -249,4 +251,37 @@ const char* strensure(const char* s); int getprecisionchr(const char* s); std::vector tokenize(const std::string &text, char sep); + +//------------------------------------------------- +// input_character - inputs a typed character +// into a buffer +//------------------------------------------------- + +template +bool input_character(std::string &buffer, unicode_char unichar, F &&filter) +{ + bool result = false; + auto buflen = buffer.size(); + + if ((unichar == 8) || (unichar == 0x7f)) + { + // backspace + if (0 < buflen) + { + auto buffer_oldend = buffer.c_str() + buflen; + auto buffer_newend = utf8_previous_char(buffer_oldend); + buffer.resize(buffer_newend - buffer.c_str()); + result = true; + } + } + else if ((unichar >= ' ') && filter(unichar)) + { + // append this character + buffer += utf8_from_uchar(unichar); + result = true; + } + return result; +} + + #endif /* __UI_UTILS_H__ */ diff --git a/src/lib/netlist/build/makefile b/src/lib/netlist/build/makefile index e017e8ef35d..36bce299de5 100644 --- a/src/lib/netlist/build/makefile +++ b/src/lib/netlist/build/makefile @@ -16,18 +16,15 @@ SRC = .. # LTO = -flto=4 -fuse-linker-plugin -flto-partition=balanced -Wodr -#-Werror -#CFLAGS = $(LTO) -g -O3 -std=c++98 -Doverride="" -march=native -msse4.2 -Wall -Wpedantic -Wsign-compare -Wextra -Wno-long-long -Wno-unused-parameter -Wno-unused-result -Wno-variadic-macros -I.. -#LDFLAGS = $(LTO) -g -O3 -std=c++98 - -CFLAGS = $(CEXTRAFLAGS) $(LTO) -g -O3 -std=c++11 -march=native -I.. -Wall -Wpedantic -Wsign-compare -Wextra -Wno-unused-parameter -LDFLAGS = $(LTO) -g -O3 -std=c++11 +CFLAGS = $(LTO) -g -O3 -std=c++11 -march=native -I.. -Wall -Wpedantic -Wsign-compare -Wextra -Wno-unused-parameter $(CEXTRAFLAGS) +LDFLAGS = $(LTO) -g -O3 -std=c++11 $(LDEXTRAFLAGS) LIBS = -lpthread -ldl -CC = g++-5 -LD = @g++-5 +CC = g++ +LD = @g++ MD = @mkdir RM = @rm +DOXYGEN = @doxygen TARGETS = nltool nlwav @@ -106,19 +103,20 @@ NLOBJS := \ ALL_OBJS = $(OBJS) $(NLOBJ)/prg/nltool.o $(NLOBJ)/prg/nlwav.o SOURCES = $(patsubst $(OBJ)%, $(SRC)%, $(ALL_OBJS:.o=.cpp)) +MAKEFILE_TARGETS_WITHOUT_INCLUDE := clean doc clang mingw #------------------------------------------------- # all #------------------------------------------------- -all: maketree $(TARGETS) +all: maketree depend $(TARGETS) #------------------------------------------------- # clean #------------------------------------------------- clean: - $(RM) -rf $(OBJS) $(TARGETS) .depend + $(RM) -rf $(OBJS) $(TARGETS) $(OBJ)/prg/nltool.o $(OBJ)/prg/nlwav.o .depend #------------------------------------------------- # nltool @@ -126,11 +124,11 @@ clean: nltool: $(OBJ)/prg/nltool.o $(OBJS) @echo Linking $@... - @$(LD) -o $@ $(LDFLAGS) $^ $(LIBS) + $(LD) -o $@ $(LDFLAGS) $^ $(LIBS) nlwav: $(OBJ)/prg/nlwav.o $(OBJS) @echo Linking $@... - @$(LD) -o $@ $(LDFLAGS) $^ $(LIBS) + $(LD) -o $@ $(LDFLAGS) $^ $(LIBS) #------------------------------------------------- # directories @@ -142,10 +140,34 @@ $(sort $(OBJDIRS)): maketree: $(sort $(OBJDIRS)) #------------------------------------------------- -# depends +# Special targets #------------------------------------------------- -depend: .depend +.PHONY: clang mingw doc + +clang: + $(MAKE) CC=clang++ LD=clang++ CEXTRAFLAGS="-Weverything -Werror -Wno-padded -Wno-weak-vtables -Wno-missing-variable-declarations -Wconversion -Wno-c++98-compat -Wno-float-equal -Wno-cast-align -Wno-global-constructors -Wno-c++98-compat-pedantic -Wno-exit-time-destructors -Wno-format-nonliteral -Wno-weak-template-vtables" + +# +# FIXME: -Wno-weak-vtables -Wno-missing-variable-declarations -Wno-conversion -Wno-exit-time-destructors +# + +mingw: + $(MAKE) LDEXTRAFLAGS="-Wl,--subsystem,console" LIBS= MD=@mkdir.exe SHELL=sh.exe + +# +# FIXME: Unicode +# CEXTRAFLAGS = -DUNICODE -D_UNICODE -municode +# LDEXTRAFLAGS = -municode +# + + +doc: + $(DOXYGEN) doxygen.conf + +#------------------------------------------------- +# depends +#------------------------------------------------- .depend: $(SOURCES) @echo creating .depend @@ -154,19 +176,12 @@ depend: .depend $(CC) $(CFLAGS) -MM $$i -MT `echo $$i | sed -e 's/$(SRC)/$(OBJ)/' -e 's/.cpp/.o/' ` >>./.depend; \ done +depend: .depend + +# Include only if the goal needs it +ifeq ($(filter $(MAKECMDGOALS),$(MAKEFILE_TARGETS_WITHOUT_INCLUDE)),) -include .depend - -#------------------------------------------------- -# Special targets -#------------------------------------------------- - -.PHONY: clang -clang: - $(MAKE) CC=clang++ LD=clang++ CEXTRAFLAGS="-Weverything -Werror -Wno-padded -Wno-weak-vtables -Wno-missing-variable-declarations -Wconversion -Wno-c++98-compat -Wno-float-equal -Wno-cast-align -Wno-global-constructors -Wno-c++98-compat-pedantic -Wno-exit-time-destructors -Wno-format-nonliteral -Wno-weak-template-vtables" - -# -# FIX: -Wno-weak-vtables -Wno-missing-variable-declarations -Wno-conversion -Wno-exit-time-destructors -# +endif #------------------------------------------------- # generic rules @@ -188,5 +203,3 @@ $(OBJ)/%.a: @echo Archiving $@... $(RM) $@ $(AR) $(ARFLAGS) $@ $^ - - diff --git a/src/lib/netlist/devices/nld_truthtable.h b/src/lib/netlist/devices/nld_truthtable.h index 2d3c04e1536..45a150574c8 100644 --- a/src/lib/netlist/devices/nld_truthtable.h +++ b/src/lib/netlist/devices/nld_truthtable.h @@ -261,7 +261,7 @@ namespace netlist } public: - void inc_active() override + void inc_active() noexcept override { if (m_NI > 1) if (++m_active == 1) @@ -270,7 +270,7 @@ namespace netlist } } - void dec_active() override + void dec_active() noexcept override { /* FIXME: * Based on current measurements there is no point to disable diff --git a/src/lib/netlist/nl_base.cpp b/src/lib/netlist/nl_base.cpp index c4d402ff3ee..d8a01612e25 100644 --- a/src/lib/netlist/nl_base.cpp +++ b/src/lib/netlist/nl_base.cpp @@ -536,8 +536,9 @@ void core_device_t::set_delegate_pointer() void core_device_t::stop_dev() { -#if (NL_KEEP_STATISTICS) -#endif + //NOTE: stop_dev is not removed. It remains so it can be reactivated in case + // we run into a situation were RAII and noexcept dtors force us to + // to have a device stop() routine which may throw. //stop(); } @@ -640,7 +641,7 @@ detail::net_t::~net_t() netlist().state().remove_save_items(this); } -void detail::net_t::inc_active(core_terminal_t &term) +void detail::net_t::inc_active(core_terminal_t &term) NL_NOEXCEPT { m_active++; m_list_active.push_front(&term); @@ -664,7 +665,7 @@ void detail::net_t::inc_active(core_terminal_t &term) } } -void detail::net_t::dec_active(core_terminal_t &term) +void detail::net_t::dec_active(core_terminal_t &term) NL_NOEXCEPT { --m_active; nl_assert(m_active >= 0); @@ -688,9 +689,8 @@ void detail::net_t::rebuild_list() m_active = cnt; } -void detail::net_t::update_devs() +void detail::net_t::update_devs() NL_NOEXCEPT { - //assert(m_num_cons != 0); nl_assert(this->isRailNet()); static const unsigned masks[4] = @@ -748,41 +748,14 @@ void detail::net_t::register_con(detail::core_terminal_t &terminal) m_active++; } -void detail::net_t::move_connections(detail::net_t *dest_net) +void detail::net_t::move_connections(detail::net_t &dest_net) { for (auto &ct : m_core_terms) - dest_net->register_con(*ct); + dest_net.register_con(*ct); m_core_terms.clear(); m_active = 0; } -void detail::net_t::merge_net(detail::net_t *othernet) -{ - netlist().log().debug("merging nets ...\n"); - if (othernet == nullptr) - return; // Nothing to do - - if (othernet == this) - { - netlist().log().warning("Connecting {1} to itself. This may be right, though\n", this->name()); - return; // Nothing to do - } - - if (this->isRailNet() && othernet->isRailNet()) - netlist().log().fatal("Trying to merge two rail nets: {1} and {2}\n", this->name(), othernet->name()); - - if (othernet->isRailNet()) - { - netlist().log().debug("othernet is railnet\n"); - othernet->merge_net(this); - } - else - { - othernet->move_connections(this); - } -} - - // ---------------------------------------------------------------------------------------- // logic_net_t // ---------------------------------------------------------------------------------------- @@ -803,46 +776,16 @@ analog_net_t::analog_net_t(netlist_t &nl, const pstring &aname, detail::core_ter { } -bool analog_net_t::already_processed(std::vector &groups) -{ - if (isRailNet()) - return true; - for (auto & grp : groups) - { - if (plib::container::contains(grp, this)) - return true; - } - return false; -} - -void analog_net_t::process_net(std::vector &groups) -{ - if (num_cons() == 0) - return; - /* add the net */ - groups.back().push_back(this); - for (auto &p : m_core_terms) - { - if (p->is_type(terminal_t::TERMINAL)) - { - terminal_t *pt = static_cast(p); - analog_net_t *other_net = &pt->m_otherterm->net(); - if (!other_net->already_processed(groups)) - other_net->process_net(groups); - } - } -} - - // ---------------------------------------------------------------------------------------- // core_terminal_t // ---------------------------------------------------------------------------------------- -detail::core_terminal_t::core_terminal_t(core_device_t &dev, const pstring &aname, const type_t atype) -: device_object_t(dev, dev.name() + "." + aname, atype) +detail::core_terminal_t::core_terminal_t(core_device_t &dev, const pstring &aname, + const type_t type, const state_e state) +: device_object_t(dev, dev.name() + "." + aname, type) , plib::linkedlist_t::element_t() , m_net(nullptr) -, m_state(*this, "m_state", STATE_NONEX) +, m_state(*this, "m_state", state) { } @@ -870,7 +813,7 @@ void detail::core_terminal_t::set_net(net_t *anet) // ---------------------------------------------------------------------------------------- terminal_t::terminal_t(core_device_t &dev, const pstring &aname) -: analog_t(dev, aname, TERMINAL) +: analog_t(dev, aname, TERMINAL, STATE_BIDIR) , m_otherterm(nullptr) , m_Idr1(*this, "m_Idr1", nullptr) , m_go1(*this, "m_go1", nullptr) @@ -907,10 +850,9 @@ void terminal_t::schedule_after(const netlist_time &after) // ---------------------------------------------------------------------------------------- logic_output_t::logic_output_t(core_device_t &dev, const pstring &aname) - : logic_t(dev, aname, OUTPUT) + : logic_t(dev, aname, OUTPUT, STATE_OUT) , m_my_net(dev.netlist(), name() + ".net", this) { - set_state(STATE_OUT); this->set_net(&m_my_net); set_logic_family(dev.logic_family()); netlist().setup().register_term(*this); @@ -926,9 +868,8 @@ void logic_output_t::initial(const netlist_sig_t val) // ---------------------------------------------------------------------------------------- analog_input_t::analog_input_t(core_device_t &dev, const pstring &aname) -: analog_t(dev, aname, INPUT) +: analog_t(dev, aname, INPUT, STATE_INP_ACTIVE) { - set_state(STATE_INP_ACTIVE); netlist().setup().register_term(*this); } @@ -937,11 +878,10 @@ analog_input_t::analog_input_t(core_device_t &dev, const pstring &aname) // ---------------------------------------------------------------------------------------- analog_output_t::analog_output_t(core_device_t &dev, const pstring &aname) - : analog_t(dev, aname, OUTPUT) + : analog_t(dev, aname, OUTPUT, STATE_OUT) , m_my_net(dev.netlist(), name() + ".net", this) { this->set_net(&m_my_net); - set_state(STATE_OUT); net().m_cur_Analog = NL_FCONST(0.0); netlist().setup().register_term(*this); @@ -957,9 +897,8 @@ void analog_output_t::initial(const nl_double val) // ----------------------------------------------------------------------------- logic_input_t::logic_input_t(core_device_t &dev, const pstring &aname) - : logic_t(dev, aname, INPUT) + : logic_t(dev, aname, INPUT, STATE_INP_ACTIVE) { - set_state(STATE_INP_ACTIVE); set_logic_family(dev.logic_family()); netlist().setup().register_term(*this); } diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h index fbd67862dd7..f76b7b8e673 100644 --- a/src/lib/netlist/nl_base.h +++ b/src/lib/netlist/nl_base.h @@ -17,6 +17,7 @@ #include "nl_lists.h" #include "nl_time.h" +#include "plib/palloc.h" #include "plib/pdynlib.h" #include "plib/pstate.h" #include "plib/pfmtlog.h" @@ -116,14 +117,14 @@ class NETLIB_NAME(name) : public device_t #define NETLIB_FAMILY(family) , m_famsetter(*this, family) #define NETLIB_UPDATE_TERMINALSI() public: virtual void update_terminals() override -#define NETLIB_UPDATEI() protected: virtual void update() NOEXCEPT override +#define NETLIB_UPDATEI() protected: virtual void update() NL_NOEXCEPT override #define NETLIB_UPDATE_PARAMI() public: virtual void update_param() override #define NETLIB_RESETI() protected: virtual void reset() override #define NETLIB_SUB(chip) nld_ ## chip #define NETLIB_SUBXX(chip) std::unique_ptr< nld_ ## chip > -#define NETLIB_UPDATE(chip) void NETLIB_NAME(chip) :: update(void) NOEXCEPT +#define NETLIB_UPDATE(chip) void NETLIB_NAME(chip) :: update(void) NL_NOEXCEPT #define NETLIB_RESET(chip) void NETLIB_NAME(chip) :: reset(void) @@ -139,13 +140,14 @@ class NETLIB_NAME(name) : public device_t //============================================================ #if defined(MAME_DEBUG) -#define nl_assert(x) do { if (1) if (!(x)) throw nl_exception(plib::pfmt("assert: {1}:{2}: {3}")(__FILE__)(__LINE__)(#x) ); } while (0) +#define nl_assert(x) do { if (1) if (!(x)) throw nl_exception(plib::pfmt("assert: {1}:{2}: {3}")(__FILE__)(__LINE__)(#x) ); } while (0) +#define NL_NOEXCEPT #else -#define nl_assert(x) do { if (0) if (!(x)) throw nl_exception(plib::pfmt("assert: {1}:{2}: {3}")(__FILE__)(__LINE__)(#x) ); } while (0) +#define nl_assert(x) do { if (0) if (!(x)) { /*throw nl_exception(plib::pfmt("assert: {1}:{2}: {3}")(__FILE__)(__LINE__)(#x) ); */} } while (0) +#define NL_NOEXCEPT noexcept #endif #define nl_assert_always(x, msg) do { if (!(x)) throw nl_exception(plib::pfmt("Fatal error: {1}\nCaused by assert: {2}:{3}: {4}")(msg)(__FILE__)(__LINE__)(#x)); } while (0) - // ----------------------------------------------------------------------------- // forward definitions // ----------------------------------------------------------------------------- @@ -195,7 +197,7 @@ namespace netlist : plib::pexception(text) { } /*! Copy constructor. */ nl_exception(const nl_exception &e) : plib::pexception(e) { } - virtual ~nl_exception() noexcept {} + virtual ~nl_exception() {} }; class logic_output_t; @@ -212,8 +214,8 @@ namespace netlist */ using model_map_t = std::unordered_map; - /*! Logic families descriptors are used create proxy devices. - * The logic family describe the analog capabilities of logic devices, + /*! Logic families descriptors are used to create proxy devices. + * The logic family describes the analog capabilities of logic devices, * inputs and outputs. */ class logic_family_desc_t @@ -284,9 +286,9 @@ namespace netlist const T &value //!< Initial value after construction ); //! Copy Constructor. - state_var(const state_var &rhs) NOEXCEPT = default; + state_var(const state_var &rhs) noexcept = default; //! Move Constructor. - state_var(state_var &&rhs) NOEXCEPT = default; + state_var(state_var &&rhs) noexcept = default; //! Assignment operator to assign value of a state var. state_var &operator=(state_var rhs) { std::swap(rhs.m_value, this->m_value); return *this; } //! Assignment operator to assign value of type T. @@ -314,8 +316,8 @@ namespace netlist { public: state_var(device_t &dev, const pstring name, const T & value); - state_var(const state_var &rhs) NOEXCEPT = default; - state_var(state_var &&rhs) NOEXCEPT = default; + state_var(const state_var &rhs) noexcept = default; + state_var(state_var &&rhs) noexcept = default; state_var &operator=(const state_var rhs) { m_value = rhs.m_value; return *this; } state_var &operator=(const T rhs) { m_value = rhs; return *this; } T & operator[](const std::size_t i) { return m_value[i]; } @@ -446,6 +448,11 @@ namespace netlist // core_terminal_t // ----------------------------------------------------------------------------- + /*! Base class for all terminals. + * + * All terminals are derived from this class. + * + */ class detail::core_terminal_t : public device_object_t, public plib::linkedlist_t::element_t { P_PREVENT_COPYING(core_terminal_t) @@ -453,18 +460,17 @@ namespace netlist using list_t = std::vector; - /* needed here ... */ - enum state_e { STATE_INP_PASSIVE = 0, STATE_INP_ACTIVE = 1, STATE_INP_HL = 2, STATE_INP_LH = 4, STATE_OUT = 128, - STATE_NONEX = 256 + STATE_BIDIR = 256 }; - core_terminal_t(core_device_t &dev, const pstring &aname, const type_t atype); + core_terminal_t(core_device_t &dev, const pstring &aname, + const type_t type, const state_e state); virtual ~core_terminal_t() { } void set_net(net_t *anet); @@ -474,16 +480,12 @@ namespace netlist const net_t & net() const { return *m_net;} net_t & net() { return *m_net;} - bool is_logic() const; - bool is_analog() const; + bool is_logic() const noexcept; + bool is_analog() const noexcept; bool is_state(const state_e astate) const { return (m_state == astate); } state_e state() const { return m_state; } - void set_state(const state_e astate) - { - nl_assert(astate != STATE_NONEX); - m_state = astate; - } + void set_state(const state_e astate) { m_state = astate; } void reset(); @@ -500,13 +502,14 @@ namespace netlist { public: - analog_t(core_device_t &dev, const pstring &aname, const type_t atype) - : core_terminal_t(dev, aname, atype) + analog_t(core_device_t &dev, const pstring &aname, const type_t type, + const state_e state) + : core_terminal_t(dev, aname, type, state) { } - const analog_net_t & net() const; - analog_net_t & net(); + const analog_net_t & net() const noexcept; + analog_net_t & net() noexcept; }; // ----------------------------------------------------------------------------- @@ -578,9 +581,11 @@ namespace netlist class logic_t : public detail::core_terminal_t, public logic_family_t { public: - logic_t(core_device_t &dev, const pstring &aname, const type_t atype) - : core_terminal_t(dev, aname, atype), logic_family_t(), - m_proxy(nullptr) + logic_t(core_device_t &dev, const pstring &aname, const type_t type, + const state_e state) + : core_terminal_t(dev, aname, type, state) + , logic_family_t() + , m_proxy(nullptr) { } @@ -588,8 +593,8 @@ namespace netlist devices::nld_base_proxy *get_proxy() const { return m_proxy; } void set_proxy(devices::nld_base_proxy *proxy) { m_proxy = proxy; } - logic_net_t & net(); - const logic_net_t & net() const; + logic_net_t & net() noexcept; + const logic_net_t & net() const noexcept; protected: @@ -606,9 +611,9 @@ namespace netlist public: logic_input_t(core_device_t &dev, const pstring &aname); - netlist_sig_t Q() const; + netlist_sig_t Q() const noexcept; - netlist_sig_t operator()() const + netlist_sig_t operator()() const NL_NOEXCEPT { nl_assert(state() != STATE_INP_PASSIVE); return Q(); @@ -646,7 +651,7 @@ namespace netlist /*! returns voltage at terminal. * \returns voltage at terminal. */ - nl_double Q_Analog() const; + nl_double Q_Analog() const noexcept; }; @@ -667,19 +672,18 @@ namespace netlist void reset(); void register_con(core_terminal_t &terminal); - void merge_net(net_t *othernet); - bool is_logic() const; - bool is_analog() const; + bool is_logic() const noexcept; + bool is_analog() const noexcept; void toggle_new_Q() { m_new_Q ^= 1; } void force_queue_execution() { m_new_Q = (m_cur_Q ^ 1); } - void push_to_queue(const netlist_time delay) NOEXCEPT; - void reschedule_in_queue(const netlist_time delay) NOEXCEPT; + void push_to_queue(const netlist_time delay) noexcept; + void reschedule_in_queue(const netlist_time delay) noexcept; bool is_queued() const { return m_in_queue == 1; } - void update_devs(); + void update_devs() NL_NOEXCEPT; const netlist_time time() const { return m_time; } void set_time(const netlist_time ntime) { m_time = ntime; } @@ -687,14 +691,13 @@ namespace netlist bool isRailNet() const { return !(m_railterminal == nullptr); } core_terminal_t & railterminal() const { return *m_railterminal; } - std::size_t num_cons() const { return m_core_terms.size(); } + std::size_t num_cons() const noexcept { return m_core_terms.size(); } - void inc_active(core_terminal_t &term); - void dec_active(core_terminal_t &term); + void inc_active(core_terminal_t &term) NL_NOEXCEPT; + void dec_active(core_terminal_t &term) NL_NOEXCEPT; void rebuild_list(); /* rebuild m_list after a load */ - - void move_connections(net_t *new_net); + void move_connections(net_t &dest_net); std::vector m_core_terms; // save post-start m_list ... @@ -728,7 +731,7 @@ namespace netlist netlist_sig_t new_Q() const { return m_new_Q; } void initial(const netlist_sig_t val) { m_cur_Q = m_new_Q = val; } - void set_Q(const netlist_sig_t newQ, const netlist_time delay) NOEXCEPT + void set_Q(const netlist_sig_t newQ, const netlist_time delay) noexcept { if (newQ != m_new_Q) { @@ -737,7 +740,7 @@ namespace netlist } } - void set_Q_time(const netlist_sig_t newQ, const netlist_time at) + void set_Q_time(const netlist_sig_t newQ, const netlist_time at) noexcept { if (newQ != m_new_Q) { @@ -750,7 +753,7 @@ namespace netlist /* internal state support * FIXME: get rid of this and implement export/import in MAME */ - netlist_sig_t &Q_state_ptr() { return m_cur_Q; } + netlist_sig_t &Q_state_ptr() { return m_cur_Q; } protected: private: @@ -772,12 +775,9 @@ namespace netlist nl_double &Q_Analog_state_ptr() { return m_cur_Analog; } //FIXME: needed by current solver code - devices::matrix_solver_t *solver() { return m_solver; } + devices::matrix_solver_t *solver() const { return m_solver; } void set_solver(devices::matrix_solver_t *solver) { m_solver = solver; } - bool already_processed(std::vector &groups); - void process_net(std::vector &groups); - private: devices::matrix_solver_t *m_solver; }; @@ -795,7 +795,7 @@ namespace netlist void initial(const netlist_sig_t val); - void push(const netlist_sig_t newQ, const netlist_time delay) NOEXCEPT + void push(const netlist_sig_t newQ, const netlist_time delay) noexcept { m_my_net.set_Q(newQ, delay); // take the shortcut } @@ -810,11 +810,11 @@ namespace netlist public: analog_output_t(core_device_t &dev, const pstring &aname); - void push(const nl_double val) { set_Q(val); } + void push(const nl_double val) noexcept { set_Q(val); } void initial(const nl_double val); private: - void set_Q(const nl_double newQ); + void set_Q(const nl_double newQ) noexcept; analog_net_t m_my_net; }; @@ -851,7 +851,7 @@ namespace netlist public: param_template_t(device_t &device, const pstring name, const C val); - const C operator()() const { return Value(); } + const C operator()() const { return Value(); } void setTo(const C ¶m); void initial(const C &val) { m_param = val; } @@ -904,14 +904,14 @@ namespace netlist virtual ~core_device_t(); - void update_dev() + void update_dev() NL_NOEXCEPT { m_stat_total_time.start(); do_update(); m_stat_total_time.stop(); } - void do_update() NOEXCEPT + void do_update() NL_NOEXCEPT { #if (NL_PMF_TYPE == NL_PMF_TYPE_GNUC_PMF) (this->*m_static_update)(); @@ -925,7 +925,7 @@ namespace netlist void set_delegate_pointer(); void stop_dev(); - void do_inc_active() + void do_inc_active() noexcept { if (m_hint_deactivate) { @@ -933,7 +933,8 @@ namespace netlist inc_active(); } } - void do_dec_active() + + void do_dec_active() noexcept { if (m_hint_deactivate) dec_active(); @@ -948,9 +949,9 @@ namespace netlist protected: - virtual void update() NOEXCEPT { } - virtual void inc_active() { } - virtual void dec_active() { } + virtual void update() NL_NOEXCEPT { } + virtual void inc_active() noexcept { } + virtual void dec_active() noexcept { } virtual void stop() { } virtual void reset() { } @@ -1087,8 +1088,8 @@ namespace netlist devices::NETLIB_NAME(gnd) *gnd() const { return m_gnd; } nl_double gmin() const; - void push_to_queue(detail::net_t &out, const netlist_time attime) NOEXCEPT; - void remove_from_queue(detail::net_t &out); + void push_to_queue(detail::net_t &out, const netlist_time attime) noexcept; + void remove_from_queue(detail::net_t &out) NL_NOEXCEPT; void process_queue(const netlist_time &delta); void abort_current_queue_slice() { m_queue.retime(m_time, nullptr); } @@ -1220,22 +1221,22 @@ namespace netlist } } - inline bool detail::core_terminal_t::is_logic() const + inline bool detail::core_terminal_t::is_logic() const noexcept { return dynamic_cast(this) != nullptr; } - inline bool detail::core_terminal_t::is_analog() const + inline bool detail::core_terminal_t::is_analog() const noexcept { return dynamic_cast(this) != nullptr; } - inline bool detail::net_t::is_logic() const + inline bool detail::net_t::is_logic() const noexcept { return dynamic_cast(this) != nullptr; } - inline bool detail::net_t::is_analog() const + inline bool detail::net_t::is_analog() const noexcept { return dynamic_cast(this) != nullptr; } @@ -1276,7 +1277,7 @@ namespace netlist } } - inline void detail::net_t::push_to_queue(const netlist_time delay) NOEXCEPT + inline void detail::net_t::push_to_queue(const netlist_time delay) noexcept { if (!is_queued() && (num_cons() != 0)) { @@ -1289,7 +1290,7 @@ namespace netlist } } - inline void detail::net_t::reschedule_in_queue(const netlist_time delay) NOEXCEPT + inline void detail::net_t::reschedule_in_queue(const netlist_time delay) noexcept { if (is_queued()) netlist().remove_from_queue(*this); @@ -1302,39 +1303,39 @@ namespace netlist } } - inline const analog_net_t & analog_t::net() const + inline const analog_net_t & analog_t::net() const noexcept { return static_cast(core_terminal_t::net()); } - inline analog_net_t & analog_t::net() + inline analog_net_t & analog_t::net() noexcept { return static_cast(core_terminal_t::net()); } inline nl_double terminal_t::operator ()() const { return net().Q_Analog(); } - inline logic_net_t & logic_t::net() + inline logic_net_t & logic_t::net() noexcept { return *static_cast(&core_terminal_t::net()); } - inline const logic_net_t & logic_t::net() const + inline const logic_net_t & logic_t::net() const noexcept { return static_cast(core_terminal_t::net()); } - inline netlist_sig_t logic_input_t::Q() const + inline netlist_sig_t logic_input_t::Q() const noexcept { return net().Q(); } - inline nl_double analog_input_t::Q_Analog() const + inline nl_double analog_input_t::Q_Analog() const noexcept { return net().Q_Analog(); } - inline void analog_output_t::set_Q(const nl_double newQ) + inline void analog_output_t::set_Q(const nl_double newQ) noexcept { if (newQ != net().Q_Analog()) { @@ -1344,12 +1345,12 @@ namespace netlist } } - inline void netlist_t::push_to_queue(detail::net_t &out, const netlist_time attime) NOEXCEPT + inline void netlist_t::push_to_queue(detail::net_t &out, const netlist_time attime) noexcept { m_queue.push(attime, &out); } - inline void netlist_t::remove_from_queue(detail::net_t &out) + inline void netlist_t::remove_from_queue(detail::net_t &out) NL_NOEXCEPT { m_queue.remove(&out); } diff --git a/src/lib/netlist/nl_config.h b/src/lib/netlist/nl_config.h index a2fe70b5320..4965e7b9746 100644 --- a/src/lib/netlist/nl_config.h +++ b/src/lib/netlist/nl_config.h @@ -135,11 +135,6 @@ using nperfcount_t = plib::chrono::counter; // General //============================================================ -// this macro passes an item followed by a string version of itself as two consecutive parameters -//#define NLNAME(x) x, #x - -#define NOEXCEPT noexcept - // The following adds about 10% performance ... #if !defined(USE_OPENMP) diff --git a/src/lib/netlist/nl_factory.h b/src/lib/netlist/nl_factory.h index d1dac190f30..6a53797d0d8 100644 --- a/src/lib/netlist/nl_factory.h +++ b/src/lib/netlist/nl_factory.h @@ -12,6 +12,7 @@ #include #include "nl_config.h" +#include "plib/palloc.h" #include "plib/plists.h" #include "plib/putil.h" #include "nl_base.h" diff --git a/src/lib/netlist/nl_lists.h b/src/lib/netlist/nl_lists.h index 84914d67450..e1fdbd10986 100644 --- a/src/lib/netlist/nl_lists.h +++ b/src/lib/netlist/nl_lists.h @@ -47,7 +47,7 @@ namespace netlist std::size_t capacity() const { return m_list.size(); } bool empty() const { return (m_end == &m_list[1]); } - void push(const Time t, Element o) NOEXCEPT + void push(const Time t, Element o) noexcept { #if HAS_OPENMP && USE_OPENMP /* Lock */ @@ -67,10 +67,10 @@ namespace netlist #endif } - entry_t pop() NOEXCEPT { return *(--m_end); } - const entry_t &top() const NOEXCEPT { return *(m_end-1); } + entry_t pop() noexcept { return *(--m_end); } + const entry_t &top() const noexcept { return *(m_end-1); } - void remove(const Element &elem) NOEXCEPT + void remove(const Element &elem) noexcept { /* Lock */ #if HAS_OPENMP && USE_OPENMP @@ -97,7 +97,7 @@ namespace netlist #endif } - void retime(const Time t, const Element &elem) NOEXCEPT + void retime(const Time t, const Element &elem) noexcept { remove(elem); push(t, elem); @@ -116,9 +116,9 @@ namespace netlist // save state support & mame disasm - const entry_t *listptr() const { return &m_list[1]; } - std::size_t size() const { return static_cast(m_end - &m_list[1]); } - const entry_t & operator[](const std::size_t index) const { return m_list[ 1 + index]; } + const entry_t *listptr() const { return &m_list[1]; } + std::size_t size() const noexcept { return static_cast(m_end - &m_list[1]); } + const entry_t & operator[](const std::size_t index) const { return m_list[ 1 + index]; } private: diff --git a/src/lib/netlist/nl_setup.cpp b/src/lib/netlist/nl_setup.cpp index 8048b7db46a..274daba019c 100644 --- a/src/lib/netlist/nl_setup.cpp +++ b/src/lib/netlist/nl_setup.cpp @@ -451,6 +451,31 @@ devices::nld_base_proxy *setup_t::get_d_a_proxy(detail::core_terminal_t &out) return proxy; } +void setup_t::merge_nets(detail::net_t &thisnet, detail::net_t &othernet) +{ + netlist().log().debug("merging nets ...\n"); + if (&othernet == &thisnet) + { + netlist().log().warning("Connecting {1} to itself. This may be right, though\n", thisnet.name()); + return; // Nothing to do + } + + if (thisnet.isRailNet() && othernet.isRailNet()) + netlist().log().fatal("Trying to merge two rail nets: {1} and {2}\n", thisnet.name(), othernet.name()); + + if (othernet.isRailNet()) + { + netlist().log().debug("othernet is railnet\n"); + merge_nets(othernet, thisnet); + } + else + { + othernet.move_connections(thisnet); + } +} + + + void setup_t::connect_input_output(detail::core_terminal_t &in, detail::core_terminal_t &out) { if (out.is_analog() && in.is_logic()) @@ -477,7 +502,7 @@ void setup_t::connect_input_output(detail::core_terminal_t &in, detail::core_ter else { if (in.has_net()) - out.net().merge_net(&in.net()); + merge_nets(out.net(), in.net()); else out.net().register_con(in); } @@ -503,7 +528,7 @@ void setup_t::connect_terminal_input(terminal_t &term, detail::core_terminal_t & if (inp.has_net()) //fatalerror("logic inputs can only belong to one net!\n"); - proxy->m_Q.net().merge_net(&inp.net()); + merge_nets(proxy->m_Q.net(), inp.net()); else proxy->m_Q.net().register_con(inp); @@ -522,7 +547,7 @@ void setup_t::connect_terminal_output(terminal_t &in, detail::core_terminal_t &o log().debug("connect_terminal_output: {1} {2}\n", in.name(), out.name()); /* no proxy needed, just merge existing terminal net */ if (in.has_net()) - out.net().merge_net(&in.net()); + merge_nets(out.net(), in.net()); else out.net().register_con(in); } @@ -544,7 +569,7 @@ void setup_t::connect_terminals(detail::core_terminal_t &t1, detail::core_termin if (t1.has_net() && t2.has_net()) { log().debug("T2 and T1 have net\n"); - t1.net().merge_net(&t2.net()); + merge_nets(t1.net(), t2.net()); } else if (t2.has_net()) { @@ -678,8 +703,8 @@ void setup_t::resolve_inputs() int tries = 100; while (m_links.size() > 0 && tries > 0) // FIXME: convert into constant { - auto li = m_links.begin(); - while (li != m_links.end()) + + for (auto li = m_links.begin(); li != m_links.end(); ) { const pstring t1s = li->first; const pstring t2s = li->second; @@ -703,18 +728,20 @@ void setup_t::resolve_inputs() log().verbose("deleting empty nets ..."); - // delete empty nets ... and save m_list ... + // delete empty nets - for (auto net = netlist().m_nets.begin(); net != netlist().m_nets.end();) - { - if (net->get()->num_cons() == 0) - { - log().verbose("Deleting net {1} ...", net->get()->name()); - net = netlist().m_nets.erase(net); - } - else - ++net; - } + netlist().m_nets.erase( + std::remove_if(netlist().m_nets.begin(), netlist().m_nets.end(), + [](plib::owned_ptr &x) + { + if (x->num_cons() == 0) + { + x->netlist().log().verbose("Deleting net {1} ...", x->name()); + return true; + } + else + return false; + }), netlist().m_nets.end()); pstring errstr(""); diff --git a/src/lib/netlist/nl_setup.h b/src/lib/netlist/nl_setup.h index 86de48e81ce..aec2da2dcd8 100644 --- a/src/lib/netlist/nl_setup.h +++ b/src/lib/netlist/nl_setup.h @@ -14,7 +14,6 @@ #include #include "plib/pstring.h" -#include "plib/palloc.h" #include "plib/pfmtlog.h" #include "plib/pstream.h" #include "plib/putil.h" @@ -271,6 +270,8 @@ namespace netlist detail::core_terminal_t *find_terminal(const pstring &outname_in, bool required = true); detail::core_terminal_t *find_terminal(const pstring &outname_in, detail::device_object_t::type_t atype, bool required = true); + void merge_nets(detail::net_t &thisnet, detail::net_t &othernet); + void connect_terminals(detail::core_terminal_t &in, detail::core_terminal_t &out); void connect_input_output(detail::core_terminal_t &in, detail::core_terminal_t &out); void connect_terminal_output(terminal_t &in, detail::core_terminal_t &out); diff --git a/src/lib/netlist/nl_time.h b/src/lib/netlist/nl_time.h index bd9a12168e9..9eb1dae0ad8 100644 --- a/src/lib/netlist/nl_time.h +++ b/src/lib/netlist/nl_time.h @@ -36,13 +36,13 @@ namespace netlist using mult_type = std::uint_fast64_t; static constexpr internal_type resolution = RES; - constexpr ptime() NOEXCEPT : m_time(0) {} - constexpr ptime(const ptime &rhs) NOEXCEPT = default; - constexpr ptime(ptime &&rhs) NOEXCEPT = default; + constexpr ptime() noexcept : m_time(0) {} + constexpr ptime(const ptime &rhs) noexcept = default; + constexpr ptime(ptime &&rhs) noexcept = default; constexpr explicit ptime(const double t) = delete; //: m_time((internal_type) ( t * (double) resolution)) { } - constexpr explicit ptime(const internal_type nom, const internal_type den) NOEXCEPT + constexpr explicit ptime(const internal_type nom, const internal_type den) noexcept : m_time(nom * (resolution / den)) { } ptime &operator=(const ptime rhs) { m_time = rhs.m_time; return *this; } diff --git a/src/lib/netlist/plib/palloc.cpp b/src/lib/netlist/plib/palloc.cpp index c89c2ed7e63..b90960f953e 100644 --- a/src/lib/netlist/plib/palloc.cpp +++ b/src/lib/netlist/plib/palloc.cpp @@ -64,7 +64,9 @@ mempool::~mempool() for (auto & b : m_blocks) { if (b.m_num_alloc != 0) - fprintf(stderr, "Found block with dangling allocations\n"); + { + fprintf(stderr, "Found block with %d dangling allocations\n", static_cast(b.m_num_alloc)); + } delete b.data; } m_blocks.clear(); @@ -122,8 +124,8 @@ void mempool::free(void *ptr) fprintf(stderr, "Argh .. double free\n"); else { - b->m_free = m_min_alloc; - b->cur_ptr = b->data; + //b->m_free = m_min_alloc; + //b->cur_ptr = b->data; } b->m_num_alloc--; } diff --git a/src/lib/netlist/plib/palloc.h b/src/lib/netlist/plib/palloc.h index fb467fbe173..a12595e0027 100644 --- a/src/lib/netlist/plib/palloc.h +++ b/src/lib/netlist/plib/palloc.h @@ -112,20 +112,25 @@ private: owned_ptr() : m_ptr(nullptr), m_is_owned(true) { } public: - owned_ptr(SC *p, bool owned) + owned_ptr(SC *p, bool owned) noexcept : m_ptr(p), m_is_owned(owned) { } owned_ptr(const owned_ptr &r) = delete; owned_ptr & operator =(owned_ptr &r) = delete; - owned_ptr & operator =(owned_ptr &&r) + + template + owned_ptr & operator =(owned_ptr &&r) { + if (m_is_owned && (m_ptr != nullptr)) + delete m_ptr; m_is_owned = r.m_is_owned; m_ptr = r.m_ptr; r.m_is_owned = false; r.m_ptr = nullptr; return *this; } - owned_ptr(owned_ptr &&r) + + owned_ptr(owned_ptr &&r) noexcept { m_is_owned = r.m_is_owned; m_ptr = r.m_ptr; @@ -134,7 +139,7 @@ public: } template - owned_ptr(owned_ptr &&r) + owned_ptr(owned_ptr &&r) noexcept { m_ptr = static_cast(r.get()); m_is_owned = r.is_owned(); @@ -143,7 +148,7 @@ public: ~owned_ptr() { - if (m_is_owned && m_ptr != nullptr) + if (m_is_owned && (m_ptr != nullptr)) delete m_ptr; m_is_owned = false; m_ptr = nullptr; @@ -164,25 +169,16 @@ public: a.m_ptr = new SC(std::forward(args)...); return std::move(a); } - void release() + SC * release() { + SC *tmp = m_ptr; m_is_owned = false; m_ptr = nullptr; + return tmp; } bool is_owned() const { return m_is_owned; } -#if 1 - template - owned_ptr & operator =(owned_ptr &&r) - { - m_is_owned = r.m_is_owned; - m_ptr = r.m_ptr; - r.m_is_owned = false; - r.m_ptr = nullptr; - return *this; - } -#endif SC * operator ->() const { return m_ptr; } SC & operator *() const { return *m_ptr; } SC * get() const { return m_ptr; } diff --git a/src/lib/netlist/plib/pdynlib.cpp b/src/lib/netlist/plib/pdynlib.cpp index 2088ab47c1b..0ed2ca3a620 100644 --- a/src/lib/netlist/plib/pdynlib.cpp +++ b/src/lib/netlist/plib/pdynlib.cpp @@ -7,7 +7,7 @@ #include "pdynlib.h" -#ifdef WIN32 +#ifdef _WIN32 #include "windows.h" #include "palloc.h" @@ -61,7 +61,7 @@ namespace plib { dynlib::dynlib(const pstring libname) : m_isLoaded(false), m_lib(nullptr) { -#ifdef WIN32 +#ifdef _WIN32 //fprintf(stderr, "win: loading <%s>\n", libname.cstr()); TCHAR *buffer = tstring_from_utf8(libname.cstr()); if (libname != "") @@ -90,7 +90,7 @@ dynlib::dynlib(const pstring path, const pstring libname) : m_isLoaded(false), m_lib(nullptr) { // printf("win: loading <%s>\n", libname.cstr()); -#ifdef WIN32 +#ifdef _WIN32 TCHAR *buffer = tstring_from_utf8(libname.cstr()); if (libname != "") m_lib = LoadLibrary(buffer); @@ -122,7 +122,7 @@ dynlib::~dynlib() { if (m_lib != nullptr) { -#ifdef WIN32 +#ifdef _WIN32 #else dlclose(m_lib); //printf("Closed %s\n", dlerror()); @@ -137,7 +137,7 @@ bool dynlib::isLoaded() const void *dynlib::getsym_p(const pstring name) { -#ifdef WIN32 +#ifdef _WIN32 return (void *) GetProcAddress((HMODULE) m_lib, name.cstr()); #else return dlsym(m_lib, name.cstr()); diff --git a/src/lib/netlist/plib/plists.h b/src/lib/netlist/plib/plists.h index 16cb2f9e686..881386a142c 100644 --- a/src/lib/netlist/plib/plists.h +++ b/src/lib/netlist/plib/plists.h @@ -15,7 +15,6 @@ #include #include -#include "palloc.h" #include "pstring.h" namespace plib { @@ -44,12 +43,12 @@ public: size_t size() { return N; } - C& operator[](const std::size_t &index) + C& operator[](const std::size_t &index) noexcept { return *reinterpret_cast(&m_buf[index]); } - const C& operator[](const std::size_t &index) const + const C& operator[](const std::size_t &index) const noexcept { return *reinterpret_cast(&m_buf[index]); } @@ -86,7 +85,7 @@ public: element_t() : m_next(nullptr) {} - LC *next() const { return m_next; } + LC *next() const noexcept { return m_next; } private: LC * m_next; }; @@ -108,8 +107,8 @@ public: linkedlist_t() : m_head(nullptr) {} - iter_t begin() const { return iter_t(m_head); } - constexpr iter_t end() const { return iter_t(nullptr); } + iter_t begin() const noexcept { return iter_t(m_head); } + constexpr iter_t end() const noexcept { return iter_t(nullptr); } void push_front(LC *elem) { diff --git a/src/lib/netlist/plib/pparser.cpp b/src/lib/netlist/plib/pparser.cpp index be52b27dc30..0a19685316d 100644 --- a/src/lib/netlist/plib/pparser.cpp +++ b/src/lib/netlist/plib/pparser.cpp @@ -8,6 +8,7 @@ #include #include "pparser.h" +#include "plib/palloc.h" namespace plib { // ---------------------------------------------------------------------------------------- @@ -105,7 +106,7 @@ pstring ptokenizer::get_identifier_or_number() token_t tok = get_token(); if (!(tok.is_type(IDENTIFIER) || tok.is_type(NUMBER))) { - error(pfmt("Expected an identifier, got <{1}>")(tok.str()) ); + error(pfmt("Expected an identifier or number, got <{1}>")(tok.str()) ); } return tok.str(); } @@ -202,7 +203,8 @@ ptokenizer::token_t ptokenizer::get_token_internal() { /* read identifier till non identifier char */ pstring tokstr = ""; - while (m_identifier_chars.find(c) != m_identifier_chars.end()) { + while (m_identifier_chars.find(c) != m_identifier_chars.end()) + { tokstr += c; c = getc(); } @@ -228,7 +230,8 @@ ptokenizer::token_t ptokenizer::get_token_internal() { /* read identifier till first identifier char or ws */ pstring tokstr = ""; - while ((m_identifier_chars.find(c)) == m_identifier_chars.end() && (m_whitespace.find(c) == m_whitespace.end())) { + while ((m_identifier_chars.find(c) == m_identifier_chars.end()) && (m_whitespace.find(c) == m_whitespace.end())) + { tokstr += c; /* expensive, check for single char tokens */ if (tokstr.len() == 1) diff --git a/src/lib/netlist/plib/pstate.cpp b/src/lib/netlist/plib/pstate.cpp index 61535acac09..ddfe0a37bc8 100644 --- a/src/lib/netlist/plib/pstate.cpp +++ b/src/lib/netlist/plib/pstate.cpp @@ -6,6 +6,7 @@ */ #include "pstate.h" +#include "palloc.h" namespace plib { state_manager_t::state_manager_t() diff --git a/src/lib/netlist/plib/pstream.h b/src/lib/netlist/plib/pstream.h index 68ab55ca58b..20aaab83a3a 100644 --- a/src/lib/netlist/plib/pstream.h +++ b/src/lib/netlist/plib/pstream.h @@ -12,7 +12,6 @@ #include "pconfig.h" #include "pstring.h" -#include "palloc.h" #include "pfmtlog.h" namespace plib { diff --git a/src/lib/netlist/plib/putil.cpp b/src/lib/netlist/plib/putil.cpp index f3f9b4c15ea..ad340017bc4 100644 --- a/src/lib/netlist/plib/putil.cpp +++ b/src/lib/netlist/plib/putil.cpp @@ -22,7 +22,7 @@ namespace plib if (ret == "") ret = elem; else - #ifdef WIN32 + #ifdef _WIN32 ret = ret + '\\' + elem; #else ret = ret + '/' + elem; diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp index 92057688954..b095a081f81 100644 --- a/src/lib/netlist/prg/nltool.cpp +++ b/src/lib/netlist/prg/nltool.cpp @@ -41,7 +41,7 @@ public: opt_logs(*this, "l", "log" , "define terminal to log. This option may be specified repeatedly."), opt_inp(*this, "i", "input", "", "input file to process (default is none)"), opt_grp4(*this, "Options for convert command", "These options are only used by the convert command."), - opt_type(*this, "y", "type", "spice", "spice:eagle", "type of file to be converted: spice,eagle"), + opt_type(*this, "y", "type", "spice", "spice:eagle:rinf", "type of file to be converted: spice,eagle,rinf"), opt_ex1(*this, "nltool -c run -t 3.5 -f nl_examples/cdelay.c -n cap_delay", "Run netlist \"cap_delay\" from file nl_examples/cdelay.c for 3.5 seconds"), @@ -465,12 +465,18 @@ int main(int argc, char *argv[]) c.convert(contents); result = c.result(); } - else + else if (opts.opt_type().equals("eagle")) { nl_convert_eagle_t c; c.convert(contents); result = c.result(); } + else if (opts.opt_type().equals("rinf")) + { + nl_convert_rinf_t c; + c.convert(contents); + result = c.result(); + } /* present result */ pout_strm.write(result.cstr()); } diff --git a/src/lib/netlist/solver/nld_solver.cpp b/src/lib/netlist/solver/nld_solver.cpp index b26b7525b40..b9c69884382 100644 --- a/src/lib/netlist/solver/nld_solver.cpp +++ b/src/lib/netlist/solver/nld_solver.cpp @@ -157,9 +157,6 @@ void matrix_solver_t::setup_base(analog_net_t::list_t &nets) if (net_proxy_output == nullptr) { - //net_proxy_output = palloc(analog_output_t(*this, - // this->name() + "." + plib::pfmt("m{1}")(m_inps.size()))); - auto net_proxy_output_u = plib::make_unique(*this, this->name() + "." + plib::pfmt("m{1}")(m_inps.size())); net_proxy_output = net_proxy_output_u.get(); m_inps.push_back(std::move(net_proxy_output_u)); @@ -385,7 +382,7 @@ void matrix_solver_t::reset() m_last_step = netlist_time::zero(); } -void matrix_solver_t::update() NOEXCEPT +void matrix_solver_t::update() NL_NOEXCEPT { const netlist_time new_timestep = solve(); @@ -691,9 +688,61 @@ std::unique_ptr NETLIB_NAME(solver)::create_solver(unsigned siz } } +struct net_splitter +{ + + bool already_processed(analog_net_t *n) + { + if (n->isRailNet()) + return true; + for (auto & grp : groups) + if (plib::container::contains(grp, n)) + return true; + return false; + } + + void process_net(analog_net_t *n) + { + if (n->num_cons() == 0) + return; + /* add the net */ + groups.back().push_back(n); + for (auto &p : n->m_core_terms) + { + if (p->is_type(terminal_t::TERMINAL)) + { + terminal_t *pt = static_cast(p); + analog_net_t *other_net = &pt->m_otherterm->net(); + if (!already_processed(other_net)) + process_net(other_net); + } + } + } + + void run(netlist_t &netlist) + { + for (auto & net : netlist.m_nets) + { + netlist.log().debug("processing {1}\n", net->name()); + if (!net->isRailNet() && net->num_cons() > 0) + { + netlist.log().debug(" ==> not a rail net\n"); + /* Must be an analog net */ + analog_net_t *n = static_cast(net.get()); + if (!already_processed(n)) + { + groups.push_back(analog_net_t::list_t()); + process_net(n); + } + } + } + } + + std::vector groups; +}; + void NETLIB_NAME(solver)::post_start() { - std::vector groups; const bool use_specific = true; m_params.m_pivot = m_pivot(); @@ -729,25 +778,14 @@ void NETLIB_NAME(solver)::post_start() netlist().log().verbose("Scanning net groups ..."); // determine net groups - for (auto & net : netlist().m_nets) - { - netlist().log().debug("processing {1}\n", net->name()); - if (!net->isRailNet()) - { - netlist().log().debug(" ==> not a rail net\n"); - /* Must be an analog net */ - analog_net_t *n = static_cast(net.get()); - if (!n->already_processed(groups)) - { - groups.push_back(analog_net_t::list_t()); - n->process_net(groups); - } - } - } + + net_splitter splitter; + + splitter.run(netlist()); // setup the solvers - netlist().log().verbose("Found {1} net groups in {2} nets\n", groups.size(), netlist().m_nets.size()); - for (auto & grp : groups) + netlist().log().verbose("Found {1} net groups in {2} nets\n", splitter.groups.size(), netlist().m_nets.size()); + for (auto & grp : splitter.groups) { std::unique_ptr ms; unsigned net_count = static_cast(grp.size()); diff --git a/src/lib/netlist/tools/nl_convert.cpp b/src/lib/netlist/tools/nl_convert.cpp index 5a238bfe9ba..978be90caaf 100644 --- a/src/lib/netlist/tools/nl_convert.cpp +++ b/src/lib/netlist/tools/nl_convert.cpp @@ -8,8 +8,51 @@ #include #include #include +#include #include "nl_convert.h" +#include "plib/palloc.h" +#include "plib/putil.h" +/* FIXME: temporarily defined here - should be in a file */ +/* FIXME: family logic in netlist is convoluted, create + * define a model param on core device + */ +/* Format: external name,netlist device,model */ +static const char *s_lib_map = +"SN74LS00D, TTL_7400_DIP, 74LSXX\n" +"SN74LS04D, TTL_7404_DIP, 74LSXX\n" +"SN74ALS08D, TTL_7408_DIP, 74ALSXX\n" +"SN74ALS10AD, TTL_7410_DIP, 74ALSXX\n" +"SN74LS30N, TTL_7430_DIP, 74LSXX\n" +"SN74ALS74AD, TTL_7474_DIP, 74ALSXX\n" +"SN74LS74AD, TTL_7474_DIP, 74LSXX\n" +"SN74LS86AD, TTL_7486_DIP, 74LSXX\n" +"SN74F153D, TTL_74153_DIP, 74FXX\n" +"SN74LS161AD, TTL_74161_DIP, 74LSXX\n" +"SN74LS164D, TTL_74164_DIP, 74LSXX\n" +"DM74LS366AN, TTL_74366_DIP, 74LSXX\n" +; + +struct lib_map_entry +{ + pstring dev; + pstring model; +}; + +using lib_map_t = std::unordered_map; + +static lib_map_t read_lib_map(const pstring lm) +{ + plib::pistringstream istrm(lm); + lib_map_t m; + pstring line; + while (istrm.readline(line)) + { + plib::pstring_vector_t split(line, ","); + m[split[0].trim()] = { split[1].trim(), split[2].trim() }; + } + return m; +} /*------------------------------------------------- convert - convert a spice netlist @@ -172,8 +215,9 @@ nl_convert_base_t::unit_t nl_convert_base_t::m_units[] = { {"M", "CAP_M({1})", 1.0e-3 }, {"u", "CAP_U({1})", 1.0e-6 }, /* eagle */ {"U", "CAP_U({1})", 1.0e-6 }, - {"??", "CAP_U({1})", 1.0e-6 }, + {"??", "CAP_U({1})", 1.0e-6 }, /* FIXME */ {"N", "CAP_N({1})", 1.0e-9 }, + {"pF", "CAP_P({1})", 1.0e-12}, {"P", "CAP_P({1})", 1.0e-12}, {"F", "{1}e-15", 1.0e-15}, @@ -447,3 +491,209 @@ void nl_convert_eagle_t::convert(const pstring &contents) } } + +/* token_id_t m_tok_HFA; + token_id_t m_tok_APP; + token_id_t m_tok_TIM; + token_id_t m_tok_TYP; + token_id_t m_tok_ADDC; + token_id_t m_tok_ATTC; + token_id_t m_tok_NET; + token_id_t m_tok_TER; + * + */ +void nl_convert_rinf_t::convert(const pstring &contents) +{ + plib::pistringstream istrm(contents); + tokenizer tok(*this, istrm); + auto lm = read_lib_map(s_lib_map); + + out("NETLIST_START(dummy)\n"); + add_term("GND", "GND"); + add_term("VCC", "VCC"); + tokenizer::token_t token = tok.get_token(); + while (true) + { + if (token.is_type(tokenizer::ENDOFFILE) || token.is(tok.m_tok_END)) + { + dump_nl(); + // FIXME: Parameter + out("NETLIST_END()\n"); + return; + } + else if (token.is(tok.m_tok_HEA)) + { + /* seems to be start token - ignore */ + token = tok.get_token(); + } + else if (token.is(tok.m_tok_APP)) + { + /* version string */ + pstring app = tok.get_string(); + out("// APP: {}\n", app); + token = tok.get_token(); + } + else if (token.is(tok.m_tok_TIM)) + { + /* time */ + out("// TIM:"); + for (int i=0; i<6; i++) + { + long x = tok.get_number_long(); + out(" {}", x); + } + out("\n"); + token = tok.get_token(); + } + else if (token.is(tok.m_tok_TYP)) + { + pstring id(tok.get_identifier()); + out("// TYP: {}\n", id); + token = tok.get_token(); + } + else if (token.is(tok.m_tok_ADDC)) + { + std::unordered_map attr; + pstring id = tok.get_identifier(); + pstring s1 = tok.get_string(); + pstring s2 = tok.get_string(); + + token = tok.get_token(); + while (token.is(tok.m_tok_ATTC)) + { + pstring tid = tok.get_identifier(); + if (tid != id) + { + out("Error: found {} expected {} in {}\n", tid, id, token.str()); + return; + } + pstring at = tok.get_string(); + pstring val = tok.get_string(); + attr[at] = val; + token = tok.get_token(); + } + pstring sim = attr["Simulation"]; + pstring val = attr["Value"]; + pstring com = attr["Comment"]; + if (val == "") + val = com; + + if (sim == "CAP") + { + add_device("CAP", id, get_sp_val(val)); + } + else if (sim == "RESISTOR") + { + add_device("RES", id, get_sp_val(val)); + } + else + { + pstring lib = attr["Library Reference"]; + auto f = lm.find(lib); + if (f != lm.end()) + add_device(f->second.dev, id); + else + add_device(lib, id); + } + } + else if (token.is(tok.m_tok_NET)) + { + pstring dev = tok.get_identifier(); + pstring pin = tok.get_identifier_or_number(); + pstring net = tok.get_string(); + add_term(net, dev + "." + pin); + token = tok.get_token(); + if (token.is(tok.m_tok_TER)) + { + token = tok.get_token(); + while (token.is_type(plib::ptokenizer::IDENTIFIER)) + { + pin = tok.get_identifier_or_number(); + add_term(net, token.str() + "." + pin); + token = tok.get_token(); + } + } + } +#if 0 + token = tok.get_token(); + /* skip to semicolon */ + do + { + token = tok.get_token(); + } while (!token.is(tok.m_tok_SEMICOLON)); + token = tok.get_token(); + pstring sval = ""; + if (token.is(tok.m_tok_VALUE)) + { + pstring vname = tok.get_string(); + sval = tok.get_string(); + tok.require_token(tok.m_tok_SEMICOLON); + token = tok.get_token(); + } + switch (name.code_at(0)) + { + case 'Q': + { + add_device("QBJT", name, sval); + } + break; + case 'R': + { + double val = get_sp_val(sval); + add_device("RES", name, val); + } + break; + case 'C': + { + double val = get_sp_val(sval); + add_device("CAP", name, val); + } + break; + case 'P': + if (sval.ucase() == "HIGH") + add_device("TTL_INPUT", name, 1); + else if (sval.ucase() == "LOW") + add_device("TTL_INPUT", name, 0); + else + add_device("ANALOG_INPUT", name, sval.as_double()); + add_pin_alias(name, "1", "Q"); + break; + case 'D': + /* Pin 1 = Anode, Pin 2 = Cathode */ + add_device("DIODE", name, sval); + add_pin_alias(name, "1", "A"); + add_pin_alias(name, "2", "K"); + break; + case 'U': + case 'X': + { + pstring tname = "TTL_" + sval + "_DIP"; + add_device(tname, name); + break; + } + default: + tok.error("// IGNORED " + name); + } + + } + else if (token.is(tok.m_tok_SIGNAL)) + { + pstring netname = tok.get_string(); + token = tok.get_token(); + while (!token.is(tok.m_tok_SEMICOLON)) + { + /* fixme: should check for string */ + pstring devname = token.str(); + pstring pin = tok.get_string(); + add_term(netname, devname + "." + pin); + token = tok.get_token(); } + } +#endif + else + { + out("Unexpected {}\n", token.str()); + return; + } + } + +} diff --git a/src/lib/netlist/tools/nl_convert.h b/src/lib/netlist/tools/nl_convert.h index 209057a06d5..fa496a092d7 100644 --- a/src/lib/netlist/tools/nl_convert.h +++ b/src/lib/netlist/tools/nl_convert.h @@ -217,6 +217,75 @@ public: protected: +private: + +}; + +class nl_convert_rinf_t : public nl_convert_base_t +{ +public: + + nl_convert_rinf_t() : nl_convert_base_t() {} + ~nl_convert_rinf_t() + { + } + + class tokenizer : public plib::ptokenizer + { + public: + tokenizer(nl_convert_rinf_t &convert, plib::pistream &strm) + : plib::ptokenizer(strm), m_convert(convert) + { + set_identifier_chars(".abcdefghijklmnopqrstuvwvxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_-"); + set_number_chars("0123456789", "0123456789eE-."); //FIXME: processing of numbers + char ws[5]; + ws[0] = ' '; + ws[1] = 9; + ws[2] = 10; + ws[3] = 13; + ws[4] = 0; + set_whitespace(ws); + /* FIXME: gnetlist doesn't print comments */ + set_comment("","","//"); // FIXME:needs to be confirmed + set_string_char('"'); + m_tok_HEA = register_token(".HEA"); + m_tok_APP = register_token(".APP"); + m_tok_TIM = register_token(".TIM"); + m_tok_TYP = register_token(".TYP"); + m_tok_ADDC = register_token(".ADD_COM"); + m_tok_ATTC = register_token(".ATT_COM"); + m_tok_NET = register_token(".ADD_TER"); + m_tok_TER = register_token(".TER"); + m_tok_END = register_token(".END"); + } + + token_id_t m_tok_HEA; + token_id_t m_tok_APP; + token_id_t m_tok_TIM; + token_id_t m_tok_TYP; + token_id_t m_tok_ADDC; + token_id_t m_tok_ATTC; + token_id_t m_tok_NET; + token_id_t m_tok_TER; + token_id_t m_tok_END; + + protected: + + void verror(const pstring &msg, int line_num, const pstring &line) override + { + m_convert.out("{} (line {}): {}\n", msg.cstr(), line_num, line.cstr()); + } + + + private: + nl_convert_rinf_t &m_convert; + }; + + void convert(const pstring &contents) override; + +protected: + + private: }; diff --git a/src/lib/util/cstrpool.cpp b/src/lib/util/cstrpool.cpp deleted file mode 100644 index 5a9e571366b..00000000000 --- a/src/lib/util/cstrpool.cpp +++ /dev/null @@ -1,114 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Aaron Giles -/*************************************************************************** - - cstrpool.c - - Constant string pool helper class. - -***************************************************************************/ - -#include - -#include "cstrpool.h" - - -//************************************************************************** -// CONST STRING POOL -//************************************************************************** - -//------------------------------------------------- -// const_string_pool - constructor -//------------------------------------------------- - -const_string_pool::const_string_pool() -{ -} - - -//------------------------------------------------- -// add - add a string to the string pool -//------------------------------------------------- - -const char *const_string_pool::add(const char *string) -{ - // if nullptr or a small number (for some hash strings), just return as-is - if (FPTR(string) < 0x100) - return string; - - // scan to find space - for (pool_chunk *chunk = m_chunklist.first(); chunk != nullptr; chunk = chunk->next()) - { - const char *result = chunk->add(string); - if (result != nullptr) - return result; - } - - // no space anywhere, create a new pool and prepend it (so it gets used first) - const char *result = m_chunklist.prepend(*global_alloc(pool_chunk)).add(string); - assert(result != nullptr); - return result; -} - - -//------------------------------------------------- -// contains - determine if the given string -// pointer lives in the pool -//------------------------------------------------- - -bool const_string_pool::contains(const char *string) -{ - // if nullptr or a small number (for some hash strings), then yes, effectively - if (FPTR(string) < 0x100) - return true; - - // scan to find it - for (pool_chunk *chunk = m_chunklist.first(); chunk != nullptr; chunk = chunk->next()) - if (chunk->contains(string)) - return true; - - return false; -} - -/** - * @fn const_string_pool::pool_chunk::pool_chunk() - * - * @brief ------------------------------------------------- - * pool_chunk - constructor - * -------------------------------------------------. - */ - -const_string_pool::pool_chunk::pool_chunk() - : m_next(nullptr), - m_used(0) -{ -} - -/** - * @fn const char *const_string_pool::pool_chunk::add(const char *string) - * - * @brief ------------------------------------------------- - * add - add a string to this pool - * -------------------------------------------------. - * - * @param string The string to add. - * - * @return null if it fails, else a char*. - */ - -const char *const_string_pool::pool_chunk::add(const char *string) -{ - // get the length of the string (no string can be longer than a full pool) - int bytes = strlen(string) + 1; - assert(bytes < POOL_SIZE); - - // if too big, return nullptr - if (m_used + bytes > POOL_SIZE) - return nullptr; - - // allocate, copy, and return the memory - char *dest = &m_buffer[m_used]; - m_used += bytes; - memcpy(dest, string, bytes); - return dest; -} diff --git a/src/lib/util/cstrpool.h b/src/lib/util/cstrpool.h deleted file mode 100644 index ff6b4c4c0ee..00000000000 --- a/src/lib/util/cstrpool.h +++ /dev/null @@ -1,65 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Aaron Giles -/********************************************************************* - - cstrpool.h - - Constant string pool helper class. - -*********************************************************************/ - -#pragma once - -#ifndef __CSTRPOOL_H_ -#define __CSTRPOOL_H_ - -#include "coretmpl.h" - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -// ======================> const_string_pool - -// a pool to hold constant strings efficiently -class const_string_pool -{ -public: - // construction - const_string_pool(); - - // operations - void reset() { m_chunklist.reset(); } - const char *add(const char *string); - bool contains(const char *string); - -private: - // shared string pool - class pool_chunk - { - static const int POOL_SIZE = 4096; - friend class simple_list; - - public: - // construction - pool_chunk(); - - // getters - pool_chunk *next() const { return m_next; } - - // operations - const char *add(const char *string); - bool contains(const char *string) const { return (string >= m_buffer && string < &m_buffer[POOL_SIZE]); } - - private: - // internal state - pool_chunk * m_next; - UINT32 m_used; - char m_buffer[POOL_SIZE]; - }; - simple_list m_chunklist; -}; - - -#endif diff --git a/src/mame/arcade.flt b/src/mame/arcade.flt index d663b173402..ab90e054301 100644 --- a/src/mame/arcade.flt +++ b/src/mame/arcade.flt @@ -27,6 +27,7 @@ aeroboto.cpp aerofgt.cpp age_candy.cpp airbustr.cpp +airraid.cpp ajax.cpp albazc.cpp albazg.cpp @@ -251,7 +252,6 @@ crimfght.cpp crospang.cpp crshrace.cpp crystal.cpp -cshooter.cpp csplayh5.cpp cswat.cpp cubeqst.cpp diff --git a/src/mame/audio/hng64.cpp b/src/mame/audio/hng64.cpp index be6857113cb..d6395327b29 100644 --- a/src/mame/audio/hng64.cpp +++ b/src/mame/audio/hng64.cpp @@ -110,7 +110,7 @@ READ32_MEMBER(hng64_state::hng64_soundram_r) WRITE32_MEMBER( hng64_state::hng64_soundcpu_enable_w ) { - if (mem_mask&0xffff0000) + if (ACCESSING_BITS_16_31) { int cmd = data >> 16; // I guess it's only one of the bits, the commands are inverse of each other @@ -132,9 +132,9 @@ WRITE32_MEMBER( hng64_state::hng64_soundcpu_enable_w ) } } - if (mem_mask&0x0000ffff) + if (ACCESSING_BITS_0_15) { - logerror("unknown hng64_soundcpu_enable_w %08x %08x\n", data, mem_mask); + logerror("unknown hng64_soundcpu_enable_w %08x %08x\n", data, mem_mask); } } diff --git a/src/mame/audio/midway.cpp b/src/mame/audio/midway.cpp index dfc75c84f3e..6b9167bc5b2 100644 --- a/src/mame/audio/midway.cpp +++ b/src/mame/audio/midway.cpp @@ -53,6 +53,7 @@ midway_ssio_device::midway_ssio_device(const machine_config &mconfig, const char m_cpu(*this, "cpu"), m_ay0(*this, "ay0"), m_ay1(*this, "ay1"), + m_ports(*this, {"IP0", "IP1", "IP2", "IP3", "IP4"}), m_status(0), m_14024_count(0), m_mute(0) @@ -113,8 +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 = read_safe(ioport(port[offset]), 0xff); + UINT8 result = m_ports[offset].read_safe(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]); @@ -413,7 +413,7 @@ ROM_END // the device's ROM definitions //------------------------------------------------- -const rom_entry *midway_ssio_device::device_rom_region() const +const tiny_rom_entry *midway_ssio_device::device_rom_region() const { return ROM_NAME(midway_ssio); } diff --git a/src/mame/audio/midway.h b/src/mame/audio/midway.h index a66953c7d7a..60cc5571cf0 100644 --- a/src/mame/audio/midway.h +++ b/src/mame/audio/midway.h @@ -87,7 +87,7 @@ public: protected: // device-level overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; virtual void device_start() override; @@ -104,6 +104,9 @@ private: required_device m_ay0; required_device m_ay1; + // I/O ports + optional_ioport_array<5> m_ports; + // internal state UINT8 m_data[4]; UINT8 m_status; diff --git a/src/mame/audio/namco52.cpp b/src/mame/audio/namco52.cpp index f6e16575d93..6ecee4a30fb 100644 --- a/src/mame/audio/namco52.cpp +++ b/src/mame/audio/namco52.cpp @@ -202,7 +202,7 @@ machine_config_constructor namco_52xx_device::device_mconfig_additions() const // the device's ROM definitions //------------------------------------------------- -const rom_entry *namco_52xx_device::device_rom_region() const +const tiny_rom_entry *namco_52xx_device::device_rom_region() const { return ROM_NAME(namco_52xx ); } diff --git a/src/mame/audio/namco52.h b/src/mame/audio/namco52.h index 5ca62330947..b9cd4d240cc 100644 --- a/src/mame/audio/namco52.h +++ b/src/mame/audio/namco52.h @@ -50,7 +50,7 @@ public: protected: // device-level overrides virtual void device_start() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; TIMER_CALLBACK_MEMBER( latch_callback ); diff --git a/src/mame/audio/namco54.cpp b/src/mame/audio/namco54.cpp index 0b19a142529..2552ac3b2ea 100644 --- a/src/mame/audio/namco54.cpp +++ b/src/mame/audio/namco54.cpp @@ -161,7 +161,7 @@ machine_config_constructor namco_54xx_device::device_mconfig_additions() const // the device's ROM definitions //------------------------------------------------- -const rom_entry *namco_54xx_device::device_rom_region() const +const tiny_rom_entry *namco_54xx_device::device_rom_region() const { return ROM_NAME(namco_54xx ); } diff --git a/src/mame/audio/namco54.h b/src/mame/audio/namco54.h index e05f5c6446b..d72547452d9 100644 --- a/src/mame/audio/namco54.h +++ b/src/mame/audio/namco54.h @@ -34,7 +34,7 @@ public: protected: // device-level overrides virtual void device_start() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; TIMER_CALLBACK_MEMBER( latch_callback ); diff --git a/src/mame/audio/t5182.cpp b/src/mame/audio/t5182.cpp index a40349de0d0..b3d6ba53cbc 100644 --- a/src/mame/audio/t5182.cpp +++ b/src/mame/audio/t5182.cpp @@ -296,7 +296,7 @@ ROM_END // rom_region - return a pointer to the device's // internal ROM region //------------------------------------------------- -const rom_entry *t5182_device::device_rom_region() const +const tiny_rom_entry *t5182_device::device_rom_region() const { return ROM_NAME( t5182 ); } diff --git a/src/mame/audio/t5182.h b/src/mame/audio/t5182.h index 4fd09da6d2c..fba3a22b55a 100644 --- a/src/mame/audio/t5182.h +++ b/src/mame/audio/t5182.h @@ -42,7 +42,7 @@ protected: // device-level overrides virtual void device_start() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; virtual machine_config_constructor device_mconfig_additions() const override; diff --git a/src/mame/drivers/4enlinea.cpp b/src/mame/drivers/4enlinea.cpp index eb1072550bb..d5ebe1b1455 100644 --- a/src/mame/drivers/4enlinea.cpp +++ b/src/mame/drivers/4enlinea.cpp @@ -249,10 +249,10 @@ public: DECLARE_READ8_MEMBER( _4enlinea_io_read ); DECLARE_WRITE8_MEMBER( _4enlinea_mode_control_w ); virtual void device_start() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; -const rom_entry *isa8_cga_4enlinea_device::device_rom_region() const +const tiny_rom_entry *isa8_cga_4enlinea_device::device_rom_region() const { return nullptr; } diff --git a/src/mame/drivers/8080bw.cpp b/src/mame/drivers/8080bw.cpp index 641f278df1a..84c3e7a67c5 100644 --- a/src/mame/drivers/8080bw.cpp +++ b/src/mame/drivers/8080bw.cpp @@ -2986,8 +2986,8 @@ INPUT_CHANGED_MEMBER(_8080bw_state::claybust_gun_trigger) ana a rz */ - UINT8 const gunx = read_safe(ioport("GUNX"), 0x00); - UINT8 const guny = read_safe(ioport("GUNY"), 0x20); + UINT8 const gunx = m_gunx.read_safe(0x00); + UINT8 const guny = m_guny.read_safe(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/abc1600.cpp b/src/mame/drivers/abc1600.cpp index f7db95b7640..8a8077d58d4 100644 --- a/src/mame/drivers/abc1600.cpp +++ b/src/mame/drivers/abc1600.cpp @@ -34,6 +34,11 @@ TODO: + - abcenix boot stuck in a loop @ 37cfa + - segment/page RAM addresses are not correctly decoded, "sas/format/format" can't find the SASI interface because of this + forcetask0 1 t0 0 t1 0 t2 0 t3 0 + sega19 0 task 0 + sega 000 segd 00 pga 008 pgd 4058 virtual 02c730 (should be 004730) - short/long reset (RSTBUT) - CIO - optimize timers! @@ -482,7 +487,9 @@ static ADDRESS_MAP_START( mac_mem, AS_PROGRAM, 8, abc1600_state ) AM_RANGE(0x1ff500, 0x1ff500) AM_MIRROR(0xff) AM_DEVREADWRITE(Z8410AB1_2_TAG, z80dma_device, read, write) AM_RANGE(0x1ff600, 0x1ff607) AM_MIRROR(0xf8) AM_READWRITE(scc_r, scc_w) AM_RANGE(0x1ff700, 0x1ff707) AM_MIRROR(0xf8) AM_READWRITE(cio_r, cio_w) - AM_RANGE(0x1ff800, 0x1ffaff) AM_DEVICE(ABC1600_MOVER_TAG, abc1600_mover_device, io_map) + AM_RANGE(0x1ff800, 0x1ff8ff) AM_DEVICE(ABC1600_MOVER_TAG, abc1600_mover_device, iowr0_map) + AM_RANGE(0x1ff900, 0x1ff9ff) AM_DEVICE(ABC1600_MOVER_TAG, abc1600_mover_device, iowr1_map) + AM_RANGE(0x1ffa00, 0x1ffaff) AM_DEVICE(ABC1600_MOVER_TAG, abc1600_mover_device, iowr2_map) AM_RANGE(0x1ffb00, 0x1ffb00) AM_MIRROR(0x7e) AM_WRITE(fw0_w) AM_RANGE(0x1ffb01, 0x1ffb01) AM_MIRROR(0x7e) AM_WRITE(fw1_w) AM_RANGE(0x1ffd00, 0x1ffd07) AM_MIRROR(0xf8) AM_DEVWRITE(ABC1600_MAC_TAG, abc1600_mac_device, dmamap_w) @@ -892,7 +899,9 @@ static MACHINE_CONFIG_START( abc1600, abc1600_state ) MCFG_Z8536_PC_OUT_CALLBACK(WRITE8(abc1600_state, cio_pc_w)) MCFG_NMC9306_ADD(NMC9306_TAG) + MCFG_E0516_ADD(E050_C16PC_TAG, XTAL_32_768kHz) + MCFG_FD1797_ADD(SAB1797_02P_TAG, XTAL_64MHz/64) MCFG_WD_FDC_INTRQ_CALLBACK(DEVWRITELINE(Z8536B1_TAG, z8536_device, pb7_w)) MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(abc1600_state, fdc_drq_w)) diff --git a/src/mame/drivers/aces1.cpp b/src/mame/drivers/aces1.cpp index 4bc18a85aa9..40faf64afcb 100644 --- a/src/mame/drivers/aces1.cpp +++ b/src/mame/drivers/aces1.cpp @@ -44,14 +44,7 @@ public: m_reel1(*this, "reel1"), m_reel2(*this, "reel2"), m_reel3(*this, "reel3"), - m_io1_port(*this, "IO1"), - m_io2_port(*this, "IO2"), - m_io3_port(*this, "IO3"), - m_io4_port(*this, "IO4"), - m_io5_port(*this, "IO5"), - m_io6_port(*this, "IO6"), - m_io7_port(*this, "IO7"), - m_io8_port(*this, "IO8") + m_io_ports(*this, {"IO1", "IO2", "IO3", "IO4", "IO5", "IO6", "IO7", "IO8"}) { } int m_input_strobe; int m_lamp_strobe; @@ -197,9 +190,7 @@ public: DECLARE_READ8_MEMBER( ic37_read_b ) { - ioport_port * portnames[] = { m_io1_port, m_io2_port, m_io3_port, m_io4_port, m_io5_port, m_io6_port, m_io7_port, m_io8_port,m_io1_port, m_io2_port, m_io3_port, m_io4_port, m_io5_port, m_io6_port, m_io7_port, m_io8_port }; - - return (portnames[m_input_strobe])->read(); + return (m_io_ports[m_input_strobe & 7])->read(); } DECLARE_READ8_MEMBER( ic37_read_c ) @@ -219,14 +210,7 @@ public: required_device m_reel1; required_device m_reel2; required_device m_reel3; - required_ioport m_io1_port; - required_ioport m_io2_port; - required_ioport m_io3_port; - required_ioport m_io4_port; - required_ioport m_io5_port; - required_ioport m_io6_port; - required_ioport m_io7_port; - required_ioport m_io8_port; + required_ioport_array<8> m_io_ports; DECLARE_DRIVER_INIT(aces1); virtual void machine_start() override; diff --git a/src/mame/drivers/cshooter.cpp b/src/mame/drivers/airraid.cpp similarity index 57% rename from src/mame/drivers/cshooter.cpp rename to src/mame/drivers/airraid.cpp index 60fec640c9f..177b967274f 100644 --- a/src/mame/drivers/cshooter.cpp +++ b/src/mame/drivers/airraid.cpp @@ -1,6 +1,36 @@ // license:LGPL-2.1+ // copyright-holders:Tomasz Slanina, Angelo Salese, hap -/* Cross Shooter (c) 1987 Seibu +/* Air Raid (aka Cross Shooter) (c) 1987 Seibu + + this driver is for the single board version on the S-0087-011A-0 PCB + for the version using a S-0086-002-B0 base PCB and separate video board see stfight.cpp + + Custom Modules note: + + The Air Raid / Cross Shooter PCB contains 3 custom modules. + These modules have not been dumped. + + 2 of these are responsible for background layer generation. + the 3rd is responsible for sprites. + + Both the tile gfx data, and tilemap layout data are + contained within the background modules, none of this is + accessible by the CPU (the CPU simply provides a scroll + position) + + The sprite modules contain the sprite gfx data. + + The modules also contain the CLUT PROM data for their layer + which controls colours and transparency. It is likely + each module contains the equivalent logic of a SEI0010BU + in order to handle this. This means there is a possibility + that the raw data from the ROMs is not exposed on the edge + of the modules, only post-lookup data. + + The above information is based off a development board + which was unfortunately stripped of all ROMs. + + --- TS 01.05.2006: @@ -9,7 +39,7 @@ Haze's notes - video system is very similar to darkmist.cpp - + Stephh's notes (based on the game Z80 code and some tests) : @@ -27,13 +57,6 @@ Stephh's notes (based on the game Z80 code and some tests) : the error.log file. - - Interrupts notes : - - * I think that they aren't handled correctly : after a few frames, - the number of lives are reset to 0, causing a "GAME OVER" 8( - * - or is this protection from the 68705, haze - - - Inputs notes : * COINx don't work correcly : see "cshooter_coin_r" read handler. @@ -128,248 +151,71 @@ Stephh's notes (based on the game Z80 code and some tests) : #include "emu.h" #include "cpu/z80/z80.h" #include "audio/seibu.h" +#include "video/airraid_dev.h" - -class cshooter_state : public driver_device +class airraid_state : public driver_device { public: - cshooter_state(const machine_config &mconfig, device_type type, const char *tag) + airraid_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_seibu_sound(*this, "seibu_sound"), - m_txram(*this, "txram"), - m_vregs(*this, "vregs"), m_mainram(*this, "mainram"), - m_spriteram(*this, "spriteram"), - m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), - m_generic_paletteram_8(*this, "paletteram"), - m_generic_paletteram2_8(*this, "paletteram2"), - m_decrypted_opcodes(*this, "decrypted_opcodes") { } + m_decrypted_opcodes(*this, "decrypted_opcodes"), + m_airraid_video(*this,"airraid_vid") + { } + required_device m_maincpu; optional_device m_seibu_sound; - required_shared_ptr m_txram; - required_shared_ptr m_vregs; optional_shared_ptr m_mainram; - optional_shared_ptr m_spriteram; - required_device m_gfxdecode; required_device m_palette; - required_shared_ptr m_generic_paletteram_8; - required_shared_ptr m_generic_paletteram2_8; optional_shared_ptr m_decrypted_opcodes; - TILEMAP_MAPPER_MEMBER(bg_scan); - TILEMAP_MAPPER_MEMBER(fg_scan); + required_device m_airraid_video; - TILE_GET_INFO_MEMBER(get_bg_tile_info); - tilemap_t *m_bg_tilemap; - TILE_GET_INFO_MEMBER(get_fg_tile_info); - tilemap_t *m_fg_tilemap; - TILE_GET_INFO_MEMBER(get_cstx_tile_info); - tilemap_t *m_txtilemap; - UINT16 m_hw; - - DECLARE_WRITE8_MEMBER(cshooter_txram_w); DECLARE_READ8_MEMBER(cshooter_coin_r); DECLARE_WRITE8_MEMBER(cshooter_c500_w); DECLARE_WRITE8_MEMBER(cshooter_c700_w); DECLARE_WRITE8_MEMBER(bank_w); - DECLARE_WRITE8_MEMBER(vregs_w); DECLARE_READ8_MEMBER(seibu_sound_comms_r); DECLARE_WRITE8_MEMBER(seibu_sound_comms_w); DECLARE_DRIVER_INIT(cshootere); DECLARE_DRIVER_INIT(cshooter); - virtual void video_start() override; - DECLARE_PALETTE_INIT(cshooter); DECLARE_MACHINE_RESET(cshooter); - void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_airraid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(cshooter_scanline); }; -PALETTE_INIT_MEMBER(cshooter_state, cshooter) -{ - const UINT8 *color_prom = memregion("tx_clut")->base(); - int i; - - // text uses colors 0xc0-0xdf - for (i = 0; i < 0x40; i++) - palette.set_pen_indirect(i, (color_prom[i] & 0x1f) | 0xc0); - - // rest is still unknown.. - for (i = 0x40; i < 0x100; i++) - palette.set_pen_indirect(i, color_prom[i]); - - // just make a direct copy of palette at the end for debug - for (i = 0x100; i < 0x200; i++) - palette.set_pen_indirect(i, i-0x100); - -} - - -TILEMAP_MAPPER_MEMBER(cshooter_state::bg_scan) -{ - return ((row&0xf) * 0x10) + (col&0xf) + (((col&0x7f0) >> 4)*0x100) + ((row & 0x30)>>4) * 0x8000; -} - -TILEMAP_MAPPER_MEMBER(cshooter_state::fg_scan) -{ - return ((row&0xf) * 0x10) + (col&0xf) + (((col&0x0f0) >> 4)*0x100) + ((row & 0x1f0)>>4) * 0x1000; -} - - -TILE_GET_INFO_MEMBER(cshooter_state::get_bg_tile_info) -{ - UINT8 *bgMap = memregion("bg_map")->base(); - int tile = bgMap[(tile_index*2)+1] & 0xff; - int attr = bgMap[(tile_index*2)+0] & 0xff; - - tile |= (attr & 0x70) << 4; - - SET_TILE_INFO_MEMBER(2, - tile, - 0, - 0); -} - -TILE_GET_INFO_MEMBER(cshooter_state::get_fg_tile_info) -{ - UINT8 *bgMap = memregion("fg_map")->base(); - int tile = bgMap[(tile_index*2)+1] & 0xff; - int attr = bgMap[(tile_index*2)+0] & 0xff; - - tile |= (attr & 0x70) << 4; - - SET_TILE_INFO_MEMBER(3, - tile, - 0, - 0); -} - - - -TILE_GET_INFO_MEMBER(cshooter_state::get_cstx_tile_info) -{ - int code = (m_txram[tile_index*2]); - int attr = (m_txram[tile_index*2+1]); - int color = attr & 0xf; - - SET_TILE_INFO_MEMBER(0, (code << 1) | ((attr & 0x20) >> 5), color, 0); -} - -WRITE8_MEMBER(cshooter_state::cshooter_txram_w) -{ - m_txram[offset] = data; - m_txtilemap->mark_tile_dirty(offset/2); -} - -void cshooter_state::video_start() -{ - // there might actually be 4 banks of 2048 x 16 tilemaps in here as the upper scroll bits are with the rom banking. - m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cshooter_state::get_bg_tile_info),this),tilemap_mapper_delegate(FUNC(cshooter_state::bg_scan),this),16,16,2048, 64); - - // which could in turn mean this is actually 256 x 128, not 256 x 512 -// m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cshooter_state::get_fg_tile_info),this),tilemap_mapper_delegate(FUNC(cshooter_state::fg_scan),this),16,16,256, 512); - m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cshooter_state::get_fg_tile_info),this),tilemap_mapper_delegate(FUNC(cshooter_state::fg_scan),this),16,16,256, 128); - - m_fg_tilemap->set_transparent_pen(0); - - m_txtilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cshooter_state::get_cstx_tile_info),this),TILEMAP_SCAN_ROWS, 8,8,32,32); - m_txtilemap->set_transparent_pen(0); -} - -void cshooter_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - for (int i = m_spriteram.bytes() - 4; i >= 0 ; i -= 4) - { - if (m_spriteram[i+1]&0x80) - continue; - - UINT16 tile = (m_spriteram[i]); - tile |= (m_spriteram[i + 1] & 0x70) << 4; - - m_gfxdecode->gfx(1)->transpen(bitmap,cliprect, tile, 0, 0, 0, m_spriteram[i+3],m_spriteram[i+2],0); - } -} - - -#define DISPLAY_SPR 1 -#define DISPLAY_FG 2 -#define DISPLAY_BG 4 -#define DISPLAY_TXT 8 -#define DM_GETSCROLL(n) (((m_vregs[(n)]<<1)&0xff) + ((m_vregs[(n)]&0x80)?1:0) +( ((m_vregs[(n)-1]<<4) | (m_vregs[(n)-1]<<12) )&0xff00)) - -UINT32 cshooter_state::screen_update_airraid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - UINT16 bgscrolly = DM_GETSCROLL(0x6); - // this is more likely to be 'bank' than scroll, like NMK16 - bgscrolly += ((m_hw & 0xc0) >> 6) * 256; - - m_bg_tilemap->set_scrollx(0, DM_GETSCROLL(0x2)); - m_bg_tilemap->set_scrolly(0, bgscrolly); - m_fg_tilemap->set_scrollx(0, DM_GETSCROLL(0xa)); - m_fg_tilemap->set_scrolly(0, DM_GETSCROLL(0xe)); - - // set palette (compared to cshooter, r and g are swapped) - for (int i = 0; i < 0x100; i++) - { - int r = m_generic_paletteram_8[i] & 0xf; - int g = m_generic_paletteram_8[i] >> 4; - int b = m_generic_paletteram2_8[i] & 0xf; - - rgb_t color = rgb_t(pal4bit(r), pal4bit(g), pal4bit(b)); - m_palette->set_indirect_color(i, color); - } - - // draw screen - bitmap.fill(0x80, cliprect); // temp - - if ((m_hw & DISPLAY_BG) == 0x00) - m_bg_tilemap->draw(screen, bitmap, cliprect, 0,0); - - if ((m_hw & DISPLAY_FG) == 0x00) - m_fg_tilemap->draw(screen, bitmap, cliprect, 0,0); - - if(m_hw & DISPLAY_SPR) - draw_sprites(bitmap, cliprect); - - if(m_hw & DISPLAY_TXT) - m_txtilemap->draw(screen, bitmap, cliprect, 0,0); - - return 0; -} - - /* main cpu */ -TIMER_DEVICE_CALLBACK_MEMBER(cshooter_state::cshooter_scanline) +TIMER_DEVICE_CALLBACK_MEMBER(airraid_state::cshooter_scanline) { int scanline = param; - if(scanline == 120) // updates scroll resgiters + if(scanline == 240) // updates scroll resgiters m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */ - if(scanline == 240) // vblank-out irq + if(scanline == 250) // vblank-out irq m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 08h */ } -MACHINE_RESET_MEMBER(cshooter_state,cshooter) +MACHINE_RESET_MEMBER(airraid_state,cshooter) { } -WRITE8_MEMBER(cshooter_state::cshooter_c500_w) +WRITE8_MEMBER(airraid_state::cshooter_c500_w) { } -WRITE8_MEMBER(cshooter_state::cshooter_c700_w) +WRITE8_MEMBER(airraid_state::cshooter_c700_w) { } -WRITE8_MEMBER(cshooter_state::bank_w) +WRITE8_MEMBER(airraid_state::bank_w) { // format of this address is TTBB tbfs @@ -380,35 +226,27 @@ WRITE8_MEMBER(cshooter_state::bank_w) // f = fg layer disable // s = sprite layer enable -// printf("bankw %02x\n", data & 0xc0); - - m_hw = data; - membank("bank1")->set_entry((data>>4)&3); + + m_airraid_video->layer_enable_w(data & 0xcf); + } -READ8_MEMBER(cshooter_state::seibu_sound_comms_r) +READ8_MEMBER(airraid_state::seibu_sound_comms_r) { return m_seibu_sound->main_word_r(space,offset,0x00ff); } -WRITE8_MEMBER(cshooter_state::seibu_sound_comms_w) +WRITE8_MEMBER(airraid_state::seibu_sound_comms_w) { m_seibu_sound->main_word_w(space,offset,data,0x00ff); } -WRITE8_MEMBER(cshooter_state::vregs_w) -{ - m_vregs[offset] = data; - - if ((offset != 0x2) && (offset != 0x01) && (offset != 0xa) && (offset != 0x09) && (offset != 0xe) && (offset != 0x0d) ) - printf("vregs_w %02x: %02x\n", offset, data); -} -static ADDRESS_MAP_START( airraid_map, AS_PROGRAM, 8, cshooter_state ) +static ADDRESS_MAP_START( airraid_map, AS_PROGRAM, 8, airraid_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") AM_WRITENOP // rld result write-back AM_RANGE(0xc000, 0xc000) AM_READ_PORT("IN0") @@ -420,27 +258,27 @@ static ADDRESS_MAP_START( airraid_map, AS_PROGRAM, 8, cshooter_state ) // AM_RANGE(0xc600, 0xc600) AM_WRITE(cshooter_c600_w) // see notes AM_RANGE(0xc700, 0xc700) AM_WRITE(cshooter_c700_w) // AM_RANGE(0xc801, 0xc801) AM_WRITE(cshooter_c801_w) // see notes - AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(cshooter_txram_w) AM_SHARE("txram") - AM_RANGE(0xd800, 0xd8ff) AM_RAM AM_SHARE("paletteram") - AM_RANGE(0xda00, 0xdaff) AM_RAM AM_SHARE("paletteram2") - AM_RANGE(0xdc11, 0xdc11) AM_WRITE(bank_w) - AM_RANGE(0xdc00, 0xdc0f) AM_RAM_WRITE(vregs_w) AM_SHARE("vregs") + AM_RANGE(0xd000, 0xd7ff) AM_RAM_DEVWRITE("airraid_vid", airraid_video_device, txram_w) AM_SHARE("txram") + AM_RANGE(0xd800, 0xd8ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") + AM_RANGE(0xda00, 0xdaff) AM_RAM_DEVWRITE("palette", palette_device, write_ext) AM_SHARE("palette_ext") + AM_RANGE(0xdc00, 0xdc0f) AM_RAM_DEVWRITE("airraid_vid", airraid_video_device, vregs_w) AM_SHARE("vregs") // AM_RANGE(0xdc10, 0xdc10) AM_RAM + AM_RANGE(0xdc11, 0xdc11) AM_WRITE(bank_w) // AM_RANGE(0xdc19, 0xdc19) AM_RAM // AM_RANGE(0xdc1e, 0xdc1e) AM_RAM // AM_RANGE(0xdc1f, 0xdc1f) AM_RAM AM_RANGE(0xde00, 0xde0f) AM_READWRITE(seibu_sound_comms_r,seibu_sound_comms_w) AM_RANGE(0xe000, 0xfdff) AM_RAM AM_SHARE("mainram") - AM_RANGE(0xfe00, 0xffff) AM_RAM AM_SHARE("spriteram") + AM_RANGE(0xfe00, 0xffff) AM_RAM AM_SHARE("sprite_ram") ADDRESS_MAP_END -static ADDRESS_MAP_START( decrypted_opcodes_map, AS_DECRYPTED_OPCODES, 8, cshooter_state ) +static ADDRESS_MAP_START( decrypted_opcodes_map, AS_DECRYPTED_OPCODES, 8, airraid_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_SHARE("decrypted_opcodes") ADDRESS_MAP_END -static INPUT_PORTS_START( cshooter ) +static INPUT_PORTS_START( airraid ) PORT_START("IN0") /* IN0 (0xc200) */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY @@ -465,9 +303,9 @@ static INPUT_PORTS_START( cshooter ) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 ) PORT_IMPULSE(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) PORT_IMPULSE(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -511,8 +349,8 @@ static INPUT_PORTS_START( cshooter ) PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW1:8" ) PORT_START("COIN") /* COIN (0xc205) */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -521,79 +359,24 @@ static INPUT_PORTS_START( cshooter ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END -static INPUT_PORTS_START( airraid ) - PORT_INCLUDE( cshooter ) - - PORT_MODIFY("IN2") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0xcf, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_MODIFY("COIN") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNUSED ) -INPUT_PORTS_END -static const gfx_layout cshooter_charlayout = -{ - 8,8, /* 8*8 characters */ - RGN_FRAC(1,1), /* 512 characters */ - 2, /* 4 bits per pixel */ - { 0,4 }, - { 8,9,10,11,0,1,2,3 }, - { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 }, - 128*1 -}; - -static const gfx_layout cshooter_char16layout = -{ - 16,16, /* 8*8 characters */ - RGN_FRAC(1,1), /* 512 characters */ - 4, /* 4 bits per pixel */ - { 0,8,4,12 }, - { 0,1,2,3, 16,17,18,19, 512+0,512+1,512+2,512+3, 512+16,512+17,512+18,512+19}, - { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, 8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 }, - 32*32 -}; - - - -static GFXDECODE_START( cshooter ) - GFXDECODE_ENTRY( "tx_gfx", 0, cshooter_charlayout, 0, 16 ) - GFXDECODE_ENTRY( "spr_gfx", 0, cshooter_char16layout, 0x100, 16 ) - GFXDECODE_ENTRY( "bg_gfx", 0, cshooter_char16layout, 0x100, 16 ) - GFXDECODE_ENTRY( "fg_gfx", 0, cshooter_char16layout, 0x100, 16 ) -GFXDECODE_END - - - -static MACHINE_CONFIG_START( airraid, cshooter_state ) +static MACHINE_CONFIG_START( airraid, airraid_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,XTAL_12MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(airraid_map) - MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", cshooter_state, cshooter_scanline, "screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", airraid_state, cshooter_scanline, "airraid_vid:screen", 0, 1) SEIBU2_AIRRAID_SOUND_SYSTEM_CPU(XTAL_14_31818MHz/4) /* verified on pcb */ SEIBU_SOUND_SYSTEM_ENCRYPTED_LOW() - MCFG_QUANTUM_PERFECT_CPU("maincpu") + MCFG_QUANTUM_PERFECT_CPU("maincpu") - /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_SIZE(256, 256) - MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 16, 256-1-16) - MCFG_SCREEN_UPDATE_DRIVER(cshooter_state, screen_update_airraid) - MCFG_SCREEN_PALETTE("palette") + MCFG_PALETTE_ADD("palette", 0x100) + MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR) - MCFG_GFXDECODE_ADD("gfxdecode", "palette", cshooter) - MCFG_PALETTE_ADD("palette", 0x200) - MCFG_PALETTE_INDIRECT_ENTRIES(0x200) - MCFG_PALETTE_INIT_OWNER(cshooter_state, cshooter) + MCFG_AIRRAID_VIDEO_ADD("airraid_vid") /* sound hardware */ SEIBU_AIRRAID_SOUND_SYSTEM_YM2151_INTERFACE(XTAL_14_31818MHz/4) @@ -609,90 +392,6 @@ MACHINE_CONFIG_END - -/* - -Cross Shooter -(C) J K H Corp (Seibu?) - -Seibu Hardware -PCB is coloured black and supposed to be proto, but mask roms are present......? - -PCB No. S-0087-011A-0 -CPU: SHARP LH0080B (Z80B) -SND: YM2151, Z80A, SEI80BU 611 787, YM3012, SEI0100BU YM3931 -RAM: TMM2015 x 7, TMM2063 x 1 -DIPs: 2 x 8 position -CMOS Gate Arrays: SEI0020BU TC17G008AN-0015 (x 3), SEI10040BU TC15G008AP-0048, - SEI0030BU TC17G005AN-0026, SEI0060BU TC17G008AN-0024 -OTHER: SEI0050BU M 6 4 0 00 -XTAL: 14.318 MHz (near SEI80BU), xx.000 MHz (cant read speed, near SEI0040BU) - -There are 3 BIG custom black packs on the PCB. - -ROMS: -Note, all ROMs have official sticker, "(C) SEIBU KAIHATSU INC." and a number. - -1.k19 TMM27256 \ -2.k20 TMM27512 / Program -3.f11 TMM2764 Gfx? -4.g8 TMM24256 Mask Sound (Samples?) -5.g6 TMM2764 Sound program - - -*/ - -ROM_START( cshootere ) - ROM_REGION( 0x10000, "maincpu", 0 ) // Main CPU - ROM_LOAD( "1.k19", 0x00000, 0x08000, CRC(71418952) SHA1(9745ca006576381c9e9595d8e42ab276bab80a41) ) - - ROM_REGION( 0x10000, "user1", 0 ) // cpu data - ROM_LOAD( "2.k20", 0x00000, 0x10000, CRC(5812fe72) SHA1(3b28bff6b62a411d2195bb228952db62ad32ef3d) ) - - ROM_REGION( 0x18000, "audiocpu", 0 ) // Sub/Sound CPU - ROM_LOAD( "5.6f", 0x00000, 0x02000, CRC(30be398c) SHA1(6c61200ee8888d6270c8cec50423b3b5602c2027) ) // 5.g6 - ROM_LOAD( "4.7f", 0x10000, 0x08000, CRC(3cd715b4) SHA1(da735fb5d262908ddf7ed7dacdea68899f1723ff) ) // 4.g8 - - ROM_REGION( 0x02000, "tx_gfx", 0 ) // TX Layer - ROM_LOAD( "3.f11", 0x00000, 0x02000, CRC(67b50a47) SHA1(b1f4aefc9437edbeefba5371149cc08c0b55c741) ) - - - ROM_REGION( 0x100, "tx_clut", 0 ) // taken from parent set (need proper IC locations for this PCB type) - ROM_LOAD( "63s281.16a", 0x0000, 0x0100, CRC(0b8b914b) SHA1(8cf4910b846de79661cc187887171ed8ebfd6719) ) // clut - - ROM_REGION( 0x220, "proms", 0 ) // taken from parent set (need proper IC locations for this PCB type) - ROM_LOAD( "82s123.7a", 0x0000, 0x0020, CRC(93e2d292) SHA1(af8edd0cfe85f28ede9604cfaf4516d54e5277c9) ) // sprite color related? (not used) - ROM_LOAD( "82s129.9s", 0x0020, 0x0100, CRC(cf14ba30) SHA1(3284b6809075756b3c8e07d9705fc7eacb7556f1) ) // timing? (not used) - ROM_LOAD( "82s129.4e", 0x0120, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) // timing? (not used) - - /* ### MODULE 1 ### Background generation / graphics */ - ROM_REGION( 0x40000, "bg_map", 0 ) - ROM_LOAD16_BYTE( "bg_layouts_even", 0x00000, 0x20000, NO_DUMP ) - ROM_LOAD16_BYTE( "bg_layouts_odd", 0x00001, 0x20000, NO_DUMP ) - ROM_REGION( 0x40000, "bg_gfx", 0 ) - ROM_LOAD16_BYTE( "bg_tiles_even", 0x00000, 0x20000, NO_DUMP ) - ROM_LOAD16_BYTE( "bg_tiles_odd", 0x00001, 0x20000, NO_DUMP ) - ROM_REGION( 0x100, "bg_clut", 0 ) - ROM_LOAD( "bg_clut", 0x000, 0x100, NO_DUMP ) - - /* ### MODULE 2 ### Foreground generation / graphics */ - ROM_REGION( 0x40000, "fg_map", 0 ) - ROM_LOAD16_BYTE( "fg_layouts_even", 0x00000, 0x20000, NO_DUMP ) - ROM_LOAD16_BYTE( "fg_layouts_odd", 0x00001, 0x20000, NO_DUMP ) - ROM_REGION( 0x40000, "fg_gfx", 0 ) - ROM_LOAD16_BYTE( "fg_tiles_even", 0x00000, 0x20000, NO_DUMP ) - ROM_LOAD16_BYTE( "fg_tiles_odd", 0x00001, 0x20000, NO_DUMP ) - ROM_REGION( 0x100, "fg_clut", 0 ) - ROM_LOAD( "fg_clut", 0x000, 0x100, NO_DUMP ) - - /* ### MODULE 3 ### Sprite graphics */ - ROM_REGION( 0x40000, "spr_gfx", 0 ) - ROM_LOAD16_BYTE( "sprite_tiles_even", 0x00000, 0x20000, NO_DUMP ) - ROM_LOAD16_BYTE( "sprite_tiles_odd", 0x00001, 0x20000, NO_DUMP ) - ROM_REGION( 0x100, "spr_clut", 0 ) - ROM_LOAD( "spr_clut", 0x000, 0x100, NO_DUMP ) -ROM_END - /* Air Raid (Seibu 1987) @@ -719,61 +418,143 @@ ROM_START( airraid ) ROM_REGION( 0x10000, "maincpu", 0 ) // Main CPU ROM_LOAD( "1.16j", 0x00000, 0x08000, CRC(7ac2cedf) SHA1(272831f51a2731e067b5aec6dba6bddd3c5350c9) ) - ROM_REGION( 0x10000, "user1", 0 ) // cpu data + ROM_REGION( 0x10000, "maindata", 0 ) // cpu data ROM_LOAD( "2.19j", 0x00000, 0x10000, CRC(842ae6c2) SHA1(0468445e4ab6f42bac786f9a258df3972fd1fde9) ) ROM_REGION( 0x18000, "audiocpu", 0 ) // Sub/Sound CPU ROM_LOAD( "5.6f", 0x00000, 0x02000, CRC(30be398c) SHA1(6c61200ee8888d6270c8cec50423b3b5602c2027) ) ROM_LOAD( "4.7f", 0x10000, 0x08000, CRC(3cd715b4) SHA1(da735fb5d262908ddf7ed7dacdea68899f1723ff) ) - ROM_REGION( 0x02000, "tx_gfx", 0 ) // TX Layer + ROM_REGION( 0x0200, "proms", 0 ) // this PCB type has different proms when compared to the cshootert hardware PCB where they were dumped + ROM_LOAD( "pr.c19", 0x0000, 0x0200, NO_DUMP ) + ROM_LOAD( "6308.a13", 0x0000, 0x0100, NO_DUMP ) + + ROM_REGION( 0x02000, "airraid_vid:tx_gfx", 0 ) // TX Layer ROM_LOAD( "3.13e", 0x00000, 0x02000, CRC(672ec0e8) SHA1(a11cd90d6494251ceee3bc7c72f4e7b1580b77e2) ) - ROM_REGION( 0x100, "tx_clut", 0 ) // taken from parent set (need proper IC locations for this PCB type) - ROM_LOAD( "63s281.16a", 0x0000, 0x0100, CRC(0b8b914b) SHA1(8cf4910b846de79661cc187887171ed8ebfd6719) ) // clut - - ROM_REGION( 0x220, "proms", 0 ) // taken from parent set (need proper IC locations for this PCB type) - ROM_LOAD( "82s123.7a", 0x0000, 0x0020, CRC(93e2d292) SHA1(af8edd0cfe85f28ede9604cfaf4516d54e5277c9) ) // sprite color related? (not used) - ROM_LOAD( "82s129.9s", 0x0020, 0x0100, CRC(cf14ba30) SHA1(3284b6809075756b3c8e07d9705fc7eacb7556f1) ) // timing? (not used) - ROM_LOAD( "82s129.4e", 0x0120, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) // timing? (not used) + ROM_REGION( 0x100, "airraid_vid:tx_clut", 0 ) // taken from cshootert, not verified for this PCB + ROM_LOAD( "63s281.d16", 0x0000, 0x0100, CRC(0b8b914b) SHA1(8cf4910b846de79661cc187887171ed8ebfd6719) ) // clut /* ### MODULE 1 ### Background generation / graphics */ - ROM_REGION( 0x40000, "bg_map", 0 ) + ROM_REGION( 0x40000, "airraid_vid:bg_map", 0 ) ROM_LOAD16_BYTE( "bg_layouts_even", 0x00000, 0x20000, NO_DUMP ) ROM_LOAD16_BYTE( "bg_layouts_odd", 0x00001, 0x20000, NO_DUMP ) - ROM_REGION( 0x40000, "bg_gfx", 0 ) + ROM_REGION( 0x40000, "airraid_vid:bg_gfx", 0 ) ROM_LOAD16_BYTE( "bg_tiles_even", 0x00000, 0x20000, NO_DUMP ) ROM_LOAD16_BYTE( "bg_tiles_odd", 0x00001, 0x20000, NO_DUMP ) - ROM_REGION( 0x100, "bg_clut", 0 ) + ROM_REGION( 0x100, "airraid_vid:bg_clut", 0 ) ROM_LOAD( "bg_clut", 0x000, 0x100, NO_DUMP ) /* ### MODULE 2 ### Foreground generation / graphics */ - ROM_REGION( 0x40000, "fg_map", 0 ) + ROM_REGION( 0x40000, "airraid_vid:fg_map", 0 ) ROM_LOAD16_BYTE( "fg_layouts_even", 0x00000, 0x20000, NO_DUMP ) ROM_LOAD16_BYTE( "fg_layouts_odd", 0x00001, 0x20000, NO_DUMP ) - ROM_REGION( 0x40000, "fg_gfx", 0 ) + ROM_REGION( 0x40000, "airraid_vid:fg_gfx", 0 ) ROM_LOAD16_BYTE( "fg_tiles_even", 0x00000, 0x20000, NO_DUMP ) ROM_LOAD16_BYTE( "fg_tiles_odd", 0x00001, 0x20000, NO_DUMP ) - ROM_REGION( 0x100, "fg_clut", 0 ) + ROM_REGION( 0x100, "airraid_vid:fg_clut", 0 ) ROM_LOAD( "fg_clut", 0x000, 0x100, NO_DUMP ) /* ### MODULE 3 ### Sprite graphics */ - ROM_REGION( 0x40000, "spr_gfx", 0 ) + ROM_REGION( 0x40000, "airraid_vid:spr_gfx", 0 ) ROM_LOAD16_BYTE( "sprite_tiles_even", 0x00000, 0x20000, NO_DUMP ) ROM_LOAD16_BYTE( "sprite_tiles_odd", 0x00001, 0x20000, NO_DUMP ) - ROM_REGION( 0x100, "spr_clut", 0 ) + ROM_REGION( 0x100, "airraid_vid:spr_clut", 0 ) ROM_LOAD( "spr_clut", 0x000, 0x100, NO_DUMP ) ROM_END +/* -DRIVER_INIT_MEMBER(cshooter_state, cshooter) +Cross Shooter +(C) J K H Corp (Seibu?) + +Seibu Hardware +PCB is coloured black + +PCB No. S-0087-011A-0 +CPU: SHARP LH0080B (Z80B) +SND: YM2151, Z80A, SEI80BU 611 787, YM3012, SEI0100BU YM3931 +RAM: TMM2015 x 7, TMM2063 x 1 +DIPs: 2 x 8 position +CMOS Gate Arrays: SEI0020BU TC17G008AN-0015 (x 3), SEI10040BU TC15G008AP-0048, + SEI0030BU TC17G005AN-0026, SEI0060BU TC17G008AN-0024 +OTHER: SEI0050BU M 6 4 0 00 +XTAL: 14.318 MHz (near SEI80BU), xx.000 MHz (cant read speed, near SEI0040BU) + +There are 3 BIG custom black packs on the PCB. + +ROMS: +Note, all ROMs have official sticker, "(C) SEIBU KAIHATSU INC." and a number. + +1.k19 TMM27256 \ +2.k20 TMM27512 / Program +3.f11 TMM2764 Gfx? +4.g8 TMM24256 Mask Sound (Samples?) +5.g6 TMM2764 Sound program + + +*/ + +ROM_START( cshooter ) + ROM_REGION( 0x10000, "maincpu", 0 ) // Main CPU + ROM_LOAD( "1.k19", 0x00000, 0x08000, CRC(71418952) SHA1(9745ca006576381c9e9595d8e42ab276bab80a41) ) + + ROM_REGION( 0x10000, "maindata", 0 ) // cpu data + ROM_LOAD( "2.k20", 0x00000, 0x10000, CRC(5812fe72) SHA1(3b28bff6b62a411d2195bb228952db62ad32ef3d) ) + + ROM_REGION( 0x18000, "audiocpu", 0 ) // Sub/Sound CPU + ROM_LOAD( "5.6f", 0x00000, 0x02000, CRC(30be398c) SHA1(6c61200ee8888d6270c8cec50423b3b5602c2027) ) // 5.g6 + ROM_LOAD( "4.7f", 0x10000, 0x08000, CRC(3cd715b4) SHA1(da735fb5d262908ddf7ed7dacdea68899f1723ff) ) // 4.g8 + + ROM_REGION( 0x0200, "proms", 0 ) // this PCB type has different proms when compared to the cshootert hardware PCB where they were dumped + ROM_LOAD( "pr.c19", 0x0000, 0x0200, NO_DUMP ) + ROM_LOAD( "6308.a13", 0x0000, 0x0100, NO_DUMP ) + + + ROM_REGION( 0x02000, "airraid_vid:tx_gfx", 0 ) // TX Layer + ROM_LOAD( "3.f11", 0x00000, 0x02000, CRC(67b50a47) SHA1(b1f4aefc9437edbeefba5371149cc08c0b55c741) ) + + ROM_REGION( 0x100, "airraid_vid:tx_clut", 0 ) // taken from cshootert, not verified for this PCB + ROM_LOAD( "63s281.d16", 0x0000, 0x0100, CRC(0b8b914b) SHA1(8cf4910b846de79661cc187887171ed8ebfd6719) ) // clut + + /* ### MODULE 1 ### Background generation / graphics */ + ROM_REGION( 0x40000, "airraid_vid:bg_map", 0 ) + ROM_LOAD16_BYTE( "bg_layouts_even", 0x00000, 0x20000, NO_DUMP ) + ROM_LOAD16_BYTE( "bg_layouts_odd", 0x00001, 0x20000, NO_DUMP ) + ROM_REGION( 0x40000, "airraid_vid:bg_gfx", 0 ) + ROM_LOAD16_BYTE( "bg_tiles_even", 0x00000, 0x20000, NO_DUMP ) + ROM_LOAD16_BYTE( "bg_tiles_odd", 0x00001, 0x20000, NO_DUMP ) + ROM_REGION( 0x100, "airraid_vid:bg_clut", 0 ) + ROM_LOAD( "bg_clut", 0x000, 0x100, NO_DUMP ) + + /* ### MODULE 2 ### Foreground generation / graphics */ + ROM_REGION( 0x40000, "airraid_vid:fg_map", 0 ) + ROM_LOAD16_BYTE( "fg_layouts_even", 0x00000, 0x20000, NO_DUMP ) + ROM_LOAD16_BYTE( "fg_layouts_odd", 0x00001, 0x20000, NO_DUMP ) + ROM_REGION( 0x40000, "airraid_vid:fg_gfx", 0 ) + ROM_LOAD16_BYTE( "fg_tiles_even", 0x00000, 0x20000, NO_DUMP ) + ROM_LOAD16_BYTE( "fg_tiles_odd", 0x00001, 0x20000, NO_DUMP ) + ROM_REGION( 0x100, "airraid_vid:fg_clut", 0 ) + ROM_LOAD( "fg_clut", 0x000, 0x100, NO_DUMP ) + + /* ### MODULE 3 ### Sprite graphics */ + ROM_REGION( 0x40000, "airraid_vid:spr_gfx", 0 ) + ROM_LOAD16_BYTE( "sprite_tiles_even", 0x00000, 0x20000, NO_DUMP ) + ROM_LOAD16_BYTE( "sprite_tiles_odd", 0x00001, 0x20000, NO_DUMP ) + ROM_REGION( 0x100, "airraid_vid:spr_clut", 0 ) + ROM_LOAD( "spr_clut", 0x000, 0x100, NO_DUMP ) +ROM_END + + + +DRIVER_INIT_MEMBER(airraid_state, cshooter) { - membank("bank1")->configure_entries(0, 4, memregion("user1")->base(), 0x4000); + membank("bank1")->configure_entries(0, 4, memregion("maindata")->base(), 0x4000); } -DRIVER_INIT_MEMBER(cshooter_state,cshootere) +DRIVER_INIT_MEMBER(airraid_state,cshootere) { UINT8 *rom = memregion("maincpu")->base(); @@ -806,8 +587,7 @@ DRIVER_INIT_MEMBER(cshooter_state,cshootere) } - - -GAME( 1987, cshootere, cshooter, airraid_crypt, airraid, cshooter_state, cshootere, ROT270, "Seibu Kaihatsu (J.K.H. license)", "Cross Shooter (Single PCB)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) -GAME( 1987, airraid, cshooter, airraid_crypt, airraid, cshooter_state, cshootere, ROT270, "Seibu Kaihatsu", "Air Raid (Single PCB)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) // There's also an undumped International Games version +GAME( 1987, cshooter, airraid, airraid_crypt, airraid, airraid_state, cshootere, ROT270, "Seibu Kaihatsu (J.K.H. license)", "Cross Shooter (Single PCB)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1987, airraid, 0, airraid_crypt, airraid, airraid_state, cshootere, ROT270, "Seibu Kaihatsu", "Air Raid (Single PCB)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) + diff --git a/src/mame/drivers/alg.cpp b/src/mame/drivers/alg.cpp index d9649286dc9..84db75d0179 100644 --- a/src/mame/drivers/alg.cpp +++ b/src/mame/drivers/alg.cpp @@ -26,7 +26,7 @@ #include "cpu/m68000/m68000.h" #include "render.h" #include "includes/amiga.h" -#include "machine/ldstub.h" +#include "machine/ldp1450.h" #include "machine/nvram.h" #include "machine/amigafdc.h" @@ -87,8 +87,8 @@ int alg_state::get_lightgun_pos(int player, int *x, int *y) { const rectangle &visarea = m_screen->visible_area(); - int xpos = (player == 0) ? m_gun1x->read() : (m_gun2x ? m_gun2x->read() : 0xffffffff); - int ypos = (player == 0) ? m_gun1y->read() : (m_gun2y ? m_gun2y->read() : 0xffffffff); + int xpos = (player == 0) ? m_gun1x->read() : m_gun2x.read_safe(0xffffffff); + int ypos = (player == 0) ? m_gun1y->read() : m_gun2y.read_safe(0xffffffff); if (xpos == -1 || ypos == -1) return FALSE; @@ -306,7 +306,7 @@ static MACHINE_CONFIG_START( alg_r1, alg_state ) /* video hardware */ MCFG_FRAGMENT_ADD(ntsc_video) - MCFG_LASERDISC_LDP1450_ADD("laserdisc") + MCFG_LASERDISC_LDP1450_ADD("laserdisc",9600) MCFG_LASERDISC_SCREEN("screen") MCFG_LASERDISC_OVERLAY_DRIVER(512*2, 262, amiga_state, screen_update_amiga) MCFG_LASERDISC_OVERLAY_CLIP((129-8)*2, (449+8-1)*2, 44-8, 244+8-1) diff --git a/src/mame/drivers/alto2.cpp b/src/mame/drivers/alto2.cpp index 4b9e7542b65..1585759759f 100644 --- a/src/mame/drivers/alto2.cpp +++ b/src/mame/drivers/alto2.cpp @@ -153,13 +153,10 @@ static INPUT_PORTS_START( alto2 ) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_NAME("Mouse YELLOW (middle)") PORT_PLAYER(1) PORT_CODE(MOUSECODE_BUTTON3) PORT_CHANGED_MEMBER( ":maincpu", alto2_cpu_device, mouse_button_2, nullptr ) PORT_START("mousex") // Mouse - X AXIS - PORT_BIT( 0xffff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_CHANGED_MEMBER( ":maincpu", alto2_cpu_device, mouse_motion_x, nullptr ) + PORT_BIT( 0xffff, 0, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_CHANGED_MEMBER( ":maincpu", alto2_cpu_device, mouse_motion_x, nullptr ) PORT_START("mousey") // Mouse - Y AXIS - PORT_BIT( 0xffff, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_CHANGED_MEMBER( ":maincpu", alto2_cpu_device, mouse_motion_y, nullptr ) - - PORT_START("utilout") // Speaker connected to UTILOUT - PORT_BIT( 0xff, 0x00, IPT_PORT ) PORT_WRITE_LINE_DEVICE_MEMBER(":speaker", speaker_sound_device, level_w) + PORT_BIT( 0xffff, 0, IPT_MOUSE_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_CHANGED_MEMBER( ":maincpu", alto2_cpu_device, mouse_motion_y, nullptr ) PORT_START("CONFIG") /* Memory switch on AIM board */ PORT_CONFNAME( 0x01, 0x01, "Memory switch") @@ -279,8 +276,8 @@ static MACHINE_CONFIG_START( alto2, alto2_state ) MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::white) MCFG_SCREEN_RAW_PARAMS(XTAL_20_16MHz, ALTO2_DISPLAY_TOTAL_WIDTH, 0, ALTO2_DISPLAY_WIDTH, - ALTO2_DISPLAY_TOTAL_HEIGHT, 0, ALTO2_DISPLAY_HEIGHT + ALTO2_FAKE_STATUS_H) - MCFG_SCREEN_REFRESH_RATE(60) // two interlaced fields + ALTO2_DISPLAY_TOTAL_HEIGHT, 0, ALTO2_DISPLAY_HEIGHT) + MCFG_SCREEN_REFRESH_RATE(30) // two interlaced fields MCFG_SCREEN_VBLANK_TIME(ALTO2_DISPLAY_VBLANK_TIME) MCFG_SCREEN_UPDATE_DEVICE("maincpu", alto2_cpu_device, screen_update) MCFG_SCREEN_VBLANK_DEVICE("maincpu", alto2_cpu_device, screen_eof) diff --git a/src/mame/drivers/amiga.cpp b/src/mame/drivers/amiga.cpp index dc16f8d536f..4b561e6eab2 100644 --- a/src/mame/drivers/amiga.cpp +++ b/src/mame/drivers/amiga.cpp @@ -309,21 +309,22 @@ class cd32_state : public amiga_state public: cd32_state(const machine_config &mconfig, device_type type, const char *tag) : amiga_state(mconfig, type, tag), - m_p1_port(*this, "p1_cd32_buttons"), - m_p2_port(*this, "p2_cd32_buttons"), + m_player_ports(*this, {"p1_cd32_buttons", "p2_cd32_buttons"}), m_cdda(*this, "cdda") { } DECLARE_WRITE8_MEMBER( akiko_cia_0_port_a_write ); + void handle_joystick_cia(UINT8 pra, UINT8 dra); + UINT16 handle_joystick_potgor(UINT16 potgor); + DECLARE_CUSTOM_INPUT_MEMBER( cd32_input ); DECLARE_CUSTOM_INPUT_MEMBER( cd32_sel_mirror_input ); DECLARE_DRIVER_INIT( pal ); DECLARE_DRIVER_INIT( ntsc ); - required_ioport m_p1_port; - required_ioport m_p2_port; + required_ioport_array<2> m_player_ports; int m_oldstate[2]; int m_cd32_shifter[2]; @@ -849,40 +850,33 @@ void cd32_state::potgo_w(UINT16 data) } } -static void handle_cd32_joystick_cia(running_machine &machine, UINT8 pra, UINT8 dra) +void cd32_state::handle_joystick_cia(UINT8 pra, UINT8 dra) { - cd32_state *state = machine.driver_data(); - int i; - - for (i = 0; i < 2; i++) + for (int i = 0; i < 2; i++) { UINT8 but = 0x40 << i; UINT16 p5dir = 0x0200 << (i * 4); /* output enable P5 */ UINT16 p5dat = 0x0100 << (i * 4); /* data P5 */ - if (!(state->m_potgo_value & p5dir) || !(state->m_potgo_value & p5dat)) + if (!(m_potgo_value & p5dir) || !(m_potgo_value & p5dat)) { - if ((dra & but) && (pra & but) != state->m_oldstate[i]) + if ((dra & but) && (pra & but) != m_oldstate[i]) { if (!(pra & but)) { - state->m_cd32_shifter[i]--; - if (state->m_cd32_shifter[i] < 0) - state->m_cd32_shifter[i] = 0; + m_cd32_shifter[i]--; + if (m_cd32_shifter[i] < 0) + m_cd32_shifter[i] = 0; } } } - state->m_oldstate[i] = pra & but; + m_oldstate[i] = pra & but; } } -static UINT16 handle_joystick_potgor(running_machine &machine, UINT16 potgor) +UINT16 cd32_state::handle_joystick_potgor(UINT16 potgor) { - cd32_state *state = machine.driver_data(); - ioport_port * player_portname[] = { state->m_p1_port, state->m_p2_port }; - int i; - - for (i = 0; i < 2; i++) + for (int i = 0; i < 2; i++) { UINT16 p9dir = 0x0800 << (i * 4); /* output enable P9 */ UINT16 p9dat = 0x0400 << (i * 4); /* data P9 */ @@ -891,16 +885,16 @@ static UINT16 handle_joystick_potgor(running_machine &machine, UINT16 potgor) /* p5 is floating in input-mode */ potgor &= ~p5dat; - potgor |= state->m_potgo_value & p5dat; - if (!(state->m_potgo_value & p9dir)) + potgor |= m_potgo_value & p5dat; + if (!(m_potgo_value & p9dir)) potgor |= p9dat; /* P5 output and 1 -> shift register is kept reset (Blue button) */ - if ((state->m_potgo_value & p5dir) && (state->m_potgo_value & p5dat)) - state->m_cd32_shifter[i] = 8; + if ((m_potgo_value & p5dir) && (m_potgo_value & p5dat)) + m_cd32_shifter[i] = 8; /* shift at 1 == return one, >1 = return button states */ - if (state->m_cd32_shifter[i] == 0) + if (m_cd32_shifter[i] == 0) potgor &= ~p9dat; /* shift at zero == return zero */ - if (state->m_cd32_shifter[i] >= 2 && ((player_portname[i])->read() & (1 << (state->m_cd32_shifter[i] - 2)))) + if (m_cd32_shifter[i] >= 2 && ((m_player_ports[i])->read() & (1 << (m_cd32_shifter[i] - 2)))) potgor &= ~p9dat; } return potgor; @@ -908,13 +902,12 @@ static UINT16 handle_joystick_potgor(running_machine &machine, UINT16 potgor) CUSTOM_INPUT_MEMBER( cd32_state::cd32_input ) { - return handle_joystick_potgor(machine(), m_potgo_value) >> 8; + return handle_joystick_potgor(m_potgo_value) >> 8; } CUSTOM_INPUT_MEMBER( cd32_state::cd32_sel_mirror_input ) { - ioport_port* ports[2]= { m_p1_port, m_p2_port }; - UINT8 bits = ports[(int)(FPTR)param]->read(); + UINT8 bits = m_player_ports[(int)(FPTR)param]->read(); return (bits & 0x20)>>5; } @@ -926,7 +919,7 @@ WRITE8_MEMBER( cd32_state::akiko_cia_0_port_a_write ) // bit 1, power led output().set_led_value(0, BIT(data, 1) ? 0 : 1); - handle_cd32_joystick_cia(machine(), data, m_cia_0->read(space, 2)); + handle_joystick_cia(data, m_cia_0->read(space, 2)); } diff --git a/src/mame/drivers/amstrad.cpp b/src/mame/drivers/amstrad.cpp index 4bebdba0132..fb2d49a8553 100644 --- a/src/mame/drivers/amstrad.cpp +++ b/src/mame/drivers/amstrad.cpp @@ -627,7 +627,7 @@ static INPUT_PORTS_START( gx4000 ) PORT_START("kbrow.3") PORT_BIT(0x07, IP_ACTIVE_LOW, IPT_UNUSED) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_START ) PORT_NAME(DEF_STR(Pause)) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME(DEF_STR(Pause)) PORT_CODE(KEYCODE_1) PORT_BIT(0xf0, IP_ACTIVE_LOW, IPT_UNUSED) PORT_START("kbrow.4") diff --git a/src/mame/drivers/apple2.cpp b/src/mame/drivers/apple2.cpp index 78775951801..8100e0f7b9e 100644 --- a/src/mame/drivers/apple2.cpp +++ b/src/mame/drivers/apple2.cpp @@ -334,7 +334,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(napple2_state::apple2_interrupt) m_video->m_sysconfig = m_sysconfig->read(); // check reset - if (m_resetdip) // if reset DIP is present, use it + if (m_resetdip.found()) // if reset DIP is present, use it { if (m_resetdip->read() & 1) { // CTRL-RESET diff --git a/src/mame/drivers/apple2gs.cpp b/src/mame/drivers/apple2gs.cpp index 5fcb899002e..11c62e0b299 100644 --- a/src/mame/drivers/apple2gs.cpp +++ b/src/mame/drivers/apple2gs.cpp @@ -448,8 +448,11 @@ ROM_START(apple2gs) ROM_LOAD ( "apple2gs.chr", 0x0000, 0x1000, CRC(91e53cd8) SHA1(34e2443e2ef960a36c047a09ed5a93f471797f89)) /* need label/part number */ ROM_REGION(0x40000,"maincpu",0) - ROM_LOAD("341-0737", 0x00000, 0x20000, CRC(8d410067) SHA1(c0f4704233ead14cb8e1e8a68fbd7063c56afd27)) /* Needs verification; 341-0737: IIgs ROM03 FC-FD */ - ROM_LOAD("341-0748", 0x20000, 0x20000, CRC(d4c50550) SHA1(2784cdd7ac7094b3e494409db3e72b4e6d2d9e81)) /* Needs verification; 341-0748: IIgs ROM03 FE-FF */ + // 341-0728 is the MASK rom version while 341-0737 is the EPROM version - SAME data. + ROM_LOAD("341-0728", 0x00000, 0x20000, CRC(8d410067) SHA1(c0f4704233ead14cb8e1e8a68fbd7063c56afd27) ) /* 341-0728: IIgs ROM03 FC-FD */ + // 341-0748 is the MASK rom version while 341-0749 is the EPROM version - SAME data. + ROM_LOAD("341-0748", 0x30000, 0x10000, CRC(18190283) SHA1(c70576869deec92ca82c78438b1d5c686eac7480) ) /* 341-0748: IIgs ROM03 FE-FF */ + ROM_CONTINUE ( 0x20000, 0x10000) /* high address line is inverted on PCB? */ ROM_REGION(0x20000, "es5503", ROMREGION_ERASE00) @@ -480,29 +483,6 @@ ROM_START(apple2gsr3p) ROM_LOAD( "341-0132-d.e12", 0x000, 0x800, CRC(c506efb9) SHA1(8e14e85c645187504ec9d162b3ea614a0c421d32) ) ROM_END -ROM_START(apple2gsr3lp) - ROM_REGION(0x1000,M5074X_INTERNAL_ROM(ADBMICRO_TAG),0) - ROM_LOAD( "341s0632-2.bin", 0x000000, 0x001000, CRC(e1c11fb0) SHA1(141d18c36a617ab9dce668445440d34354be0672) ) - - ROM_REGION(0x400, "kmcu", 0) - ROM_LOAD( "341-0232a.bin", 0x000000, 0x000400, CRC(6a158b9f) SHA1(e8744180075182849d431fd8023a52a062a6da76) ) - ROM_LOAD( "341-0124a.bin", 0x000000, 0x000400, CRC(2a3576bf) SHA1(58fbf770d3801a02d0944039829f9241b5279013) ) - - ROM_REGION(0x1000,"gfx1",0) - ROM_LOAD ( "apple2gs.chr", 0x0000, 0x1000, CRC(91e53cd8) SHA1(34e2443e2ef960a36c047a09ed5a93f471797f89) ) /* need label/part number */ - - ROM_REGION(0x40000,"maincpu",0) - // The 341-0749 is known to also be matched with the 341-0728 MASK rom which holds the same data as the EPROM 341-0737 version. - ROM_LOAD("341-0737", 0x00000, 0x20000, CRC(8d410067) SHA1(c0f4704233ead14cb8e1e8a68fbd7063c56afd27) ) /* 341-0737: IIgs ROM03 FC-FD - 32 pin EPROM */ - ROM_LOAD("341-0749", 0x20000, 0x20000, CRC(c6e9b4b4) SHA1(d754a3c3a26763c50bc9adfd0fcb9b71aef7999d) ) /* 341-0749: unknown ?post? ROM03 IIgs prototype? FE-FF - 32 pin EPROM */ - - ROM_REGION(0x20000, "es5503", ROMREGION_ERASE00) - - // temporary: use IIe enhanced keyboard decode ROM - ROM_REGION( 0x800, "keyboard", 0 ) - ROM_LOAD( "341-0132-d.e12", 0x000, 0x800, CRC(c506efb9) SHA1(8e14e85c645187504ec9d162b3ea614a0c421d32) ) -ROM_END - ROM_START(apple2gsr1) ROM_REGION(0xc00,M5074X_INTERNAL_ROM(ADBMICRO_TAG),0) ROM_LOAD( "341s0345.bin", 0x000000, 0x000c00, CRC(48cd5779) SHA1(97e421f5247c00a0ca34cd08b6209df573101480) ) @@ -536,11 +516,6 @@ ROM_START(apple2gsr0) ROM_LOAD ( "apple2gs.chr", 0x0000, 0x1000, CRC(91e53cd8) SHA1(34e2443e2ef960a36c047a09ed5a93f471797f89)) ROM_REGION(0x20000,"maincpu",0) - /* Should these roms really be split like this? according to the unofficial apple rom list, IIgs ROM00 was on one rom labeled 342-0077-A */ -// ROM_LOAD("rom0a.bin", 0x0000, 0x8000, CRC(9cc78238) SHA1(0ea82e10720a01b68722ab7d9f66efec672a44d3)) -// ROM_LOAD("rom0b.bin", 0x8000, 0x8000, CRC(8baf2a79) SHA1(91beeb11827932fe10475252d8036a63a2edbb1c)) -// ROM_LOAD("rom0c.bin", 0x10000, 0x8000, CRC(94c32caa) SHA1(4806d50d676b06f5213b181693fc1585956b98bb)) -// ROM_LOAD("rom0d.bin", 0x18000, 0x8000, CRC(200a15b8) SHA1(0c2890bb169ead63369738bbd5f33b869f24c42a)) ROM_LOAD("342-0077-a", 0x0000, 0x20000, CRC(dfbdd97b) SHA1(ff0c245dd0732ec4413a934fd80efc2defd8a8e3) ) /* 342-0077-A: IIgs ROM00 */ ROM_REGION(0x20000, "es5503", ROMREGION_ERASE00) @@ -593,10 +568,9 @@ ROM_START(apple2gsr0p2) // 3/10/1986 Cortland prototype, boots as "Apple //'ing ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ -COMP( 1989, apple2gs, 0, apple2, apple2gs, apple2gs, driver_device, 0, "Apple Computer", "Apple IIgs (ROM03)", MACHINE_SUPPORTS_SAVE ) -COMP( 198?, apple2gsr3p, apple2gs, 0, apple2gs, apple2gs, driver_device, 0, "Apple Computer", "Apple IIgs (ROM03 prototype)", MACHINE_NOT_WORKING ) -COMP( 1989, apple2gsr3lp, apple2gs, 0, apple2gs, apple2gs, driver_device, 0, "Apple Computer", "Apple IIgs (ROM03 late prototype?)", MACHINE_SUPPORTS_SAVE ) -COMP( 1987, apple2gsr1, apple2gs, 0, apple2gsr1, apple2gs, driver_device, 0, "Apple Computer", "Apple IIgs (ROM01)", MACHINE_SUPPORTS_SAVE ) -COMP( 1986, apple2gsr0, apple2gs, 0, apple2gsr1, apple2gs, driver_device, 0, "Apple Computer", "Apple IIgs (ROM00)", MACHINE_SUPPORTS_SAVE ) -COMP( 1986, apple2gsr0p,apple2gs, 0, apple2gsr1, apple2gs, driver_device, 0, "Apple Computer", "Apple IIgs (ROM00 prototype 6/19/1986)", MACHINE_SUPPORTS_SAVE ) -COMP( 1986, apple2gsr0p2,apple2gs,0, apple2gsr1, apple2gs, driver_device, 0, "Apple Computer", "Apple IIgs (ROM00 prototype 3/10/1986)", MACHINE_SUPPORTS_SAVE ) +COMP( 1989, apple2gs, 0, apple2, apple2gs, apple2gs, driver_device, 0, "Apple Computer", "Apple IIgs (ROM03)", MACHINE_SUPPORTS_SAVE ) +COMP( 198?, apple2gsr3p, apple2gs, 0, apple2gs, apple2gs, driver_device, 0, "Apple Computer", "Apple IIgs (ROM03 prototype)", MACHINE_NOT_WORKING ) +COMP( 1987, apple2gsr1, apple2gs, 0, apple2gsr1, apple2gs, driver_device, 0, "Apple Computer", "Apple IIgs (ROM01)", MACHINE_SUPPORTS_SAVE ) +COMP( 1986, apple2gsr0, apple2gs, 0, apple2gsr1, apple2gs, driver_device, 0, "Apple Computer", "Apple IIgs (ROM00)", MACHINE_SUPPORTS_SAVE ) +COMP( 1986, apple2gsr0p, apple2gs, 0, apple2gsr1, apple2gs, driver_device, 0, "Apple Computer", "Apple IIgs (ROM00 prototype 6/19/1986)", MACHINE_SUPPORTS_SAVE ) +COMP( 1986, apple2gsr0p2, apple2gs, 0, apple2gsr1, apple2gs, driver_device, 0, "Apple Computer", "Apple IIgs (ROM00 prototype 3/10/1986)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/aristmk4.cpp b/src/mame/drivers/aristmk4.cpp index b752c6b8f9d..203680b20cd 100644 --- a/src/mame/drivers/aristmk4.cpp +++ b/src/mame/drivers/aristmk4.cpp @@ -1198,7 +1198,7 @@ static INPUT_PORTS_START(aristmk4) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_NAME("2-2 UNUSED") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_NAME("2-3 UNUSED") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON12 ) PORT_NAME("AUX1") PORT_CODE(KEYCODE_X) // PB5 - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON13 ) PORT_NAME("Memory Reset") PORT_CODE(KEYCODE_C) // PB4 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_CODE(KEYCODE_C) // PB4 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON14 ) PORT_NAME("Hopper Test") PORT_CODE(KEYCODE_V) // PB3 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON15 ) PORT_NAME("Print Data") PORT_CODE(KEYCODE_B) // PB2 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON16 ) PORT_NAME("Clock Init") PORT_CODE(KEYCODE_N) // PB1 diff --git a/src/mame/drivers/arkanoid.cpp b/src/mame/drivers/arkanoid.cpp index 6daff2641bf..7e025e7c311 100644 --- a/src/mame/drivers/arkanoid.cpp +++ b/src/mame/drivers/arkanoid.cpp @@ -878,7 +878,7 @@ READ8_MEMBER(arkanoid_state::hexaa_sub_90_r) } static ADDRESS_MAP_START( hexaa_sub_iomap, AS_IO, 8, arkanoid_state ) - ADDRESS_MAP_GLOBAL_MASK(0x0f) + ADDRESS_MAP_GLOBAL_MASK(0x9f) AM_RANGE(0x00, 0x0f) AM_RAM // ?? could be communication with the other chip (protection?) AM_RANGE(0x80, 0x80) AM_WRITE(hexaa_sub_80_w) AM_RANGE(0x90, 0x90) AM_READ(hexaa_sub_90_r) diff --git a/src/mame/drivers/astrafr.cpp b/src/mame/drivers/astrafr.cpp index 303b0448626..37d0f4c4997 100644 --- a/src/mame/drivers/astrafr.cpp +++ b/src/mame/drivers/astrafr.cpp @@ -170,10 +170,10 @@ WRITE32_MEMBER(astrafr_state::astrafr_mem_w) case 3: address &= 0xfffff; - if (mem_mask&0xff000000) astra_fgpa_w(space, address+0, data >> 24); - if (mem_mask&0x00ff0000) astra_fgpa_w(space, address+1, data >> 16); - if (mem_mask&0x0000ff00) astra_fgpa_w(space, address+2, data >> 8); - if (mem_mask&0x000000ff) astra_fgpa_w(space, address+3, data >> 0); + if (ACCESSING_BITS_24_31) astra_fgpa_w(space, address+0, data >> 24); + if (ACCESSING_BITS_16_23) astra_fgpa_w(space, address+1, data >> 16); + if (ACCESSING_BITS_8_15) astra_fgpa_w(space, address+2, data >> 8); + if (ACCESSING_BITS_0_7) astra_fgpa_w(space, address+3, data >> 0); break; case 2: @@ -225,10 +225,10 @@ WRITE32_MEMBER(astrafr_state::astrafr_slave_mem_w) case 3: address &= 0xfffff; - if (mem_mask&0xff000000) astra_fgpa_slave_w(space, address+0, data >> 24); - if (mem_mask&0x00ff0000) astra_fgpa_slave_w(space, address+1, data >> 16); - if (mem_mask&0x0000ff00) astra_fgpa_slave_w(space, address+2, data >> 8); - if (mem_mask&0x000000ff) astra_fgpa_slave_w(space, address+3, data >> 0); + if (ACCESSING_BITS_24_31) astra_fgpa_slave_w(space, address+0, data >> 24); + if (ACCESSING_BITS_16_23) astra_fgpa_slave_w(space, address+1, data >> 16); + if (ACCESSING_BITS_8_15) astra_fgpa_slave_w(space, address+2, data >> 8); + if (ACCESSING_BITS_0_7) astra_fgpa_slave_w(space, address+3, data >> 0); break; case 2: diff --git a/src/mame/drivers/astrocde.cpp b/src/mame/drivers/astrocde.cpp index 73b32d70563..00aa5357c19 100644 --- a/src/mame/drivers/astrocde.cpp +++ b/src/mame/drivers/astrocde.cpp @@ -265,7 +265,7 @@ READ8_MEMBER(astrocde_state::spacezap_io_r) { machine().bookkeeping().coin_counter_w(0, (offset >> 8) & 1); machine().bookkeeping().coin_counter_w(1, (offset >> 9) & 1); - return m_p3handle ? m_p3handle->read() : 0xff; + return m_p3handle.read_safe(0xff); } diff --git a/src/mame/drivers/astrof.cpp b/src/mame/drivers/astrof.cpp index 875e0077eff..b009cee438d 100644 --- a/src/mame/drivers/astrof.cpp +++ b/src/mame/drivers/astrof.cpp @@ -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 = read_safe(ioport("FAKE"), 0x00); + UINT8 config = m_fake_port.read_safe(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 = read_safe(ioport("FAKE"), 0x00); + UINT8 config = m_fake_port.read_safe(0x00); for (i = 0; i < TOMAHAWK_NUM_PENS; i++) { diff --git a/src/mame/drivers/atarist.cpp b/src/mame/drivers/atarist.cpp index 42040df8a30..2d178825650 100644 --- a/src/mame/drivers/atarist.cpp +++ b/src/mame/drivers/atarist.cpp @@ -566,7 +566,7 @@ READ8_MEMBER( st_state::ikbd_port2_r ) */ - UINT8 data = m_joy1 ? m_joy1->read() & 0x06 : 0x06; + UINT8 data = m_joy1.read_safe(0x06) & 0x06; // serial receive data |= m_ikbd_tx << 3; @@ -653,7 +653,7 @@ READ8_MEMBER( st_state::ikbd_port4_r ) if (m_ikbd_joy) return 0xff; - UINT8 data = m_joy0 ? m_joy0->read() : 0xff; + UINT8 data = m_joy0.read_safe(0xff); if ((m_config->read() & 0x01) == 0) { @@ -1941,7 +1941,8 @@ void st_state::machine_start() m_maincpu->space(AS_PROGRAM).install_read_handler(0xfa0000, 0xfbffff, read16_delegate(FUNC(generic_slot_device::read16_rom),(generic_slot_device*)m_cart)); // allocate timers - if(m_mousex) { + if (m_mousex.found()) + { m_mouse_timer = timer_alloc(TIMER_MOUSE_TICK); m_mouse_timer->adjust(attotime::zero, 0, attotime::from_hz(500)); } diff --git a/src/mame/drivers/attache.cpp b/src/mame/drivers/attache.cpp index 00db1fcc689..0c154fb4971 100644 --- a/src/mame/drivers/attache.cpp +++ b/src/mame/drivers/attache.cpp @@ -86,14 +86,7 @@ public: m_palette(*this, "palette"), m_floppy0(*this, "fdc:0:525dd"), m_floppy1(*this, "fdc:1:525dd"), - m_kb_row0(*this, "row0"), - m_kb_row1(*this, "row1"), - m_kb_row2(*this, "row2"), - m_kb_row3(*this, "row3"), - m_kb_row4(*this, "row4"), - m_kb_row5(*this, "row5"), - m_kb_row6(*this, "row6"), - m_kb_row7(*this, "row7"), + m_kb_rows(*this, {"row0", "row1", "row2", "row3", "row4", "row5", "row6", "row7"}), m_kb_mod(*this, "modifiers"), m_membank1(*this, "bank1"), m_membank2(*this, "bank2"), @@ -183,14 +176,7 @@ private: required_device m_palette; required_device m_floppy0; required_device m_floppy1; - required_ioport m_kb_row0; - required_ioport m_kb_row1; - required_ioport m_kb_row2; - required_ioport m_kb_row3; - required_ioport m_kb_row4; - required_ioport m_kb_row5; - required_ioport m_kb_row6; - required_ioport m_kb_row7; + required_ioport_array<8> m_kb_rows; required_ioport m_kb_mod; required_memory_bank m_membank1; required_memory_bank m_membank2; @@ -370,13 +356,12 @@ WRITE8_MEMBER(attache_state::rom_w) UINT16 attache_state::get_key() { UINT8 row,bits,data; - ioport_port* keys[8] = { m_kb_row0, m_kb_row1, m_kb_row2, m_kb_row3, m_kb_row4, m_kb_row5, m_kb_row6, m_kb_row7 }; UINT8 res = 0; // scan input ports for(row=0;row<8;row++) { - data = keys[row]->read(); + data = m_kb_rows[row]->read(); for(bits=0;bits<8;bits++) { if(BIT(data,bits)) diff --git a/src/mame/drivers/bbc.cpp b/src/mame/drivers/bbc.cpp index a89bde1c039..3b8202285a7 100644 --- a/src/mame/drivers/bbc.cpp +++ b/src/mame/drivers/bbc.cpp @@ -659,14 +659,14 @@ INPUT_PORTS_END INPUT_CHANGED_MEMBER(bbc_state::monitor_changed) { - m_monitortype = read_safe(ioport("BBCCONFIG"), 0) &0x03; + m_monitortype = m_bbcconfig.read_safe(0) &0x03; } INPUT_CHANGED_MEMBER(bbc_state::speech_changed) { // Switchable during runtime as some games (Hyper Sports, Space Fighter) are not compatible with Speech - m_Speech = read_safe(ioport("BBCCONFIG"), 0) & 0x04; + m_Speech = m_bbcconfig.read_safe(0) & 0x04; } diff --git a/src/mame/drivers/bfm_sc4.cpp b/src/mame/drivers/bfm_sc4.cpp index df5852c9410..bfd99c93683 100644 --- a/src/mame/drivers/bfm_sc4.cpp +++ b/src/mame/drivers/bfm_sc4.cpp @@ -110,13 +110,12 @@ UINT8 sc4_state::read_input_matrix(int row) { - ioport_port* portnames[16] = { m_io1, m_io2, m_io3, m_io4, m_io5, m_io6, m_io7, m_io8, m_io9, m_io10, m_io11, m_io12 }; UINT8 value; if (row<4) - value = (read_safe(portnames[row], 0x00) & 0x1f) + ((read_safe(portnames[row+8], 0x00) & 0x07) << 5); + value = (m_io_ports[row].read_safe(0x00) & 0x1f) + ((m_io_ports[row+8].read_safe(0x00) & 0x07) << 5); else - value = (read_safe(portnames[row], 0x00) & 0x1f) + ((read_safe(portnames[row+4], 0x00) & 0x18) << 2); + value = (m_io_ports[row].read_safe(0x00) & 0x1f) + ((m_io_ports[row+4].read_safe(0x00) & 0x18) << 2); return value; } @@ -206,12 +205,12 @@ READ16_MEMBER(sc4_state::sc4_mem_r) if (addr < 0x0080) { UINT16 retvalue = 0x0000; - if (mem_mask&0xff00) + if (ACCESSING_BITS_8_15) { logerror("mem_mask&0xff00 unhandled\n"); } - if (mem_mask&0x00ff) + if (ACCESSING_BITS_0_7) { retvalue = read_input_matrix((addr & 0x00f0)>>4); } @@ -382,12 +381,12 @@ WRITE16_MEMBER(sc4_state::sc4_mem_w) if (addr < 0x0200) { - if (mem_mask&0xff00) + if (ACCESSING_BITS_8_15) { logerror("lamp write mem_mask&0xff00 unhandled\n"); } - if (mem_mask&0x00ff) + if (ACCESSING_BITS_0_7) { // lamps mux_output_w(space, (addr & 0x01f0)>>4, data); } @@ -395,12 +394,12 @@ WRITE16_MEMBER(sc4_state::sc4_mem_w) } else if ((addr >= 0x1000) && (addr < 0x1200)) { - if (mem_mask&0xff00) + if (ACCESSING_BITS_8_15) { logerror("lamp write mem_mask&0xff00 unhandled\n"); } - if (mem_mask&0x00ff) + if (ACCESSING_BITS_0_7) { // lamps mux_output2_w(space, (addr & 0x01f0)>>4, data); } @@ -1645,7 +1644,7 @@ DRIVER_INIT_MEMBER(sc4_state,sc4) // debug helpers to find strings used for inputs and where the buttons map - bfm_sc45_layout_helper(machine()); +// bfm_sc45_layout_helper(machine()); } diff --git a/src/mame/drivers/bfm_sc5.cpp b/src/mame/drivers/bfm_sc5.cpp index a899ee2260e..bd9b4d2f2a4 100644 --- a/src/mame/drivers/bfm_sc5.cpp +++ b/src/mame/drivers/bfm_sc5.cpp @@ -28,7 +28,7 @@ WRITE16_MEMBER( bfm_sc5_state::sc5_duart_w ) // clearly a duart of some kind, write patterns are the same as SC4 games // printf("%s: duart_w %1x %04x %04x\n", machine().describe_context(), offset, data, mem_mask); - if (mem_mask &0xff00) + if (ACCESSING_BITS_8_15) { m_duart->write(space,offset,(data>>8)&0x00ff); } diff --git a/src/mame/drivers/bwidow.cpp b/src/mame/drivers/bwidow.cpp index 6c738de146f..3eb06741e9e 100644 --- a/src/mame/drivers/bwidow.cpp +++ b/src/mame/drivers/bwidow.cpp @@ -264,9 +264,9 @@ READ8_MEMBER(bwidow_state::spacduel_IN3_r) int res2; int res3; - res1 = ioport("IN3")->read(); - res2 = ioport("IN4")->read(); - res3 = read_safe(ioport("DSW2"), 0); + res1 = m_in3->read(); + res2 = m_in4->read(); + res3 = m_dsw2.read_safe(0); res = 0x00; switch (offset & 0x07) @@ -315,7 +315,7 @@ CUSTOM_INPUT_MEMBER(bwidow_state::clock_r) READ8_MEMBER(bwidow_state::bwidowp_in_r) { - return (ioport("IN4")->read() & 0x0f) | ((ioport("IN3")->read() & 0x0f) << 4); + return (m_in4->read() & 0x0f) | ((m_in3->read() & 0x0f) << 4); } /************************************* diff --git a/src/mame/drivers/c65.cpp b/src/mame/drivers/c65.cpp index fb9f882ead7..1f007bd15f0 100644 --- a/src/mame/drivers/c65.cpp +++ b/src/mame/drivers/c65.cpp @@ -21,7 +21,7 @@ Note: #include "emu.h" #include "cpu/m6502/m4510.h" #include "machine/mos6526.h" -#include "softlist.h" +#include "softlist_dev.h" #define MAIN_CLOCK XTAL_3_5MHz diff --git a/src/mame/drivers/calomega.cpp b/src/mame/drivers/calomega.cpp index 9226a748b92..a247dc12de0 100644 --- a/src/mame/drivers/calomega.cpp +++ b/src/mame/drivers/calomega.cpp @@ -843,7 +843,7 @@ static ADDRESS_MAP_START( s903mod_map, AS_PROGRAM, 8, calomega_state ) AM_RANGE(0x08c8, 0x08cb) AM_DEVREADWRITE("pia1", pia6821_device, read, write) AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(calomega_videoram_w) AM_SHARE("videoram") AM_RANGE(0x1400, 0x17ff) AM_RAM_WRITE(calomega_colorram_w) AM_SHARE("colorram") - AM_RANGE(0x1800, 0xffff) AM_ROM + AM_RANGE(0x1800, 0x3fff) AM_ROM ADDRESS_MAP_END static ADDRESS_MAP_START( sys905_map, AS_PROGRAM, 8, calomega_state ) @@ -856,7 +856,7 @@ static ADDRESS_MAP_START( sys905_map, AS_PROGRAM, 8, calomega_state ) AM_RANGE(0x10c8, 0x10cb) AM_DEVREADWRITE("pia1", pia6821_device, read, write) AM_RANGE(0x2000, 0x23ff) AM_RAM_WRITE(calomega_videoram_w) AM_SHARE("videoram") AM_RANGE(0x2400, 0x27ff) AM_RAM_WRITE(calomega_colorram_w) AM_SHARE("colorram") - AM_RANGE(0x2800, 0xffff) AM_ROM + AM_RANGE(0x2800, 0x7fff) AM_ROM ADDRESS_MAP_END static ADDRESS_MAP_START( sys906_map, AS_PROGRAM, 8, calomega_state ) diff --git a/src/mame/drivers/cb2001.cpp b/src/mame/drivers/cb2001.cpp index 10fc8bb527a..c969490595e 100644 --- a/src/mame/drivers/cb2001.cpp +++ b/src/mame/drivers/cb2001.cpp @@ -447,7 +447,7 @@ UINT32 cb2001_state::screen_update_cb2001(screen_device &screen, bitmap_rgb32 &b is being executed incorrectly */ WRITE16_MEMBER(cb2001_state::cb2001_vidctrl_w) { - if (mem_mask&0xff00) // video control? + if (ACCESSING_BITS_8_15) // video control? { printf("cb2001_vidctrl_w %04x %04x\n", data, mem_mask); m_videobank = (data & 0x0800)>>11; @@ -458,7 +458,7 @@ WRITE16_MEMBER(cb2001_state::cb2001_vidctrl_w) WRITE16_MEMBER(cb2001_state::cb2001_vidctrl2_w) { - if (mem_mask&0xff00) // video control? + if (ACCESSING_BITS_8_15) // video control? { printf("cb2001_vidctrl2_w %04x %04x\n", data, mem_mask); // i think this switches to 'reels' mode m_videomode = (data>>8) & 0x03; // which bit?? diff --git a/src/mame/drivers/cclimber.cpp b/src/mame/drivers/cclimber.cpp index 0bad5858b9d..a14ef528522 100644 --- a/src/mame/drivers/cclimber.cpp +++ b/src/mame/drivers/cclimber.cpp @@ -591,6 +591,54 @@ static INPUT_PORTS_START( ckong ) PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END +static INPUT_PORTS_START( bagmanf ) + PORT_START("P1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) + + PORT_START("P2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN4 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL + + PORT_START("DSW") + PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") + PORT_DIPSETTING( 0x03, "2" ) + PORT_DIPSETTING( 0x02, "3" ) + PORT_DIPSETTING( 0x01, "4" ) + PORT_DIPSETTING( 0x00, "5" ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:3") + PORT_DIPSETTING( 0x00, "2C/1C 1C/1C 1C/3C 1C/7C" ) + PORT_DIPSETTING( 0x04, "1C/1C 1C/2C 1C/6C 1C/14C" ) + PORT_DIPNAME( 0x18, 0x18, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:4,5") + PORT_DIPSETTING( 0x18, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Medium ) ) + PORT_DIPSETTING( 0x08, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Language ) ) PORT_DIPLOCATION("SW1:6") + PORT_DIPSETTING( 0x20, DEF_STR( English ) ) + PORT_DIPSETTING( 0x00, DEF_STR( French ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:7") + PORT_DIPSETTING( 0x40, "30000" ) + PORT_DIPSETTING( 0x00, "40000" ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) /* Cabinet type set through edge connector, not dip switch (verified on real pcb) */ + PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) + + PORT_START("SYSTEM") +INPUT_PORTS_END + /* Similar to normal Crazy Kong except for the lives per game */ static INPUT_PORTS_START( ckongb ) PORT_INCLUDE( ckong ) @@ -1035,6 +1083,12 @@ INTERRUPT_GEN_MEMBER(cclimber_state::vblank_irq) device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } +INTERRUPT_GEN_MEMBER(cclimber_state::bagmanf_vblank_irq) +{ + if(m_nmi_mask) + device.execute().set_input_line(0, HOLD_LINE); +} + static MACHINE_CONFIG_START( root, cclimber_state ) /* basic machine hardware */ @@ -1086,6 +1140,13 @@ static MACHINE_CONFIG_DERIVED( cannonb, cclimber ) MCFG_GFXDECODE_MODIFY("gfxdecode", cannonb) MACHINE_CONFIG_END +static MACHINE_CONFIG_DERIVED( bagmanf, cclimber ) + + /* basic machine hardware */ + MCFG_CPU_MODIFY("maincpu") + MCFG_CPU_VBLANK_INT_DRIVER("screen", cclimber_state, bagmanf_vblank_irq) +MACHINE_CONFIG_END + static MACHINE_CONFIG_DERIVED( yamato, root ) @@ -2544,6 +2605,19 @@ DRIVER_INIT_MEMBER(cclimber_state,dking) } +DRIVER_INIT_MEMBER(cclimber_state,rpatrol) +{ + UINT8 *rom = memregion( "maincpu" )->base(); + + /* Bits are inverted */ + for (int i = 0x0000; i < 0x5000; i++) + { + rom[i] = rom[i] ^ 0x79; + i++; + rom[i] = rom[i] ^ 0x5b; + } +} + GAME( 1980, cclimber, 0, cclimberx, cclimber, cclimber_state, cclimber, ROT0, "Nichibutsu", "Crazy Climber (US)", MACHINE_SUPPORTS_SAVE ) GAME( 1980, cclimberj, cclimber, cclimberx, cclimberj, cclimber_state,cclimberj,ROT0, "Nichibutsu", "Crazy Climber (Japan)", MACHINE_SUPPORTS_SAVE ) @@ -2576,15 +2650,15 @@ GAME( 1981, ckongpt2j, ckongpt2, cclimber, ckong, driver_device, 0, GAME( 1981, ckongpt2jeu, ckongpt2, cclimber, ckong, driver_device, 0, ROT270, "bootleg (Jeutel)", "Crazy Kong Part II (Jeutel bootleg)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, ckongpt2b, ckongpt2, cclimber, ckongb, cclimber_state, ckongb, ROT270, "bootleg", "Crazy Kong Part II (alternative levels)", MACHINE_SUPPORTS_SAVE ) -// see bagman.c for parent -GAME( 1981, bagmanf, bagman, cclimber, ckong, driver_device, 0, ROT270, "bootleg", "Bagman (bootleg on Crazy Kong hardware)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +// see bagman.cpp for parent +GAME( 1981, bagmanf, bagman, bagmanf, bagmanf, driver_device, 0, ROT270, "bootleg", "Bagman (bootleg on Crazy Kong hardware)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1981, rpatrol, 0, cclimber, rpatrol, driver_device, 0, ROT0, "Orca", "River Patrol (Japan)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) // TODO: encrypted, suicide battery on PCB +GAME( 1981, rpatrol, 0, cclimber, rpatrol, cclimber_state, rpatrol, ROT0, "Orca", "River Patrol (Japan)", MACHINE_SUPPORTS_SAVE) GAME( 1981, rpatrola, rpatrol, cclimber, rpatrol, driver_device, 0, ROT0, "bootleg", "River Patrol (bootleg set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, rpatrolb, rpatrol, cclimber, rpatrol, driver_device, 0, ROT0, "bootleg", "River Patrol (bootleg set 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, silvland, rpatrol, cclimber, rpatrol, driver_device, 0, ROT0, "Falcon", "Silver Land", MACHINE_SUPPORTS_SAVE ) -// see pacman.c for parent +// see pacman.cpp for parent GAME( 1985, cannonb, cannonbp, cannonb, cannonb, cclimber_state, cannonb, ROT90, "bootleg (Soft)", "Cannon Ball (bootleg on Crazy Kong hardware) (set 1, buggy)" , MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // bootleggers missed protection after bonus game GAME( 1985, cannonb2, cannonbp, cannonb, cannonb, cclimber_state, cannonb2, ROT90, "bootleg (TV Game Gruenberg)", "Cannon Ball (bootleg on Crazy Kong hardware) (set 2, buggy)", MACHINE_SUPPORTS_SAVE ) // bootleggers missed protection after bonus game GAME( 1985, cannonb3, cannonbp, cannonb, cannonb, cclimber_state, cannonb2, ROT90, "bootleg (Soft)", "Cannon Ball (bootleg on Crazy Kong hardware) (set 3, no bonus game)", MACHINE_SUPPORTS_SAVE ) // the bonus game is patched out, thus avoiding the protection issue diff --git a/src/mame/drivers/cdi.cpp b/src/mame/drivers/cdi.cpp index e2c984228e6..fb0bdbf47e4 100644 --- a/src/mame/drivers/cdi.cpp +++ b/src/mame/drivers/cdi.cpp @@ -143,35 +143,35 @@ INPUT_CHANGED_MEMBER(cdi_state::mcu_input) switch((FPTR)param) { case 0x39: - if(m_input1 && m_input1->read() & 0x01) send = true; + if (m_input1.read_safe(0) & 0x01) send = true; break; case 0x37: - if(m_input1 && m_input1->read() & 0x02) send = true; + if (m_input1.read_safe(0) & 0x02) send = true; break; case 0x31: - if(m_input1 && m_input1->read() & 0x04) send = true; + if (m_input1.read_safe(0) & 0x04) send = true; break; case 0x32: - if(m_input1 && m_input1->read() & 0x08) send = true; + if (m_input1.read_safe(0) & 0x08) send = true; break; case 0x33: - if(m_input1 && m_input1->read() & 0x10) send = true; + if (m_input1.read_safe(0) & 0x10) send = true; break; case 0x30: - if(m_input2 && m_input2->read() & 0x01) send = true; + if (m_input2.read_safe(0) & 0x01) send = true; break; case 0x38: - if(m_input2 && m_input2->read() & 0x02) send = true; + if (m_input2.read_safe(0) & 0x02) send = true; break; case 0x34: - if(m_input2 && m_input2->read() & 0x04) send = true; + if (m_input2.read_safe(0) & 0x04) send = true; break; case 0x35: - if(m_input2 && m_input2->read() & 0x08) send = true; + if (m_input2.read_safe(0) & 0x08) send = true; break; case 0x36: - if(m_input2 && m_input2->read() & 0x10) send = true; + if (m_input2.read_safe(0) & 0x10) send = true; break; } diff --git a/src/mame/drivers/chihiro.cpp b/src/mame/drivers/chihiro.cpp index 1ea32a63cb9..3632cd95872 100644 --- a/src/mame/drivers/chihiro.cpp +++ b/src/mame/drivers/chihiro.cpp @@ -13,6 +13,7 @@ Games on this system include.... |*| 20030224 | Crazy Taxi High Roller (Rev B) | Sega / Hitmaker | GDROM | GDX-0002B | 317-0353-COM | | | 2003 | Virtua Cop 3 | Sega | GDROM | GDX-0003 | 317-0354-COM | |*| 20030226 | Virtua Cop 3 (Rev A) | Sega | GDROM | GDX-0003A | 317-0354-COM | +|*| 20030521 | Virtua Cop 3 (Rev B) | Sega | GDROM | GDX-0003B | 317-0354-COM | | | 2003 | OutRun 2 | Sega | GDROM | GDX-0004 | 317-0372-COM | |*| 200312 | OutRun 2 (Rev A) | Sega | GDROM | GDX-0004A | 317-0372-COM | | | 2003 | OutRun 2 prototype (Rev P) | Sega | GDROM | GDX-0004P | | @@ -710,7 +711,7 @@ void chihiro_state::hack_eeprom() m_maincpu->space(0).write_byte(0x3b767, 0xc3); } -#define HACK_ITEMS 4 +#define HACK_ITEMS 5 static const struct { const char *game_name; const bool disable_usb; @@ -722,6 +723,7 @@ static const struct { { "outr2", true, { { 0x12e4cf, 0x01 }, { 0x12e4d0, 0x00 }, { 0x4793e, 0x01 }, { 0x4793f, 0x00 }, { 0x47aa3, 0x01 }, { 0x47aa4, 0x00 }, { 0x14f2b6, 0x84 }, { 0x14f2d1, 0x75 }, { 0x8732f, 0x7d }, { 0x87384, 0x7d }, { 0x87388, 0xeb }, { 0, 0 } } }, { "crtaxihr", false, { { 0x14ada5/*11fda5*/, 0x90 },{ 0x14ada6/*11fda6*/, 0x90 }, { 0, 0 } } }, { "ghostsqu", false, { { 0x78833/*4d833*/, 0x90 },{ 0x78834/*4d834*/, 0x90 }, { 0, 0 } } }, + { "vcop3", false, { { 0x61a23/*36a23*/, 0x90 },{ 0x61a24/*36a24*/, 0x90 }, { 0, 0 } } }, }; void chihiro_state::hack_usb() @@ -1723,7 +1725,7 @@ PIC 255-5508-354 317-0354-COM */ -ROM_START( vcop3 ) +ROM_START( vcop3a ) CHIHIRO_BIOS DISK_REGION( "gdrom" ) @@ -1733,6 +1735,16 @@ ROM_START( vcop3 ) ROM_LOAD("317-0354-com.data", 0x00, 0x50, CRC(df7e3217) SHA1(9f0f4bf6b15f3b6eeea81eaa27b3d25bd94110da) ) ROM_END +ROM_START( vcop3 ) + CHIHIRO_BIOS + + DISK_REGION( "gdrom" ) + DISK_IMAGE_READONLY( "gdx-0003b", 0, SHA1(4268aadb83c880d4f3dab1d43ddd0a3a2f8befa2) ) + + ROM_REGION( 0x50, "pic", ROMREGION_ERASE) + ROM_LOAD("317-0354-com.data", 0x00, 0x50, CRC(df7e3217) SHA1(9f0f4bf6b15f3b6eeea81eaa27b3d25bd94110da) ) +ROM_END + ROM_START( outr2 ) CHIHIRO_BIOS @@ -2044,7 +2056,8 @@ ROM_END // 0002A GAME( 2003, crtaxhra, crtaxihr, chihirogd, chihiro, driver_device, 0, ROT0, "Sega / Hitmaker", "Crazy Taxi High Roller (Rev A) (GDX-0002A)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) /* 0002B */ GAME( 2003, crtaxihr, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Sega / Hitmaker", "Crazy Taxi High Roller (Rev B) (GDX-0002B)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) // 0003 GAME( 2003, vcop3o, vcop3, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Virtua Cop 3 (GDX-0003)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) -/* 0003A */ GAME( 2003, vcop3, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Virtua Cop 3 (Rev A) (GDX-0003A)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) +/* 0003A */ GAME( 2003, vcop3a, vcop3, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Virtua Cop 3 (Rev A) (GDX-0003A)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) +/* 0003B */ GAME( 2003, vcop3, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Virtua Cop 3 (Rev B) (GDX-0003B)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) // 0004 GAME( 2003, outr2o, outr2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "OutRun 2 (GDX-0004)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING|MACHINE_SUPPORTS_SAVE ) /* 0004A */ GAME( 2003, outr2, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "OutRun 2 (Rev A) (GDX-0004A)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING|MACHINE_SUPPORTS_SAVE ) // 0005 GAME( 2004, sgolcnpt, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Golf Club Network Pro Tour (GDX-0005)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING|MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/cinemat.cpp b/src/mame/drivers/cinemat.cpp index 3273f5fef8f..2127fca0fa4 100644 --- a/src/mame/drivers/cinemat.cpp +++ b/src/mame/drivers/cinemat.cpp @@ -151,7 +151,7 @@ READ8_MEMBER(cinemat_state::joystick_read) else { int const xval = INT16(m_maincpu->state_int(CCPU_X) << 4) >> 4; - return (read_safe(ioport(m_mux_select ? "ANALOGX" : "ANALOGY"), 0) - xval) < 0x800; + return ((m_mux_select ? m_analog_x : m_analog_y).read_safe(0) - xval) < 0x800; } } diff --git a/src/mame/drivers/cobra.cpp b/src/mame/drivers/cobra.cpp index 37ea78dfa0c..8b440c98659 100644 --- a/src/mame/drivers/cobra.cpp +++ b/src/mame/drivers/cobra.cpp @@ -504,12 +504,16 @@ protected: private: int m_coin_counter[2]; + optional_ioport m_test_port; + optional_ioport_array<2> m_player_ports; }; const device_type COBRA_JVS = &device_creator; cobra_jvs::cobra_jvs(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : jvs_device(mconfig, COBRA_JVS, "JVS (COBRA)", tag, owner, clock, "cobra_jvs", __FILE__) + : jvs_device(mconfig, COBRA_JVS, "JVS (COBRA)", tag, owner, clock, "cobra_jvs", __FILE__), + m_test_port(*this, ":TEST"), + m_player_ports(*this, {":P1", ":P2"}) { m_coin_counter[0] = 0; m_coin_counter[1] = 0; @@ -551,13 +555,11 @@ bool cobra_jvs::switches(UINT8 *&buf, UINT8 count_players, UINT8 bytes_per_switc if (count_players > 2 || bytes_per_switch > 2) return false; - static const char* player_ports[2] = { ":P1", ":P2" }; - - *buf++ = read_safe(ioport(":TEST"), 0); + *buf++ = m_test_port.read_safe(0); for (int i=0; i < count_players; i++) { - UINT32 pval = read_safe(ioport(player_ports[i]), 0); + UINT32 pval = m_player_ports[i].read_safe(0); for (int j=0; j < bytes_per_switch; j++) { *buf++ = (UINT8)(pval >> ((1-j) * 8)); @@ -1728,7 +1730,7 @@ READ32_MEMBER(cobra_state::sub_unk1_r) WRITE32_MEMBER(cobra_state::sub_unk1_w) { /* - if (!(mem_mask & 0xff000000)) + if (!ACCESSING_BITS_24_31) { printf("%02X", data >> 24); ucount++; diff --git a/src/mame/drivers/coleco.cpp b/src/mame/drivers/coleco.cpp index dd4cec79202..84807970c66 100644 --- a/src/mame/drivers/coleco.cpp +++ b/src/mame/drivers/coleco.cpp @@ -231,18 +231,18 @@ READ8_MEMBER( coleco_state::cart_r ) UINT8 coleco_state::coleco_scan_paddles(UINT8 *joy_status0, UINT8 *joy_status1) { - UINT8 ctrl_sel = (m_ctrlsel != nullptr) ? m_ctrlsel->read() : 0; + UINT8 ctrl_sel = m_ctrlsel.read_safe(0); /* which controller shall we read? */ if ((ctrl_sel & 0x07) == 0x02) // Super Action Controller P1 - *joy_status0 = (m_sac_slide1 != nullptr) ? m_sac_slide1->read() : 0; + *joy_status0 = m_sac_slide1.read_safe(0); else if ((ctrl_sel & 0x07) == 0x03) // Driving Controller P1 - *joy_status0 = (m_driv_wheel1 != nullptr) ? m_driv_wheel1->read() : 0; + *joy_status0 = m_driv_wheel1.read_safe(0); if ((ctrl_sel & 0x70) == 0x20) // Super Action Controller P2 - *joy_status1 = (m_sac_slide2 != nullptr) ? m_sac_slide2->read() : 0; + *joy_status1 = m_sac_slide2.read_safe(0); else if ((ctrl_sel & 0x70) == 0x30) // Driving Controller P2 - *joy_status1 = (m_driv_wheel2 != nullptr) ? m_driv_wheel2->read() : 0; + *joy_status1 = m_driv_wheel2.read_safe(0); /* In principle, even if not supported by any game, I guess we could have two Super Action Controllers plugged into the Roller controller ports. Since I found no info @@ -250,8 +250,8 @@ UINT8 coleco_state::coleco_scan_paddles(UINT8 *joy_status0, UINT8 *joy_status1) the Roller trackball inputs and actually use the latter ones, when both are selected. */ if (ctrl_sel & 0x80) // Roller controller { - *joy_status0 = (m_roller_x != nullptr) ? m_roller_x->read() : 0; - *joy_status1 = (m_roller_y != nullptr) ? m_roller_y->read() : 0; + *joy_status0 = m_roller_x.read_safe(0); + *joy_status1 = m_roller_y.read_safe(0); } return *joy_status0 | *joy_status1; @@ -260,7 +260,7 @@ UINT8 coleco_state::coleco_scan_paddles(UINT8 *joy_status0, UINT8 *joy_status1) UINT8 coleco_state::coleco_paddle_read(int port, int joy_mode, UINT8 joy_status) { - UINT8 ctrl_sel = (m_ctrlsel != nullptr ) ? m_ctrlsel->read() : 0; + UINT8 ctrl_sel = m_ctrlsel.read_safe(0); UINT8 ctrl_extra = ctrl_sel & 0x80; ctrl_sel = ctrl_sel >> (port*4) & 7; diff --git a/src/mame/drivers/combatsc.cpp b/src/mame/drivers/combatsc.cpp index e9addf5066b..2f241304d4f 100644 --- a/src/mame/drivers/combatsc.cpp +++ b/src/mame/drivers/combatsc.cpp @@ -268,13 +268,12 @@ READ8_MEMBER(combatsc_state::trackball_r) if (offset == 0) { int i, dir[4]; - static const char *const tracknames[] = { "TRACK0_Y", "TRACK0_X", "TRACK1_Y", "TRACK1_X" }; for (i = 0; i < 4; i++) { UINT8 curr; - curr = read_safe(ioport(tracknames[i]), 0xff); + curr = m_track_ports[i].read_safe(0xff); dir[i] = curr - m_pos[i]; m_sign[i] = dir[i] & 0x80; diff --git a/src/mame/drivers/cops.cpp b/src/mame/drivers/cops.cpp index 307f77bff26..c0b862a2677 100644 --- a/src/mame/drivers/cops.cpp +++ b/src/mame/drivers/cops.cpp @@ -2,7 +2,7 @@ // copyright-holders:Mariusz Wojcieszek, James Wallace /*************************************************************************** - Nova 'LaserMax'/Atari Games Cops + Nova Laserdisc Games/Atari Games COPS (hardware developed by Nova Productions Limited) Preliminary driver by Mariusz Wojcieszek, James Wallace @@ -10,15 +10,23 @@ Bad Boys by Inner Circle, so there is musical accompaniment to areas where the laserdisc audio is muted. - NOTES: To boot up Revelations, turn the refill key (R) and press button A. - TODO: There are probably more ROMs for Revelations, the disc contains - full data for a picture based memory game called 'Vision Quest'. - - LaserMax memory map needs sorting out, Cops uses a subset of what's - actually available + The different games here have subtly different control PCBs COPS has an Atari + part number (58-12B), while Revelations simply refers to a Lasermax control PCB + (Lasermax being the consumer name for the LDP series) + + NOTES: To boot up Revelations, turn the refill key (R) and press button A + to init NVRAM. + + TODO: There are probably more ROMs for Revelations and related, the disc + contains full data for a picture based memory game called 'Vision Quest'. + However, the Vision Quest Laserdisc is slightly different, with Revelations + specific data seemingly replaced with black level. The UK version COPS appears to want to communicate with the LDP in a - different way. + different way, passing illegal commands, need to verify this is the same + player. + + This should be similar hardware for Street Viper if we get a dump. ***************************************************************************/ @@ -26,13 +34,15 @@ #include "cpu/m6502/m6502.h" #include "machine/6522via.h" #include "sound/sn76496.h" +#include "machine/msm6242.h" +#include "machine/ldp1450.h" -//#include "machine/mos6551.h" +#include "machine/mos6551.h" #include "cops.lh" -#define LOG_CDROM 0 -#define LOG_DACIA 0 +#define LOG_CDROM 1 +#define LOG_DACIA 1 #define CMP_REGISTER 0 #define AUX_REGISTER 1 @@ -46,12 +56,14 @@ public: : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_sn(*this, "snsnd"), + m_ld(*this, "laserdisc"), m_irq(0) { } // devices required_device m_maincpu; required_device m_sn; + required_device m_ld; // screen updates UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -66,14 +78,18 @@ protected: public: DECLARE_WRITE8_MEMBER(io1_w); DECLARE_READ8_MEMBER(io1_r); + DECLARE_READ8_MEMBER(io1_lm_r); DECLARE_WRITE8_MEMBER(io2_w); DECLARE_READ8_MEMBER(io2_r); + DECLARE_READ8_MEMBER(ldstatus_r); + DECLARE_WRITE_LINE_MEMBER(dacia_irq); + DECLARE_WRITE_LINE_MEMBER(ld_w); DECLARE_WRITE_LINE_MEMBER(via1_irq); DECLARE_WRITE_LINE_MEMBER(via2_irq); - void dacia_receive(UINT8 data); - void update_dacia_irq(); - DECLARE_WRITE8_MEMBER(dacia_w); - DECLARE_READ8_MEMBER(dacia_r); + void dacia_receive(UINT8 data); + void update_dacia_irq(); + DECLARE_WRITE8_MEMBER(dacia_w); + DECLARE_READ8_MEMBER(dacia_r); DECLARE_WRITE8_MEMBER(via1_b_w); DECLARE_WRITE8_MEMBER(via1_cb1_w); DECLARE_WRITE8_MEMBER(cdrom_data_w); @@ -85,26 +101,46 @@ public: UINT8 m_lcd_addr_l, m_lcd_addr_h; UINT8 m_lcd_data_l, m_lcd_data_h; - UINT8 m_dacia_irq1_reg; - UINT8 m_dacia_rts1; - UINT8 m_dacia_dtr1; + UINT8 m_dacia_irq1_reg; + UINT8 m_dacia_rts1; + UINT8 m_dacia_dtr1; + UINT8 m_parity_1; UINT8 m_parity_mode_1; UINT8 m_bpc_1; - int m_dacia_ic_div_1; - UINT8 m_dacia_echo1; - UINT8 m_dacia_stp_1; - UINT8 m_dacia_reg1; - UINT8 m_dacia_fe1; - UINT8 m_dacia_cmp1; - UINT8 m_dacia_cmpval1; + int m_dacia_ic_div_1; + UINT8 m_dacia_echo1; + UINT8 m_dacia_stp_1; + UINT8 m_dacia_reg1; + UINT8 m_dacia_fe1; + UINT8 m_dacia_cmp1; + UINT8 m_dacia_cmpval1; - UINT8 m_dacia_cts; - UINT8 m_dacia_dcd; - UINT8 m_dacia_trans; + UINT8 m_dacia_irq2_reg; + UINT8 m_dacia_rts2; + UINT8 m_dacia_dtr2; - UINT8 m_dacia_receiver_data; - UINT8 m_dacia_receiver_full; + UINT8 m_parity_2; + UINT8 m_parity_mode_2; + UINT8 m_bpc_2; + int m_dacia_ic_div_2; + UINT8 m_dacia_echo2; + UINT8 m_dacia_stp_2; + UINT8 m_dacia_reg2; + UINT8 m_dacia_fe2; + UINT8 m_dacia_cmp2; + UINT8 m_dacia_cmpval2; + + UINT8 m_dacia_cts; + UINT8 m_dacia_dcd; + UINT8 m_dacia_trans; + UINT8 m_dacia_trans2; + + UINT8 m_dacia_receiver_data; + UINT8 m_dacia_receiver_full; + + UINT8 m_dacia_receiver_data2; + UINT8 m_dacia_receiver_full2; UINT8 m_cdrom_ctrl; UINT8 m_cdrom_data; @@ -113,28 +149,17 @@ public: UINT8 m_sn_cb1; // LDP-1450 - UINT8 m_ld_command_to_send[5]; - UINT8 m_ld_command_total_bytes; - UINT8 m_ld_command_current_byte; - UINT8 m_ld_frame[5]; - UINT8 m_ld_frame_index; emu_timer *m_ld_timer; TIMER_CALLBACK_MEMBER(ld_timer_callback); - enum LD_INPUT_STATE - { - LD_INPUT_GET_COMMAND = 0, - LD_INPUT_TEXT_COMMAND, - LD_INPUT_TEXT_GET_X, - LD_INPUT_TEXT_GET_Y, - LD_INPUT_TEXT_GET_MODE, - LD_INPUT_TEXT_GET_STRING, - LD_INPUT_TEXT_GET_SET_WINDOW - } m_ld_input_state; + UINT8 m_ld_command_to_send[8]; + UINT8 m_ld_command_current_byte; + UINT8 ldcount=0; + UINT8 lddata; UINT8 generate_isr(); - void laserdisc_w(UINT8 data); + UINT8 generate_isr2(); +// void laserdisc_w(UINT8 data); void laserdisc_response_w(UINT8 data); - DECLARE_PALETTE_INIT( cops ); }; const int timer_divide_select[16] = @@ -199,9 +224,15 @@ READ8_MEMBER(cops_state::cdrom_data_r) * *************************************/ +READ8_MEMBER(cops_state::ldstatus_r) +{ + return m_ld->status_r(); +} + TIMER_CALLBACK_MEMBER(cops_state::ld_timer_callback) { m_dacia_receiver_full = 1; + int m_ld_command_total_bytes =8; if ( m_ld_command_current_byte < m_ld_command_total_bytes ) { @@ -214,16 +245,22 @@ TIMER_CALLBACK_MEMBER(cops_state::ld_timer_callback) } } -void cops_state::laserdisc_response_w(UINT8 data) +WRITE_LINE_MEMBER(cops_state::ld_w) { - if ( m_ld_command_total_bytes >= 5 ) - { - logerror( "LD Overflow!\n" ); - } - m_ld_command_to_send[m_ld_command_total_bytes++] = data; -} + lddata <<= 1; -void cops_state::laserdisc_w(UINT8 data) + if ( state ) lddata |= 1; + + if ( ++ldcount >= 8 ) + { + ldcount = 0; + lddata = 0; + printf("LDBYTE %d",lddata); + } + + printf("LDBIT %d",state); +} +/*void cops_state::laserdisc_w(UINT8 data) { switch( m_ld_input_state ) { @@ -245,111 +282,10 @@ void cops_state::laserdisc_w(UINT8 data) m_ld_input_state = LD_INPUT_GET_COMMAND; } break; - case LD_INPUT_TEXT_COMMAND: - case LD_INPUT_GET_COMMAND: - { - switch( data ) - { - case 0x00: /* text handling (start gotoxy) */ - if ( m_ld_input_state == LD_INPUT_TEXT_COMMAND ) - { - m_ld_input_state = LD_INPUT_TEXT_GET_X; - } - break; - case 0x01: /* text handling (end of text)*/ - if ( m_ld_input_state == LD_INPUT_TEXT_COMMAND ) - { - m_ld_input_state = LD_INPUT_TEXT_GET_STRING; - } - break; - case 0x02: /* text 'set window' command */ - if ( m_ld_input_state == LD_INPUT_TEXT_COMMAND ) - { - m_ld_input_state = LD_INPUT_TEXT_GET_SET_WINDOW; - } - break; - case 0x1a: /* text sent */ - break; - case 0x24: /* Audio On */ - laserdisc_response_w(0x0a); - break; - case 0x26: /* Video off */ - laserdisc_response_w(0x0a); - break; - case 0x27: /* Video on */ - laserdisc_response_w(0x0a); - break; - case 0x30: /* Digit */ - case 0x31: - case 0x32: - case 0x33: - case 0x34: - case 0x35: - case 0x36: - case 0x37: - case 0x38: - case 0x39: - if ( m_ld_frame_index >= 5 ) - { - m_ld_frame_index = 0; - } - m_ld_frame[m_ld_frame_index++] = data; - laserdisc_response_w(0x0a); - break; - case 0x3a: /* Play (answer should have delay) */ - laserdisc_response_w(0x0a); - break; - case 0x3f: /* Stop */ - laserdisc_response_w(0x0a); - break; - case 0x40: /* Enter */ - laserdisc_response_w(0x0a); - break; - case 0x43: /* Search */ - laserdisc_response_w(0x0a); - break; - case 0x46: /* Channel 1 on */ - laserdisc_response_w(0x0a); - break; - case 0x47: /* Channel 1 off */ - laserdisc_response_w(0x0a); - break; - case 0x48: /* Channel 2 on */ - laserdisc_response_w(0x0a); - break; - case 0x49: /* Channel 2 off */ - laserdisc_response_w(0x0a); - break; - case 0x4f: /* Still */ - laserdisc_response_w(0x0a); - break; - case 0x55: /* 'frame mode' (unknown function) */ - break; - case 0x56: /* C. L. (Reset) */ - m_ld_input_state = LD_INPUT_GET_COMMAND; - laserdisc_response_w(0x0a); - break; - case 0x60: /* Addr Inq (get current frame number) */ - for (auto & elem : m_ld_frame) - { - laserdisc_response_w(elem); - } - break; - case 0x80: /* text start */ - m_ld_input_state = LD_INPUT_TEXT_COMMAND; - break; - case 0x81: /* Turn on text */ - break; - case 0x82: /* Turn off text */ - break; - default: - logerror("Laserdisc command %02x\n", data); - break; - } } break; } -} +}*/ /************************************* * @@ -357,51 +293,72 @@ void cops_state::laserdisc_w(UINT8 data) * *************************************/ - void cops_state::update_dacia_irq() +void cops_state::update_dacia_irq() { UINT8 isr = generate_isr(); //remove bits isr &= ~m_dacia_irq1_reg; - m_maincpu->set_input_line(INPUT_LINE_NMI, isr? ASSERT_LINE:CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, isr? ASSERT_LINE:CLEAR_LINE); + + UINT8 isr2 = generate_isr2(); + //remove bits + isr2 &= ~m_dacia_irq2_reg; + m_maincpu->set_input_line(INPUT_LINE_NMI, isr2? ASSERT_LINE:CLEAR_LINE); + } void cops_state::dacia_receive(UINT8 data) { - if (m_dacia_cmp1) - { - if (m_dacia_cmpval1 == data) - { - m_dacia_receiver_data = data; - m_dacia_receiver_full = 1; - update_dacia_irq(); - m_dacia_cmp1 =0; - m_dacia_cts =1; - m_dacia_trans =1; - } - } - else - { - m_dacia_receiver_data = data; - m_dacia_receiver_full = 1; - update_dacia_irq(); - m_dacia_cts =1; - m_dacia_trans =1; - } + if (m_dacia_cmp1) + { + if (m_dacia_cmpval1 == data) + { + m_dacia_receiver_data = data; + m_dacia_receiver_full = 1; + update_dacia_irq(); + m_dacia_cmp1 =0; + m_dacia_cts =1; + m_dacia_trans =1; + } + } + else + { + m_dacia_receiver_data = data; + m_dacia_receiver_full = 1; + update_dacia_irq(); + m_dacia_cts =1; + m_dacia_trans =1; + } } UINT8 cops_state::generate_isr() { - UINT8 isr =0; + UINT8 isr =0; - isr |= m_dacia_receiver_full; - isr |= (m_dacia_cmp1 << 1); - isr |= (m_dacia_trans <<4); + isr |= m_dacia_receiver_full; + isr |= (m_dacia_cmp1 << 1); + isr |= (m_dacia_trans <<4); - if (isr) - { - isr |= 0x40; - } - return isr; + if (isr) + { + isr |= 0x40; + } + return isr; +} + +UINT8 cops_state::generate_isr2() +{ + UINT8 isr2 =0; + + isr2 |= m_dacia_receiver_full2; + isr2 |= (m_dacia_cmp2 << 1); + isr2 |= (m_dacia_trans2 <<4); + + if (isr2) + { + isr2 |= 0x40; + } + return isr2; } READ8_MEMBER(cops_state::dacia_r) @@ -428,11 +385,42 @@ READ8_MEMBER(cops_state::dacia_r) } case 3: /* RDR1: Receive data register */ + { m_dacia_receiver_full = 0; m_dacia_fe1=0; - if (LOG_DACIA) logerror("RDR1 %02x\n",m_dacia_receiver_data); - return m_dacia_receiver_data; - default: + +// if (LOG_DACIA) logerror("RDR1 %02x\n",m_dacia_receiver_data); + if (LOG_DACIA) logerror("RDR1 %02x\n",m_ld->status_r()); + return m_ld->status_r(); + } + case 4: /* ISR2: Interrupt Status Register */ + { + UINT8 isr2 = generate_isr2(); + m_dacia_trans2 =0; + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); + return isr2; + } + + case 5: /* CSR2: Control Status Register */ + { + UINT8 csr2 =0; + csr2 |= m_dacia_rts2; + csr2 |= (m_dacia_dtr2 << 1); + csr2 |= (m_dacia_cts <<4); + csr2 |= (m_dacia_fe2 <<7); + if (LOG_DACIA) logerror("CSR2 %02x\n",csr2); + return csr2; + } + + case 7: /* RDR2: Receive data register */ + m_dacia_receiver_full2 = 0; + m_dacia_fe2=0; + + if (LOG_DACIA) logerror("RDR2 %02x\n",m_ld->status_r()); + return m_ld->status_r(); + + + default: if (LOG_DACIA) logerror("%s:dacia_r(%02x)\n", machine().describe_context(), offset); return 0; } @@ -485,7 +473,7 @@ WRITE8_MEMBER(cops_state::dacia_w) } if (LOG_DACIA) logerror("DACIA TIME %02d\n", XTAL_3_6864MHz / m_dacia_ic_div_1); - m_ld_timer->adjust(attotime::from_hz(XTAL_3_6864MHz / m_dacia_ic_div_1), 0, attotime::from_hz(XTAL_3_6864MHz / m_dacia_ic_div_1)); +// m_ld_timer->adjust(attotime::from_hz(XTAL_3_6864MHz / m_dacia_ic_div_1), 0, attotime::from_hz(XTAL_3_6864MHz / m_dacia_ic_div_1)); if (LOG_DACIA) logerror("DACIA Ctrl Register: %02x\n", data); @@ -507,15 +495,88 @@ WRITE8_MEMBER(cops_state::dacia_w) } } case 3: /* Transmit Data Register 1 */ + { if (LOG_DACIA) logerror("DACIA Transmit: %02x %c\n", data, (char)data); - laserdisc_w(data); + m_ld->command_w(data); break; - default: - if (LOG_DACIA) logerror("%s:dacia_w(%02x,%02x)\n", machine().describe_context(), offset, data); + } + case 4: /* IRQ enable Register 2 */ + { + m_dacia_irq2_reg &= ~0x80; + + if (data & 0x80) //enable bits + { + m_dacia_irq2_reg |= (data & 0x7f); + } + else // disable bits + { + m_dacia_irq2_reg &= ~(data & 0x7f); + } + if (LOG_DACIA) logerror("DACIA IRQ 2 Register: %02x\n", m_dacia_irq2_reg); + update_dacia_irq(); break; + } + + case 5: /* Control / Format Register 2 */ + { + if (data & 0x80) //Format Register + { + m_dacia_rts2 = (data & 0x01); + m_dacia_dtr2 = (data & 0x02 ? 1:0); + m_parity_2 = (data & 0x04); + m_parity_mode_2 = ((data & 0x18) >> 3); + m_bpc_2 = ((data & 0x60) >> 5) +5; + if (LOG_DACIA) logerror("DACIA Format Register 2: %02x\n", data); + } + else // Control register + { + m_dacia_ic_div_2 = timer_divide_select[data & 0x15]; + m_dacia_echo2 = (data & 0x10); + m_dacia_stp_2 = (data & 0x20 ? 2:1); + if (data & 0x40) + { + m_dacia_reg2 = AUX_REGISTER; + } + else + { + m_dacia_reg2 = CMP_REGISTER; + } + if (LOG_DACIA) logerror("DACIA TIME 2 %02d\n", XTAL_3_6864MHz / m_dacia_ic_div_1); + + m_ld_timer->adjust(attotime::from_hz(XTAL_3_6864MHz / m_dacia_ic_div_2), 0, attotime::from_hz(XTAL_3_6864MHz / m_dacia_ic_div_2)); + + if (LOG_DACIA) logerror("DACIA Ctrl Register 2: %02x\n", data); + + } + break; + } + case 6: /* Compare / Aux Ctrl Register 2 */ + { + if (m_dacia_reg2 == CMP_REGISTER) + { + m_dacia_cmp2 =1; + m_dacia_cmpval2=data; + if (LOG_DACIA) logerror("DACIA Compare mode 2: %02x \n", data); +// update_dacia_irq(); + } + else + { + if (LOG_DACIA) logerror("DACIA Aux ctrl 2: %02x \n", data); + } + } + case 7: /* Transmit Data Register 2 */ + { + if (LOG_DACIA) logerror("DACIA Transmit 2: %02x %c\n", data, (char)data); + + // for (int i=0; i <8; i++) + { + // m_ld_command_to_send[i] = data & (1<command_w(data); + break; + } } } - /************************************* * * I/O @@ -538,6 +599,24 @@ READ8_MEMBER(cops_state::io1_r) } } +READ8_MEMBER(cops_state::io1_lm_r) +{ + switch( offset & 0x0f ) + { + case 0x07: /* WDI */ + return 1; + case 0x08: /* SW0 */ + return ioport("SW0")->read(); + case 0x09: /* SW1 */ + return ioport("SW1")->read(); + case 0x0a: /* SW2 */ + return ioport("SW2")->read(); + default: + logerror("Unknown io1_r, offset = %03x\n", offset); + return 0; + } +} + WRITE8_MEMBER(cops_state::io1_w) { int i; @@ -653,7 +732,7 @@ WRITE8_MEMBER(cops_state::io2_w) * * VIA 1 (U18) * PA0-2 Steer - * PA3 ? + * PA3 Shake motor? * PA4-6 Fade? * PA7 STK (system rom banking) * PB0-7 SN76489 data bus @@ -726,13 +805,21 @@ static ADDRESS_MAP_START( cops_map, AS_PROGRAM, 8, cops_state ) AM_RANGE(0xb000, 0xb00f) AM_DEVREADWRITE("via6522_1", via6522_device, read, write) /* VIA 1 */ AM_RANGE(0xb800, 0xb80f) AM_DEVREADWRITE("via6522_2", via6522_device, read, write) /* VIA 2 */ AM_RANGE(0xc000, 0xcfff) AM_READWRITE(io2_r, io2_w) -// AM_RANGE(0xd000, 0xd003) AM_DEVREADWRITE("acia6551_1", mos6551_device, read, write ) -// AM_RANGE(0xd004, 0xd007) AM_DEVREADWRITE("acia6551_2", mos6551_device, read, write ) AM_RANGE(0xd000, 0xd007) AM_READWRITE(dacia_r, dacia_w) AM_RANGE(0xd800, 0xd80f) AM_DEVREADWRITE("via6522_3", via6522_device, read, write) /* VIA 3 */ AM_RANGE(0xe000, 0xffff) AM_ROMBANK("sysbank1") ADDRESS_MAP_END +static ADDRESS_MAP_START( revlatns_map, AS_PROGRAM, 8, cops_state ) + AM_RANGE(0x0000, 0x1fff) AM_RAM + AM_RANGE(0x2000, 0x9fff) AM_ROM AM_REGION("program", 0) + AM_RANGE(0xa000, 0xafff) AM_READWRITE(io1_lm_r, io1_w) + AM_RANGE(0xb000, 0xb00f) AM_DEVREADWRITE("via6522_1", via6522_device, read, write) /* VIA 1 */ + AM_RANGE(0xc000, 0xc00f) AM_DEVREADWRITE("rtc", msm6242_device, read, write) + AM_RANGE(0xd000, 0xd007) AM_READWRITE(dacia_r, dacia_w) + AM_RANGE(0xe000, 0xffff) AM_ROMBANK("sysbank1") +ADDRESS_MAP_END + static INPUT_PORTS_START( cops ) PORT_START("SW0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Switch A") PORT_CODE(KEYCODE_A) PORT_IMPULSE(1) @@ -795,7 +882,6 @@ INPUT_PORTS_END void cops_state::machine_start() { m_ld_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(cops_state::ld_timer_callback),this)); - m_dacia_ic_div_1 = timer_divide_select[0]; m_ld_timer->adjust(attotime::from_hz(167*5), 0, attotime::from_hz(167*5)); } @@ -805,7 +891,7 @@ void cops_state::machine_reset() m_irq = 0; m_lcd_addr_l = m_lcd_addr_h = 0; m_lcd_data_l = m_lcd_data_h = 0; - + m_dacia_cts = 0; m_dacia_dcd = 0; @@ -814,16 +900,9 @@ void cops_state::machine_reset() m_dacia_dtr1 = 1; m_dacia_fe1 = 1; m_dacia_receiver_full = 1; - m_ld_input_state = LD_INPUT_GET_COMMAND; - m_ld_command_current_byte = m_ld_command_total_bytes = 0; - m_ld_frame_index = 0; } -PALETTE_INIT_MEMBER( cops_state,cops ) -{ -} - DRIVER_INIT_MEMBER(cops_state,cops) { //The hardware is designed and programmed to use multiple system ROM banks, but for some reason it's hardwired to bank 2. @@ -840,16 +919,8 @@ static MACHINE_CONFIG_START( cops, cops_state ) MCFG_CPU_PROGRAM_MAP(cops_map) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_UPDATE_DRIVER(cops_state, screen_update) - MCFG_SCREEN_SIZE(32*8, 32*8) - MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_PALETTE("palette") - - MCFG_PALETTE_ADD("palette", 8) - MCFG_PALETTE_INIT_OWNER(cops_state,cops) + MCFG_LASERDISC_LDP1450_ADD("laserdisc",9600) + MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") /* via */ MCFG_DEVICE_ADD("via6522_1", VIA6522, 0) @@ -865,9 +936,7 @@ static MACHINE_CONFIG_START( cops, cops_state ) MCFG_VIA6522_WRITEPA_HANDLER(WRITE8(cops_state, cdrom_data_w)) MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(cops_state, cdrom_ctrl_w)) - /* acia */ -// MCFG_MOS6551_ADD("acia6551_1", XTAL_1_8432MHz, nullptr) -// MCFG_MOS6551_ADD("acia6551_2", XTAL_1_8432MHz, nullptr) + /* acia (really a 65C52)*/ /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -879,6 +948,35 @@ static MACHINE_CONFIG_START( cops, cops_state ) MACHINE_CONFIG_END +static MACHINE_CONFIG_START( revlatns, cops_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu",M6502,MAIN_CLOCK/2) + MCFG_CPU_PROGRAM_MAP(revlatns_map) + + /* video hardware */ + MCFG_LASERDISC_LDP1450_ADD("laserdisc",9600) + MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") + + /* via */ + MCFG_DEVICE_ADD("via6522_1", VIA6522, 0) + MCFG_VIA6522_IRQ_HANDLER(WRITELINE(cops_state, via1_irq)) + MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(cops_state, via1_b_w)) + MCFG_VIA6522_CB1_HANDLER(WRITE8(cops_state, via1_cb1_w)) + + MCFG_DEVICE_ADD("rtc", MSM6242, XTAL_32_768kHz) + + /* acia (really a 65C52)*/ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + + /* TODO: Verify clock */ + MCFG_SOUND_ADD("snsnd", SN76489, MAIN_CLOCK/2) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) + +MACHINE_CONFIG_END + /*************************************************************************** Game driver(s) @@ -893,10 +991,10 @@ ROM_START( cops ) ROM_LOAD( "cops_sys.dat", 0x0000, 0x8000, CRC(0060e5d0) SHA1(b8c9f6fde6a315e33fa7946e5d3bb4ea2fbe76a8) ) DISK_REGION( "audiocd" ) - DISK_IMAGE_READONLY( "copscd", 0, NO_DUMP ) + DISK_IMAGE_READONLY( "copscd", 0, NO_DUMP ) DISK_REGION( "laserdisc" ) - DISK_IMAGE_READONLY( "cops", 0, NO_DUMP ) + DISK_IMAGE_READONLY( "cops", 0, NO_DUMP ) ROM_END ROM_START( copsuk ) @@ -907,10 +1005,10 @@ ROM_START( copsuk ) ROM_LOAD( "cops_sys.dat", 0x0000, 0x8000, CRC(0060e5d0) SHA1(b8c9f6fde6a315e33fa7946e5d3bb4ea2fbe76a8) ) DISK_REGION( "audiocd" ) - DISK_IMAGE_READONLY( "copscd", 0, NO_DUMP ) + DISK_IMAGE_READONLY( "copscd", 0, NO_DUMP ) DISK_REGION( "laserdisc" ) - DISK_IMAGE_READONLY( "cops", 0, NO_DUMP ) + DISK_IMAGE_READONLY( "copsld", 0, NO_DUMP ) ROM_END ROM_START( revlatns ) @@ -921,10 +1019,10 @@ ROM_START( revlatns ) ROM_LOAD( "revelations_sys.bin", 0x0000, 0x8000, CRC(43e5e3ec) SHA1(fa44b102b5aa7ad2421c575abdc67f1c29f23bc1) ) DISK_REGION( "laserdisc" ) - DISK_IMAGE_READONLY( "revlatns", 0, NO_DUMP ) + DISK_IMAGE_READONLY( "revlatns", 0, NO_DUMP ) ROM_END GAMEL( 1994, cops, 0, cops, cops, cops_state, cops, ROT0, "Atari Games", "Cops (USA)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND, layout_cops ) GAMEL( 1994, copsuk, cops,cops, cops, cops_state, cops, ROT0, "Nova Productions / Deith Leisure","Cops (UK)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND, layout_cops ) -GAMEL( 1994, revlatns, 0, cops, revlatns, cops_state, cops, ROT0, "Nova Productions", "Revelations", MACHINE_NOT_WORKING | MACHINE_NO_SOUND, layout_cops ) +GAMEL( 1994, revlatns, 0, revlatns, revlatns, cops_state, cops, ROT0, "Nova Productions", "Revelations", MACHINE_NOT_WORKING | MACHINE_NO_SOUND, layout_cops ) diff --git a/src/mame/drivers/cosmic.cpp b/src/mame/drivers/cosmic.cpp index b896be46641..7aba45dcd58 100644 --- a/src/mame/drivers/cosmic.cpp +++ b/src/mame/drivers/cosmic.cpp @@ -324,12 +324,12 @@ READ8_MEMBER(cosmic_state::cosmica_pixel_clock_r) READ8_MEMBER(cosmic_state::cosmicg_port_0_r) { /* The top four address lines from the CRTC are bits 0-3 */ - return (ioport("IN0")->read() & 0xf0) | ((m_screen->vpos() & 0xf0) >> 4); + return (m_in_ports[0]->read() & 0xf0) | ((m_screen->vpos() & 0xf0) >> 4); } READ8_MEMBER(cosmic_state::magspot_coinage_dip_r) { - return (read_safe(ioport("DSW"), 0) & (1 << (7 - offset))) ? 0 : 1; + return (m_dsw.read_safe(0) & (1 << (7 - offset))) ? 0 : 1; } @@ -337,8 +337,8 @@ READ8_MEMBER(cosmic_state::magspot_coinage_dip_r) READ8_MEMBER(cosmic_state::nomnlnd_port_0_1_r) { - int control = ioport(offset ? "IN1" : "IN0")->read(); - int fire = ioport("IN3")->read(); + int control = m_in_ports[offset]->read(); + int fire = m_in_ports[3]->read(); /* If firing - stop tank */ if ((fire & 0xc0) == 0) return 0xff; diff --git a/src/mame/drivers/cosmicos.cpp b/src/mame/drivers/cosmicos.cpp index 96d29ff341f..6c97e09e722 100644 --- a/src/mame/drivers/cosmicos.cpp +++ b/src/mame/drivers/cosmicos.cpp @@ -456,12 +456,6 @@ void cosmicos_state::machine_start() /* initialize LED display */ m_led->rbi_w(1); - // find keyboard rows - m_key_row[0] = m_y1; - m_key_row[1] = m_y2; - m_key_row[2] = m_y3; - m_key_row[3] = m_y4; - /* register for state saving */ save_item(NAME(m_wait)); save_item(NAME(m_clear)); diff --git a/src/mame/drivers/cp1.cpp b/src/mame/drivers/cp1.cpp index 090aa7706a1..77034027b8d 100644 --- a/src/mame/drivers/cp1.cpp +++ b/src/mame/drivers/cp1.cpp @@ -28,11 +28,7 @@ public: m_i8155(*this, "i8155"), m_i8155_cp3(*this, "i8155_cp3"), m_cassette(*this, "cassette"), - m_io_line0(*this, "LINE0"), - m_io_line1(*this, "LINE1"), - m_io_line2(*this, "LINE2"), - m_io_line3(*this, "LINE3"), - m_io_line4(*this, "LINE4"), + m_io_lines(*this, {"LINE0", "LINE1", "LINE2", "LINE3", "LINE4"}), m_io_config(*this, "CONFIG") { } @@ -40,11 +36,7 @@ public: required_device m_i8155; required_device m_i8155_cp3; required_device m_cassette; - required_ioport m_io_line0; - required_ioport m_io_line1; - required_ioport m_io_line2; - required_ioport m_io_line3; - required_ioport m_io_line4; + required_ioport_array<5> m_io_lines; required_ioport m_io_config; virtual void machine_reset() override; @@ -99,12 +91,11 @@ READ8_MEMBER(cp1_state::port2_r) // ---x ---- I8155 CE // ---- xxxx keyboard input - ioport_port* portnames[] = { m_io_line0, m_io_line1, m_io_line2, m_io_line3, m_io_line4 }; UINT8 data = 0; for(int i=0; i<5; i++) if (!(m_matrix & (1<read(); + data |= m_io_lines[i]->read(); return (data & 0x0f) | (m_port2 & 0xf0); } diff --git a/src/mame/drivers/crystal.cpp b/src/mame/drivers/crystal.cpp index ebe604fbe48..ec80ebaa415 100644 --- a/src/mame/drivers/crystal.cpp +++ b/src/mame/drivers/crystal.cpp @@ -318,7 +318,7 @@ READ32_MEMBER(crystal_state::FlipCount_r) WRITE32_MEMBER(crystal_state::FlipCount_w) { - if (mem_mask & 0x00ff0000) + if (ACCESSING_BITS_16_23) { int fc = (data >> 16) & 0xff; if (fc == 1) @@ -351,14 +351,14 @@ WRITE32_MEMBER(crystal_state::IntAck_w) { UINT32 IntPend = space.read_dword(0x01800c0c); - if (mem_mask & 0xff) + if (ACCESSING_BITS_0_7) { IntPend &= ~(1 << (data & 0x1f)); space.write_dword(0x01800c0c, IntPend); if (!IntPend) m_maincpu->set_input_line(SE3208_INT, CLEAR_LINE); } - if (mem_mask & 0xff00) + if (ACCESSING_BITS_8_15) m_IntHigh = (data >> 8) & 7; } diff --git a/src/mame/drivers/cubo.cpp b/src/mame/drivers/cubo.cpp index 127a94f18f6..010c59a762e 100644 --- a/src/mame/drivers/cubo.cpp +++ b/src/mame/drivers/cubo.cpp @@ -326,12 +326,14 @@ class cubo_state : public amiga_state public: cubo_state(const machine_config &mconfig, device_type type, const char *tag) : amiga_state(mconfig, type, tag), - m_p1_port(*this, "P1"), - m_p2_port(*this, "P2"), + m_player_ports(*this, {"P1", "P2"}), m_microtouch(*this, "microtouch"), m_cdda(*this, "cdda") { } + void handle_joystick_cia(UINT8 pra, UINT8 dra); + UINT16 handle_joystick_potgor(UINT16 potgor); + DECLARE_CUSTOM_INPUT_MEMBER(cubo_input); DECLARE_CUSTOM_INPUT_MEMBER(cd32_sel_mirror_input); @@ -347,8 +349,7 @@ public: DECLARE_DRIVER_INIT(lasstixx); DECLARE_DRIVER_INIT(lsrquiz); - optional_ioport m_p1_port; - optional_ioport m_p2_port; + optional_ioport_array<2> m_player_ports; int m_oldstate[2]; int m_cd32_shifter[2]; @@ -374,8 +375,6 @@ private: void mgprem11_input_hack(); }; -static void handle_cd32_joystick_cia(running_machine &machine, UINT8 pra, UINT8 dra); - /************************************* * @@ -401,7 +400,7 @@ WRITE8_MEMBER( cubo_state::akiko_cia_0_port_a_write ) /* bit 2 = Power Led on Amiga */ output().set_led_value(0, (data & 2) ? 0 : 1); - handle_cd32_joystick_cia(machine(), data, m_cia_0->read(space, 2)); + handle_joystick_cia(data, m_cia_0->read(space, 2)); } @@ -466,40 +465,33 @@ void cubo_state::potgo_w(UINT16 data) } } -static void handle_cd32_joystick_cia(running_machine &machine, UINT8 pra, UINT8 dra) +void cubo_state::handle_joystick_cia(UINT8 pra, UINT8 dra) { - cubo_state *state = machine.driver_data(); - int i; - - for (i = 0; i < 2; i++) + for (int i = 0; i < 2; i++) { UINT8 but = 0x40 << i; UINT16 p5dir = 0x0200 << (i * 4); /* output enable P5 */ UINT16 p5dat = 0x0100 << (i * 4); /* data P5 */ - if (!(state->m_potgo_value & p5dir) || !(state->m_potgo_value & p5dat)) + if (!(m_potgo_value & p5dir) || !(m_potgo_value & p5dat)) { - if ((dra & but) && (pra & but) != state->m_oldstate[i]) + if ((dra & but) && (pra & but) != m_oldstate[i]) { if (!(pra & but)) { - state->m_cd32_shifter[i]--; - if (state->m_cd32_shifter[i] < 0) - state->m_cd32_shifter[i] = 0; + m_cd32_shifter[i]--; + if (m_cd32_shifter[i] < 0) + m_cd32_shifter[i] = 0; } } } - state->m_oldstate[i] = pra & but; + m_oldstate[i] = pra & but; } } -static UINT16 handle_joystick_potgor(running_machine &machine, UINT16 potgor) +UINT16 cubo_state::handle_joystick_potgor(UINT16 potgor) { - cubo_state *state = machine.driver_data(); - ioport_port * player_portname[] = { state->m_p2_port, state->m_p1_port }; - int i; - - for (i = 0; i < 2; i++) + for (int i = 0; i < 2; i++) { UINT16 p9dir = 0x0800 << (i * 4); /* output enable P9 */ UINT16 p9dat = 0x0400 << (i * 4); /* data P9 */ @@ -508,16 +500,16 @@ static UINT16 handle_joystick_potgor(running_machine &machine, UINT16 potgor) /* p5 is floating in input-mode */ potgor &= ~p5dat; - potgor |= state->m_potgo_value & p5dat; - if (!(state->m_potgo_value & p9dir)) + potgor |= m_potgo_value & p5dat; + if (!(m_potgo_value & p9dir)) potgor |= p9dat; /* P5 output and 1 -> shift register is kept reset (Blue button) */ - if ((state->m_potgo_value & p5dir) && (state->m_potgo_value & p5dat)) - state->m_cd32_shifter[i] = 8; + if ((m_potgo_value & p5dir) && (m_potgo_value & p5dat)) + m_cd32_shifter[i] = 8; /* shift at 1 == return one, >1 = return button states */ - if (state->m_cd32_shifter[i] == 0) + if (m_cd32_shifter[i] == 0) potgor &= ~p9dat; /* shift at zero == return zero */ - if (state->m_cd32_shifter[i] >= 2 && ((player_portname[i])->read() & (1 << (state->m_cd32_shifter[i] - 2)))) + if (m_cd32_shifter[i] >= 2 && ((m_player_ports[1 - i])->read() & (1 << (m_cd32_shifter[i] - 2)))) potgor &= ~p9dat; } return potgor; @@ -525,13 +517,12 @@ static UINT16 handle_joystick_potgor(running_machine &machine, UINT16 potgor) CUSTOM_INPUT_MEMBER( cubo_state::cubo_input ) { - return handle_joystick_potgor(machine(), m_potgo_value) >> 8; + return handle_joystick_potgor(m_potgo_value) >> 8; } CUSTOM_INPUT_MEMBER( cubo_state::cd32_sel_mirror_input ) { - ioport_port* ports[2]= { m_p1_port, m_p2_port }; - UINT8 bits = ports[(int)(FPTR)param]->read(); + UINT8 bits = m_player_ports[(int)(FPTR)param]->read(); return (bits & 0x20)>>5; } diff --git a/src/mame/drivers/d6809.cpp b/src/mame/drivers/d6809.cpp index 1d6a17aecbe..9e17ac72fdf 100644 --- a/src/mame/drivers/d6809.cpp +++ b/src/mame/drivers/d6809.cpp @@ -164,4 +164,4 @@ ROM_END /* Driver */ /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ -COMP( 1983, d6809, 0, 0, d6809, d6809, driver_device, 0, "Dunfield", "6809 Portable", MACHINE_IS_SKELETON | MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW) +COMP( 1983, d6809, 0, 0, d6809, d6809, driver_device, 0, "Dunfield", "6809 Portable", MACHINE_IS_SKELETON | MACHINE_NO_SOUND_HW) diff --git a/src/mame/drivers/darkmist.cpp b/src/mame/drivers/darkmist.cpp index 50e75ff14b0..7e417a62009 100644 --- a/src/mame/drivers/darkmist.cpp +++ b/src/mame/drivers/darkmist.cpp @@ -214,9 +214,10 @@ static const gfx_layout tilelayout = static GFXDECODE_START( darkmist ) - GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 16*4 ) - GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0, 16*4 ) - GFXDECODE_ENTRY( "gfx3", 0, tilelayout, 0, 16*4 ) + GFXDECODE_ENTRY( "tx_gfx", 0, charlayout, 0, 16*4 ) + GFXDECODE_ENTRY( "bg_gfx", 0, tilelayout, 0, 16*4 ) + GFXDECODE_ENTRY( "fg_gfx", 0, tilelayout, 0, 16*4 ) + GFXDECODE_ENTRY( "spr_gfx", 0, tilelayout, 0, 16*4 ) GFXDECODE_END TIMER_DEVICE_CALLBACK_MEMBER(darkmist_state::scanline) @@ -276,50 +277,77 @@ ROM_START( darkmist ) ROM_REGION( 0x8000, "t5182_z80", 0 ) /* Toshiba T5182 external ROM */ ROM_LOAD( "dm_17.rom", 0x0000, 0x8000, CRC(7723dcae) SHA1(a0c69e7a7b6fd74f7ed6b9c6419aed94aabcd4b0) ) - ROM_REGION( 0x4000, "gfx1", 0 ) + ROM_REGION( 0x4000, "tx_gfx", 0 ) ROM_LOAD( "dm_13.rom", 0x00000, 0x02000, CRC(38bb38d9) SHA1(d751990166dd3d503c5de7667679b96210061cd1) ) ROM_LOAD( "dm_14.rom", 0x02000, 0x02000, CRC(ac5a31f3) SHA1(79083390671062be2eab93cc875a0f86d709a963) ) - ROM_REGION( 0x40000, "gfx2", 0 ) - ROM_LOAD( "dm_05.rom", 0x10000, 0x10000, CRC(ca79a738) SHA1(66a76ea0d8ecc44f6cc77102303df74f40bf6118) ) - ROM_LOAD( "dm_01.rom", 0x00000, 0x10000, CRC(652aee6b) SHA1(f4150784f7bd7be83a0041e4c52540aa564062ba) ) - ROM_LOAD( "dm_06.rom", 0x30000, 0x10000, CRC(9629ed2c) SHA1(453f6a0b12efdadd7fcbe03ad37afb0afa6be051) ) - ROM_LOAD( "dm_02.rom", 0x20000, 0x10000, CRC(e2dd15aa) SHA1(1f3a6a1e1afabfe9dc47549ef13ae7696302ae88) ) + ROM_REGION( 0x20000, "fg_gfx", 0 ) + ROM_LOAD( "dm_05.rom", 0x00000, 0x10000, CRC(ca79a738) SHA1(66a76ea0d8ecc44f6cc77102303df74f40bf6118) ) + ROM_LOAD( "dm_06.rom", 0x10000, 0x10000, CRC(9629ed2c) SHA1(453f6a0b12efdadd7fcbe03ad37afb0afa6be051) ) - ROM_REGION( 0x40000, "gfx3", 0) + ROM_REGION( 0x20000, "bg_gfx", 0 ) + ROM_LOAD( "dm_01.rom", 0x00000, 0x10000, CRC(652aee6b) SHA1(f4150784f7bd7be83a0041e4c52540aa564062ba) ) + ROM_LOAD( "dm_02.rom", 0x10000, 0x10000, CRC(e2dd15aa) SHA1(1f3a6a1e1afabfe9dc47549ef13ae7696302ae88) ) + + ROM_REGION( 0x40000, "spr_gfx", 0) ROM_LOAD( "dm_09.rom", 0x00000, 0x10000, CRC(52154b50) SHA1(5ee1a4bcf0752a057b9993b0069d744c35cf55f4) ) ROM_LOAD( "dm_11.rom", 0x10000, 0x08000, CRC(3118e2f9) SHA1(dfd946ea1310851f97d31ce58d8280f2d92b0f59) ) ROM_LOAD( "dm_10.rom", 0x20000, 0x10000, CRC(34fd52b5) SHA1(c4ee464ed79ec91f993b0f894572c0288f0ad1d4) ) ROM_LOAD( "dm_12.rom", 0x30000, 0x08000, CRC(cc4b9839) SHA1(b7e95513d2e06929fed5005caf3bf8c3fba0b597) ) - ROM_REGION( 0x8000, "user1", 0 ) + ROM_REGION( 0x10000, "bg_map", 0 ) /* BG layer map ( 512x64 )*/ - ROM_LOAD( "dm_03.rom", 0x00000, 0x08000, CRC(60b40c2a) SHA1(c046273b15dab95ea4851c26ce941e580fa1b6ec) ) + ROM_LOAD16_BYTE( "dm_03.rom", 0x00000, 0x08000, CRC(60b40c2a) SHA1(c046273b15dab95ea4851c26ce941e580fa1b6ec) ) + ROM_LOAD16_BYTE( "dm_04.rom", 0x00001, 0x08000, CRC(d47b8cd9) SHA1(86eb7a5d8ea63c0c91f455b1b8322cc7b9c4a968) ) - ROM_REGION( 0x8000, "user2", 0 ) - /* BG layer attr ( 512x64 ) */ - ROM_LOAD( "dm_04.rom", 0x00000, 0x08000, CRC(d47b8cd9) SHA1(86eb7a5d8ea63c0c91f455b1b8322cc7b9c4a968) ) - - ROM_REGION( 0x04000, "user3", 0 ) + ROM_REGION( 0x08000, "fg_map", 0 ) /* FG layer map ( 64x256 ) */ - ROM_LOAD( "dm_07.rom", 0x00000, 0x04000, CRC(889b1277) SHA1(78405110b9cf1ab988c0cbfdb668498dadb41229) ) + ROM_LOAD16_BYTE( "dm_07.rom", 0x00000, 0x04000, CRC(889b1277) SHA1(78405110b9cf1ab988c0cbfdb668498dadb41229) ) + ROM_LOAD16_BYTE( "dm_08.rom", 0x00001, 0x04000, CRC(f76f6f46) SHA1(ce1c67dc8976106b24fee8d3a0b9e5deb016a327) ) - ROM_REGION( 0x04000, "user4", 0 ) - /* FG layer attr ( 64x256 ) */ - ROM_LOAD( "dm_08.rom", 0x00000, 0x04000, CRC(f76f6f46) SHA1(ce1c67dc8976106b24fee8d3a0b9e5deb016a327) ) - - ROM_REGION( 0x0600, "proms", 0 ) - /* color lookup tables */ + ROM_REGION( 0x0100, "bg_clut", 0 ) ROM_LOAD( "63s281n.m7", 0x0000, 0x0100, CRC(897ef49f) SHA1(e40c0fb0a68aa91ceaee86e774a428819a4794bb) ) - ROM_LOAD( "63s281n.d7", 0x0100, 0x0100, CRC(a9975a96) SHA1(3a34569fc68ac15f91e1e90d4e273f844b315091) ) - ROM_LOAD( "63s281n.f11", 0x0200, 0x0100, CRC(8096b206) SHA1(257004aa3501121d058afa6f64b1129303246758) ) - ROM_LOAD( "63s281n.j15", 0x0300, 0x0100, CRC(2ea780a4) SHA1(0f8d6791114705e9982f9035f291d2a305b47f0a) ) - /* unknown */ - ROM_LOAD( "63s281n.l1", 0x0400, 0x0100, CRC(208d17ca) SHA1(a77d56337bcac8d9a7bc3411239dfb3045e069ec) ) - ROM_LOAD( "82s129.d11", 0x0500, 0x0100, CRC(866eab0e) SHA1(398ffe2b82b6e2235746fd987d5f5995d7dc8687) ) + ROM_REGION( 0x0100, "fg_clut", 0 ) + ROM_LOAD( "63s281n.d7", 0x0000, 0x0100, CRC(a9975a96) SHA1(3a34569fc68ac15f91e1e90d4e273f844b315091) ) + ROM_REGION( 0x0100, "spr_clut", 0 ) + ROM_LOAD( "63s281n.f11", 0x0000, 0x0100, CRC(8096b206) SHA1(257004aa3501121d058afa6f64b1129303246758) ) + ROM_REGION( 0x0100, "tx_clut", 0 ) + ROM_LOAD( "63s281n.j15", 0x0000, 0x0100, CRC(2ea780a4) SHA1(0f8d6791114705e9982f9035f291d2a305b47f0a) ) + + + ROM_REGION( 0x0200, "proms", 0 ) // unknown PROMs + ROM_LOAD( "63s281n.l1", 0x0000, 0x0100, CRC(208d17ca) SHA1(a77d56337bcac8d9a7bc3411239dfb3045e069ec) ) + ROM_LOAD( "82s129.d11", 0x0100, 0x0100, CRC(866eab0e) SHA1(398ffe2b82b6e2235746fd987d5f5995d7dc8687) ) ROM_END + + +void darkmist_state::decrypt_fgbgtiles(UINT8* rom, int size) +{ + dynamic_buffer buf(0x40000); + /* data lines */ + for (int i = 0;i < size/2;i++) + { + int w1; + + w1 = (rom[i + 0*size/2] << 8) + rom[i + 1*size/2]; + + w1 = BITSWAP16(w1, 9,14,7,2, 6,8,3,15, 10,13,5,12, 0,11,4,1); + + buf[i + 0*size/2] = w1 >> 8; + buf[i + 1*size/2] = w1 & 0xff; + } + + /* address lines */ + for (int i = 0;i < size;i++) + { + rom[i] = buf[BITSWAP24(i,23,22,21,20,19,18,17,16,15,14,13, 5,4,3,2, 12,11,10,9,8, 1,0, 7,6)]; + } +} + + + void darkmist_state::decrypt_gfx() { dynamic_buffer buf(0x40000); @@ -327,8 +355,8 @@ void darkmist_state::decrypt_gfx() int size; int i; - rom = memregion("gfx1")->base(); - size = memregion("gfx1")->bytes(); + rom = memregion("tx_gfx")->base(); + size = memregion("tx_gfx")->bytes(); /* data lines */ for (i = 0;i < size/2;i++) @@ -349,32 +377,12 @@ void darkmist_state::decrypt_gfx() rom[i] = buf[BITSWAP24(i,23,22,21,20,19,18,17,16,15,14,13,12, 3,2,1, 11,10,9,8, 0, 7,6,5,4)]; } - - rom = memregion("gfx2")->base(); - size = memregion("gfx2")->bytes(); - - /* data lines */ - for (i = 0;i < size/2;i++) - { - int w1; - - w1 = (rom[i + 0*size/2] << 8) + rom[i + 1*size/2]; - - w1 = BITSWAP16(w1, 9,14,7,2, 6,8,3,15, 10,13,5,12, 0,11,4,1); - - buf[i + 0*size/2] = w1 >> 8; - buf[i + 1*size/2] = w1 & 0xff; - } - - /* address lines */ - for (i = 0;i < size;i++) - { - rom[i] = buf[BITSWAP24(i,23,22,21,20,19,18,17,16,15,14,13, 5,4,3,2, 12,11,10,9,8, 1,0, 7,6)]; - } + decrypt_fgbgtiles(memregion("bg_gfx")->base(), memregion("bg_gfx")->bytes()); + decrypt_fgbgtiles(memregion("fg_gfx")->base(), memregion("fg_gfx")->bytes()); - rom = memregion("gfx3")->base(); - size = memregion("gfx3")->bytes(); + rom = memregion("spr_gfx")->base(); + size = memregion("spr_gfx")->bytes(); /* data lines */ for (i = 0;i < size/2;i++) @@ -441,38 +449,24 @@ DRIVER_INIT_MEMBER(darkmist_state,darkmist) membank("bank1")->set_base(&ROM[0x010000]); /* adr line swaps */ - ROM = memregion("user1")->base(); - len = memregion("user1")->bytes(); + ROM = memregion("bg_map")->base(); + len = memregion("bg_map")->bytes(); memcpy( &buffer[0], ROM, len ); for(i=0;ibase(); - len = memregion("user2")->bytes(); + + ROM = memregion("fg_map")->base(); + len = memregion("fg_map")->bytes(); memcpy( &buffer[0], ROM, len ); for(i=0;ibase(); - len = memregion("user3")->bytes(); - memcpy( &buffer[0], ROM, len ); - for(i=0;ibase(); - len = memregion("user4")->bytes(); - memcpy( &buffer[0], ROM, len ); - for(i=0;i>=16; @@ -826,7 +826,7 @@ READ32_MEMBER( deco32_state::fghthist_protection_region_0_146_r ) WRITE32_MEMBER( deco32_state::fghthist_protection_region_0_146_w ) { - if (mem_mask & 0xffff0000) + if (ACCESSING_BITS_16_31) { data >>=16; mem_mask >>=16; diff --git a/src/mame/drivers/deco_mlc.cpp b/src/mame/drivers/deco_mlc.cpp index 61a6ab054b2..0365d844625 100644 --- a/src/mame/drivers/deco_mlc.cpp +++ b/src/mame/drivers/deco_mlc.cpp @@ -241,12 +241,12 @@ READ32_MEMBER( deco_mlc_state::mlc_spriteram_r ) { UINT32 retdata = 0; - if (mem_mask & 0xffff0000) + if (ACCESSING_BITS_16_31) { retdata |= 0xffff0000; } - if (mem_mask & 0x0000ffff) + if (ACCESSING_BITS_0_15) { retdata |= m_mlc_spriteram[offset]; } @@ -257,11 +257,11 @@ READ32_MEMBER( deco_mlc_state::mlc_spriteram_r ) WRITE32_MEMBER( deco_mlc_state::mlc_spriteram_w ) { - if (mem_mask & 0xffff0000) + if (ACCESSING_BITS_16_31) { } - if (mem_mask & 0x0000ffff) + if (ACCESSING_BITS_0_15) { data &=0x0000ffff; COMBINE_DATA(&m_mlc_spriteram[offset]); diff --git a/src/mame/drivers/divebomb.cpp b/src/mame/drivers/divebomb.cpp old mode 100755 new mode 100644 diff --git a/src/mame/drivers/djmain.cpp b/src/mame/drivers/djmain.cpp index efa5c7ed4d8..85181a1decb 100644 --- a/src/mame/drivers/djmain.cpp +++ b/src/mame/drivers/djmain.cpp @@ -224,14 +224,13 @@ READ8_MEMBER(djmain_state::inp2_r) READ32_MEMBER(djmain_state::turntable_r) { UINT32 result = 0; - static const char *const ttnames[] = { "TT1", "TT2" }; if (ACCESSING_BITS_8_15) { UINT8 pos; int delta; - pos = read_safe(ioport(ttnames[m_turntable_select]), 0); + pos = m_turntable[m_turntable_select].read_safe(0); delta = pos - m_turntable_last_pos[m_turntable_select]; if (delta < -128) delta += 256; diff --git a/src/mame/drivers/dkong.cpp b/src/mame/drivers/dkong.cpp index 546ef915830..93537dd6e80 100644 --- a/src/mame/drivers/dkong.cpp +++ b/src/mame/drivers/dkong.cpp @@ -355,6 +355,28 @@ Donkey Kong Notes Not only did the eprom fix the ladder bug, but it also changed the copyright screen to read "(C)1981 Nintendo of America". + + -------------------------------------------------------------- + + Nintendo Service Department Bulletin # TKG-06 10-04-82 + GAME: Donkey Kong + SUBJECT: Speed-up Kit #2 + + In an attempt to increase revenue of Donkey Kong we are making + available and updated speed-up kit, part number TKG-23-70. + + The speed-up kit consists of two (2) EPROM's that are mounted + on the CPU P.C. Board. The replacement locations vary depend- + ing on the P.C. Board style. + + P.C Board Style Eprom Location + --------------- -------------- + TKG2 and TKG3 5F, 5K + TKG4 5A, 5E + + These kits are available through all Nintendo distributors. If + your distributor is out, they can get immediate shipment from + our factory. D2K Jumpman returns Notes @@ -378,6 +400,9 @@ Donkey Kong Notes Hopefully confirmation and information will come along later which confirms this is a legitimate Nintendo Kit. + + This is probably "Speed-up Kit #2" mentioned above, but this still needs to be + confirmed. ***************************************************************************/ diff --git a/src/mame/drivers/dreambal.cpp b/src/mame/drivers/dreambal.cpp index 55d360aaf68..60e9653a1d5 100644 --- a/src/mame/drivers/dreambal.cpp +++ b/src/mame/drivers/dreambal.cpp @@ -64,7 +64,7 @@ public: logerror("dreambal_eeprom_w unhandled data %04x %04x\n",data&0x0fff8, mem_mask); } - if (mem_mask&0x00ff) + if (ACCESSING_BITS_0_7) { m_eeprom->clk_write(data &0x2 ? ASSERT_LINE : CLEAR_LINE); m_eeprom->di_write(data &0x1); diff --git a/src/mame/drivers/dribling.cpp b/src/mame/drivers/dribling.cpp index f59060e0b51..2ac6caa7181 100644 --- a/src/mame/drivers/dribling.cpp +++ b/src/mame/drivers/dribling.cpp @@ -322,9 +322,9 @@ ROM_START( dribling ) ROM_LOAD( "3n.bin", 0x1000, 0x1000, CRC(356c9803) SHA1(8e2ce52f32b33886f4747dadf3aeb78148538173) ) ROM_REGION( 0x600, "proms", 0 ) - ROM_LOAD( "prom_3c.bin", 0x0000, 0x0400, CRC(25f068de) SHA1(ea4c56c47fe8153069acb9df80df0b099f3b81f1) ) - ROM_LOAD( "prom_3e.bin", 0x0400, 0x0100, CRC(73eba798) SHA1(7be0e253624df53092e26c28eb18afdcf71434aa) ) - ROM_LOAD( "prom_2d.bin", 0x0500, 0x0100, CRC(5d8c57c6) SHA1(abfb54812d66a36e797be47653dadda4843e8a90) ) + ROM_LOAD( "93453-d9.3c", 0x0000, 0x0400, CRC(b045d005) SHA1(7e3ac10a99aa37f6348b3a57a747116b7025103e) ) + ROM_LOAD( "63s140-d8.3e", 0x0400, 0x0100, CRC(8f1a9908) SHA1(12c513c589757f1282e9979d3589f9b49d30ec0f) ) + ROM_LOAD( "tbp24s10.2d", 0x0500, 0x0100, CRC(a17d6956) SHA1(81724daf2e2d319f55cc34cc881b6a9a4e64e7ac) ) ROM_END @@ -341,9 +341,9 @@ ROM_START( driblingo ) ROM_LOAD( "3n.bin", 0x1000, 0x1000, CRC(356c9803) SHA1(8e2ce52f32b33886f4747dadf3aeb78148538173) ) ROM_REGION( 0x600, "proms", 0 ) - ROM_LOAD( "prom_3c.bin", 0x0000, 0x0400, CRC(25f068de) SHA1(ea4c56c47fe8153069acb9df80df0b099f3b81f1) ) - ROM_LOAD( "prom_3e.bin", 0x0400, 0x0100, CRC(73eba798) SHA1(7be0e253624df53092e26c28eb18afdcf71434aa) ) - ROM_LOAD( "prom_2d.bin", 0x0500, 0x0100, CRC(5d8c57c6) SHA1(abfb54812d66a36e797be47653dadda4843e8a90) ) + ROM_LOAD( "93453-d9.3c", 0x0000, 0x0400, CRC(b045d005) SHA1(7e3ac10a99aa37f6348b3a57a747116b7025103e) ) + ROM_LOAD( "63s140-d8.3e", 0x0400, 0x0100, CRC(8f1a9908) SHA1(12c513c589757f1282e9979d3589f9b49d30ec0f) ) + ROM_LOAD( "tbp24s10.2d", 0x0500, 0x0100, CRC(a17d6956) SHA1(81724daf2e2d319f55cc34cc881b6a9a4e64e7ac) ) ROM_END ROM_START( driblingbr ) @@ -359,9 +359,9 @@ ROM_START( driblingbr ) ROM_LOAD( "7", 0x1000, 0x1000, CRC(356c9803) SHA1(8e2ce52f32b33886f4747dadf3aeb78148538173) ) ROM_REGION( 0x600, "proms", 0 ) - ROM_LOAD( "prom_3c.bin", 0x0000, 0x0400, CRC(25f068de) SHA1(ea4c56c47fe8153069acb9df80df0b099f3b81f1) ) - ROM_LOAD( "prom_3e.bin", 0x0400, 0x0100, CRC(73eba798) SHA1(7be0e253624df53092e26c28eb18afdcf71434aa) ) - ROM_LOAD( "prom_2d.bin", 0x0500, 0x0100, CRC(5d8c57c6) SHA1(abfb54812d66a36e797be47653dadda4843e8a90) ) + ROM_LOAD( "93453-d9.3c", 0x0000, 0x0400, CRC(b045d005) SHA1(7e3ac10a99aa37f6348b3a57a747116b7025103e) ) + ROM_LOAD( "63s140-d8.3e", 0x0400, 0x0100, CRC(8f1a9908) SHA1(12c513c589757f1282e9979d3589f9b49d30ec0f) ) + ROM_LOAD( "tbp24s10.2d", 0x0500, 0x0100, CRC(a17d6956) SHA1(81724daf2e2d319f55cc34cc881b6a9a4e64e7ac) ) ROM_END diff --git a/src/mame/drivers/dvk_ksm.cpp b/src/mame/drivers/dvk_ksm.cpp index 60cfee34578..855be480138 100644 --- a/src/mame/drivers/dvk_ksm.cpp +++ b/src/mame/drivers/dvk_ksm.cpp @@ -11,7 +11,13 @@ Hardware revisions (XXX verify everything): - 7.102.076 -- has DIP switches, SRAM at 0x2000, model name "KSM" - - 7.102.228 -- no DIP switches, SRAM at 0x2100, model name "KSM-01" + - 7.102.228 -- no DIP switches, ?? SRAM at 0x2100, model name "KSM-01" + + Two sets of dumps exist: + - one puts SRAM at 0x2000, which is where technical manual puts it, + but chargen has 1 missing pixel in 'G' character. + - another puts SRAM at 0x2100, but has no missing pixel. + Merge them for now into one (SRAM at 0x2000 and no missing pixel). Emulates a VT52 without copier (ESC Z response is ESC / M), with Hold Screen mode and Graphics character set (but it is unique and @@ -49,7 +55,7 @@ ksm|DVK KSM, To do: - verify if pixel stretching is done by hw - verify details of hw revisions (memory map, DIP presence...) - - baud rate selection (missing feature in bitbanger) + - baud rate selection ****************************************************************************/ @@ -222,8 +228,7 @@ WRITE8_MEMBER(ksm_state::ksm_ppi_portc_w) WRITE_LINE_MEMBER(ksm_state::write_keyboard_clock) { -// KSM never sends data to keyboard -// m_i8251kbd->write_txc(state); + m_i8251kbd->write_txc(state); m_i8251kbd->write_rxc(state); } @@ -335,8 +340,7 @@ static MACHINE_CONFIG_START( ksm, ksm_state ) MCFG_CPU_IO_MAP(ksm_io) MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259", pic8259_device, inta_cb) - MCFG_TIMER_DRIVER_ADD_PERIODIC("scantimer", ksm_state, scanline_callback, attotime::from_hz(50*28*11)) - MCFG_TIMER_START_DELAY(attotime::from_hz(XTAL_15_4MHz/KSM_HORZ_START)) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ksm_state, scanline_callback, "screen", 0, 1) MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_UPDATE_DRIVER(ksm_state, screen_update) @@ -383,29 +387,11 @@ static MACHINE_CONFIG_START( ksm, ksm_state ) MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(ksm_state, write_keyboard_clock)) MACHINE_CONFIG_END - -/* - Assumes that SRAM is at 0x2000, which is where technical manual puts it. - Chargen has 1 missing pixel in 'G' character. -*/ ROM_START( dvk_ksm ) ROM_REGION(0x1000, "maincpu", ROMREGION_ERASE00) ROM_LOAD( "ksm_04_rom0_d32.bin", 0x0000, 0x0800, CRC(6ad62715) SHA1(20f8f95119bc7fc6e0f16c67864e339a86edb44d)) ROM_LOAD( "ksm_05_rom1_d33.bin", 0x0800, 0x0800, CRC(5b29bcd2) SHA1(1f4f82c2f88f1e8615ec02076559dc606497e654)) - ROM_REGION(0x0800, "chargen", ROMREGION_ERASE00) - ROM_LOAD("ksm_03_cg_d31.bin", 0x0000, 0x0800, CRC(98853aa7) SHA1(09b8e1b5b10a00c0b0ae7e36ad1328113d31230a)) -ROM_END - -/* - Assumes that SRAM is at 0x2100, otherwise identical. - Chargen has no missing pixels in 'G' character. -*/ -ROM_START( dvk_ksm01 ) - ROM_REGION(0x1000, "maincpu", ROMREGION_ERASE00) - ROM_LOAD( "ksm_04_rom0_d32.bin", 0x0000, 0x0800, CRC(5276dc9a) SHA1(dd41dfb4cb3f1cf22d96d95f1ff6a27fe4eb9a38)) - ROM_LOAD( "ksm_05_rom1_d33.bin", 0x0800, 0x0800, CRC(5b29bcd2) SHA1(1f4f82c2f88f1e8615ec02076559dc606497e654)) - ROM_REGION(0x0800, "chargen", ROMREGION_ERASE00) ROM_LOAD("ksm_03_cg_d31.bin", 0x0000, 0x0800, CRC(6a8477e2) SHA1(c7871a96f135db05c3c8d718fbdf1728e22e72b7)) ROM_END @@ -414,4 +400,3 @@ ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ COMP( 1986, dvk_ksm, 0, 0, ksm, ksm, driver_device, 0, "USSR", "DVK KSM", 0) -COMP( 198?, dvk_ksm01,dvk_ksm,0, ksm, ksm, driver_device, 0, "USSR", "DVK KSM-01", 0) diff --git a/src/mame/drivers/eacc.cpp b/src/mame/drivers/eacc.cpp index cc91872dddf..3aef6f02258 100644 --- a/src/mame/drivers/eacc.cpp +++ b/src/mame/drivers/eacc.cpp @@ -96,7 +96,7 @@ static ADDRESS_MAP_START(eacc_mem, AS_PROGRAM, 8, eacc_state) ADDRESS_MAP_GLOBAL_MASK(0xc7ff) // A11,A12,A13 not connected AM_RANGE(0x0000, 0x001f) AM_RAM AM_SHARE("nvram") // inside cpu, battery-backed AM_RANGE(0x0020, 0x007f) AM_RAM // inside cpu - AM_RANGE(0x6000, 0x67ff) AM_ROM AM_MIRROR(0x8000) + AM_RANGE(0x4000, 0x47ff) AM_ROM AM_MIRROR(0x8000) AM_RANGE(0x8000, 0x8003) AM_MIRROR(0x7fc) AM_DEVREADWRITE("pia", pia6821_device, read, write) ADDRESS_MAP_END diff --git a/src/mame/drivers/elwro800.cpp b/src/mame/drivers/elwro800.cpp index fa377badef9..f30de584e65 100644 --- a/src/mame/drivers/elwro800.cpp +++ b/src/mame/drivers/elwro800.cpp @@ -40,7 +40,7 @@ public: m_i8251(*this, "i8251"), m_i8255(*this, "ppi8255"), m_centronics(*this, "centronics"), - m_io_line8(*this, "LINE8"), + m_io_ports(*this, {"LINE7", "LINE6", "LINE5", "LINE4", "LINE3", "LINE2", "LINE1", "LINE0", "LINE8"}), m_io_line9(*this, "LINE9"), m_io_network_id(*this, "NETWORK ID") { @@ -68,7 +68,7 @@ protected: required_device m_i8251; required_device m_i8255; required_device m_centronics; - required_ioport m_io_line8; + required_ioport_array<9> m_io_ports; required_ioport m_io_line9; required_ioport m_io_network_id; @@ -234,7 +234,6 @@ READ8_MEMBER(elwro800_state::elwro800jr_io_r) int mask = 0x8000; int data = 0xff; int i; - ioport_port *io_ports[9] = { m_io_line7, m_io_line6, m_io_line5, m_io_line4, m_io_line3, m_io_line2, m_io_line1, m_io_line0, m_io_line8 }; if ( !m_NR ) { @@ -242,7 +241,7 @@ READ8_MEMBER(elwro800_state::elwro800jr_io_r) { if (!(offset & mask)) { - data &= io_ports[i]->read(); + data &= m_io_ports[i]->read(); } } diff --git a/src/mame/drivers/feversoc.cpp b/src/mame/drivers/feversoc.cpp index 9b4f1132140..e326faf7869 100644 --- a/src/mame/drivers/feversoc.cpp +++ b/src/mame/drivers/feversoc.cpp @@ -255,7 +255,7 @@ static INPUT_PORTS_START( feversoc ) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Unknown (BTN5)") PORT_CODE(KEYCODE_J) PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out (BTN6)") PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_NAME("Coin Out (BTN7)") - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Reset") + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END diff --git a/src/mame/drivers/fidel6502.cpp b/src/mame/drivers/fidel6502.cpp index 49e965f6f0d..be075299ca7 100644 --- a/src/mame/drivers/fidel6502.cpp +++ b/src/mame/drivers/fidel6502.cpp @@ -743,7 +743,7 @@ WRITE8_MEMBER(fidel6502_state::fexcel_ttl_w) READ8_MEMBER(fidel6502_state::fexcel_ttl_r) { // a0-a2,d6: from speech board: language switches and TSI BUSY line, otherwise tied to VCC - UINT8 d6 = (read_safe(m_inp_matrix[9], 0xff) >> offset & 1) ? 0x40 : 0; + UINT8 d6 = (m_inp_matrix[9].read_safe(0xff) >> offset & 1) ? 0x40 : 0; // a0-a2,d7: multiplexed inputs (active low) return d6 | ((read_inputs(9) >> offset & 1) ? 0 : 0x80); diff --git a/src/mame/drivers/firetrk.cpp b/src/mame/drivers/firetrk.cpp index 9f616ef9808..542bc717077 100644 --- a/src/mame/drivers/firetrk.cpp +++ b/src/mame/drivers/firetrk.cpp @@ -155,8 +155,8 @@ void firetrk_state::machine_reset() READ8_MEMBER(firetrk_state::firetrk_dip_r) { - UINT8 val0 = ioport("DIP_0")->read(); - UINT8 val1 = ioport("DIP_1")->read(); + UINT8 val0 = m_dips[0]->read(); + UINT8 val1 = m_dips[1]->read(); if (val1 & (1 << (2 * offset + 0))) val0 |= 1; if (val1 & (1 << (2 * offset + 1))) val0 |= 2; @@ -167,8 +167,8 @@ READ8_MEMBER(firetrk_state::firetrk_dip_r) READ8_MEMBER(firetrk_state::montecar_dip_r) { - UINT8 val0 = ioport("DIP_0")->read(); - UINT8 val1 = ioport("DIP_1")->read(); + UINT8 val0 = m_dips[0]->read(); + UINT8 val1 = m_dips[1]->read(); if (val1 & (1 << (3 - offset))) val0 |= 1; if (val1 & (1 << (7 - offset))) val0 |= 2; @@ -230,7 +230,7 @@ READ8_MEMBER(firetrk_state::firetrk_input_r) /* update steering wheels */ for (i = 0; i < 2; i++) { - UINT32 const new_dial = read_safe(ioport(i ? "STEER_2" : "STEER_1"), 0); + UINT32 const new_dial = m_steer[i].read_safe(0); INT32 const delta = new_dial - m_dial[i]; if (delta != 0) @@ -242,9 +242,9 @@ READ8_MEMBER(firetrk_state::firetrk_input_r) } } - 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); + return ((m_bit_0.read_safe(0) & (1 << offset)) ? 0x01 : 0) | + ((m_bit_6.read_safe(0) & (1 << offset)) ? 0x40 : 0) | + ((m_bit_7.read_safe(0) & (1 << offset)) ? 0x80 : 0); } diff --git a/src/mame/drivers/fm7.cpp b/src/mame/drivers/fm7.cpp index 9151afa895e..6032a3d9beb 100644 --- a/src/mame/drivers/fm7.cpp +++ b/src/mame/drivers/fm7.cpp @@ -1288,7 +1288,6 @@ void fm7_state::key_press(UINT16 scancode) void fm7_state::fm7_keyboard_poll_scan() { - ioport_port* portnames[3] = { m_key1, m_key2, m_key3 }; int bit = 0; int x,y; UINT32 keys; @@ -1297,7 +1296,7 @@ void fm7_state::fm7_keyboard_poll_scan() for(x=0;x<3;x++) { - keys = portnames[x]->read(); + keys = m_kb_ports[x]->read(); for(y=0;y<32;y++) // loop through each bit in the port { @@ -1333,14 +1332,13 @@ void fm7_state::fm7_keyboard_poll_scan() TIMER_CALLBACK_MEMBER(fm7_state::fm7_keyboard_poll) { - ioport_port* portnames[3] = { m_key1, m_key2, m_key3 }; int x,y; int bit = 0; int mod = 0; UINT32 keys; UINT32 modifiers = m_keymod->read(); - if(m_key3->read() & 0x40000) + if (m_kb_ports[2]->read() & 0x40000) { m_break_flag = 1; m_maincpu->set_input_line(M6809_FIRQ_LINE,ASSERT_LINE); @@ -1369,7 +1367,7 @@ TIMER_CALLBACK_MEMBER(fm7_state::fm7_keyboard_poll) for(x=0;x<3;x++) { - keys = portnames[x]->read(); + keys = m_kb_ports[x]->read(); for(y=0;y<32;y++) // loop through each bit in the port { diff --git a/src/mame/drivers/fmtowns.cpp b/src/mame/drivers/fmtowns.cpp index 579b3f3b4c1..804644c0140 100644 --- a/src/mame/drivers/fmtowns.cpp +++ b/src/mame/drivers/fmtowns.cpp @@ -661,21 +661,21 @@ void towns_state::kb_sendcode(UINT8 scancode, int release) case 0: // key press m_towns_kb_output = 0x80; m_towns_kb_extend = scancode & 0x7f; - if(m_key3->read() & 0x00080000) + if (m_kb_ports[2]->read() & 0x00080000) m_towns_kb_output |= 0x04; - if(m_key3->read() & 0x00040000) + if (m_kb_ports[2]->read() & 0x00040000) m_towns_kb_output |= 0x08; - if(m_key3->read() & 0x06400000) + if (m_kb_ports[2]->read() & 0x06400000) m_towns_kb_output |= 0x20; break; case 1: // key release m_towns_kb_output = 0x90; m_towns_kb_extend = scancode & 0x7f; - if(m_key3->read() & 0x00080000) + if (m_kb_ports[2]->read() & 0x00080000) m_towns_kb_output |= 0x04; - if(m_key3->read() & 0x00040000) + if (m_kb_ports[2]->read() & 0x00040000) m_towns_kb_output |= 0x08; - if(m_key3->read() & 0x06400000) + if (m_kb_ports[2]->read() & 0x06400000) m_towns_kb_output |= 0x20; break; case 2: // extended byte @@ -694,7 +694,6 @@ void towns_state::kb_sendcode(UINT8 scancode, int release) void towns_state::poll_keyboard() { - ioport_port* kb_ports[4] = { m_key1, m_key2, m_key3, m_key4 }; int port,bit; UINT8 scan; UINT32 portval; @@ -702,7 +701,7 @@ void towns_state::poll_keyboard() scan = 0; for(port=0;port<4;port++) { - portval = kb_ports[port]->read(); + portval = m_kb_ports[port]->read(); for(bit=0;bit<32;bit++) { if(((portval & (1<= 0 && m_tenspot_current_game < 10) + return m_tenspot_game_dsw[m_tenspot_current_game]->read(); + else + return 0x00; } diff --git a/src/mame/drivers/galaxy.cpp b/src/mame/drivers/galaxy.cpp index 8a6a884ea8d..79f3b47ee61 100644 --- a/src/mame/drivers/galaxy.cpp +++ b/src/mame/drivers/galaxy.cpp @@ -37,8 +37,8 @@ Galaksija driver by Krzysztof Strzecha and Miodrag Milanovic static ADDRESS_MAP_START (galaxyp_io, AS_IO, 8, galaxy_state ) ADDRESS_MAP_GLOBAL_MASK(0x01) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0xbe, 0xbe) AM_DEVWRITE("ay8910", ay8910_device, address_w) - AM_RANGE(0xbf, 0xbf) AM_DEVWRITE("ay8910", ay8910_device, data_w) + AM_RANGE(0x00, 0x00) AM_DEVWRITE("ay8910", ay8910_device, address_w) + AM_RANGE(0x01, 0x01) AM_DEVWRITE("ay8910", ay8910_device, data_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/gambl186.cpp b/src/mame/drivers/gambl186.cpp index 89e009743c5..37360a09512 100644 --- a/src/mame/drivers/gambl186.cpp +++ b/src/mame/drivers/gambl186.cpp @@ -347,8 +347,8 @@ WRITE16_MEMBER(gambl186_state::upd_w) // m_upd7759->reset_w(0); // m_upd7759->reset_w(1); -// if (mem_mask&0x00ff) m_upd7759->port_w(space, 0, data & 0xff); -// if (mem_mask&0xff00) m_upd7759->port_w(space, 0, (data >> 8) & 0xff); +// if (ACCESSING_BITS_0_7) m_upd7759->port_w(space, 0, data & 0xff); +// if (ACCESSING_BITS_8_15) m_upd7759->port_w(space, 0, (data >> 8) & 0xff); data = (data >> 8); popmessage("sample index: %02x", data); diff --git a/src/mame/drivers/gba.cpp b/src/mame/drivers/gba.cpp index b58253c03b2..d1f46afc67d 100644 --- a/src/mame/drivers/gba.cpp +++ b/src/mame/drivers/gba.cpp @@ -475,12 +475,12 @@ READ32_MEMBER(gba_state::gba_io_r) switch( offset ) { case 0x0000/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: DISPCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_DISPCNT ); retval |= m_DISPCNT; } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: Green Swap (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_GRNSWAP ); retval |= m_GRNSWAP << 16; @@ -490,229 +490,229 @@ READ32_MEMBER(gba_state::gba_io_r) retval = (m_DISPSTAT & 0xffff) | (machine().first_screen()->vpos()<<16); break; case 0x0008/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: BG0CNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_BG0CNT ); retval |= m_BG0CNT; } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: BG2CNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_BG2CNT ); retval |= m_BG2CNT; } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: BG0HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: BG0VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0014/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: BG1HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: BG1VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0018/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: BG2HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: BG2VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x001c/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: BG3HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: BG3VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0020/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: BG2PA (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: BG2PB (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0024/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: BG2PC (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: BG2PD (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0028/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: BG2X_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: BG2Y_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: BG3PA (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: BG3PB (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0034/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: BG3PC (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: BG3PD (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0038/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: BG3X_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: BG3Y_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: WIN0H (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: WIN1H (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0044/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: WIN0V (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: WIN1V (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0048/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: WININ (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_WININ ); retval |= m_WININ; } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: MOSAIC (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0050/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: BLDCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_BLDCNT ); retval |= m_BLDCNT; } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: BLDY (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0058/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x005c/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } @@ -743,7 +743,7 @@ READ32_MEMBER(gba_state::gba_io_r) break; case 0x0080/4: retval = m_gbsound->sound_r(space, 0x14) | m_gbsound->sound_r(space, 0x15)<<8; - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: SOUNDCNT_H (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_SOUNDCNT_H ); retval |= m_SOUNDCNT_H << 16; @@ -753,12 +753,12 @@ READ32_MEMBER(gba_state::gba_io_r) retval = m_gbsound->sound_r(space, 0x16); break; case 0x0088/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: SOUNDBIAS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_SOUNDBIAS ); retval |= m_SOUNDBIAS; } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } @@ -850,115 +850,115 @@ READ32_MEMBER(gba_state::gba_io_r) } break; case 0x0120/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: SIOMULTI0 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_SIOMULTI0 ); retval |= m_SIOMULTI0; } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: SIOMULTI2 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_SIOMULTI2 ); retval |= m_SIOMULTI2; } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: SIOCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_SIOCNT ); retval |= m_SIOCNT; } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: SIODATA8 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_SIODATA8 ); retval |= m_SIODATA8 << 16; } break; case 0x0130/4: - if( (mem_mask) & 0x0000ffff ) // KEYINPUT + if( ACCESSING_BITS_0_15 ) // KEYINPUT { retval = m_io_inputs->read(); } - else if( (mem_mask) & 0xffff0000 ) + else if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: RCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_RCNT ); retval |= m_RCNT; } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: IR (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0140/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: JOYCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_JOYCNT ); retval |= m_JOYCNT; } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0150/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { 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 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: JOYSTAT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_JOYSTAT ); retval |= m_JOYSTAT; } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0200/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { // printf("Read: IE (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_IE ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: IF (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_IF ); } @@ -966,23 +966,23 @@ READ32_MEMBER(gba_state::gba_io_r) retval = m_IE | (m_IF<<16); break; case 0x0204/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: WAITCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_WAITCNT ); retval |= m_WAITCNT; } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0208/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Read: IME (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_IME ); retval |= m_IME; } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } @@ -1002,10 +1002,10 @@ WRITE32_MEMBER(gba_state::gba_io_w) switch( offset ) { case 0x0000/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_DISPCNT); if(m_DISPCNT & (DISPCNT_WIN0_EN | DISPCNT_WIN1_EN)) { m_windowOn = 1; @@ -1015,7 +1015,7 @@ WRITE32_MEMBER(gba_state::gba_io_w) m_windowOn = 0; } } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ); @@ -1025,107 +1025,107 @@ WRITE32_MEMBER(gba_state::gba_io_w) COMBINE_DATA(&m_DISPSTAT); break; case 0x0008/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_BG0CNT); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_BG2CNT); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_BG0HOFS); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_BG1HOFS); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_BG2HOFS); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_BG3HOFS); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_BG2PA); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_BG2PC); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Write: BG2X_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Write: BG2X_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); } @@ -1133,11 +1133,11 @@ WRITE32_MEMBER(gba_state::gba_io_w) m_gfxBG2Changed |= 1; break; case 0x002c/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Write: BG2Y_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Write: BG2Y_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); } @@ -1145,35 +1145,35 @@ WRITE32_MEMBER(gba_state::gba_io_w) m_gfxBG2Changed |= 2; break; case 0x0030/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_BG3PA); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_BG3PC); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Write: BG3X_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Write: BG3X_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); } @@ -1181,11 +1181,11 @@ WRITE32_MEMBER(gba_state::gba_io_w) m_gfxBG3Changed |= 1; break; case 0x003c/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Write: BG3Y_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Write: BG3Y_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); } @@ -1193,57 +1193,57 @@ WRITE32_MEMBER(gba_state::gba_io_w) m_gfxBG3Changed |= 2; break; case 0x0040/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_WIN0H); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_WIN0V); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_WININ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_MOSAIC); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_BLDCNT); if(m_BLDCNT & BLDCNT_SFX) { m_fxOn = 1; @@ -1253,142 +1253,142 @@ WRITE32_MEMBER(gba_state::gba_io_w) m_fxOn = 0; } } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_BLDY); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); } break; case 0x0060/4: - if( (mem_mask) & 0x000000ff ) // SOUNDCNTL + if( ACCESSING_BITS_0_7 ) // SOUNDCNTL { m_gbsound->sound_w(space, 0, data); } - if( (mem_mask) & 0x00ff0000 ) + if( ACCESSING_BITS_16_23 ) { m_gbsound->sound_w(space, 1, data>>16); // SOUND1CNT_H } - if( (mem_mask) & 0xff000000 ) + if( ACCESSING_BITS_24_31 ) { m_gbsound->sound_w(space, 2, data>>24); } break; case 0x0064/4: - if( (mem_mask) & 0x000000ff ) // SOUNDCNTL + if( ACCESSING_BITS_0_7 ) // SOUNDCNTL { m_gbsound->sound_w(space, 3, data); } - if( (mem_mask) & 0x0000ff00 ) + if( ACCESSING_BITS_8_15 ) { m_gbsound->sound_w(space, 4, data>>8); // SOUND1CNT_H } break; case 0x0068/4: - if( (mem_mask) & 0x000000ff ) + if( ACCESSING_BITS_0_7 ) { m_gbsound->sound_w(space, 6, data); } - if( (mem_mask) & 0x0000ff00 ) + if( ACCESSING_BITS_8_15 ) { m_gbsound->sound_w(space, 7, data>>8); } break; case 0x006c/4: - if( (mem_mask) & 0x000000ff ) + if( ACCESSING_BITS_0_7 ) { m_gbsound->sound_w(space, 8, data); } - if( (mem_mask) & 0x0000ff00 ) + if( ACCESSING_BITS_8_15 ) { m_gbsound->sound_w(space, 9, data>>8); } break; case 0x0070/4: //SND3CNTL and H - if( (mem_mask) & 0x000000ff ) // SOUNDCNTL + if( ACCESSING_BITS_0_7 ) // SOUNDCNTL { m_gbsound->sound_w(space, 0xa, data); } - if( (mem_mask) & 0x00ff0000 ) + if( ACCESSING_BITS_16_23 ) { m_gbsound->sound_w(space, 0xb, data>>16); // SOUND1CNT_H } - if( (mem_mask) & 0xff000000 ) + if( ACCESSING_BITS_24_31 ) { m_gbsound->sound_w(space, 0xc, data>>24); } break; case 0x0074/4: - if( (mem_mask) & 0x000000ff ) + if( ACCESSING_BITS_0_7 ) { m_gbsound->sound_w(space, 0xd, data); } - if( (mem_mask) & 0x0000ff00 ) + if( ACCESSING_BITS_8_15 ) { m_gbsound->sound_w(space, 0xe, data>>8); } break; case 0x0078/4: - if( (mem_mask) & 0x000000ff ) + if( ACCESSING_BITS_0_7 ) { m_gbsound->sound_w(space, 0x10, data); } - if( (mem_mask) & 0x0000ff00 ) + if( ACCESSING_BITS_8_15 ) { m_gbsound->sound_w(space, 0x11, data>>8); } break; case 0x007c/4: - if( (mem_mask) & 0x000000ff ) + if( ACCESSING_BITS_0_7 ) { m_gbsound->sound_w(space, 0x12, data); } - if( (mem_mask) & 0x0000ff00 ) + if( ACCESSING_BITS_8_15 ) { m_gbsound->sound_w(space, 0x13, data>>8); } break; case 0x0080/4: - if( (mem_mask) & 0x000000ff ) + if( ACCESSING_BITS_0_7 ) { m_gbsound->sound_w(space, 0x14, data); } - if( (mem_mask) & 0x0000ff00 ) + if( ACCESSING_BITS_8_15 ) { m_gbsound->sound_w(space, 0x15, data>>8); } - if ((mem_mask) & 0xffff0000) + if (ACCESSING_BITS_16_31) { data >>= 16; m_SOUNDCNT_H = data; @@ -1413,7 +1413,7 @@ WRITE32_MEMBER(gba_state::gba_io_w) } break; case 0x0084/4: - if( (mem_mask) & 0x000000ff ) + if( ACCESSING_BITS_0_7 ) { m_gbsound->sound_w(space, 0x16, data); if ((data & 0x80) && !(m_SOUNDCNT_X & 0x80)) @@ -1429,84 +1429,84 @@ WRITE32_MEMBER(gba_state::gba_io_w) } break; case 0x0088/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_SOUNDBIAS); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); } break; case 0x0090/4: - if( (mem_mask) & 0x000000ff ) + if( ACCESSING_BITS_0_7 ) { m_gbsound->wave_w(space, 0, data); } - if( (mem_mask) & 0x0000ff00 ) + if( ACCESSING_BITS_8_15 ) { m_gbsound->wave_w(space, 1, data>>8); } - if( (mem_mask) & 0x00ff0000 ) + if( ACCESSING_BITS_16_23 ) { m_gbsound->wave_w(space, 2, data>>16); } - if( (mem_mask) & 0xff000000 ) + if( ACCESSING_BITS_24_31 ) { m_gbsound->wave_w(space, 3, data>>24); } break; case 0x0094/4: - if( (mem_mask) & 0x000000ff ) + if( ACCESSING_BITS_0_7 ) { m_gbsound->wave_w(space, 4, data); } - if( (mem_mask) & 0x0000ff00 ) + if( ACCESSING_BITS_8_15 ) { m_gbsound->wave_w(space, 5, data>>8); } - if( (mem_mask) & 0x00ff0000 ) + if( ACCESSING_BITS_16_23 ) { m_gbsound->wave_w(space, 6, data>>16); } - if( (mem_mask) & 0xff000000 ) + if( ACCESSING_BITS_24_31 ) { m_gbsound->wave_w(space, 7, data>>24); } break; case 0x0098/4: - if( (mem_mask) & 0x000000ff ) + if( ACCESSING_BITS_0_7 ) { m_gbsound->wave_w(space, 8, data); } - if( (mem_mask) & 0x0000ff00 ) + if( ACCESSING_BITS_8_15 ) { m_gbsound->wave_w(space, 9, data>>8); } - if( (mem_mask) & 0x00ff0000 ) + if( ACCESSING_BITS_16_23 ) { m_gbsound->wave_w(space, 0xa, data>>16); } - if( (mem_mask) & 0xff000000 ) + if( ACCESSING_BITS_24_31 ) { m_gbsound->wave_w(space, 0xb, data>>24); } break; case 0x009c/4: - if( (mem_mask) & 0x000000ff ) + if( ACCESSING_BITS_0_7 ) { m_gbsound->wave_w(space, 0xc, data); } - if( (mem_mask) & 0x0000ff00 ) + if( ACCESSING_BITS_8_15 ) { m_gbsound->wave_w(space, 0xd, data>>8); } - if( (mem_mask) & 0x00ff0000 ) + if( ACCESSING_BITS_16_23 ) { m_gbsound->wave_w(space, 0xe, data>>16); } - if( (mem_mask) & 0xff000000 ) + if( ACCESSING_BITS_24_31 ) { m_gbsound->wave_w(space, 0xf, data>>24); } @@ -1642,31 +1642,31 @@ WRITE32_MEMBER(gba_state::gba_io_w) } break; case 0x0120/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_SIOMULTI0); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_SIOMULTI2); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { verboselog(*this, 2, "GBA IO Register Write: SIOCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); // normal mode ? @@ -1683,16 +1683,16 @@ WRITE32_MEMBER(gba_state::gba_io_w) } } } - m_SIOCNT = ( m_SIOCNT & ~mem_mask ) | ( data & mem_mask ); + COMBINE_DATA(&m_SIOCNT); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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; case 0x0130/4: - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { // printf("KEYCNT = %04x\n", data>>16); verboselog(*this, 2, "GBA IO Register Write: KEYCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); @@ -1700,68 +1700,68 @@ WRITE32_MEMBER(gba_state::gba_io_w) } break; case 0x0134/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_RCNT); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_JOYCNT); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_JOY_RECV); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_JOY_TRANS); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_JOYSTAT); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { // printf("IE (%08x) = %04x raw %x (%08x) (scan %d PC %x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, data, ~mem_mask, machine.first_screen()->vpos(), space.device().safe_pc()); - m_IE = ( m_IE & ~mem_mask ) | ( data & mem_mask ); + COMBINE_DATA(&m_IE); #if 0 if (m_IE & m_IF) { @@ -1769,7 +1769,7 @@ WRITE32_MEMBER(gba_state::gba_io_w) } #endif } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ); @@ -1782,35 +1782,35 @@ WRITE32_MEMBER(gba_state::gba_io_w) } break; case 0x0204/4: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_WAITCNT); } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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 ) + if( ACCESSING_BITS_0_15 ) { 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 ); + COMBINE_DATA(&m_IME); if (m_IF) { m_irq_timer->adjust(attotime::zero); } } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { 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: - if( (mem_mask) & 0x0000ffff ) + if( ACCESSING_BITS_0_15 ) { - if( (mem_mask) & 0x000000ff ) + if( ACCESSING_BITS_0_7 ) { verboselog(*this, 2, "GBA IO Register Write: POSTFLG (%08x) = %02x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x000000ff, ~mem_mask ); m_POSTFLG = data & 0x000000ff; @@ -1823,7 +1823,7 @@ WRITE32_MEMBER(gba_state::gba_io_w) m_maincpu->spin_until_interrupt(); } } - if( (mem_mask) & 0xffff0000 ) + if( ACCESSING_BITS_16_31 ) { verboselog(*this, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); } diff --git a/src/mame/drivers/geneve.cpp b/src/mame/drivers/geneve.cpp index bcf8acee880..866805420d9 100644 --- a/src/mame/drivers/geneve.cpp +++ b/src/mame/drivers/geneve.cpp @@ -218,8 +218,8 @@ #define TRACE_LINES 0 #define TRACE_CRU 0 -#define SRAM_SIZE 384*1024 // maximum SRAM expansion on-board -#define DRAM_SIZE 512*1024 +#define SRAM_GEN_TAG "sram" +#define DRAM_GEN_TAG "dram" class geneve_state : public driver_device { @@ -355,7 +355,7 @@ WRITE8_MEMBER ( geneve_state::cruwrite ) if ((addroff & 0xffc0) == CRU_SSTEP_BASE) { int bit = (addroff & 0x003e)>>1; - logerror("geneve: Single step not implemented; bit %d set to %d\n", bit, data); + logerror("Single step not implemented; bit %d set to %d\n", bit, data); return; } @@ -366,47 +366,47 @@ WRITE8_MEMBER ( geneve_state::cruwrite ) { case 5: // No one really cares... - if (TRACE_CRU) logerror("geneve: Set PAL flag = %02x\n", data); + if (TRACE_CRU) logerror("Set PAL flag = %02x\n", data); // m_palvideo = (data!=0); break; case 7: // m_capslock = (data!=0); - if (TRACE_CRU) logerror("geneve: Set capslock flag = %02x\n", data); + if (TRACE_CRU) logerror("Set capslock flag = %02x\n", data); break; case 8: - if (TRACE_CRU) logerror("geneve: Set keyboard clock flag = %02x\n", data); + if (TRACE_CRU) logerror("Set keyboard clock flag = %02x\n", data); m_keyboard->clock_control((data!=0)? ASSERT_LINE : CLEAR_LINE); break; case 9: - if (TRACE_CRU) logerror("geneve: Set keyboard scan flag = %02x\n", data); + if (TRACE_CRU) logerror("Set keyboard scan flag = %02x\n", data); m_keyboard->send_scancodes((data!=0)? ASSERT_LINE : CLEAR_LINE); break; case 10: - if (TRACE_CRU) logerror("geneve: Geneve mode = %02x\n", data); + if (TRACE_CRU) logerror("Geneve mode = %02x\n", data); m_mapper->set_geneve_mode(data!=0); break; case 11: - if (TRACE_CRU) logerror("geneve: Direct mode = %02x\n", data); + if (TRACE_CRU) logerror("Direct mode = %02x\n", data); m_mapper->set_direct_mode(data!=0); break; case 12: - if (TRACE_CRU) logerror("geneve: Cartridge size 8K = %02x\n", data); + if (TRACE_CRU) logerror("Cartridge size 8K = %02x\n", data); m_mapper->set_cartridge_size((data!=0)? 0x2000 : 0x4000); break; case 13: - if (TRACE_CRU) logerror("geneve: Cartridge writable 6000 = %02x\n", data); + if (TRACE_CRU) logerror("Cartridge writable 6000 = %02x\n", data); m_mapper->set_cartridge_writable(0x6000, (data!=0)); break; case 14: - if (TRACE_CRU) logerror("geneve: Cartridge writable 7000 = %02x\n", data); + if (TRACE_CRU) logerror("Cartridge writable 7000 = %02x\n", data); m_mapper->set_cartridge_writable(0x7000, (data!=0)); break; case 15: - if (TRACE_CRU) logerror("geneve: Extra wait states = %02x\n", data==0); + if (TRACE_CRU) logerror("Extra wait states = %02x\n", data==0); m_mapper->set_extra_waitstates(data==0); // let's use the inverse semantics break; default: - logerror("geneve: set CRU address %04x=%02x ignored\n", addroff, data); + logerror("set CRU address %04x=%02x ignored\n", addroff, data); break; } } @@ -426,7 +426,7 @@ READ8_MEMBER( geneve_state::cruread ) if ((addroff & 0xffc0) == CRU_SSTEP_BASE) { int bit = (addroff & 0x003e)>>1; - logerror("geneve: Single step not implemented; attempting to read bit %d\n", bit); + logerror("Single step not implemented; attempting to read bit %d\n", bit); return value; } @@ -478,7 +478,7 @@ READ8_MEMBER( geneve_state::read_by_9901 ) if (m_intb==CLEAR_LINE) answer |= 0x10; if (m_video_wait==ASSERT_LINE) answer |= 0x20; // TODO: PAL pin 5 - if (TRACE_LINES) logerror("geneve: INT15-8 = %02x\n", answer); + if (TRACE_LINES) logerror("INT15-8 = %02x\n", answer); break; case TMS9901_P0_P7: @@ -506,7 +506,7 @@ READ8_MEMBER( geneve_state::read_by_9901 ) */ WRITE_LINE_MEMBER( geneve_state::peripheral_bus_reset ) { - logerror("geneve: Peripheral bus reset request; not implemented yet.\n"); + logerror("Peripheral bus reset request; not implemented yet.\n"); } /* @@ -514,7 +514,7 @@ WRITE_LINE_MEMBER( geneve_state::peripheral_bus_reset ) */ WRITE_LINE_MEMBER( geneve_state::VDP_reset ) { - logerror("geneve: Video reset request; not implemented yet.\n"); + logerror("Video reset request; not implemented yet.\n"); } /* @@ -530,7 +530,7 @@ WRITE_LINE_MEMBER( geneve_state::joystick_select ) */ WRITE_LINE_MEMBER( geneve_state::extbus_wait_states ) { - logerror("geneve: External bus wait states set to %d, not implemented yet.\n", state); + logerror("External bus wait states set to %d, not implemented yet.\n", state); } /* @@ -539,7 +539,7 @@ WRITE_LINE_MEMBER( geneve_state::extbus_wait_states ) */ WRITE_LINE_MEMBER( geneve_state::video_wait_states ) { - if (TRACE_LINES) logerror("geneve: Video wait states set to %d\n", state); + if (TRACE_LINES) logerror("Video wait states set to %d\n", state); m_mapper->set_video_waitstates(state==ASSERT_LINE); m_video_wait = (state!=0)? ASSERT_LINE : CLEAR_LINE; } @@ -581,14 +581,14 @@ WRITE_LINE_MEMBER( geneve_state::intb ) WRITE_LINE_MEMBER( geneve_state::ext_ready ) { - if (TRACE_READY) logerror("geneve: READY level (ext) = %02x\n", state); + if (TRACE_READY) logerror("READY level (ext) = %02x\n", state); m_ready_line = state; m_cpu->ready_line((m_ready_line == ASSERT_LINE && m_ready_line1 == ASSERT_LINE)? ASSERT_LINE : CLEAR_LINE); } WRITE_LINE_MEMBER( geneve_state::mapper_ready ) { - if (TRACE_READY) logerror("geneve: READY level (mapper) = %02x\n", state); + if (TRACE_READY) logerror("READY level (mapper) = %02x\n", state); m_ready_line1 = state; m_cpu->ready_line((m_ready_line == ASSERT_LINE && m_ready_line1 == ASSERT_LINE)? ASSERT_LINE : CLEAR_LINE); } @@ -633,7 +633,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(geneve_state::geneve_hblank_interrupt) WRITE8_MEMBER( geneve_state::external_operation ) { static const char* extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" }; - if (offset != IDLE_OP) logerror("geneve: External operation %s not implemented on Geneve board\n", extop[offset]); + if (offset != IDLE_OP) logerror("External operation %s not implemented on Geneve board\n", extop[offset]); } /* @@ -740,6 +740,16 @@ static MACHINE_CONFIG_START( geneve_60hz, geneve_state ) MCFG_AT29C040_ADD( PFM512_TAG ) MCFG_AT29C040A_ADD( PFM512A_TAG ) + // DRAM 512K + MCFG_RAM_ADD(DRAM_GEN_TAG) + MCFG_RAM_DEFAULT_SIZE("512K") + MCFG_RAM_DEFAULT_VALUE(0) + + // SRAM 384K (max; stock Geneve: 32K) + MCFG_RAM_ADD(SRAM_GEN_TAG) + MCFG_RAM_DEFAULT_SIZE("384K") + MCFG_RAM_DEFAULT_VALUE(0) + MACHINE_CONFIG_END /* @@ -752,12 +762,6 @@ ROM_START(geneve) ROM_LOAD("genbt100.bin", 0x0000, 0x4000, CRC(8001e386) SHA1(b44618b54dabac3882543e18555d482b299e0109)) /* CPU ROMs v1.0 */ ROM_LOAD_OPTIONAL("genbt098.bin", 0x4000, 0x4000, CRC(b2e20df9) SHA1(2d5d09177afe97d63ceb3ad59b498b1c9e2153f7)) /* CPU ROMs v0.98 */ ROM_LOAD_OPTIONAL("gnmbt100.bin", 0x8000, 0x4000, CRC(19b89479) SHA1(6ef297eda78dc705946f6494e9d7e95e5216ec47)) /* CPU ROMs GenMod */ - - ROM_REGION(SRAM_SIZE, SRAM_TAG, 0) - ROM_FILL(0x0000, SRAM_SIZE, 0x00) - - ROM_REGION(DRAM_SIZE, DRAM_TAG, 0) - ROM_FILL(0x0000, DRAM_SIZE, 0x00) ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ diff --git a/src/mame/drivers/glass.cpp b/src/mame/drivers/glass.cpp index 5711341018f..285970b54e7 100644 --- a/src/mame/drivers/glass.cpp +++ b/src/mame/drivers/glass.cpp @@ -388,7 +388,7 @@ WRITE16_MEMBER( glass_state::mainram_w ) { // printf("%06x write %06x - %04x %04x\n", pc, (offset*2 + 0xfec000), data, mem_mask); // several checks write here then expect it to appear mirrored, might be some kind of command + command ack - if (mem_mask & 0xff00) // sometimes mask 0xff00, but not in cases which poll for change + if (ACCESSING_BITS_8_15) // sometimes mask 0xff00, but not in cases which poll for change { mem_mask = 0x00ff; data >>=8; diff --git a/src/mame/drivers/goldnpkr.cpp b/src/mame/drivers/goldnpkr.cpp index 591d3e8a589..c70d153a41d 100644 --- a/src/mame/drivers/goldnpkr.cpp +++ b/src/mame/drivers/goldnpkr.cpp @@ -1690,7 +1690,7 @@ static ADDRESS_MAP_START( wildcrdb_map, AS_PROGRAM, 8, goldnpkr_state ) AM_RANGE(0x2100, 0x2100) AM_DEVWRITE("crtc", mc6845_device, address_w) AM_RANGE(0x2101, 0x2101) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) AM_RANGE(0x2800, 0x2fff) AM_RAM - AM_RANGE(0x3000, 0xffff) AM_ROM + AM_RANGE(0x3000, 0x7fff) AM_ROM ADDRESS_MAP_END static ADDRESS_MAP_START( wildcrdb_mcu_map, AS_PROGRAM, 8, goldnpkr_state ) diff --git a/src/mame/drivers/gomoku.cpp b/src/mame/drivers/gomoku.cpp index c7c86df9ca7..4a425759fa3 100644 --- a/src/mame/drivers/gomoku.cpp +++ b/src/mame/drivers/gomoku.cpp @@ -32,11 +32,10 @@ todo: READ8_MEMBER(gomoku_state::input_port_r) { int i, res; - static const char *const portnames[] = { "IN0", "IN1", "DSW", "UNUSED0", "UNUSED1", "UNUSED2", "UNUSED3", "UNUSED4" }; res = 0; for (i = 0; i < 8; i++) - res |= ((read_safe(ioport(portnames[i]), 0xff) >> offset) & 1) << i; + res |= ((m_inputs[i].read_safe(0xff) >> offset) & 1) << i; return res; } diff --git a/src/mame/drivers/gottlieb.cpp b/src/mame/drivers/gottlieb.cpp index d3006f73d9e..2a335e14010 100644 --- a/src/mame/drivers/gottlieb.cpp +++ b/src/mame/drivers/gottlieb.cpp @@ -284,8 +284,8 @@ CUSTOM_INPUT_MEMBER(gottlieb_state::analog_delta_r) WRITE8_MEMBER(gottlieb_state::gottlieb_analog_reset_w) { /* reset the trackball counters */ - m_track[0] = read_safe(ioport("TRACKX"), 0); - m_track[1] = read_safe(ioport("TRACKY"), 0); + m_track[0] = m_track_x.read_safe(0); + m_track[1] = m_track_y.read_safe(0); } diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp index e938077bd29..a3697da82c5 100644 --- a/src/mame/drivers/hh_tms1k.cpp +++ b/src/mame/drivers/hh_tms1k.cpp @@ -22,8 +22,10 @@ @MP0905B TMS0970 1977, Parker Brothers Codename Sector *MP0057 TMS1000 1978, APH Student Speech+ (same ROM contents as TSI Speech+?) @MP0158 TMS1000 1979, Entex Soccer - *MP0168 TMS1000 1979, Conic Basketball + *MP0163 TMS1000 1979, LJN Electronic Concentration + *MP0168 TMS1000 1979, Conic Basketball/Tandy Sports Arena @MP0170 TMS1000 1979, Conic Football + *MP0230 TMS1000? 1980, Entex Blast It @MP0914 TMS1000 1979, Entex Baseball 1 @MP0919 TMS1000 1979, Tiger Copy Cat (model 7-520) @MP0923 TMS1000 1979, Entex Baseball 2 @@ -31,7 +33,9 @@ @MP1133 TMS1470 1979, Kosmos Astro @MP1180 TMS1100 1980, Tomy Power House Pinball @MP1181 TMS1100 1979, Conic Football 2 + *MP1193 TMS1100 1980, Tandy Championship Football (model 60-2150) @MP1204 TMS1100 1980, Entex Baseball 3 (6007) + *MP1209 TMS1100 1980, U.S. Games Space Cruiser/Strategy Football @MP1211 TMS1100 1980, Entex Space Invader @MP1218 TMS1100 1980, Entex Basketball 2 (6010) @MP1219 TMS1100 1980, U.S. Games Super Sports-4 @@ -41,6 +45,7 @@ *MP1359 TMS1100? 1985, Capsela CRC2000 @MP1525 TMS1170 1980, Coleco Head to Head Baseball *MP1604 ? 1981, Hanzawa Twinvader III/Tandy Cosmic Fire Away 3000 (? note: VFD-capable) + *MP1801 TMS1100? 1981, Tiger Copycat Jr/Ditto/Tandy Pocket Repeat @MP2105 TMS1370 1979, Gakken/Entex Poker *MP2139 TMS1370? 1982, Gakken Galaxy Invader 1000 @MP2726 TMS1040 1979, Tomy Break Up @@ -76,6 +81,7 @@ @M34012 TMS1100 1980, Mattel Dungeons & Dragons - Computer Labyrinth Game *M34014 TMS1100 1981, Coleco Bowlatronic M34017 TMS1100 1981, MicroVision cartridge: Cosmic Hunter + *M34018 TMS1100 1981, Coleco Head to Head Boxing @M34038 TMS1100 1982, Parker Brothers Lost Treasure M34047 TMS1100 1982, MicroVision cartridge: Super Blockbuster *M34078A TMS1100 1983, Milton Bradley Arcade Mania diff --git a/src/mame/drivers/hnayayoi.cpp b/src/mame/drivers/hnayayoi.cpp index 3afc8c0def9..39c2081a0bf 100644 --- a/src/mame/drivers/hnayayoi.cpp +++ b/src/mame/drivers/hnayayoi.cpp @@ -21,7 +21,7 @@ Year + Game Board --------------------------------------- Notes: -- In service mode, press "analyzer" (0) and "test" (F1) to see a gfx test +- In service mode, press "analyzer" (0) and "test" (F2) to see a gfx test - hnfubuki doesn't have a service mode dip, press "analyzer" instead @@ -269,7 +269,9 @@ static INPUT_PORTS_START( hnayayoi ) PORT_START("DSW3") /* DSW3 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter busy flag - PORT_SERVICE( 0x02, IP_ACTIVE_LOW ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Service_Mode ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -292,7 +294,7 @@ static INPUT_PORTS_START( hnayayoi ) PORT_START("COIN") /* COIN */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) // there is also a dip switch + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) // there is also a dip switch PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Analizer") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "Non Use" in service mode PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) /* "Note" ("Paper Money") = 10 Credits */ @@ -382,9 +384,9 @@ static INPUT_PORTS_START( hnfubuki ) PORT_START("COIN") /* COIN */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Analizer") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Memory Reset") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) /* "Note" ("Paper Money") = 10 Credits */ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) @@ -446,9 +448,9 @@ static INPUT_PORTS_START( untoucha ) PORT_START("COIN") /* COIN */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Analizer") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Memory Reset") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) /* "Note" ("Paper Money") = 5 or 8 Credits */ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) diff --git a/src/mame/drivers/hornet.cpp b/src/mame/drivers/hornet.cpp index 3a15506a5a4..b08482f3a8a 100644 --- a/src/mame/drivers/hornet.cpp +++ b/src/mame/drivers/hornet.cpp @@ -995,8 +995,8 @@ ADC12138_IPT_CONVERT_CB(hornet_state::adc12138_input_callback) int value = 0; switch (input) { - case 0: value = (m_analog1) ? m_analog1->read() : 0; break; - case 1: value = (m_analog2) ? m_analog2->read() : 0; break; + case 0: value = m_analog1.read_safe(0); break; + case 1: value = m_analog2.read_safe(0); break; } return (double)(value) / 2047.0; diff --git a/src/mame/drivers/huebler.cpp b/src/mame/drivers/huebler.cpp index 26148bcbff6..c552329d99a 100644 --- a/src/mame/drivers/huebler.cpp +++ b/src/mame/drivers/huebler.cpp @@ -278,24 +278,6 @@ static const z80_daisy_config amu880_daisy_chain[] = void amu880_state::machine_start() { - // find keyboard rows - m_key_row[0] = m_y0; - m_key_row[1] = m_y1; - m_key_row[2] = m_y2; - m_key_row[3] = m_y3; - m_key_row[4] = m_y4; - m_key_row[5] = m_y5; - m_key_row[6] = m_y6; - m_key_row[7] = m_y7; - m_key_row[8] = m_y8; - m_key_row[9] = m_y9; - m_key_row[10] = m_y10; - m_key_row[11] = m_y11; - m_key_row[12] = m_y12; - m_key_row[13] = m_y13; - m_key_row[14] = m_y14; - m_key_row[15] = m_y15; - /* register for state saving */ save_item(NAME(m_key_d6)); save_item(NAME(m_key_d7)); diff --git a/src/mame/drivers/hyhoo.cpp b/src/mame/drivers/hyhoo.cpp index 9def22372b7..64fcee9eda1 100644 --- a/src/mame/drivers/hyhoo.cpp +++ b/src/mame/drivers/hyhoo.cpp @@ -109,7 +109,7 @@ static INPUT_PORTS_START( hyhoo ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, hyhoo_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // NOT USED PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) // SERVICE - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Memory Reset") // MEMORY RESET + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // NOT USED @@ -184,7 +184,7 @@ static INPUT_PORTS_START( hyhoo2 ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, hyhoo_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // NOT USED PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) // SERVICE - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Memory Reset") // MEMORY RESET + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // NOT USED diff --git a/src/mame/drivers/isbc.cpp b/src/mame/drivers/isbc.cpp index 21836db109c..299d117ed72 100644 --- a/src/mame/drivers/isbc.cpp +++ b/src/mame/drivers/isbc.cpp @@ -55,8 +55,19 @@ public: DECLARE_WRITE_LINE_MEMBER(isbc_uart8274_irq); DECLARE_READ8_MEMBER(get_slave_ack); DECLARE_WRITE8_MEMBER(ppi_c_w); +protected: + void machine_reset() override; }; +void isbc_state::machine_reset() +{ + if(m_centronics) + { + m_centronics->write_busy(0); // centronics_device sets busy to 1 at reset causing spurious irqs + m_pic_1->ir7_w(0); + } +} + static ADDRESS_MAP_START(rpc86_mem, AS_PROGRAM, 16, isbc_state) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x00000, 0x3ffff) AM_RAM diff --git a/src/mame/drivers/jackal.cpp b/src/mame/drivers/jackal.cpp index 7f28f96d665..26e2c97dcf3 100644 --- a/src/mame/drivers/jackal.cpp +++ b/src/mame/drivers/jackal.cpp @@ -87,7 +87,7 @@ Address Dir Data Description READ8_MEMBER(jackal_state::jackalr_rotary_r) { - return (1 << read_safe(ioport(offset ? "DIAL1" : "DIAL0"), 0x00)) ^ 0xff; + return (1 << m_dials[offset].read_safe(0x00)) ^ 0xff; } WRITE8_MEMBER(jackal_state::jackal_flipscreen_w) diff --git a/src/mame/drivers/jangou.cpp b/src/mame/drivers/jangou.cpp index 64c34ac3cf2..250db8e3d38 100644 --- a/src/mame/drivers/jangou.cpp +++ b/src/mame/drivers/jangou.cpp @@ -763,7 +763,7 @@ static INPUT_PORTS_START( roylcrdn ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) /* Spare 2 */ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Note In") /* Note In */ - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_TOGGLE PORT_CODE(KEYCODE_9) PORT_NAME("Memory Reset") /* Memory Reset */ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_TOGGLE PORT_CODE(KEYCODE_9) /* Memory Reset */ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_TOGGLE PORT_CODE(KEYCODE_0) PORT_NAME("Analyzer") /* Analyzer */ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_TOGGLE PORT_CODE(KEYCODE_F2) PORT_NAME("Test Mode") /* Test Mode */ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Coin In") /* Coin In */ diff --git a/src/mame/drivers/juicebox.cpp b/src/mame/drivers/juicebox.cpp index f0e58b3138c..a024b893759 100644 --- a/src/mame/drivers/juicebox.cpp +++ b/src/mame/drivers/juicebox.cpp @@ -223,10 +223,10 @@ WRITE32_MEMBER(juicebox_state::s3c44b0_gpio_port_w) READ32_MEMBER(juicebox_state::juicebox_nand_r) { UINT32 data = 0; - if (mem_mask & 0x000000FF) data = data | (smc_read() << 0); - if (mem_mask & 0x0000FF00) data = data | (smc_read() << 8); - if (mem_mask & 0x00FF0000) data = data | (smc_read() << 16); - if (mem_mask & 0xFF000000) data = data | (smc_read() << 24); + if (ACCESSING_BITS_0_7) data = data | (smc_read() << 0); + if (ACCESSING_BITS_8_15) data = data | (smc_read() << 8); + if (ACCESSING_BITS_16_23) data = data | (smc_read() << 16); + if (ACCESSING_BITS_24_31) data = data | (smc_read() << 24); verboselog( 5, "juicebox_nand_r %08X %08X %08X\n", offset, mem_mask, data); return data; } @@ -234,10 +234,10 @@ READ32_MEMBER(juicebox_state::juicebox_nand_r) WRITE32_MEMBER(juicebox_state::juicebox_nand_w) { verboselog( 5, "juicebox_nand_w %08X %08X %08X\n", offset, mem_mask, data); - if (mem_mask & 0x000000FF) smc_write((data >> 0) & 0xFF); - if (mem_mask & 0x0000FF00) smc_write((data >> 8) & 0xFF); - if (mem_mask & 0x00FF0000) smc_write((data >> 16) & 0xFF); - if (mem_mask & 0xFF000000) smc_write((data >> 24) & 0xFF); + if (ACCESSING_BITS_0_7) smc_write((data >> 0) & 0xFF); + if (ACCESSING_BITS_8_15) smc_write((data >> 8) & 0xFF); + if (ACCESSING_BITS_16_23) smc_write((data >> 16) & 0xFF); + if (ACCESSING_BITS_24_31) smc_write((data >> 24) & 0xFF); } // I2S diff --git a/src/mame/drivers/kurukuru.cpp b/src/mame/drivers/kurukuru.cpp index 2e003469c0c..bc9b968bf7e 100644 --- a/src/mame/drivers/kurukuru.cpp +++ b/src/mame/drivers/kurukuru.cpp @@ -124,12 +124,17 @@ 3) Pyon Pyon Jump (a contents where the same characters try to cross the river jumping on pads). 4) Sui Sui Pyon Pyon (a swimming competition where the same characters swim with different styles, even walking). - Coin 1 (key 5) could be set either as Coin 1 or as Payout button, through - a DIP switch. + The 100 Yen coin input (key 7) can be set as "Exchange" through a DIP switch, in + which case its value is not accepted as credits but immediately paid out in + "medals." If you get a 'medal jam' error, and the game is not responding anymore, press - RESET (key 9), and the game will reset to default values (even all counters - will be cleared). + RESET (key F1), and the game will reset to default values (even all counters + will be cleared; the program does this by zeroing the magic byte preceding the + game ID string copied with it into NVRAM and then jumping to the boot routine). + + The tables for the I/O routines have room for 7 coin inputs (address + mask) and + 3 output latches, but only 3 coin inputs and 1 output latch are defined and used. ************************************************************************************ @@ -145,9 +150,9 @@ How to play... Insert tokens (medals). - You can bet to any (or all) of the following 5 characters: Bote, Oume, Pyoko, - Kunio, and Pyon Pyon. Press start, and the reels start to roll. You'll win if - you can get 3 of the chosen character(s) in a row, column or diagonal. + You can bet to any (or all) of the following 5 characters: Botechin, Oume, + Pyokorin, Kunio, and Pyon-Pyon. Press start, and the reels start to roll. You'll + win if you can get 3 of the chosen character(s) in a row, column or diagonal. The black tadpoles behave just like jokers... If you have 2 chosen characters in a row and the remaining one is a black tadpole, it will transform into another @@ -254,6 +259,9 @@ #include "machine/nvram.h" #include "machine/gen_latch.h" +#define UNICODE_10YEN "\xC2\xA5" "10" +#define UNICODE_100YEN "\xC2\xA5" "100" + class kurukuru_state : public driver_device { public: @@ -361,7 +369,7 @@ WRITE8_MEMBER(kurukuru_state::kurukuru_out_latch_w) machine().bookkeeping().coin_counter_w(0, data & 0x01); /* Coin Counter 1 */ machine().bookkeeping().coin_counter_w(1, data & 0x20); /* Coin Counter 2 */ machine().bookkeeping().coin_lockout_global_w(data & 0x40); /* Coin Lock */ - m_hopper->write(space, 0, (data & 0x40)); /* Hopper Motor */ + m_hopper->write(space, 0, (data & 0x40) ? 0x80 : 0); /* Hopper Motor */ if (data & 0x9e) logerror("kurukuru_out_latch_w %02X @ %04X\n", data, space.device().safe_pc()); @@ -540,13 +548,13 @@ static INPUT_PORTS_START( kurukuru ) /* bits d0-d3 are JAMMA top side pins 20,21,22,23, bits d4-d7 are JAMMA bottom side pins 20,21,22,23 so that's player 1 left/right/button1/button2 then player 2 left/right/button1/button2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("1st (Bote/Botechin)") // edge connector pin 20 top + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("1st (Botechin)") // edge connector pin 20 top PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("2nd (Oume)") // edge connector pin 21 top - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("3rd (Pyoko/Pyokorin)") // edge connector pin 22 top + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("3rd (Pyokorin)") // edge connector pin 22 top PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("4th (Kunio)") // edge connector pin 23 top PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("5th (Pyon-Pyon)") // edge connector pin 20 bottom - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_N) PORT_NAME("Unknown A0h - bit5") // edge connector pin 21 bottom - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_M) PORT_NAME("Unknown A0h - bit6") // edge connector pin 22 bottom + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) // edge connector pin 21 bottom + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // edge connector pin 22 bottom PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) // edge connector pin 23 bottom PORT_START("IN1") @@ -554,16 +562,16 @@ static INPUT_PORTS_START( kurukuru ) so that's test, tilt/slam, coin 1, coin 2, p1 start, p2 start, p1 button 3, p2 button 3 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // edge connector pin 15 top - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("Medal In") // edge connector pin 15 bottom - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_NAME("Reset Button") // edge connector pin 16 top - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) // edge connector pin 16 bottom - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) PORT_NAME("Unknown B0h - bit4") // edge connector pin 17 top (active) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE (2) // edge connector pin 17 bottom + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Medal In") // edge connector pin 15 bottom + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // edge connector pin 16 top + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME(UNICODE_10YEN " In") // edge connector pin 16 bottom + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // edge connector pin 17 top (active) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME(UNICODE_100YEN " In") PORT_IMPULSE(2) // edge connector pin 17 bottom PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("hopper", ticket_dispenser_device, line_r) // hopper feedback, edge connector pin 24 top PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // edge connector pin 24 bottom PORT_START("DSW1") // found in the PCB: 11111111 - PORT_DIPNAME( 0x07, 0x00, "Coinage A (100 Y)" ) PORT_DIPLOCATION("DSW1:1,2,3") + PORT_DIPNAME( 0x07, 0x00, "Coinage A (" UNICODE_100YEN ")" ) PORT_DIPLOCATION("DSW1:1,2,3") PORT_DIPSETTING( 0x02, "1 Coin / 3 Medal" ) PORT_DIPSETTING( 0x06, "1 Coin / 4 Medal" ) PORT_DIPSETTING( 0x01, "1 Coin / 5 Medal" ) @@ -572,17 +580,17 @@ static INPUT_PORTS_START( kurukuru ) PORT_DIPSETTING( 0x07, "1 Coin / 11 Medal" ) PORT_DIPSETTING( 0x04, "1 Coin / 20 Medal" ) PORT_DIPSETTING( 0x00, "1 Coin / 50 Medal" ) - PORT_DIPNAME( 0x18, 0x00, "Coinage B (10 Y)" ) PORT_DIPLOCATION("DSW1:4,5") + PORT_DIPNAME( 0x18, 0x00, "Coinage B (" UNICODE_10YEN ")" ) PORT_DIPLOCATION("DSW1:4,5") PORT_DIPSETTING( 0x00, "3 Coin / 1 Medal" ) PORT_DIPSETTING( 0x10, "2 Coin / 1 Medal" ) PORT_DIPSETTING( 0x18, "1 Coin / 1 Medal" ) PORT_DIPSETTING( 0x08, "1 Coin / 2 Medal" ) PORT_DIPNAME( 0x20, 0x00, "Coinage Config" ) PORT_DIPLOCATION("DSW1:6") - PORT_DIPSETTING( 0x00, "Coin 1 = Normal; Medal In = 2 Credits by Medal" ) - PORT_DIPSETTING( 0x20, "Coin 1 = Payout; Medal In = 1 Credit by Medal" ) + PORT_DIPSETTING( 0x00, UNICODE_100YEN " = Credits; Medal In = 2 Credits by Medal" ) + PORT_DIPSETTING( 0x20, UNICODE_100YEN " = Exchange; Medal In = 1 Credit by Medal" ) PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("DSW1:7") - PORT_DIPSETTING( 0x40, "Manual" ) - PORT_DIPSETTING( 0x00, "Automatic" ) + PORT_DIPSETTING( 0x40, "Automatic" ) + PORT_DIPSETTING( 0x00, "Manual" ) PORT_DIPNAME( 0x80, 0x00, "Repeat Last Bet") PORT_DIPLOCATION("DSW1:8") PORT_DIPSETTING( 0x80, DEF_STR( No ) ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) @@ -625,8 +633,8 @@ static INPUT_PORTS_START( ppj ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("3rd (Pyon-Pyon)") // edge connector pin 22 top PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("4th (Pyokorin)") // edge connector pin 23 top PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("5th (Botechin)") // edge connector pin 20 bottom - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) PORT_NAME("Unknown 70h - bit5") // edge connector pin 21 bottom (active) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) PORT_NAME("Unknown 70h - bit6") // edge connector pin 22 bottom (active) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) // edge connector pin 21 bottom (active) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // edge connector pin 22 bottom (active) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) // edge connector pin 23 bottom PORT_START("IN1") @@ -634,16 +642,16 @@ static INPUT_PORTS_START( ppj ) so that's test, tilt/slam, coin 1, coin 2, p1 start, p2 start, p1 button 3, p2 button 3 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // edge connector pin 15 top - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("Medal In") // edge connector pin 15 bottom - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_NAME("Reset Button") // edge connector pin 16 top - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) // edge connector pin 16 bottom - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) PORT_NAME("Unknown 60h - bit4") // edge connector pin 17 top (active) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE (2) // edge connector pin 17 bottom + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Medal In") // edge connector pin 15 bottom + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // edge connector pin 16 top + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME(UNICODE_10YEN " In") // edge connector pin 16 bottom + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // edge connector pin 17 top (active) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME(UNICODE_100YEN " In") PORT_IMPULSE(2) // edge connector pin 17 bottom PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("hopper", ticket_dispenser_device, line_r) // hopper feedback, edge connector pin 24 top PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // edge connector pin 24 bottom PORT_START("DSW1") // found in the PCB: 00000000 (arranged for sale since they are uncommon settings) - PORT_DIPNAME( 0x07, 0x03, "Coinage A (100 Y)" ) PORT_DIPLOCATION("DSW1:1,2,3") + PORT_DIPNAME( 0x07, 0x03, "Coinage A (" UNICODE_100YEN ")" ) PORT_DIPLOCATION("DSW1:1,2,3") PORT_DIPSETTING( 0x00, "1 Coin / 1 Medal" ) PORT_DIPSETTING( 0x04, "1 Coin / 2 Medal" ) PORT_DIPSETTING( 0x02, "1 Coin / 3 Medal" ) @@ -652,21 +660,22 @@ static INPUT_PORTS_START( ppj ) PORT_DIPSETTING( 0x05, "1 Coin / 6 Medal" ) PORT_DIPSETTING( 0x03, "1 Coin / 10 Medal" ) PORT_DIPSETTING( 0x07, "1 Coin / 11 Medal" ) - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:4") - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + // Coinage B is always 1 Coin / 1 Medal + PORT_DIPNAME( 0x08, 0x00, "Coinage Config" ) PORT_DIPLOCATION("DSW1:4") + PORT_DIPSETTING( 0x00, UNICODE_100YEN " = Credits" ) + PORT_DIPSETTING( 0x08, UNICODE_100YEN " = Exchange" ) + PORT_DIPNAME( 0x10, 0x00, "Payout Mode" ) PORT_DIPLOCATION("DSW1:5") + PORT_DIPSETTING( 0x10, "Automatic" ) + PORT_DIPSETTING( 0x00, "Manual" ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:6") + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x00, "Unknown (related to coin1/payout)") PORT_DIPLOCATION("DSW1:5") - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:7") + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:8") + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x00, "Coinage Config" ) PORT_DIPLOCATION("DSW1:6") - PORT_DIPSETTING( 0x00, "Coin 1 = Normal" ) - PORT_DIPSETTING( 0x20, "Coin 1 = Payout" ) - PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("DSW1:7") - PORT_DIPSETTING( 0x40, "Manual" ) - PORT_DIPSETTING( 0x00, "Automatic" ) - PORT_DIPNAME( 0x80, 0x00, "Repeat Last Bet") PORT_DIPLOCATION("DSW1:8") - PORT_DIPSETTING( 0x80, DEF_STR( No ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_START("DSW2") // found in the PCB: 00000000 (arranged for sale since they are uncommon settings) PORT_DIPNAME( 0x07, 0x01, "Percentage" ) PORT_DIPLOCATION("DSW2:1,2,3") @@ -732,7 +741,7 @@ static MACHINE_CONFIG_START( kurukuru, kurukuru_state ) MCFG_V99X8_INTERRUPT_CALLBACK(INPUTLINE("maincpu", 0)) MCFG_V99X8_SCREEN_ADD_NTSC("screen", "v9938", MAIN_CLOCK) - MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(HOPPER_PULSE), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW ) + MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(HOPPER_PULSE), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -770,7 +779,7 @@ static MACHINE_CONFIG_START( ppj, kurukuru_state ) MCFG_V99X8_INTERRUPT_CALLBACK(INPUTLINE("maincpu", 0)) MCFG_V99X8_SCREEN_ADD_NTSC("screen", "v9938", MAIN_CLOCK) - MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(HOPPER_PULSE), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW ) + MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(HOPPER_PULSE), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -800,6 +809,7 @@ MACHINE_CONFIG_END ROM_START( kurukuru ) ROM_REGION( 0x08000, "maincpu", 0 ) ROM_LOAD( "kp_17l.ic17", 0x00000, 0x08000, CRC(9b552ebc) SHA1(07d0e62b7fdad381963a345376b72ad31eb7b96d) ) // program code + // Game ID string: "carp carp carp hiroshima ---" ROM_REGION( 0x40000, "user1", 0 ) // maincpu banked roms ROM_FILL( 0x00000, 0x10000, 0xff ) // ic23: unpopulated @@ -824,6 +834,7 @@ ROM_END ROM_START( ppj ) ROM_REGION( 0x08000, "maincpu", 0 ) ROM_LOAD( "ppj17.ic17", 0x00000, 0x08000, CRC(5d9c9ceb) SHA1(0f52c8a0aaaf978afeb07e56493399133b4ce781) ) // program code + // Game ID string: "PYON PYON JUMP V1.40" ROM_REGION( 0x40000, "user1", 0 ) // maincpu banked roms ROM_FILL( 0x00000, 0x10000, 0xff ) // ic23: unpopulated diff --git a/src/mame/drivers/laserbat.cpp b/src/mame/drivers/laserbat.cpp index 3f3342c3ed0..946d22200c8 100644 --- a/src/mame/drivers/laserbat.cpp +++ b/src/mame/drivers/laserbat.cpp @@ -136,8 +136,7 @@ WRITE8_MEMBER(laserbat_state_base::ct_io_w) READ8_MEMBER(laserbat_state_base::rrowx_r) { - ioport_port *const mux_ports[] = { m_row0, m_row1, m_sw1, m_sw2 }; - return (m_mpx_p_1_2 ? m_row2 : mux_ports[m_input_mux])->read(); + return (m_mpx_p_1_2 ? m_row2 : m_mux_ports[m_input_mux])->read(); } /* diff --git a/src/mame/drivers/lc80.cpp b/src/mame/drivers/lc80.cpp index b29f5836f35..9deed1fc2fe 100644 --- a/src/mame/drivers/lc80.cpp +++ b/src/mame/drivers/lc80.cpp @@ -64,9 +64,9 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( lc80_io, AS_IO, 8, lc80_state ) ADDRESS_MAP_GLOBAL_MASK(0x1f) - AM_RANGE(0xf4, 0xf7) AM_DEVREADWRITE(Z80PIO1_TAG, z80pio_device, read, write) - AM_RANGE(0xf8, 0xfb) AM_DEVREADWRITE(Z80PIO2_TAG, z80pio_device, read, write) - AM_RANGE(0xec, 0xef) AM_DEVREADWRITE(Z80CTC_TAG, z80ctc_device, read, write) + AM_RANGE(0x14, 0x17) AM_DEVREADWRITE(Z80PIO1_TAG, z80pio_device, read, write) + AM_RANGE(0x18, 0x1b) AM_DEVREADWRITE(Z80PIO2_TAG, z80pio_device, read, write) + AM_RANGE(0x0c, 0x0f) AM_DEVREADWRITE(Z80CTC_TAG, z80ctc_device, read, write) ADDRESS_MAP_END /* Input Ports */ diff --git a/src/mame/drivers/lisa.cpp b/src/mame/drivers/lisa.cpp index 34e9b8bbe1f..1e5dad25b03 100644 --- a/src/mame/drivers/lisa.cpp +++ b/src/mame/drivers/lisa.cpp @@ -31,7 +31,6 @@ static ADDRESS_MAP_START(lisa_fdc_map, AS_PROGRAM, 8, lisa_state ) AM_RANGE(0x0400, 0x07ff) AM_READWRITE(lisa_fdc_io_r, lisa_fdc_io_w) /* disk controller (IWM and TTL logic) */ AM_RANGE(0x0800, 0x0fff) AM_NOP AM_RANGE(0x1000, 0x1fff) AM_ROM AM_REGION("fdccpu", 0x1000) AM_SHARE("fdc_rom") /* ROM */ - AM_RANGE(0x2000, 0xffff) AM_READWRITE(lisa_fdc_r, lisa_fdc_w) /* handler for wrap-around */ ADDRESS_MAP_END static ADDRESS_MAP_START(lisa210_fdc_map, AS_PROGRAM, 8, lisa_state ) @@ -41,7 +40,6 @@ static ADDRESS_MAP_START(lisa210_fdc_map, AS_PROGRAM, 8, lisa_state ) AM_RANGE(0x0800, 0x0bff) AM_READWRITE(lisa_fdc_io_r, lisa_fdc_io_w) /* disk controller (IWM and TTL logic) */ AM_RANGE(0x0c00, 0x0fff) AM_NOP /* nothing, or IO port wrap-around ??? */ AM_RANGE(0x1000, 0x1fff) AM_ROM AM_REGION("fdccpu", 0x1000) AM_SHARE("fdc_rom") /* ROM */ - AM_RANGE(0x2000, 0xffff) AM_READWRITE(lisa_fdc_r, lisa_fdc_w) /* handler for wrap-around */ ADDRESS_MAP_END diff --git a/src/mame/drivers/lvcards.cpp b/src/mame/drivers/lvcards.cpp index 48225a4cc78..2d855815cdd 100644 --- a/src/mame/drivers/lvcards.cpp +++ b/src/mame/drivers/lvcards.cpp @@ -272,7 +272,7 @@ static INPUT_PORTS_START( lvpoker ) PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Analyzer") PORT_TOGGLE PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_MINUS) PORT_NAME("Memory Reset") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_CODE(KEYCODE_MINUS) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Clear Stats") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_EQUALS) PORT_NAME("Hopper Reset") diff --git a/src/mame/drivers/mac.cpp b/src/mame/drivers/mac.cpp index 36433ae5fc1..5b7e56d18b8 100644 --- a/src/mame/drivers/mac.cpp +++ b/src/mame/drivers/mac.cpp @@ -136,7 +136,7 @@ WRITE32_MEMBER( mac_state::rbv_ramdac_w ) if (m_model != MODEL_MAC_CLASSIC_II) { // Color Classic has no MONTYPE so the default gets us 512x384, which is right - if ((m_montype ? m_montype->read() : 2) == 1) + if (m_montype.read_safe(2) == 1) { m_palette->set_pen_color(m_rbv_clutoffs, rgb_t(m_rbv_colors[2], m_rbv_colors[2], m_rbv_colors[2])); m_rbv_palette[m_rbv_clutoffs] = rgb_t(m_rbv_colors[2], m_rbv_colors[2], m_rbv_colors[2]); @@ -172,7 +172,7 @@ WRITE32_MEMBER( mac_state::ariel_ramdac_w ) // this is for the "Ariel" style RAM if (m_model != MODEL_MAC_CLASSIC_II) { // Color Classic has no MONTYPE so the default gets us 512x384, which is right - if ((m_montype ? m_montype->read() : 2) == 1) + if (m_montype.read_safe(2) == 1) { m_palette->set_pen_color(m_rbv_clutoffs, rgb_t(m_rbv_colors[2], m_rbv_colors[2], m_rbv_colors[2])); m_rbv_palette[m_rbv_clutoffs] = rgb_t(m_rbv_colors[2], m_rbv_colors[2], m_rbv_colors[2]); @@ -204,7 +204,7 @@ READ8_MEMBER( mac_state::mac_sonora_vctl_r ) if (offset == 2) { // printf("Sonora: read monitor ID at PC=%x\n", m_maincpu->pc()); - return ((m_montype ? m_montype->read() : 6)<<4); + return (m_montype.read_safe(6)<<4); } return m_sonora_vctl[offset]; @@ -260,7 +260,7 @@ READ8_MEMBER ( mac_state::mac_rbv_r ) if (offset == 0x10) { data &= ~0x38; - data |= ((m_montype ? m_montype->read() : 2)<<3); + data |= (m_montype.read_safe(2)<<3); // printf("rbv_r montype: %02x (PC %x)\n", data, space.cpu->safe_pc()); } diff --git a/src/mame/drivers/maxaflex.cpp b/src/mame/drivers/maxaflex.cpp index 49d41708a6b..0514c9b45d9 100644 --- a/src/mame/drivers/maxaflex.cpp +++ b/src/mame/drivers/maxaflex.cpp @@ -389,12 +389,12 @@ INPUT_PORTS_END READ8_MEMBER(maxaflex_state::pia_pa_r) { - return atari_input_disabled() ? 0xff : read_safe(m_joy01, 0); + return atari_input_disabled() ? 0xff : m_joy01.read_safe(0); } READ8_MEMBER(maxaflex_state::pia_pb_r) { - return atari_input_disabled() ? 0xff : read_safe(m_joy23, 0); + return atari_input_disabled() ? 0xff : m_joy23.read_safe(0); } diff --git a/src/mame/drivers/maygay1b.cpp b/src/mame/drivers/maygay1b.cpp index 26c976c4eee..0c4907e76a4 100644 --- a/src/mame/drivers/maygay1b.cpp +++ b/src/mame/drivers/maygay1b.cpp @@ -559,8 +559,7 @@ WRITE8_MEMBER( maygay1b_state::lamp_data_w ) READ8_MEMBER( maygay1b_state::kbd_r ) { - ioport_port * portnames[] = { m_sw1_port, m_s2_port, m_s3_port, m_s4_port, m_s5_port, m_s6_port, m_s7_port, m_sw2_port}; - return (portnames[m_lamp_strobe&0x07])->read(); + return (m_kbd_ports[m_lamp_strobe&0x07])->read(); } WRITE8_MEMBER( maygay1b_state::lamp_data_2_w ) diff --git a/src/mame/drivers/mc1502.cpp b/src/mame/drivers/mc1502.cpp index a0a90856b39..2ad1fc20adc 100644 --- a/src/mame/drivers/mc1502.cpp +++ b/src/mame/drivers/mc1502.cpp @@ -267,17 +267,18 @@ static MACHINE_CONFIG_START( mc1502, mc1502_state ) MCFG_I8255_OUT_PORTC_CB(WRITE8(mc1502_state, mc1502_kppi_portc_w)) MCFG_DEVICE_ADD( "upd8251", I8251, 0) - MCFG_I8251_TXD_HANDLER(DEVWRITELINE("irps", rs232_port_device, write_txd)) - MCFG_I8251_DTR_HANDLER(DEVWRITELINE("irps", rs232_port_device, write_dtr)) - MCFG_I8251_RTS_HANDLER(DEVWRITELINE("irps", rs232_port_device, write_rts)) + MCFG_I8251_TXD_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_txd)) + MCFG_I8251_DTR_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_dtr)) + MCFG_I8251_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts)) /* XXX RxD data are accessible via PPI port C, bit 7 */ MCFG_I8251_RXRDY_HANDLER(DEVWRITELINE("pic8259", pic8259_device, ir7_w)) /* default handler does nothing */ MCFG_I8251_TXRDY_HANDLER(DEVWRITELINE("pic8259", pic8259_device, ir7_w)) MCFG_I8251_SYNDET_HANDLER(WRITELINE(mc1502_state, mc1502_i8251_syndet)) - MCFG_RS232_PORT_ADD("irps", default_rs232_devices, nullptr) + MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, nullptr) MCFG_RS232_RXD_HANDLER(DEVWRITELINE("upd8251", i8251_device, write_rxd)) MCFG_RS232_DSR_HANDLER(DEVWRITELINE("upd8251", i8251_device, write_dsr)) + MCFG_RS232_CTS_HANDLER(DEVWRITELINE("upd8251", i8251_device, write_cts)) MCFG_DEVICE_ADD("isa", ISA8, 0) MCFG_ISA8_CPU(":maincpu") diff --git a/src/mame/drivers/mediagx.cpp b/src/mame/drivers/mediagx.cpp index 1ad02146050..df142524f37 100644 --- a/src/mame/drivers/mediagx.cpp +++ b/src/mame/drivers/mediagx.cpp @@ -95,7 +95,9 @@ public: m_vram(*this, "vram"), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), - m_palette(*this, "palette") { } + m_palette(*this, "palette"), + m_ports(*this, {"IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7", "IN8"}) + { } required_device m_ide; required_shared_ptr m_main_ram; @@ -107,6 +109,7 @@ public: required_device m_palette; UINT8 m_pal[768]; + optional_ioport_array<9> m_ports; // but parallel_pointer takes values 0 -> 23 UINT32 m_disp_ctrl_reg[256/4]; int m_frame_width; @@ -515,25 +518,24 @@ WRITE8_MEMBER(mediagx_state::io20_w) READ32_MEMBER(mediagx_state::parallel_port_r) { UINT32 r = 0; - //static const char *const portnames[] = { "IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7", "IN8" }; // but parallel_pointer takes values 0 -> 23 if (ACCESSING_BITS_8_15) { - UINT8 nibble = m_parallel_latched;//(read_safe(ioport(m_portnames[m_parallel_pointer / 3]), 0) >> (4 * (m_parallel_pointer % 3))) & 15; + UINT8 nibble = m_parallel_latched; r |= ((~nibble & 0x08) << 12) | ((nibble & 0x07) << 11); logerror("%08X:parallel_port_r()\n", space.device().safe_pc()); #if 0 if (m_controls_data == 0x18) { - r |= ioport("IN0")->read() << 8; + r |= m_ports[0]->read() << 8; } else if (m_controls_data == 0x60) { - r |= ioport("IN1")->read() << 8; + r |= m_ports[1]->read() << 8; } else if (m_controls_data == 0xff || m_controls_data == 0x50) { - r |= ioport("IN2")->read() << 8; + r |= m_ports[2]->read() << 8; } //r |= m_control_read << 8; @@ -549,8 +551,6 @@ READ32_MEMBER(mediagx_state::parallel_port_r) WRITE32_MEMBER(mediagx_state::parallel_port_w) { - static const char *const portnames[] = { "IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7", "IN8" }; // but parallel_pointer takes values 0 -> 23 - COMBINE_DATA( &m_parport ); if (ACCESSING_BITS_0_7) @@ -572,7 +572,7 @@ WRITE32_MEMBER(mediagx_state::parallel_port_w) logerror("%08X:", space.device().safe_pc()); - m_parallel_latched = (read_safe(ioport(portnames[m_parallel_pointer / 3]), 0) >> (4 * (m_parallel_pointer % 3))) & 15; + m_parallel_latched = (m_ports[m_parallel_pointer / 3].read_safe(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.cpp b/src/mame/drivers/megadriv.cpp index e31c5e939d5..8630eb72396 100644 --- a/src/mame/drivers/megadriv.cpp +++ b/src/mame/drivers/megadriv.cpp @@ -356,7 +356,7 @@ MACHINE_RESET_MEMBER(md_cons_state, ms_megadriv) // same as screen_eof_megadriv but with addition of 32x and SegaCD/MegaCD pieces void md_cons_state::screen_eof_console(screen_device &screen, bool state) { - if (m_io_reset && (m_io_reset->read() & 0x01)) + if (m_io_reset.read_safe(0) & 0x01) m_maincpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE); // rising edge diff --git a/src/mame/drivers/megasys1.cpp b/src/mame/drivers/megasys1.cpp index 92314029c94..8f0cba5913c 100644 --- a/src/mame/drivers/megasys1.cpp +++ b/src/mame/drivers/megasys1.cpp @@ -303,6 +303,31 @@ static ADDRESS_MAP_START( megasys1B_map, AS_PROGRAM, 16, megasys1_state ) AM_RANGE(0x0e0000, 0x0e0001) AM_READWRITE(ip_select_r,ip_select_w) ADDRESS_MAP_END +static ADDRESS_MAP_START( megasys1B_edfbl_map, AS_PROGRAM, 16, megasys1_state ) + ADDRESS_MAP_GLOBAL_MASK(0xfffff) + AM_RANGE(0x0e0002, 0x0e0003) AM_READ_PORT("SYSTEM") + AM_RANGE(0x0e0004, 0x0e0005) AM_READ_PORT("P1") + AM_RANGE(0x0e0006, 0x0e0007) AM_READ_PORT("P2") + AM_RANGE(0x0e0008, 0x0e0009) AM_READ_PORT("DSW1") + AM_RANGE(0x0e000a, 0x0e000b) AM_READ_PORT("DSW2") + //AM_RANGE(0x0e000e, 0x0e000f) // soundlatch moved here + AM_IMPORT_FROM(megasys1B_map) +ADDRESS_MAP_END + +static ADDRESS_MAP_START( megasys1B_monkelf_map, AS_PROGRAM, 16, megasys1_state ) + ADDRESS_MAP_GLOBAL_MASK(0xfffff) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x044000, 0x0443ff) AM_WRITE(megasys1_vregs_monkelf_w) + AM_RANGE(0x0e0002, 0x0e0003) AM_READ_PORT("P1") + AM_RANGE(0x0e0004, 0x0e0005) AM_READ_PORT("P2") + AM_RANGE(0x0e0006, 0x0e0007) AM_READ_PORT("DSW1") + AM_RANGE(0x0e0008, 0x0e0009) AM_READ_PORT("DSW2") + AM_RANGE(0x0e000a, 0x0e000b) AM_READ_PORT("SYSTEM") + AM_IMPORT_FROM(megasys1B_map) +ADDRESS_MAP_END + + + /*************************************************************************** [ Main CPU - System C ] @@ -1626,11 +1651,16 @@ static MACHINE_CONFIG_DERIVED( system_B, system_A ) MACHINE_CONFIG_END +static MACHINE_CONFIG_DERIVED( system_B_monkelf, system_B ) + MCFG_CPU_MODIFY("maincpu") + MCFG_CPU_PROGRAM_MAP(megasys1B_monkelf_map) +MACHINE_CONFIG_END + static MACHINE_CONFIG_START( system_Bbl, megasys1_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, SYS_B_CPU_CLOCK) - MCFG_CPU_PROGRAM_MAP(megasys1B_map) + MCFG_CPU_PROGRAM_MAP(megasys1B_edfbl_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", megasys1_state, megasys1B_scanline, "screen", 0, 1) MCFG_MACHINE_RESET_OVERRIDE(megasys1_state,megasys1) @@ -4250,30 +4280,6 @@ DRIVER_INIT_MEMBER(megasys1_state,edfp) phantasm_rom_decode(machine(), "maincpu"); } -READ16_MEMBER(megasys1_state::edfbl_input_r) -{ - ioport_port *in_names[] = { m_io_system, m_io_p1, m_io_p2, m_io_dsw1, m_io_dsw2 }; - UINT16 res; - - res = 0; - - switch(offset) - { - case 0x02/2: - case 0x04/2: - case 0x06/2: - case 0x08/2: - case 0x0a/2: res = in_names[offset-1]->read(); break; - } - - return res; -} - -DRIVER_INIT_MEMBER(megasys1_state,edfbl) -{ - m_maincpu->space(AS_PROGRAM).install_read_handler(0xe0000, 0xe000f, read16_delegate(FUNC(megasys1_state::edfbl_input_r),this)); -} - DRIVER_INIT_MEMBER(megasys1_state,hayaosi1) { m_ip_select_values[0] = 0x51; @@ -4473,34 +4479,12 @@ DRIVER_INIT_MEMBER(megasys1_state,stdragonb) stdragona_gfx_unmangle("gfx4"); } -READ16_MEMBER(megasys1_state::monkelf_input_r) -{ - ioport_port *in_names[] = { m_io_p1, m_io_p2, m_io_dsw1, m_io_dsw2, m_io_system }; - UINT16 res; - - res = 0xffff; - - switch(offset) - { - case 0x02/2: - case 0x04/2: - case 0x06/2: - case 0x08/2: - case 0x0a/2: res = in_names[offset-1]->read(); break; - } - - return res; -} - DRIVER_INIT_MEMBER(megasys1_state,monkelf) { DRIVER_INIT_CALL(avspirit); m_rom_maincpu[0x00744/2] = 0x4e71; // weird check, 0xe000e R is a port-based trap? - m_maincpu->space(AS_PROGRAM).install_read_handler(0xe0000, 0xe000f, read16_delegate(FUNC(megasys1_state::monkelf_input_r),this)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x44000, 0x443ff, write16_delegate(FUNC(megasys1_state::megasys1_vregs_monkelf_w),this)); - // convert bootleg priority format to standard { int i; @@ -4552,11 +4536,11 @@ GAME( 1992, soldamj, soldam, system_A, soldam, megasys1_state, sol // Type B GAME( 1991, avspirit, 0, system_B, avspirit, megasys1_state, avspirit, ROT0, "Jaleco", "Avenging Spirit", 0 ) -GAME( 1990, monkelf, avspirit, system_B, avspirit, megasys1_state, monkelf, ROT0, "bootleg","Monky Elf (Korean bootleg of Avenging Spirit)", 0 ) +GAME( 1990, monkelf, avspirit, system_B_monkelf, avspirit, megasys1_state, monkelf, ROT0, "bootleg","Monky Elf (Korean bootleg of Avenging Spirit)", 0 ) GAME( 1991, edf, 0, system_B, edf, megasys1_state, edf, ROT0, "Jaleco", "E.D.F. : Earth Defense Force (set 1)", 0 ) GAME( 1991, edfa, edf, system_B, edf, megasys1_state, edf, ROT0, "Jaleco", "E.D.F. : Earth Defense Force (set 2)", 0 ) GAME( 1991, edfu, edf, system_B, edf, megasys1_state, edf, ROT0, "Jaleco", "E.D.F. : Earth Defense Force (North America)", 0 ) -GAME( 1991, edfbl, edf, system_Bbl, edf, megasys1_state, edfbl, ROT0, "bootleg","E.D.F. : Earth Defense Force (bootleg)", MACHINE_NO_SOUND ) +GAME( 1991, edfbl, edf, system_Bbl, edf, driver_device, 0, ROT0, "bootleg","E.D.F. : Earth Defense Force (bootleg)", MACHINE_NO_SOUND ) GAME( 1993, hayaosi1, 0, system_B_hayaosi1, hayaosi1, megasys1_state, hayaosi1, ROT0, "Jaleco", "Hayaoshi Quiz Ouza Ketteisen - The King Of Quiz", MACHINE_IMPERFECT_GRAPHICS ) // Type C diff --git a/src/mame/drivers/meyc8088.cpp b/src/mame/drivers/meyc8088.cpp index 7e8edcf4169..59336da1d2e 100644 --- a/src/mame/drivers/meyc8088.cpp +++ b/src/mame/drivers/meyc8088.cpp @@ -43,7 +43,8 @@ public: m_maincpu(*this,"maincpu"), m_vram(*this, "vram"), m_heartbeat(*this, "heartbeat"), - m_dac(*this, "dac") + m_dac(*this, "dac"), + m_switches(*this, {"C0", "C1", "C2", "C3"}) { } required_device m_maincpu; @@ -51,6 +52,8 @@ public: required_device m_heartbeat; required_device m_dac; + optional_ioport_array<4> m_switches; + UINT8 m_status; UINT8 m_common; @@ -231,10 +234,10 @@ READ8_MEMBER(meyc8088_state::meyc8088_input_r) UINT8 ret = 0xff; // multiplexed switch inputs - 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 + if (~m_common & 1) ret &= m_switches[0].read_safe(0); // bit switches + if (~m_common & 2) ret &= m_switches[1].read_safe(0); // control switches + if (~m_common & 4) ret &= m_switches[2].read_safe(0); // light switches + if (~m_common & 8) ret &= m_switches[3].read_safe(0); // light switches return ret; } diff --git a/src/mame/drivers/midvunit.cpp b/src/mame/drivers/midvunit.cpp index 0f50c0a5362..1af6df687b8 100644 --- a/src/mame/drivers/midvunit.cpp +++ b/src/mame/drivers/midvunit.cpp @@ -135,14 +135,13 @@ READ32_MEMBER(midvunit_state::midvunit_adc_r) WRITE32_MEMBER(midvunit_state::midvunit_adc_w) { - static const char *const adcnames[] = { "WHEEL", "ACCEL", "BRAKE" }; - if (!(m_control_data & 0x20)) { int which = (data >> m_adc_shift) - 4; if (which < 0 || which > 2) logerror("adc_w: unexpected which = %02X\n", which + 4); - m_adc_data = read_safe(ioport(adcnames[which]), 0); + else + m_adc_data = m_adc_ports[which].read_safe(0); timer_set(attotime::from_msec(1), TIMER_ADC_READY); } else diff --git a/src/mame/drivers/model1.cpp b/src/mame/drivers/model1.cpp index 3a5215585cc..ae053d8b45a 100644 --- a/src/mame/drivers/model1.cpp +++ b/src/mame/drivers/model1.cpp @@ -638,11 +638,8 @@ Notes: READ16_MEMBER(model1_state::io_r) { - static const char *const analognames[] = { "AN.0", "AN.1", "AN.2", "AN.3", "AN.4", "AN.5", "AN.6", "AN.7" }; - static const char *const inputnames[] = { "IN.0", "IN.1", "IN.2" }; - if(offset < 0x8) - return read_safe(ioport(analognames[offset]), 0x00); + return m_analog_ports[offset].read_safe(0x00); if(offset == 0x0f) return m_lamp_state; @@ -651,7 +648,7 @@ READ16_MEMBER(model1_state::io_r) { offset -= 0x8; if(offset < 3) - return ioport(inputnames[offset])->read(); + return m_digital_ports[offset]->read(); return 0xff; } diff --git a/src/mame/drivers/model2.cpp b/src/mame/drivers/model2.cpp index 9acd104f910..25b29956a4f 100644 --- a/src/mame/drivers/model2.cpp +++ b/src/mame/drivers/model2.cpp @@ -520,7 +520,7 @@ WRITE32_MEMBER(model2_state::videoctl_w) CUSTOM_INPUT_MEMBER(model2_state::_1c00000_r) { - UINT32 ret = ioport("IN0")->read(); + UINT32 ret = m_in0->read(); if(m_ctrlmode == 0) { @@ -538,8 +538,7 @@ CUSTOM_INPUT_MEMBER(model2_state::_1c0001c_r) UINT32 iptval = 0x00ff; if(m_analog_channel < 4) { - static const char *const ports[] = { "ANA0", "ANA1", "ANA2", "ANA3" }; - iptval = read_safe(ioport(ports[m_analog_channel]), 0); + iptval = m_analog_ports[m_analog_channel].read_safe(0); ++m_analog_channel; } return iptval; @@ -557,7 +556,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 = read_safe(ioport("GEARS"), 0); + UINT8 res = m_gears.read_safe(0); int i; const UINT8 gearvalue[5] = { 0, 2, 1, 6, 5 }; @@ -1054,21 +1053,20 @@ WRITE32_MEMBER(model2_state::geo_w) READ32_MEMBER(model2_state::hotd_lightgun_r) { - static const char *const ports[] = { "P1_Y", "P1_X", "P2_Y", "P2_X" }; UINT16 res = 0xffff; if(m_lightgun_mux < 8) - res = (read_safe(ioport(ports[m_lightgun_mux >> 1]), 0) >> ((m_lightgun_mux & 1)*8)) & 0xff; + res = (m_lightgun_ports[m_lightgun_mux >> 1].read_safe(0) >> ((m_lightgun_mux & 1)*8)) & 0xff; else { UINT16 p1x,p1y,p2x,p2y; res = 0xfffc; - 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); + p1x = m_lightgun_ports[1].read_safe(0); + p1y = m_lightgun_ports[0].read_safe(0); + p2x = m_lightgun_ports[3].read_safe(0); + p2y = m_lightgun_ports[2].read_safe(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) @@ -1479,10 +1477,9 @@ ADDRESS_MAP_END READ8_MEMBER(model2_state::virtuacop_lightgun_r) { - static const char *const ports[] = { "P1_Y", "P1_X", "P2_Y", "P2_X" }; UINT8 res; - res = (read_safe(ioport(ports[offset >> 1]), 0) >> ((offset & 1)*8)) & 0xff; + res = (m_lightgun_ports[offset >> 1].read_safe(0) >> ((offset & 1)*8)) & 0xff; return res; } @@ -1493,10 +1490,10 @@ READ8_MEMBER(model2_state::virtuacop_lightgun_offscreen_r) UINT16 special_res = 0xfffc; UINT16 p1x,p1y,p2x,p2y; - 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); + p1x = m_lightgun_ports[1].read_safe(0); + p1y = m_lightgun_ports[0].read_safe(0); + p2x = m_lightgun_ports[3].read_safe(0); + p2y = m_lightgun_ports[2].read_safe(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.cpp b/src/mame/drivers/model3.cpp index f85f4dd9ffc..2eb9135e825 100644 --- a/src/mame/drivers/model3.cpp +++ b/src/mame/drivers/model3.cpp @@ -1431,8 +1431,7 @@ READ64_MEMBER(model3_state::model3_ctrl_r) case 7: if (ACCESSING_BITS_24_31) /* ADC Data read */ { - static const char *const adcnames[] = { "AN0", "AN1", "AN2", "AN3", "AN4", "AN5", "AN6", "AN7" }; - const UINT8 adc_data = read_safe(ioport(adcnames[m_adc_channel]), 0); + const UINT8 adc_data = m_adc_ports[m_adc_channel].read_safe(0); m_adc_channel++; m_adc_channel &= 0x7; return (UINT64)adc_data << 24; diff --git a/src/mame/drivers/mpu4.cpp b/src/mame/drivers/mpu4.cpp index f21de53772b..9240e476c81 100644 --- a/src/mame/drivers/mpu4.cpp +++ b/src/mame/drivers/mpu4.cpp @@ -1255,14 +1255,12 @@ WRITE_LINE_MEMBER(mpu4_state::pia_ic7_cb2_w) /* IC8, Inputs, TRIACS, alpha clock */ READ8_MEMBER(mpu4_state::pia_ic8_porta_r) { - ioport_port * portnames[] = { m_orange1_port, m_orange2_port, m_black1_port, m_black2_port, m_orange1_port, m_orange2_port, m_dil1_port, m_dil2_port }; - LOG_IC8(("%s: IC8 PIA Read of Port A (MUX input data)\n", machine().describe_context())); /* The orange inputs are polled twice as often as the black ones, for reasons of efficiency. This is achieved via connecting every input line to an AND gate, thus allowing two strobes to represent each orange input bank (strobes are active low). */ m_pia5->cb1_w(m_aux2_port->read() & 0x80); - return (portnames[m_input_strobe])->read(); + return (m_port_mux[m_input_strobe])->read(); } diff --git a/src/mame/drivers/mpu4mod4yam.hxx b/src/mame/drivers/mpu4mod4yam.hxx index 0df27c2b378..4400e026f6c 100644 --- a/src/mame/drivers/mpu4mod4yam.hxx +++ b/src/mame/drivers/mpu4mod4yam.hxx @@ -641,6 +641,8 @@ GAME_CUSTOM( 199?, m4vivalv__5, m4vivalv, "vv_10_d_.3_3", 0 GAME_CUSTOM( 199?, m4vivalv__6, m4vivalv, "vv_10_k_.3_3", 0x0000, 0x010000, CRC(70fc4c56) SHA1(02cbaadd3575ef0d9dc192aabbe39a735893a662), "Barcrest","Viva Las Vegas (Barcrest) (MPU4) (set 34)" ) GAME_CUSTOM( 199?, m4vivalv__7, m4vivalv, "vv_10a__.3_3", 0x0000, 0x010000, CRC(c908d65a) SHA1(5af180e697c22c27380e275d76708103e298cf41), "Barcrest","Viva Las Vegas (Barcrest) (MPU4) (set 35)" ) GAME_CUSTOM( 199?, m4vivalv__8, m4vivalv, "vvi05___.3_3", 0x0000, 0x010000, CRC(a5829d5c) SHA1(4cd1a2185579898db7be75f8c3f565043f0691b6), "Barcrest","Viva Las Vegas (Barcrest) (MPU4) (set 36)" ) +// "(C)1991 BARCREST" and "VLV 1.0" +GAME_CUSTOM( 199?, m4vivalv__9, m4vivalv, "viva206", 0x0000, 0x010000, CRC(76ab9a5d) SHA1(455699cbc05f744eafe58881a8fb120b24cfe5c8), "Barcrest","Viva Las Vegas (Barcrest) (MPU4) (set 37)" ) GAME(199?, m4stc ,0 ,mod4yam ,mpu4 , mpu4_state,m4default ,ROT0, "Barcrest","unknown MPU4 'STC 0.1' (Barcrest) (MPU4)",GAME_FLAGS) diff --git a/src/mame/drivers/mpu4sw.hxx b/src/mame/drivers/mpu4sw.hxx index 417f55d784c..74f4b6b802b 100644 --- a/src/mame/drivers/mpu4sw.hxx +++ b/src/mame/drivers/mpu4sw.hxx @@ -506,13 +506,19 @@ GAME_CUSTOM( 199?, m4andyge_h4, m4andyge, "age20_101", 0 // I think this is a mod2, but because it doesn't boot I haven't moved it to mpu4mod2sw.c yet // "(C)1991 BARCREST" and "A6L 0.1" -GAME_CUSTOM( 1991, m4addr, 0, "a6ls.p1", 0x0000, 0x010000, CRC(9f97f57b) SHA1(402d1518bb78fdc489b06c2aabc771e5ce151847), "Barcrest","Adders & Ladders (Barcrest) (MPU4) (A6L 0.1)" ) +GAME_CUSTOM( 1991, m4addr, 0, "a6ls.p1", 0x0000, 0x010000, CRC(9f97f57b) SHA1(402d1518bb78fdc489b06c2aabc771e5ce151847), "Barcrest","Adders & Ladders (Barcrest) (MPU4) (A6L 0.1, set 1)" ) +GAME_CUSTOM( 199?, m4addrc__d, m4addr, "alddr20", 0x0000, 0x010000, CRC(19cf4437) SHA1(b528823c476bebd1a9a6c720a4144294743693d2), "Barcrest","Adders & Ladders (Barcrest) (MPU4) (A6L 0.1, set 2)" ) // hack? GAME_CUSTOM( 1991, m4addr6ld, m4addr, "a6ld.p1", 0x0000, 0x010000, CRC(de555e12) SHA1(2233160f1c734c889c1c00dee202a928f18ad763), "Barcrest","Adders & Ladders (Barcrest) (MPU4) (A6L 0.1D)" ) GAME_CUSTOM( 1991, m4addr6lc, m4addr, "a6lc.p1", 0x0000, 0x010000, CRC(1e75fe67) SHA1(4497b19d4c512c934d445b4acf607dc2dc080d44), "Barcrest","Adders & Ladders (Barcrest) (MPU4) (A6L 0.1C)" ) GAME_CUSTOM( 1991, m4addr6lk, m4addr, "a6lk.p1", 0x0000, 0x010000, CRC(af5ae5c4) SHA1(20e40cf996c2c3b7b18ec104a374be1da193b94e), "Barcrest","Adders & Ladders (Barcrest) (MPU4) (A6L 0.1K)" ) GAME_CUSTOM( 1991, m4addr6ly, m4addr, "adders ladders 20p 6.bin", 0x0000, 0x010000, CRC(62abeb34) SHA1(8069e6fde0673fdbc124a1a172dc988bb3205ff6), "Barcrest","Adders & Ladders (Barcrest) (MPU4) (A6L 0.1Y)" ) GAME_CUSTOM( 1991, m4addr6lyd, m4addr, "a6ldy.p1", 0x0000, 0x010000, CRC(82f060a5) SHA1(2e8474e6c17def07e35448b5bf8d453cce0f292c), "Barcrest","Adders & Ladders (Barcrest) (MPU4) (A6L 0.1YD)" ) GAME_CUSTOM( 1991, m4addr6lybd, m4addr, "a6lbdy.p1", 0x0000, 0x010000, CRC(28064099) SHA1(c916f73911974440d4c79ecb51b343aad78f115b), "Barcrest","Adders & Ladders (Barcrest) (MPU4) (A6L 0.1YBD)" ) +// "(C)1991 BARCREST" and "A6L 0.1" (but hack?) +GAME_CUSTOM( 199?, m4addrc__b, m4addr, "add20_101", 0x0000, 0x010000, CRC(361b7173) SHA1(dea2b1b0f5910e2fd3f45d220554f0e712dedada), "hack","Adders & Ladders (Barcrest) (MPU4) (A6L 0.1, hack, set 1)" ) +GAME_CUSTOM( 199?, m4addrc__k, m4addr, "addl_20_.8", 0x0000, 0x010000, CRC(43c98f46) SHA1(0ca4a093b38fc04639e3f4bb742a8923b90d2ed1), "hack","Adders & Ladders (Barcrest) (MPU4) (A6L 0.1, hack, set 2)" ) +// "(C)1993 B.W.B." and "ADD 1.0" +GAME_CUSTOM( 199?, m4addrc__l, m4addr, "al10", 0x0000, 0x010000, CRC(3c3c82b6) SHA1(cc5ffdd0837c9af31d5737a70430a01d1989cdcc), "Bwb","Adders & Ladders (Bwb / Barcrest) (MPU4) (ADD 1.0, 1993)" ) // "(C)1994 B.W.B." and "ADD 1.0" (actually version 10?) GAME_CUSTOM( 1994, m4addr10, m4addr, "ad_05___.1o3", 0x0000, 0x010000, CRC(8d9e0f5d) SHA1(fecc844908876e161d0134ce3cc098e79e74e0b1), "Bwb","Adders & Ladders (Bwb / Barcrest) (MPU4) (ADD 1.0, set 1)" ) GAME_CUSTOM( 1994, m4addr10d, m4addr, "ad_05_d_.1o3", 0x0000, 0x010000, CRC(2d29040f) SHA1(ee2bdd5da1a7e4146419ffd8bad521a9c1b49aa2), "Bwb","Adders & Ladders (Bwb / Barcrest) (MPU4) (ADD 1.0D, set 1)" ) @@ -555,8 +561,44 @@ GAME_CUSTOM( 1994, m4addr4_a, m4addr, "ad_10___.4a3", 0x0000, 0x0 GAME_CUSTOM( 1994, m4addr4c_a, m4addr, "adi10___.4a3", 0x0000, 0x010000, CRC(2d2aa3cc) SHA1(21a7690c3fb7d158f4b4e6da63663778246ac902), "Bwb","Adders & Ladders (Bwb / Barcrest) (MPU4) (ADD 4.0C, set 2)" ) GAME_CUSTOM( 1994, m4addr4c_b, m4addr, "adi10___.4n3", 0x0000, 0x010000, CRC(af9aad00) SHA1(09729e73f27d9ac5d6ac7171191ed76aeaac3e3d), "Bwb","Adders & Ladders (Bwb / Barcrest) (MPU4) (ADD 4.0C, set 3)" ) // "BIG DIPPER" and ADD 1.0 -GAME_CUSTOM( 1994, m4addr_h1, m4addr, "5p4addersladders.bin", 0x0000, 0x010000, CRC(03fc43da) SHA1(cf2fdb0d1ad702331ba004fd39072484b05e2b97), "hack?","Adders & Ladders (Bwb / Barcrest) (MPU4) (ADD 1.0C, hack?, set 1)" ) -GAME_CUSTOM( 1994, m4addr_h2, m4addr, "ad05.6c", 0x0000, 0x010000, CRC(0940e4aa) SHA1(e8e7f7249a18386af990999a4c06f001db7003c5), "hack?","Adders & Ladders (Bwb / Barcrest) (MPU4) (ADD 1.0C, hack?, set 2)" ) +GAME_CUSTOM( 199?, m4addrc__h, m4addr, "adders classic.bin", 0x0000, 0x010000, CRC(6bc1d2aa) SHA1(cf17e697ff0cfba999f6511f24051dbc3d0384ef), "hack","Adders & Ladders (Bwb / Barcrest) (MPU4) (ADD 1.0, hack)" ) +GAME_CUSTOM( 1994, m4addr_h1, m4addr, "5p4addersladders.bin", 0x0000, 0x010000, CRC(03fc43da) SHA1(cf2fdb0d1ad702331ba004fd39072484b05e2b97), "hack","Adders & Ladders (Bwb / Barcrest) (MPU4) (ADD 1.0C, hack, set 1)" ) +GAME_CUSTOM( 1994, m4addr_h2, m4addr, "ad05.6c", 0x0000, 0x010000, CRC(0940e4aa) SHA1(e8e7f7249a18386af990999a4c06f001db7003c5), "hack","Adders & Ladders (Bwb / Barcrest) (MPU4) (ADD 1.0C, hack, set 2)" ) +GAME_CUSTOM( 199?, m4addrc, m4addr, "add05_101", 0x0000, 0x010000, CRC(4b3fb104) SHA1(9dba619019a476ce317122a3553965b279c684ba), "hack","Adders & Ladders (Bwb / Barcrest) (MPU4) (ADD 1.0C, hack, set 3)" ) +GAME_CUSTOM( 199?, m4addrc__c, m4addr, "add55", 0x0000, 0x010000, CRC(48c5bc73) SHA1(18c9f70bad6141cca95b6bbcb4fc621e71f87700), "hack","Adders & Ladders (Bwb / Barcrest) (MPU4) (ADD 1.0C, hack, set 4)" ) +GAME_CUSTOM( 199?, m4addrc__m, m4addr, "alad58c", 0x0000, 0x010000, CRC(df9c46b8) SHA1(439ea1ce17aa89e19cedb78465b4388b72c8c5ed), "hack","Adders & Ladders (Bwb / Barcrest) (MPU4) (ADD 1.0C, hack, set 5)" ) +// "DADS ARMY" and "ADD 1.0" +GAME_CUSTOM( 199?, m4addrc__a, m4addr, "add10_101", 0x0000, 0x010000, CRC(af8f8b4e) SHA1(712c33ed0f425dc10b79780b0cfce0ac5768e2d5), "hack","Adders & Ladders (Bwb / Barcrest) (MPU4) (ADD 1.0C, hack, set 6)" ) +GAME_CUSTOM( 199?, m4addrc__i, m4addr, "addl_10_.4", 0x0000, 0x010000, CRC(c2d11126) SHA1(0eafe9dc30013ed5817ac303a4eea5ea82d62715), "hack","Adders & Ladders (Bwb / Barcrest) (MPU4) (ADD 1.0C, hack, set 7)" ) +GAME_CUSTOM( 199?, m4addrc__j, m4addr, "addl_10_.8", 0x0000, 0x010000, CRC(9fc82c47) SHA1(0f56afc33f09fe22afc5ec74aeb496c32f9e623c), "hack","Adders & Ladders (Bwb / Barcrest) (MPU4) (ADD 1.0C, hack, set 8)" ) +// no copyright string and "NNU 5.0" (possibly a different game?) +GAME_CUSTOM( 199?, m4addrc__e, m4addr, "classic adders & ladders_alt", 0x0000, 0x010000, CRC(ac948903) SHA1(e07023efd7722a661a2bbf93c0a168af70ad6c20), "hack","Adders & Ladders (Bwb / Barcrest) (MPU4) (NNU 5.0, hack, set 1)" ) +GAME_CUSTOM( 199?, m4addrc__f, m4addr, "classic adders & ladders_alt2", 0x0000, 0x010000, CRC(843ed53d) SHA1(b1dff249df37800744e3fc9c32be20a62bd130a1), "hack","Adders & Ladders (Bwb / Barcrest) (MPU4) (NNU 5.0, hack, set 2)" ) +GAME_CUSTOM( 199?, m4addrc__n, m4addr, "nik56c", 0x0000, 0x010000, CRC(05fa11d1) SHA1(01d3d0c504489f1513a0c3aa26e910c9604f5366), "hack","Adders & Ladders (Bwb / Barcrest) (MPU4) (NNU 5.0, hack, set 3)" ) + + + +#define M4ADDRCC_EXTRA_ROMS \ + ROM_REGION( 0x48, "fakechr", 0 ) \ + ROM_LOAD( "aal.chr", 0x0000, 0x000048, CRC(bb48409f) SHA1(adefde520104b8c3815260ee136460ddf3e9e4b2) ) +#undef GAME_CUSTOM +#define GAME_CUSTOM(year, setname,parent,name,offset,length,hash,company,title) \ + ROM_START( setname ) \ + ROM_REGION( length, "maincpu", 0 ) \ + ROM_LOAD( name, offset, length, hash ) \ + M4ADDRCC_EXTRA_ROMS \ + ROM_END \ + GAME(year, setname, parent ,mod2 ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) + +// "(C)1991 BARCREST" and "ADC 1.1" +GAME_CUSTOM( 199?, m4addrcc, 0, "adcs.p1", 0x0000, 0x010000, CRC(7247de78) SHA1(e390b4e912d7bc8c1ca5e42bf2e2753d4c2b4d17), "Barcrest","Adders & Ladders Classic Club (Barcrest) (MPU4) (ADC 1.1)" ) +GAME_CUSTOM( 199?, m4addrcc__c, m4addrcc, "adcd.p1", 0x0000, 0x010000, CRC(47e41c9a) SHA1(546aaaa5765b3bc91eeb9bf5a979ed68a2e72da8), "Barcrest","Adders & Ladders Classic Club (Barcrest) (MPU4) (ADC 1.1D)" ) +GAME_CUSTOM( 199?, m4addrcc__a, m4addrcc, "adcf.p1", 0x0000, 0x010000, CRC(1dbbc990) SHA1(fb9439b43089e3135a719ab94b24dd65561d17cf), "Barcrest","Adders & Ladders Classic Club (Barcrest) (MPU4) (ADC 1.1F)" ) +GAME_CUSTOM( 199?, m4addrcc__b, m4addrcc, "adcl.p1", 0x0000, 0x010000, CRC(89299196) SHA1(9a92b250b47b11536f8708429d69c95111ecdb98), "Barcrest","Adders & Ladders Classic Club (Barcrest) (MPU4) (ADC 1.1L)" ) +// "(C)1991 BARCREST" and "ADC 0.5" +GAME_CUSTOM( 199?, m4addrcc__d, m4addrcc, "adrscfm", 0x0000, 0x010000, CRC(6c95881a) SHA1(db658bd722c54fc84734105f1a9b0028b23179fb), "Barcrest","Adders & Ladders Classic Club (Barcrest) (MPU4) (ADC 0.5)" ) + + #define M4DENMEN_EXTRA_ROMS \ @@ -674,55 +716,60 @@ GAME_CUSTOM( 199?, m4crmaze__s, m4crmaze, "cmaz58t", 0x0000, 0 ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4jackpot8tkn , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4cashmn, 0, "cma07s.p1", 0x0000, 0x020000, CRC(e9c1d9f2) SHA1(f2df4ae650ec2b62d15bbaa562d638476bf926e7), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4cashmn__a, m4cashmn, "camc2010", 0x0000, 0x020000, CRC(82e459ab) SHA1(62e1906007f6bba99e3e8badc3472070e8ae84f8), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4cashmn__b, m4cashmn, "cma07ad.p1", 0x0000, 0x020000, CRC(411889fd) SHA1(5855b584315867ecc5df6d37f4a664b8331ecde8), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4cashmn__c, m4cashmn, "cma07b.p1", 0x0000, 0x020000, CRC(ab889a33) SHA1(0f3ed0e4b8131585bcb4af47674fb1b65c37503d), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4cashmn__d, m4cashmn, "cma07bd.p1", 0x0000, 0x020000, CRC(cc022738) SHA1(5968d1b6db55008cbd3c83651214c61c28fd4c5c), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4cashmn__e, m4cashmn, "cma07c.p1", 0x0000, 0x020000, CRC(9cc22721) SHA1(ee4e9860641c8bf7db024a5bf9469265a6383e0a), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4cashmn__f, m4cashmn, "cma07d.p1", 0x0000, 0x020000, CRC(d6939145) SHA1(45b6f7f80c7a2f4377d9bf8e184fb791f4ed0a2d), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4cashmn__g, m4cashmn, "cma07dk.p1", 0x0000, 0x020000, CRC(86c58f6e) SHA1(fce50f86a641d27d0f5e5ecbac84822ccc9c177b), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4cashmn__h, m4cashmn, "cma07dr.p1", 0x0000, 0x020000, CRC(35ca345f) SHA1(ddbb926988028bef13ebaa949d3ee92599770003), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4cashmn__i, m4cashmn, "cma07dy.p1", 0x0000, 0x020000, CRC(0126af90) SHA1(0f303451fd8ca8c0cc50a31297f0d2729cfc2d7b), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4cashmn__j, m4cashmn, "cma07k.p1", 0x0000, 0x020000, CRC(e14f3265) SHA1(7b5dc581fe8679559356fdca9644985da7d299cb), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4cashmn__k, m4cashmn, "cma07r.p1", 0x0000, 0x020000, CRC(52408954) SHA1(623f840d94cc3cf2d2d648eb2be644d48350b169), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4cashmn__l, m4cashmn, "cma07y.p1", 0x0000, 0x020000, CRC(66ac129b) SHA1(97f8c0c1f46444d4a492bc3dd3689df038000640), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4cashmn__m, m4cashmn, "cma08ad.p1", 0x0000, 0x020000, CRC(fce2f785) SHA1(fc508e3d1036319894985600cb0142f13536078c), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4cashmn__n, m4cashmn, "cma08b.p1", 0x0000, 0x020000, CRC(df7526de) SHA1(71456496fc31ae11ffa7c543b6444adba735aeb9), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4cashmn__o, m4cashmn, "cma08bd.p1", 0x0000, 0x020000, CRC(71f85940) SHA1(439c54f35f4f6161a683d2c3d2bb6ce81b4190bf), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4cashmn__p, m4cashmn, "cma08c.p1", 0x0000, 0x020000, CRC(e83f9bcc) SHA1(e20297ba5238b59c3872776b01e6a89a51a7aea7), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4cashmn__q, m4cashmn, "cma08d.p1", 0x0000, 0x020000, CRC(a26e2da8) SHA1(928dfe399a7ae278dadd1e930bd370022f5113c4), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4cashmn__r, m4cashmn, "cma08dk.p1", 0x0000, 0x020000, CRC(3b3ff116) SHA1(f60f0f9d996398a0f1c5b7d2a411613c42149e65), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4cashmn__s, m4cashmn, "cma08dr.p1", 0x0000, 0x020000, CRC(88304a27) SHA1(9b86a49edca078dd68abab4c3e8655d3b4e79d47), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4cashmn__t, m4cashmn, "cma08dy.p1", 0x0000, 0x020000, CRC(bcdcd1e8) SHA1(a7a4ab2313198c3bc0536526bd83179fd9170e66), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4cashmn__u, m4cashmn, "cma08k.p1", 0x0000, 0x020000, CRC(95b28e88) SHA1(282a782900a0ddf60c66aa6a69e6871bb42c647a), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4cashmn__v, m4cashmn, "cma08r.p1", 0x0000, 0x020000, CRC(26bd35b9) SHA1(74d07da26932bf48fe4b79b39ff76956b0993f3b), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4cashmn__w, m4cashmn, "cma08s.p1", 0x0000, 0x020000, CRC(d0154d3c) SHA1(773f211092c51fb4ca1ef6a5a0cbdb15f842aca8), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4cashmn__x, m4cashmn, "cma08y.p1", 0x0000, 0x020000, CRC(1251ae76) SHA1(600ce195be615796b887bb56bebb6c4322709632), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4cashmn__y, m4cashmn, "cmh06ad.p1", 0x0000, 0x020000, CRC(ea2f6866) SHA1(afae312a488d7d83576c17eb2627a84637d88f18), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4cashmn__z, m4cashmn, "cmh06b.p1", 0x0000, 0x020000, CRC(2d4d9667) SHA1(896ed70962c8904646df7159c3717399d0ceb022), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4cashmn__0, m4cashmn, "cmh06bd.p1", 0x0000, 0x020000, CRC(6735c6a3) SHA1(4bce480c57473a9b0787a87a462c76e146a10157), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4cashmn__1, m4cashmn, "cmh06c.p1", 0x0000, 0x020000, CRC(1a072b75) SHA1(89d4aed011391b2f12b48c0344136d83175ff2f0), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 29)" ) -GAME_CUSTOM( 199?, m4cashmn__2, m4cashmn, "cmh06d.p1", 0x0000, 0x020000, CRC(50569d11) SHA1(bdf7e984766bbe90bafbf0b367690ca65a8612d2), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 30)" ) -GAME_CUSTOM( 199?, m4cashmn__3, m4cashmn, "cmh06dk.p1", 0x0000, 0x020000, CRC(2df26ef5) SHA1(c716b73396d0af1f69f5812bace06341d368859f), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 31)" ) -GAME_CUSTOM( 199?, m4cashmn__4, m4cashmn, "cmh06dr.p1", 0x0000, 0x020000, CRC(9efdd5c4) SHA1(b9e02fe91e766aff41ca19879ab29e53bdee537e), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 32)" ) -GAME_CUSTOM( 199?, m4cashmn__5, m4cashmn, "cmh06dy.p1", 0x0000, 0x020000, CRC(aa114e0b) SHA1(8bc9b94e488a98b8a8008f9a35b6c078cc5c8f3f), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 33)" ) -GAME_CUSTOM( 199?, m4cashmn__6, m4cashmn, "cmh06k.p1", 0x0000, 0x020000, CRC(678a3e31) SHA1(2351b5167eec2a0d23c9938014de6f6ee07f13ff), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 34)" ) -GAME_CUSTOM( 199?, m4cashmn__7, m4cashmn, "cmh06r.p1", 0x0000, 0x020000, CRC(d4858500) SHA1(489fd55ac6c93b94bfb9297fd71b5d74bf95a97f), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 35)" ) -GAME_CUSTOM( 199?, m4cashmn__8, m4cashmn, "cmh06s.p1", 0x0000, 0x020000, CRC(9d3b4260) SHA1(7c4740585d17be3da3a0ea6e7fc68f89538013fb), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 36)" ) -GAME_CUSTOM( 199?, m4cashmn__9, m4cashmn, "cmh06y.p1", 0x0000, 0x020000, CRC(e0691ecf) SHA1(978fa00736967dd09d48ce5c847698b39a058ab5), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 37)" ) -GAME_CUSTOM( 199?, m4cashmn__aa, m4cashmn, "cmh07ad.p1", 0x0000, 0x020000, CRC(4f354391) SHA1(687eccc312cd69f8bb70e35837f0b7ce74392936), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 38)" ) -GAME_CUSTOM( 199?, m4cashmn__ab, m4cashmn, "cmh07b.p1", 0x0000, 0x020000, CRC(27fb6e7b) SHA1(c1558e4a0e2c28a825c2c5bb4089143cf919b67c), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 39)" ) -GAME_CUSTOM( 199?, m4cashmn__ac, m4cashmn, "cmh07bd.p1", 0x0000, 0x020000, CRC(c22fed54) SHA1(5b6df1ed8518f9ba3e02b17c189c01ad1d0acbbb), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 40)" ) -GAME_CUSTOM( 199?, m4cashmn__ad, m4cashmn, "cmh07c.p1", 0x0000, 0x020000, CRC(10b1d369) SHA1(9933a2a7933df941ee93e16682e91dcc90abb627), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 41)" ) -GAME_CUSTOM( 199?, m4cashmn__ae, m4cashmn, "cmh07d.p1", 0x0000, 0x020000, CRC(5ae0650d) SHA1(da6917aa186daf59f35124c7cdc9d039d365c4c2), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 42)" ) -GAME_CUSTOM( 199?, m4cashmn__af, m4cashmn, "cmh07dk.p1", 0x0000, 0x020000, CRC(88e84502) SHA1(2ab86be51b3dde0b2cb05e3af5f43aad3d8a76df), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 43)" ) -GAME_CUSTOM( 199?, m4cashmn__ag, m4cashmn, "cmh07dr.p1", 0x0000, 0x020000, CRC(3be7fe33) SHA1(074243cdfd37ba36e18e00610f45473e46ddc728), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 44)" ) -GAME_CUSTOM( 199?, m4cashmn__ah, m4cashmn, "cmh07dy.p1", 0x0000, 0x020000, CRC(0f0b65fc) SHA1(68d775bb4af9595ac87c33c2663b272640eea69e), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 45)" ) -GAME_CUSTOM( 199?, m4cashmn__ai, m4cashmn, "cmh07k.p1", 0x0000, 0x020000, CRC(6d3cc62d) SHA1(85f76fd8513c20683d486de7a1509cadfb6ecaa9), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 46)" ) -GAME_CUSTOM( 199?, m4cashmn__aj, m4cashmn, "cmh07r.p1", 0x0000, 0x020000, CRC(de337d1c) SHA1(dd07727fb183833eced5c0c2dc284d571baacd25), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 47)" ) -GAME_CUSTOM( 199?, m4cashmn__ak, m4cashmn, "cmh07s.p1", 0x0000, 0x020000, CRC(0367f4cf) SHA1(8b24a9009ff17d517b34e078ebbdc17465df139d), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 48)" ) -GAME_CUSTOM( 199?, m4cashmn__al, m4cashmn, "cmh07y.p1", 0x0000, 0x020000, CRC(eadfe6d3) SHA1(80541aba612b8ebba7ab159c61e6492b9c06feda), "Barcrest","Cash Machine (Barcrest) (MPU4) (set 49)" ) +// "(C)1993 BARCREST" and "CMA 0.7" +GAME_CUSTOM( 199?, m4cashmn, 0, "cma07s.p1", 0x0000, 0x020000, CRC(e9c1d9f2) SHA1(f2df4ae650ec2b62d15bbaa562d638476bf926e7), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.7)" ) +GAME_CUSTOM( 199?, m4cashmn__b, m4cashmn, "cma07ad.p1", 0x0000, 0x020000, CRC(411889fd) SHA1(5855b584315867ecc5df6d37f4a664b8331ecde8), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.7AD)" ) +GAME_CUSTOM( 199?, m4cashmn__c, m4cashmn, "cma07b.p1", 0x0000, 0x020000, CRC(ab889a33) SHA1(0f3ed0e4b8131585bcb4af47674fb1b65c37503d), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.7B)" ) +GAME_CUSTOM( 199?, m4cashmn__d, m4cashmn, "cma07bd.p1", 0x0000, 0x020000, CRC(cc022738) SHA1(5968d1b6db55008cbd3c83651214c61c28fd4c5c), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.7BD)" ) +GAME_CUSTOM( 199?, m4cashmn__e, m4cashmn, "cma07c.p1", 0x0000, 0x020000, CRC(9cc22721) SHA1(ee4e9860641c8bf7db024a5bf9469265a6383e0a), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.7C)" ) +GAME_CUSTOM( 199?, m4cashmn__f, m4cashmn, "cma07d.p1", 0x0000, 0x020000, CRC(d6939145) SHA1(45b6f7f80c7a2f4377d9bf8e184fb791f4ed0a2d), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.7D)" ) +GAME_CUSTOM( 199?, m4cashmn__g, m4cashmn, "cma07dk.p1", 0x0000, 0x020000, CRC(86c58f6e) SHA1(fce50f86a641d27d0f5e5ecbac84822ccc9c177b), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.7KD)" ) +GAME_CUSTOM( 199?, m4cashmn__h, m4cashmn, "cma07dr.p1", 0x0000, 0x020000, CRC(35ca345f) SHA1(ddbb926988028bef13ebaa949d3ee92599770003), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.7RD)" ) +GAME_CUSTOM( 199?, m4cashmn__i, m4cashmn, "cma07dy.p1", 0x0000, 0x020000, CRC(0126af90) SHA1(0f303451fd8ca8c0cc50a31297f0d2729cfc2d7b), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.7YD)" ) +GAME_CUSTOM( 199?, m4cashmn__j, m4cashmn, "cma07k.p1", 0x0000, 0x020000, CRC(e14f3265) SHA1(7b5dc581fe8679559356fdca9644985da7d299cb), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.7K)" ) +GAME_CUSTOM( 199?, m4cashmn__k, m4cashmn, "cma07r.p1", 0x0000, 0x020000, CRC(52408954) SHA1(623f840d94cc3cf2d2d648eb2be644d48350b169), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.7R)" ) +GAME_CUSTOM( 199?, m4cashmn__l, m4cashmn, "cma07y.p1", 0x0000, 0x020000, CRC(66ac129b) SHA1(97f8c0c1f46444d4a492bc3dd3689df038000640), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.7Y)" ) +// "(C)1993 BARCREST" and "CMA 0.8" +GAME_CUSTOM( 199?, m4cashmn__m, m4cashmn, "cma08ad.p1", 0x0000, 0x020000, CRC(fce2f785) SHA1(fc508e3d1036319894985600cb0142f13536078c), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.8AD)" ) +GAME_CUSTOM( 199?, m4cashmn__n, m4cashmn, "cma08b.p1", 0x0000, 0x020000, CRC(df7526de) SHA1(71456496fc31ae11ffa7c543b6444adba735aeb9), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.8B)" ) +GAME_CUSTOM( 199?, m4cashmn__o, m4cashmn, "cma08bd.p1", 0x0000, 0x020000, CRC(71f85940) SHA1(439c54f35f4f6161a683d2c3d2bb6ce81b4190bf), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.8BD)" ) +GAME_CUSTOM( 199?, m4cashmn__p, m4cashmn, "cma08c.p1", 0x0000, 0x020000, CRC(e83f9bcc) SHA1(e20297ba5238b59c3872776b01e6a89a51a7aea7), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.8C)" ) +GAME_CUSTOM( 199?, m4cashmn__q, m4cashmn, "cma08d.p1", 0x0000, 0x020000, CRC(a26e2da8) SHA1(928dfe399a7ae278dadd1e930bd370022f5113c4), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.8D)" ) +GAME_CUSTOM( 199?, m4cashmn__r, m4cashmn, "cma08dk.p1", 0x0000, 0x020000, CRC(3b3ff116) SHA1(f60f0f9d996398a0f1c5b7d2a411613c42149e65), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.8KD)" ) +GAME_CUSTOM( 199?, m4cashmn__s, m4cashmn, "cma08dr.p1", 0x0000, 0x020000, CRC(88304a27) SHA1(9b86a49edca078dd68abab4c3e8655d3b4e79d47), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.8RD)" ) +GAME_CUSTOM( 199?, m4cashmn__t, m4cashmn, "cma08dy.p1", 0x0000, 0x020000, CRC(bcdcd1e8) SHA1(a7a4ab2313198c3bc0536526bd83179fd9170e66), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.8YD)" ) +GAME_CUSTOM( 199?, m4cashmn__u, m4cashmn, "cma08k.p1", 0x0000, 0x020000, CRC(95b28e88) SHA1(282a782900a0ddf60c66aa6a69e6871bb42c647a), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.8K)" ) +GAME_CUSTOM( 199?, m4cashmn__v, m4cashmn, "cma08r.p1", 0x0000, 0x020000, CRC(26bd35b9) SHA1(74d07da26932bf48fe4b79b39ff76956b0993f3b), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.8R)" ) +GAME_CUSTOM( 199?, m4cashmn__w, m4cashmn, "cma08s.p1", 0x0000, 0x020000, CRC(d0154d3c) SHA1(773f211092c51fb4ca1ef6a5a0cbdb15f842aca8), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.8)" ) +GAME_CUSTOM( 199?, m4cashmn__x, m4cashmn, "cma08y.p1", 0x0000, 0x020000, CRC(1251ae76) SHA1(600ce195be615796b887bb56bebb6c4322709632), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMA 0.8Y)" ) +// "(C)1993 BARCREST" and "CMH 0.6" +GAME_CUSTOM( 199?, m4cashmn__y, m4cashmn, "cmh06ad.p1", 0x0000, 0x020000, CRC(ea2f6866) SHA1(afae312a488d7d83576c17eb2627a84637d88f18), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.6AD)" ) +GAME_CUSTOM( 199?, m4cashmn__z, m4cashmn, "cmh06b.p1", 0x0000, 0x020000, CRC(2d4d9667) SHA1(896ed70962c8904646df7159c3717399d0ceb022), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.6B)" ) +GAME_CUSTOM( 199?, m4cashmn__0, m4cashmn, "cmh06bd.p1", 0x0000, 0x020000, CRC(6735c6a3) SHA1(4bce480c57473a9b0787a87a462c76e146a10157), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.6BD)" ) +GAME_CUSTOM( 199?, m4cashmn__1, m4cashmn, "cmh06c.p1", 0x0000, 0x020000, CRC(1a072b75) SHA1(89d4aed011391b2f12b48c0344136d83175ff2f0), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.6C)" ) +GAME_CUSTOM( 199?, m4cashmn__2, m4cashmn, "cmh06d.p1", 0x0000, 0x020000, CRC(50569d11) SHA1(bdf7e984766bbe90bafbf0b367690ca65a8612d2), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.6D)" ) +GAME_CUSTOM( 199?, m4cashmn__3, m4cashmn, "cmh06dk.p1", 0x0000, 0x020000, CRC(2df26ef5) SHA1(c716b73396d0af1f69f5812bace06341d368859f), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.6KD)" ) +GAME_CUSTOM( 199?, m4cashmn__4, m4cashmn, "cmh06dr.p1", 0x0000, 0x020000, CRC(9efdd5c4) SHA1(b9e02fe91e766aff41ca19879ab29e53bdee537e), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.6RD)" ) +GAME_CUSTOM( 199?, m4cashmn__5, m4cashmn, "cmh06dy.p1", 0x0000, 0x020000, CRC(aa114e0b) SHA1(8bc9b94e488a98b8a8008f9a35b6c078cc5c8f3f), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.6YD)" ) +GAME_CUSTOM( 199?, m4cashmn__6, m4cashmn, "cmh06k.p1", 0x0000, 0x020000, CRC(678a3e31) SHA1(2351b5167eec2a0d23c9938014de6f6ee07f13ff), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.6K)" ) +GAME_CUSTOM( 199?, m4cashmn__7, m4cashmn, "cmh06r.p1", 0x0000, 0x020000, CRC(d4858500) SHA1(489fd55ac6c93b94bfb9297fd71b5d74bf95a97f), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.6R)" ) +GAME_CUSTOM( 199?, m4cashmn__8, m4cashmn, "cmh06s.p1", 0x0000, 0x020000, CRC(9d3b4260) SHA1(7c4740585d17be3da3a0ea6e7fc68f89538013fb), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.6)" ) +GAME_CUSTOM( 199?, m4cashmn__9, m4cashmn, "cmh06y.p1", 0x0000, 0x020000, CRC(e0691ecf) SHA1(978fa00736967dd09d48ce5c847698b39a058ab5), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.6Y)" ) +// "(C)1993 BARCREST" and "CMH 0.7" +GAME_CUSTOM( 199?, m4cashmn__aa, m4cashmn, "cmh07ad.p1", 0x0000, 0x020000, CRC(4f354391) SHA1(687eccc312cd69f8bb70e35837f0b7ce74392936), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.7AD)" ) +GAME_CUSTOM( 199?, m4cashmn__ab, m4cashmn, "cmh07b.p1", 0x0000, 0x020000, CRC(27fb6e7b) SHA1(c1558e4a0e2c28a825c2c5bb4089143cf919b67c), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.7B)" ) +GAME_CUSTOM( 199?, m4cashmn__ac, m4cashmn, "cmh07bd.p1", 0x0000, 0x020000, CRC(c22fed54) SHA1(5b6df1ed8518f9ba3e02b17c189c01ad1d0acbbb), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.7BD)" ) +GAME_CUSTOM( 199?, m4cashmn__ad, m4cashmn, "cmh07c.p1", 0x0000, 0x020000, CRC(10b1d369) SHA1(9933a2a7933df941ee93e16682e91dcc90abb627), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.7C)" ) +GAME_CUSTOM( 199?, m4cashmn__ae, m4cashmn, "cmh07d.p1", 0x0000, 0x020000, CRC(5ae0650d) SHA1(da6917aa186daf59f35124c7cdc9d039d365c4c2), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.7D)" ) +GAME_CUSTOM( 199?, m4cashmn__af, m4cashmn, "cmh07dk.p1", 0x0000, 0x020000, CRC(88e84502) SHA1(2ab86be51b3dde0b2cb05e3af5f43aad3d8a76df), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.7KD)" ) +GAME_CUSTOM( 199?, m4cashmn__ag, m4cashmn, "cmh07dr.p1", 0x0000, 0x020000, CRC(3be7fe33) SHA1(074243cdfd37ba36e18e00610f45473e46ddc728), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.7RD)" ) +GAME_CUSTOM( 199?, m4cashmn__ah, m4cashmn, "cmh07dy.p1", 0x0000, 0x020000, CRC(0f0b65fc) SHA1(68d775bb4af9595ac87c33c2663b272640eea69e), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.7YD)" ) +GAME_CUSTOM( 199?, m4cashmn__ai, m4cashmn, "cmh07k.p1", 0x0000, 0x020000, CRC(6d3cc62d) SHA1(85f76fd8513c20683d486de7a1509cadfb6ecaa9), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.7K)" ) +GAME_CUSTOM( 199?, m4cashmn__aj, m4cashmn, "cmh07r.p1", 0x0000, 0x020000, CRC(de337d1c) SHA1(dd07727fb183833eced5c0c2dc284d571baacd25), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.7R)" ) +GAME_CUSTOM( 199?, m4cashmn__ak, m4cashmn, "cmh07s.p1", 0x0000, 0x020000, CRC(0367f4cf) SHA1(8b24a9009ff17d517b34e078ebbdc17465df139d), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.7)" ) +GAME_CUSTOM( 199?, m4cashmn__al, m4cashmn, "cmh07y.p1", 0x0000, 0x020000, CRC(eadfe6d3) SHA1(80541aba612b8ebba7ab159c61e6492b9c06feda), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.7Y)" ) +// "(C)1993 BARCREST" and "CMH 0.2" +GAME_CUSTOM( 199?, m4cashmn__a, m4cashmn, "camc2010", 0x0000, 0x020000, CRC(82e459ab) SHA1(62e1906007f6bba99e3e8badc3472070e8ae84f8), "Barcrest","Cash Machine (Barcrest) (MPU4) (CMH 0.2)" ) // "(C)1993 BARCREST" and "CMH 0.6" GAME_CUSTOM( 199?, m4cashmn__za, m4cashmn, "cma15g", 0x0000, 0x020000, CRC(f30b3ef2) SHA1(c8fb4d883d12a477a703d8cb0842994675aaf879), "hack?","Cash Machine (Barcrest) (MPU4) (CMH 0.6Y, hack?)" ) // no copyright string, and "CMA 0.7" @@ -896,7 +943,18 @@ GAME_CUSTOM( 199?, m4toot__zb, m4toot, "tot15t", 0x0000, 0x020000, CRC(1 ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4eaw, 0, "er4s.p1", 0x0000, 0x010000, CRC(163fc987) SHA1(8e1768ed2fbddbd5e00652ff40614de3978c9567), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 1)" ) +// "(C)1991 BARCREST" and "ER4 0.2" +GAME_CUSTOM( 199?, m4eaw, 0, "er4s.p1", 0x0000, 0x010000, CRC(163fc987) SHA1(8e1768ed2fbddbd5e00652ff40614de3978c9567), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (ER4 0.2)" ) +GAME_CUSTOM( 199?, m4eaw__av, m4eaw, "er4ad.p1", 0x0000, 0x010000, CRC(93fff89d) SHA1(3f90168efa5ecaf7707ef357616638a9d5ab746f), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 59)" ) +GAME_CUSTOM( 199?, m4eaw__aw, m4eaw, "er4b.p1", 0x0000, 0x010000, CRC(cb39fda7) SHA1(4a31d2ff53942a658992a5e13c2b617da5fb03ce), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 60)" ) +GAME_CUSTOM( 199?, m4eaw__ax, m4eaw, "er4bd.p1", 0x0000, 0x010000, CRC(a5e395d7) SHA1(3f134a2ce3788ac84a6de096306c651e6b2d6a4a), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 61)" ) +GAME_CUSTOM( 199?, m4eaw__ay, m4eaw, "er4d.p1", 0x0000, 0x010000, CRC(33612923) SHA1(1129ced207aaf46045f20a1ef1a37af8ec537bb0), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 62)" ) +GAME_CUSTOM( 199?, m4eaw__az, m4eaw, "er4dk.p1", 0x0000, 0x010000, CRC(df41d570) SHA1(4a2db04ee51bb811ac3aee5b2c3c1f1a2201f7ec), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 63)" ) +GAME_CUSTOM( 199?, m4eaw__a0, m4eaw, "er4dy.p1", 0x0000, 0x010000, CRC(7df882e6) SHA1(1246220a5ac8a4454a7f3a359a5a00319395095d), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 64)" ) +GAME_CUSTOM( 199?, m4eaw__a1, m4eaw, "er4k.p1", 0x0000, 0x010000, CRC(9803cc0d) SHA1(1516c3836919a7a2cc32711a9bf2d3bf3d6b82c0), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 65)" ) +GAME_CUSTOM( 199?, m4eaw__a2, m4eaw, "er4y.p1", 0x0000, 0x010000, CRC(d8dece2d) SHA1(8482092434e1e94e6648e402c8b518c2f0fcc28e), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 66)" ) +// "(C)1991 BARCREST" and "ER4 0.3" (startup is CET 0.3) +GAME_CUSTOM( 199?, m4eaw__j, m4eaw, "cet03s.p1", 0x0000, 0x010000, CRC(bec3ea51) SHA1(740a73da105d8329dc9ceaa5e8c25b305124e2dd), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (CET0.3 / ER4 0.3)" ) GAME_CUSTOM( 199?, m4eaw__a, m4eaw, "cet03ad.p1", 0x0000, 0x010000, CRC(33afe7a5) SHA1(5d3bdb74c6babd49e88915282ad81c184bd7aa68), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4eaw__b, m4eaw, "cet03b.p1", 0x0000, 0x010000, CRC(7674e2a5) SHA1(188e683eac91f64fe563b0f09f2b934e709c47fb), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4eaw__c, m4eaw, "cet03bd.p1", 0x0000, 0x010000, CRC(406843a2) SHA1(7d4bf6cd3c5be0f6df687b0ba97b3b88fd377170), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 4)" ) @@ -906,8 +964,9 @@ GAME_CUSTOM( 199?, m4eaw__f, m4eaw, "cet03dr.p1", 0x0000, 0x0100 GAME_CUSTOM( 199?, m4eaw__g, m4eaw, "cet03dy.p1", 0x0000, 0x010000, CRC(fece4ac4) SHA1(badf4f94d565958fc9f42a443f53ec9624925ee1), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 8)" ) GAME_CUSTOM( 199?, m4eaw__h, m4eaw, "cet03k.p1", 0x0000, 0x010000, CRC(f6531a43) SHA1(75ec5c8fc0012fee144daab7761f3717c17fa22d), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4eaw__i, m4eaw, "cet03r.p1", 0x0000, 0x010000, CRC(fec4a6c0) SHA1(89fac7e4df77f526d0e357f1874b73be932548ce), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4eaw__j, m4eaw, "cet03s.p1", 0x0000, 0x010000, CRC(bec3ea51) SHA1(740a73da105d8329dc9ceaa5e8c25b305124e2dd), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4eaw__k, m4eaw, "cet03y.p1", 0x0000, 0x010000, CRC(63af8e2e) SHA1(97b9dd02bf8a72ca0be7c1a9cb753fbd55644497), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 12)" ) +// "(C)1991 BARCREST" and "ER4 0.2" (startup is CEU 0.2) +GAME_CUSTOM( 199?, m4eaw__u, m4eaw, "ceu02s.p1", 0x0000, 0x010000, CRC(d52099e6) SHA1(10f1acb948fa7c4b547f801ddb5e15111992ca91), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (CEU0.2 / ER4 0.2)" ) GAME_CUSTOM( 199?, m4eaw__l, m4eaw, "ceu02ad.p1", 0x0000, 0x010000, CRC(5805182c) SHA1(c15ef2e05061fd89944b039f007d92bc4bdf66d5), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 13)" ) GAME_CUSTOM( 199?, m4eaw__m, m4eaw, "ceu02b.p1", 0x0000, 0x010000, CRC(cbf62a02) SHA1(20fb16ac4602d4e386e5dc01e1b7e83c459f614d), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 14)" ) GAME_CUSTOM( 199?, m4eaw__n, m4eaw, "ceu02bd.p1", 0x0000, 0x010000, CRC(6e197566) SHA1(16f44ca77bc02c7eb186c3684b4e837da0d73553), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 15)" ) @@ -917,8 +976,9 @@ GAME_CUSTOM( 199?, m4eaw__q, m4eaw, "ceu02dr.p1", 0x0000, 0x0100 GAME_CUSTOM( 199?, m4eaw__r, m4eaw, "ceu02dy.p1", 0x0000, 0x010000, CRC(a345696d) SHA1(a189eb6a6a6a83fe0d490f4a7c8e9c4c52aa91f7), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 19)" ) GAME_CUSTOM( 199?, m4eaw__s, m4eaw, "ceu02k.p1", 0x0000, 0x010000, CRC(0e0a1ba9) SHA1(e1ee2595a3fd4fe874f50dc027f6c931636aadcc), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 20)" ) GAME_CUSTOM( 199?, m4eaw__t, m4eaw, "ceu02r.p1", 0x0000, 0x010000, CRC(1a882a6a) SHA1(c966be957e7a78c33a28afd79ba60c69a6de42b8), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4eaw__u, m4eaw, "ceu02s.p1", 0x0000, 0x010000, CRC(d52099e6) SHA1(10f1acb948fa7c4b547f801ddb5e15111992ca91), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 22)" ) GAME_CUSTOM( 199?, m4eaw__v, m4eaw, "ceu02y.p1", 0x0000, 0x010000, CRC(87e30284) SHA1(4c598a33b73cfe6338c0f51408f2a6c1abfa978b), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 23)" ) +// "(C)1991 BARCREST" and "ER4 0.1" (startup is ENN 0.1) +GAME_CUSTOM( 199?, m4eaw__6, m4eaw, "enn01s.p1", 0x0000, 0x010000, CRC(d0ba447d) SHA1(744d5448c5318287e58994b684e116ac1a236f05), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (ENN 0.1 / ER4 0.1)" ) GAME_CUSTOM( 199?, m4eaw__w, m4eaw, "enn01ad.p1", 0x0000, 0x010000, CRC(913ba1d6) SHA1(1167ccce2f0b528ec8eba140b1f9c8358fa19f54), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 24)" ) GAME_CUSTOM( 199?, m4eaw__x, m4eaw, "enn01b.p1", 0x0000, 0x010000, CRC(76cf750c) SHA1(7f3ede643c5b92d9e313c4450a0d4ef3bd9eefd3), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 25)" ) GAME_CUSTOM( 199?, m4eaw__y, m4eaw, "enn01bd.p1", 0x0000, 0x010000, CRC(c6c29211) SHA1(a49759c4c00633405a338eeb89fcb00f7503990c), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 26)" ) @@ -929,8 +989,9 @@ GAME_CUSTOM( 199?, m4eaw__2, m4eaw, "enn01dr.p1", 0x0000, 0x0100 GAME_CUSTOM( 199?, m4eaw__3, m4eaw, "enn01dy.p1", 0x0000, 0x010000, CRC(be3e5901) SHA1(ea3f366724135682da7cddad3c82e5f4c434f4a9), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 31)" ) GAME_CUSTOM( 199?, m4eaw__4, m4eaw, "enn01k.p1", 0x0000, 0x010000, CRC(273d7b10) SHA1(5577355c918407e548266a16b225e8a4f58c921c), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 32)" ) GAME_CUSTOM( 199?, m4eaw__5, m4eaw, "enn01r.p1", 0x0000, 0x010000, CRC(aee3f31e) SHA1(72676bc6b3bc287bf3bd3e7719848b40aa1b3627), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 33)" ) -GAME_CUSTOM( 199?, m4eaw__6, m4eaw, "enn01s.p1", 0x0000, 0x010000, CRC(d0ba447d) SHA1(744d5448c5318287e58994b684e116ac1a236f05), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 34)" ) GAME_CUSTOM( 199?, m4eaw__7, m4eaw, "enn01y.p1", 0x0000, 0x010000, CRC(91a73867) SHA1(5197fcd5bf3dc036095b8291d7b23776995d84d1), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 35)" ) +// "(C)1991 BARCREST" and "ER4 0.1" (startup is EON 0.1) +GAME_CUSTOM( 199?, m4eaw__ai, m4eaw, "eon01s.p1", 0x0000, 0x010000, CRC(e2e9ce10) SHA1(41a08b17285d6591b4a5cb6b1b6cc40ee7d35f01), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (EON 0.1 / ER4 0.1)" ) GAME_CUSTOM( 199?, m4eaw__8, m4eaw, "eon01ad.p1", 0x0000, 0x010000, CRC(998b0e8d) SHA1(f2d0c43073d76d662c3a997b1fd081016e4c7a7d), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 36)" ) GAME_CUSTOM( 199?, m4eaw__9, m4eaw, "eon01b.p1", 0x0000, 0x010000, CRC(66f281db) SHA1(b9bd37c53ab7c8838ec87062c8b9da39779b9fa9), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 37)" ) GAME_CUSTOM( 199?, m4eaw__aa, m4eaw, "eon01bd.p1", 0x0000, 0x010000, CRC(66a378ca) SHA1(6639f36df67af8bdd381ad3e16e0adc78a4552f4), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 38)" ) @@ -941,8 +1002,9 @@ GAME_CUSTOM( 199?, m4eaw__ae, m4eaw, "eon01dr.p1", 0x0000, 0x0100 GAME_CUSTOM( 199?, m4eaw__af, m4eaw, "eon01dy.p1", 0x0000, 0x010000, CRC(d5a39761) SHA1(9b69f9e45d87f53196e5d4fd595300beb573ff49), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 43)" ) GAME_CUSTOM( 199?, m4eaw__ag, m4eaw, "eon01k.p1", 0x0000, 0x010000, CRC(1d34dea7) SHA1(546db8247d0c78501fe4ec818d614e8f451b0076), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 44)" ) GAME_CUSTOM( 199?, m4eaw__ah, m4eaw, "eon01r.p1", 0x0000, 0x010000, CRC(7c70a508) SHA1(2c5835f36ef4c215ff9f6f6cc350f0916b397b7b), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 45)" ) -GAME_CUSTOM( 199?, m4eaw__ai, m4eaw, "eon01s.p1", 0x0000, 0x010000, CRC(e2e9ce10) SHA1(41a08b17285d6591b4a5cb6b1b6cc40ee7d35f01), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 46)" ) GAME_CUSTOM( 199?, m4eaw__aj, m4eaw, "eon01y.p1", 0x0000, 0x010000, CRC(ddc4f7d1) SHA1(bbc21ba153541df1507e01d4a25a1a669c8eab62), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 47)" ) +// "(C)1991 BARCREST" and "ER2 0.1" +GAME_CUSTOM( 199?, m4eaw__at, m4eaw, "er2s.p1", 0x0000, 0x010000, CRC(bfee8157) SHA1(3ce5a2ec16f06c753a054a9f645efbcd26f411ab), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (ER2 0.1)" ) GAME_CUSTOM( 199?, m4eaw__ak, m4eaw, "er2ad.p1", 0x0000, 0x010000, CRC(4e5fcc8b) SHA1(8176ca01ad49f39e1337a085cf3a1fd33803c517), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 48)" ) GAME_CUSTOM( 199?, m4eaw__al, m4eaw, "er2b.p1", 0x0000, 0x010000, CRC(999c6510) SHA1(bc70b88183df84ea0e18e1017ab9d74545ce7588), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 49)" ) GAME_CUSTOM( 199?, m4eaw__am, m4eaw, "er2bd.p1", 0x0000, 0x010000, CRC(3f50573a) SHA1(46527b08d751372df09d61fd67054600b6e933f3), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 50)" ) @@ -952,24 +1014,18 @@ GAME_CUSTOM( 199?, m4eaw__ap, m4eaw, "er2dr.p1", 0x0000, 0x0100 GAME_CUSTOM( 199?, m4eaw__aq, m4eaw, "er2dy.p1", 0x0000, 0x010000, CRC(f20c4b31) SHA1(744ce6065b3bea3a0c128a4848282cbca2bc8056), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 54)" ) GAME_CUSTOM( 199?, m4eaw__ar, m4eaw, "er2k.p1", 0x0000, 0x010000, CRC(2c3661bb) SHA1(5f5a6b47dacdb2184d3ac9646da616283743fcbf), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 55)" ) GAME_CUSTOM( 199?, m4eaw__as, m4eaw, "er2r.p1", 0x0000, 0x010000, CRC(cb636e43) SHA1(44df3adc1d5af4c1930596f34f41884e7731be62), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 56)" ) -GAME_CUSTOM( 199?, m4eaw__at, m4eaw, "er2s.p1", 0x0000, 0x010000, CRC(bfee8157) SHA1(3ce5a2ec16f06c753a054a9f645efbcd26f411ab), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 57)" ) GAME_CUSTOM( 199?, m4eaw__au, m4eaw, "er2y.p1", 0x0000, 0x010000, CRC(91369b00) SHA1(7427fcf9e350bc9a3883577de5ee4a4ab5ff63b0), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 58)" ) -GAME_CUSTOM( 199?, m4eaw__av, m4eaw, "er4ad.p1", 0x0000, 0x010000, CRC(93fff89d) SHA1(3f90168efa5ecaf7707ef357616638a9d5ab746f), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 59)" ) -GAME_CUSTOM( 199?, m4eaw__aw, m4eaw, "er4b.p1", 0x0000, 0x010000, CRC(cb39fda7) SHA1(4a31d2ff53942a658992a5e13c2b617da5fb03ce), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 60)" ) -GAME_CUSTOM( 199?, m4eaw__ax, m4eaw, "er4bd.p1", 0x0000, 0x010000, CRC(a5e395d7) SHA1(3f134a2ce3788ac84a6de096306c651e6b2d6a4a), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 61)" ) -GAME_CUSTOM( 199?, m4eaw__ay, m4eaw, "er4d.p1", 0x0000, 0x010000, CRC(33612923) SHA1(1129ced207aaf46045f20a1ef1a37af8ec537bb0), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 62)" ) -GAME_CUSTOM( 199?, m4eaw__az, m4eaw, "er4dk.p1", 0x0000, 0x010000, CRC(df41d570) SHA1(4a2db04ee51bb811ac3aee5b2c3c1f1a2201f7ec), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 63)" ) -GAME_CUSTOM( 199?, m4eaw__a0, m4eaw, "er4dy.p1", 0x0000, 0x010000, CRC(7df882e6) SHA1(1246220a5ac8a4454a7f3a359a5a00319395095d), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 64)" ) -GAME_CUSTOM( 199?, m4eaw__a1, m4eaw, "er4k.p1", 0x0000, 0x010000, CRC(9803cc0d) SHA1(1516c3836919a7a2cc32711a9bf2d3bf3d6b82c0), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 65)" ) -GAME_CUSTOM( 199?, m4eaw__a2, m4eaw, "er4y.p1", 0x0000, 0x010000, CRC(d8dece2d) SHA1(8482092434e1e94e6648e402c8b518c2f0fcc28e), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 66)" ) +// "(C)1991 BARCREST" and "ER8 0.1" +GAME_CUSTOM( 199?, m4eaw__a9, m4eaw, "er8s.p1", 0x0000, 0x010000, CRC(5d36bbc6) SHA1(4d0cd8e939f22d919671dc97c3d97bf6191e738f), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (ER8 0.1)" ) GAME_CUSTOM( 199?, m4eaw__a3, m4eaw, "er8ad.p1", 0x0000, 0x010000, CRC(ba059e06) SHA1(f6bb9092c9d18bccde111f8e20e79b8b4e6d8593), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 67)" ) GAME_CUSTOM( 199?, m4eaw__a4, m4eaw, "er8b.p1", 0x0000, 0x010000, CRC(27c7f954) SHA1(93305d1d4a5781de56f1e54801e25b29b6713ef0), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 68)" ) GAME_CUSTOM( 199?, m4eaw__a5, m4eaw, "er8c.p1", 0x0000, 0x010000, CRC(cee94fb3) SHA1(01ec098016b6946c3fbf96b2071076316bbd5795), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 69)" ) GAME_CUSTOM( 199?, m4eaw__a6, m4eaw, "er8dk.p1", 0x0000, 0x010000, CRC(789c5e1d) SHA1(5f5b686a770f4ab0cfa8e8ae21b3805ef6102516), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 70)" ) GAME_CUSTOM( 199?, m4eaw__a7, m4eaw, "er8dy.p1", 0x0000, 0x010000, CRC(4adf568b) SHA1(dd21b547211566ad5cb018a0205d887b7f860bc9), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 71)" ) GAME_CUSTOM( 199?, m4eaw__a8, m4eaw, "er8k.p1", 0x0000, 0x010000, CRC(c76140e4) SHA1(6c097fdd018eb594a84ceb7712a45201490ca370), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 72)" ) -GAME_CUSTOM( 199?, m4eaw__a9, m4eaw, "er8s.p1", 0x0000, 0x010000, CRC(5d36bbc6) SHA1(4d0cd8e939f22d919671dc97c3d97bf6191e738f), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 73)" ) GAME_CUSTOM( 199?, m4eaw__ba, m4eaw, "er8y.p1", 0x0000, 0x010000, CRC(8a1aa409) SHA1(a7ae62e1038e52a111de3004e2160838e0d102d0), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 74)" ) +// "(C)1991 BARCREST" and "ERT 0.2" +GAME_CUSTOM( 199?, m4eaw__bk, m4eaw, "erts.p1", 0x0000, 0x010000, CRC(185b47bb) SHA1(377cb42878572a3e94dd6be6fb106ecacb3c5059), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (ERT 0.2)" ) GAME_CUSTOM( 199?, m4eaw__bb, m4eaw, "ertad.p1", 0x0000, 0x010000, CRC(75798f2d) SHA1(68939c187d841aa046a4f7dd8f39e8387969460c), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 75)" ) GAME_CUSTOM( 199?, m4eaw__bc, m4eaw, "ertb.p1", 0x0000, 0x010000, CRC(c6407839) SHA1(79d73d79b389682586fdf7c9c25d8e2ea5943bb6), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 76)" ) GAME_CUSTOM( 199?, m4eaw__bd, m4eaw, "ertbd.p1", 0x0000, 0x010000, CRC(4365e267) SHA1(b1853c3ddb707cb114e6bb2d780b142b80f099b6), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 77)" ) @@ -979,8 +1035,9 @@ GAME_CUSTOM( 199?, m4eaw__bg, m4eaw, "ertdr.p1", 0x0000, 0x0100 GAME_CUSTOM( 199?, m4eaw__bh, m4eaw, "ertdy.p1", 0x0000, 0x010000, CRC(5a7c77fa) SHA1(37c212db131b682fd8d293a8cf8efad2e80a8a18), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 81)" ) GAME_CUSTOM( 199?, m4eaw__bi, m4eaw, "ertk.p1", 0x0000, 0x010000, CRC(19959bd3) SHA1(617f7079b39b0ef41ebb0b5f89053d723a28824d), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 82)" ) GAME_CUSTOM( 199?, m4eaw__bj, m4eaw, "ertr.p1", 0x0000, 0x010000, CRC(3264f04a) SHA1(88d1f6857f3a0acd89db1563fd5f24582b578765), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 83)" ) -GAME_CUSTOM( 199?, m4eaw__bk, m4eaw, "erts.p1", 0x0000, 0x010000, CRC(185b47bb) SHA1(377cb42878572a3e94dd6be6fb106ecacb3c5059), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 84)" ) GAME_CUSTOM( 199?, m4eaw__bl, m4eaw, "erty.p1", 0x0000, 0x010000, CRC(38adc77e) SHA1(7a925e2aa946fdcf38df454ec733da1ce9bdc495), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 85)" ) +// "(C)1991 BARCREST" and "ER4 0.1" (startup is EUN 0.1) +GAME_CUSTOM( 199?, m4eaw__bw, m4eaw, "eun01s.p1", 0x0000, 0x010000, CRC(d0b49fc6) SHA1(4062d9763010d42666660e383e52818d572b61b9), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (EUN 0.1 / ER4 0.1)" ) GAME_CUSTOM( 199?, m4eaw__bm, m4eaw, "eun01ad.p1", 0x0000, 0x010000, CRC(0148eb57) SHA1(7ebf73402ffe68cfb045a906ed039407bd173b88), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 86)" ) GAME_CUSTOM( 199?, m4eaw__bn, m4eaw, "eun01b.p1", 0x0000, 0x010000, CRC(ad152cda) SHA1(ca5c72a54e14f8b44fddfbc5c38c4e149432f593), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 87)" ) GAME_CUSTOM( 199?, m4eaw__bo, m4eaw, "eun01bd.p1", 0x0000, 0x010000, CRC(6b0abd7c) SHA1(a6f74096bfffa082a441c094b5acadd5929ac36a), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 88)" ) @@ -991,9 +1048,9 @@ GAME_CUSTOM( 199?, m4eaw__bs, m4eaw, "eun01dr.p1", 0x0000, 0x0100 GAME_CUSTOM( 199?, m4eaw__bt, m4eaw, "eun01dy.p1", 0x0000, 0x010000, CRC(93db5d3a) SHA1(ddd209b22ed396d3329b9522649db6dda64958b7), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 93)" ) GAME_CUSTOM( 199?, m4eaw__bu, m4eaw, "eun01k.p1", 0x0000, 0x010000, CRC(9fca43fd) SHA1(f7626f122dedb217002888971100d8a34910b48d), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 94)" ) GAME_CUSTOM( 199?, m4eaw__bv, m4eaw, "eun01r.p1", 0x0000, 0x010000, CRC(15b8eb9e) SHA1(e4babaf526e6dd45bb4b7f7441a08cfbec12c661), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 95)" ) -GAME_CUSTOM( 199?, m4eaw__bw, m4eaw, "eun01s.p1", 0x0000, 0x010000, CRC(d0b49fc6) SHA1(4062d9763010d42666660e383e52818d572b61b9), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 96)" ) GAME_CUSTOM( 199?, m4eaw__bx, m4eaw, "eun01y.p1", 0x0000, 0x010000, CRC(88d3c370) SHA1(6c3839a9c89ae67f80ab932ec70ebaf1240de9bb), "Barcrest","Everyone's A Winner (Barcrest) (MPU4) (set 97)" ) +// bad dump? wrong size ROM_START( m4eaw__bz ) \ ROM_REGION( 0x010000, "maincpu", 0 ) ROM_LOAD( "everyones a winner v2-5p", 0x8000, 0x008000, CRC(eb8f2fc5) SHA1(0d3614bd5ff561d17bef0d1e620f2f812b8fed5b)) @@ -1017,48 +1074,59 @@ GAME(199?, m4eaw__bz, m4eaw ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,"Bar ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4wta, 0, "wta55", 0x0000, 0x010000, CRC(df3e66cd) SHA1(68e769816cb1a71dea8a3ccf4636414c45c01646), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4wta__b, m4wta, "windy.p1", 0x0000, 0x010000, CRC(d8b78c2d) SHA1(d8c2a2ac30a9b876acfbe99e3c540ba0e82cde33), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4wta__d, m4wta, "wins.p1", 0x0000, 0x010000, CRC(d79d1e5b) SHA1(722657423a605d6d272d61e4e00b4055ed05f98d), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4wta__e, m4wta, "winy.p1", 0x0000, 0x010000, CRC(5ff8ed08) SHA1(9567db64e8ebf25ecb22236598cc88a3106f0e36), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4wta__f, m4wta, "wn5ad.p1", 0x0000, 0x010000, CRC(0eb0845d) SHA1(57a2ca27672119e71af3b990cedcf52dd89e24cc), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4wta__g, m4wta, "wn5b.p1", 0x0000, 0x010000, CRC(82cefba2) SHA1(07753a5f0d455422f33495a6f050c8e16a92e087), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4wta__h, m4wta, "wn5bd.p1", 0x0000, 0x010000, CRC(19d25b26) SHA1(91459c87e95d9800c5f77fd0c7f72f8a1488dc37), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4wta__i, m4wta, "wn5d.p1", 0x0000, 0x010000, CRC(8a3d6bed) SHA1(a20f24cd5216976913c0405f54883d6080986867), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4wta__j, m4wta, "wn5dk.p1", 0x0000, 0x010000, CRC(1dfcb2bc) SHA1(b1a73a7758c3126f7b13156835c91a4900cbe6e0), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4wta__k, m4wta, "wn5dy.p1", 0x0000, 0x010000, CRC(d45e1db0) SHA1(2524c4b60a89ea0ca15cf999fbd1f8d9029dfbb6), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4wta__l, m4wta, "wn5k.p1", 0x0000, 0x010000, CRC(71c34cb4) SHA1(e1b96dd30d8ab680128d76886691d06fcd2d48c0), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4wta__m, m4wta, "wn5s.p1", 0x0000, 0x010000, CRC(f6e925c1) SHA1(963f06462c73300757aad2371df4ebe28afca521), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4wta__n, m4wta, "wn5y.p1", 0x0000, 0x010000, CRC(7155f8b5) SHA1(f55f88fd7b0144cb7b64640d529b179dd056f5ec), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4wta__o, m4wta, "wn8b.p1", 0x0000, 0x010000, CRC(7e84f99c) SHA1(bef41b3e7906bdaadfa5741e9ae40028f4fd360f), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4wta__p, m4wta, "wn8c.p1", 0x0000, 0x010000, CRC(471ba65a) SHA1(6ede860bcf323ee75dd7f75a51e5d1166ee72abc), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4wta__q, m4wta, "wn8d.p1", 0x0000, 0x010000, CRC(eb2bd01e) SHA1(df74f8eb8fa411bab20ab522fd7c511a1370fe90), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4wta__r, m4wta, "wn8dk.p1", 0x0000, 0x010000, CRC(ec20a0bc) SHA1(61b615165a6e77cd85e1fa6aeb955307ec48d1b6), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4wta__s, m4wta, "wn8dy.p1", 0x0000, 0x010000, CRC(d2a1513c) SHA1(e4d2ad88846cbb6b393d3615bf10e1dea01de219), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4wta__t, m4wta, "wn8k.p1", 0x0000, 0x010000, CRC(3e15c690) SHA1(2fc1cca91ac5cc9abeac112e4d60e8fd57b07b94), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4wta__u, m4wta, "wn8s.p1", 0x0000, 0x010000, CRC(5c5a0f31) SHA1(301e595141dd6eb9250d71e591780e15a7d36423), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4wta__v, m4wta, "wn8y.p1", 0x0000, 0x010000, CRC(993cee6a) SHA1(26b2d5d3aa3465f90fe74960f183b8580ea2fbb1), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4wta__w, m4wta, "wnta2010", 0x0000, 0x010000, CRC(5b08faf8) SHA1(f4657041562044e17febfe77ad1f849545dcdaec), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4wta__x, m4wta, "wntad.p1", 0x0000, 0x010000, CRC(8502766e) SHA1(2a47c8f8ce8711b30962c5e8ef9093bdd3543551), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4wta__y, m4wta, "wntb.p1", 0x0000, 0x010000, CRC(1e3159f0) SHA1(ab9d0e9e6731b40c66c358d98c6481f31d9a0b0c), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4wta__z, m4wta, "wntbd.p1", 0x0000, 0x010000, CRC(91cc8978) SHA1(570ad4092bb148106fb2600f1e22b6cb6f57002a), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4wta__0, m4wta, "wntd.p1", 0x0000, 0x010000, CRC(ad68d804) SHA1(f301d0d267dd0020903f06b67ee6494b71258c68), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4wta__1, m4wta, "wntdk.p1", 0x0000, 0x010000, CRC(3a6b65b8) SHA1(1da0448e53a45fa249c14b5655cd0dc957ebb646), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 29)" ) -GAME_CUSTOM( 199?, m4wta__2, m4wta, "wntdy.p1", 0x0000, 0x010000, CRC(2420634f) SHA1(5c6e891c34a6e2b3a6acb3856c1554145bb24d0d), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 30)" ) -GAME_CUSTOM( 199?, m4wta__3, m4wta, "wntk.p1", 0x0000, 0x010000, CRC(3d8d07c7) SHA1(4659e2459d956bbcf5ef2a605527317ccdafcccb), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 31)" ) -GAME_CUSTOM( 199?, m4wta__4, m4wta, "wnts.p1", 0x0000, 0x010000, CRC(3a9b0878) SHA1(85e86cca1a3a079746cd4401767ba1d9fc31a938), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 32)" ) -GAME_CUSTOM( 199?, m4wta__5, m4wta, "wnty.p1", 0x0000, 0x010000, CRC(edaa5ae7) SHA1(d24b9f37d75f13f16718374e48e6c003b0b3333f), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 33)" ) -GAME_CUSTOM( 199?, m4wta__6, m4wta, "wta20p10.bin", 0x0000, 0x010000, CRC(c7f235b8) SHA1(a25f6f755140d70b0392985839b1729640cf5d5d), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 34)" ) -GAME_CUSTOM( 199?, m4wta__7, m4wta, "wta510l", 0x0000, 0x010000, CRC(9ce140ae) SHA1(01d53a5da0161ac4ecc861309f645d6eb47b4af5), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 35)" ) -GAME_CUSTOM( 199?, m4wta__8, m4wta, "wta58tl", 0x0000, 0x010000, CRC(7275e865) SHA1(d5550646a062609cfc052fab81c533ca69171875), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 36)" ) -GAME_CUSTOM( 199?, m4wta__9, m4wta, "wta_5p_4c.bin", 0x0000, 0x010000, CRC(54c51976) SHA1(70cae1f931615b993ac6a9e7ce2e529ad6d27da8), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 37)" ) -GAME_CUSTOM( 199?, m4wta__aa, m4wta, "wtall20a", 0x0000, 0x010000, CRC(b53c951e) SHA1(24f96d16852a4fbaf49fbdf29a26d15877f07b18), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 38)" ) -GAME_CUSTOM( 199?, m4wta__ab, m4wta, "wt_05__4.1_1", 0x0000, 0x010000, CRC(5e05485e) SHA1(062f16ca92518f746f5410a2b9b551542e1a68e3), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 39)" ) -GAME_CUSTOM( 199?, m4wta__ac, m4wta, "wt_05__5.3_1", 0x0000, 0x010000, CRC(8a289bbd) SHA1(8ae0858716ed6aa02f6b4f93fd367c7cee85d13a), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 40)" ) -GAME_CUSTOM( 199?, m4wta__ad, m4wta, "wta5.10", 0x0000, 0x010000, CRC(c1ae8e9a) SHA1(66c0b200202386a10b96b7141517a52921266950), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 41)" ) -GAME_CUSTOM( 199?, m4wta__ae, m4wta, "wta5.4", 0x0000, 0x010000, CRC(00c64637) SHA1(54214edb107b28852a1bd3e095787bf9241e4fe3), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 42)" ) -GAME_CUSTOM( 199?, m4wta__af, m4wta, "wta5.5n", 0x0000, 0x010000, CRC(85eed9b5) SHA1(6a11ff6a031b788524d23018e3af44767176246a), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 43)" ) -GAME_CUSTOM( 199?, m4wta__ag, m4wta, "wta5.8t", 0x0000, 0x010000, CRC(548122ab) SHA1(c611084e8a08d5556e458daf9cc721c0e5ba1948), "Barcrest","Winner Takes All (Barcrest) (MPU4) (set 44)" ) +// (C)1993 BARCREST and "WIN 0.6" +GAME_CUSTOM( 199?, m4wta, 0, "wins.p1", 0x0000, 0x010000, CRC(d79d1e5b) SHA1(722657423a605d6d272d61e4e00b4055ed05f98d), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WIN 0.6)" ) +GAME_CUSTOM( 199?, m4wta__b, m4wta, "windy.p1", 0x0000, 0x010000, CRC(d8b78c2d) SHA1(d8c2a2ac30a9b876acfbe99e3c540ba0e82cde33), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WIN 0.6YD)" ) +GAME_CUSTOM( 199?, m4wta__e, m4wta, "winy.p1", 0x0000, 0x010000, CRC(5ff8ed08) SHA1(9567db64e8ebf25ecb22236598cc88a3106f0e36), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WIN 0.6Y)" ) +GAME_CUSTOM( 199?, m4wta__aa, m4wta, "wtall20a", 0x0000, 0x010000, CRC(b53c951e) SHA1(24f96d16852a4fbaf49fbdf29a26d15877f07b18), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WIN 0.6K)" ) +// (C)1993 BARCREST and "WN5 0.1" +GAME_CUSTOM( 199?, m4wta__f, m4wta, "wn5ad.p1", 0x0000, 0x010000, CRC(0eb0845d) SHA1(57a2ca27672119e71af3b990cedcf52dd89e24cc), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WN5 0.1AD)" ) +GAME_CUSTOM( 199?, m4wta__g, m4wta, "wn5b.p1", 0x0000, 0x010000, CRC(82cefba2) SHA1(07753a5f0d455422f33495a6f050c8e16a92e087), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WN5 0.1B)" ) +GAME_CUSTOM( 199?, m4wta__h, m4wta, "wn5bd.p1", 0x0000, 0x010000, CRC(19d25b26) SHA1(91459c87e95d9800c5f77fd0c7f72f8a1488dc37), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WN5 0.1BD)" ) +GAME_CUSTOM( 199?, m4wta__i, m4wta, "wn5d.p1", 0x0000, 0x010000, CRC(8a3d6bed) SHA1(a20f24cd5216976913c0405f54883d6080986867), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WN5 0.1D)" ) +GAME_CUSTOM( 199?, m4wta__j, m4wta, "wn5dk.p1", 0x0000, 0x010000, CRC(1dfcb2bc) SHA1(b1a73a7758c3126f7b13156835c91a4900cbe6e0), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WN5 0.1KD)" ) +GAME_CUSTOM( 199?, m4wta__k, m4wta, "wn5dy.p1", 0x0000, 0x010000, CRC(d45e1db0) SHA1(2524c4b60a89ea0ca15cf999fbd1f8d9029dfbb6), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WN5 0.1YD)" ) +GAME_CUSTOM( 199?, m4wta__l, m4wta, "wn5k.p1", 0x0000, 0x010000, CRC(71c34cb4) SHA1(e1b96dd30d8ab680128d76886691d06fcd2d48c0), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WN5 0.1K)" ) +GAME_CUSTOM( 199?, m4wta__m, m4wta, "wn5s.p1", 0x0000, 0x010000, CRC(f6e925c1) SHA1(963f06462c73300757aad2371df4ebe28afca521), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WN5 0.1)" ) +GAME_CUSTOM( 199?, m4wta__n, m4wta, "wn5y.p1", 0x0000, 0x010000, CRC(7155f8b5) SHA1(f55f88fd7b0144cb7b64640d529b179dd056f5ec), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WN5 0.1Y)" ) +// (C)1993 BARCREST and "WN8 0.1" +GAME_CUSTOM( 199?, m4wta__o, m4wta, "wn8b.p1", 0x0000, 0x010000, CRC(7e84f99c) SHA1(bef41b3e7906bdaadfa5741e9ae40028f4fd360f), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WN8 0.1B)" ) +GAME_CUSTOM( 199?, m4wta__p, m4wta, "wn8c.p1", 0x0000, 0x010000, CRC(471ba65a) SHA1(6ede860bcf323ee75dd7f75a51e5d1166ee72abc), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WN8 0.1C)" ) +GAME_CUSTOM( 199?, m4wta__q, m4wta, "wn8d.p1", 0x0000, 0x010000, CRC(eb2bd01e) SHA1(df74f8eb8fa411bab20ab522fd7c511a1370fe90), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WN8 0.1D)" ) +GAME_CUSTOM( 199?, m4wta__r, m4wta, "wn8dk.p1", 0x0000, 0x010000, CRC(ec20a0bc) SHA1(61b615165a6e77cd85e1fa6aeb955307ec48d1b6), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WN8 0.1KD)" ) +GAME_CUSTOM( 199?, m4wta__s, m4wta, "wn8dy.p1", 0x0000, 0x010000, CRC(d2a1513c) SHA1(e4d2ad88846cbb6b393d3615bf10e1dea01de219), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WN8 0.1YD)" ) +GAME_CUSTOM( 199?, m4wta__t, m4wta, "wn8k.p1", 0x0000, 0x010000, CRC(3e15c690) SHA1(2fc1cca91ac5cc9abeac112e4d60e8fd57b07b94), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WN8 0.1K)" ) +GAME_CUSTOM( 199?, m4wta__u, m4wta, "wn8s.p1", 0x0000, 0x010000, CRC(5c5a0f31) SHA1(301e595141dd6eb9250d71e591780e15a7d36423), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WN8 0.1)" ) +GAME_CUSTOM( 199?, m4wta__v, m4wta, "wn8y.p1", 0x0000, 0x010000, CRC(993cee6a) SHA1(26b2d5d3aa3465f90fe74960f183b8580ea2fbb1), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WN8 0.1Y)" ) +// "(C)1993 BARCREST" and "WNT 0.1" // bad char alarm, hack? +GAME_CUSTOM( 199?, m4wta__w, m4wta, "wnta2010", 0x0000, 0x010000, CRC(5b08faf8) SHA1(f4657041562044e17febfe77ad1f849545dcdaec), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WNT 0.1, hack?)" ) +// "(C)1993 BARCREST" and "WNT 0.1" +GAME_CUSTOM( 199?, m4wta__x, m4wta, "wntad.p1", 0x0000, 0x010000, CRC(8502766e) SHA1(2a47c8f8ce8711b30962c5e8ef9093bdd3543551), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WNT 0.1AD)" ) +GAME_CUSTOM( 199?, m4wta__y, m4wta, "wntb.p1", 0x0000, 0x010000, CRC(1e3159f0) SHA1(ab9d0e9e6731b40c66c358d98c6481f31d9a0b0c), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WNT 0.1B)" ) +GAME_CUSTOM( 199?, m4wta__z, m4wta, "wntbd.p1", 0x0000, 0x010000, CRC(91cc8978) SHA1(570ad4092bb148106fb2600f1e22b6cb6f57002a), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WNT 0.1BD)" ) +GAME_CUSTOM( 199?, m4wta__0, m4wta, "wntd.p1", 0x0000, 0x010000, CRC(ad68d804) SHA1(f301d0d267dd0020903f06b67ee6494b71258c68), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WNT 0.1D)" ) +GAME_CUSTOM( 199?, m4wta__1, m4wta, "wntdk.p1", 0x0000, 0x010000, CRC(3a6b65b8) SHA1(1da0448e53a45fa249c14b5655cd0dc957ebb646), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WNT 0.1KD)" ) +GAME_CUSTOM( 199?, m4wta__2, m4wta, "wntdy.p1", 0x0000, 0x010000, CRC(2420634f) SHA1(5c6e891c34a6e2b3a6acb3856c1554145bb24d0d), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WNT 0.1YD)" ) +GAME_CUSTOM( 199?, m4wta__3, m4wta, "wntk.p1", 0x0000, 0x010000, CRC(3d8d07c7) SHA1(4659e2459d956bbcf5ef2a605527317ccdafcccb), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WNT 0.1K)" ) +GAME_CUSTOM( 199?, m4wta__4, m4wta, "wnts.p1", 0x0000, 0x010000, CRC(3a9b0878) SHA1(85e86cca1a3a079746cd4401767ba1d9fc31a938), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WNT 0.1)" ) +GAME_CUSTOM( 199?, m4wta__5, m4wta, "wnty.p1", 0x0000, 0x010000, CRC(edaa5ae7) SHA1(d24b9f37d75f13f16718374e48e6c003b0b3333f), "Barcrest","Winner Takes All (Barcrest) (MPU4) (WNT 0.1Y)" ) +// "(C)1996 B.W.B." and "WNC 1.3" // bad char alarm +GAME_CUSTOM( 199?, m4wta__7, m4wta, "wta510l", 0x0000, 0x010000, CRC(9ce140ae) SHA1(01d53a5da0161ac4ecc861309f645d6eb47b4af5), "Bwb / hack?","Winner Takes All (Barcrest) (MPU4) (WNC 1.3, set 1)" ) +GAME_CUSTOM( 199?, m4wta__ad, m4wta, "wta5.10", 0x0000, 0x010000, CRC(c1ae8e9a) SHA1(66c0b200202386a10b96b7141517a52921266950), "Bwb / hack?","Winner Takes All (Barcrest) (MPU4) (WNC 1.3, set 2)" ) +// "(C)1996 B.W.B." and "WN8 2.2" // bad char alarm +GAME_CUSTOM( 199?, m4wta__8, m4wta, "wta58tl", 0x0000, 0x010000, CRC(7275e865) SHA1(d5550646a062609cfc052fab81c533ca69171875), "Bwb / hack?","Winner Takes All (Barcrest) (MPU4) (WN8 2.2, set 1)" ) +GAME_CUSTOM( 199?, m4wta__ag, m4wta, "wta5.8t", 0x0000, 0x010000, CRC(548122ab) SHA1(c611084e8a08d5556e458daf9cc721c0e5ba1948), "Bwb / hack?","Winner Takes All (Barcrest) (MPU4) (WN8 2.2, set 2)" ) +// "(C)1996 B.W.B." and "WN4 1.1" +GAME_CUSTOM( 199?, m4wta__9, m4wta, "wta_5p_4c.bin", 0x0000, 0x010000, CRC(54c51976) SHA1(70cae1f931615b993ac6a9e7ce2e529ad6d27da8), "Bwb / hack?","Winner Takes All (Barcrest) (MPU4) (WN4 1.1 K5)" ) +GAME_CUSTOM( 199?, m4wta__ab, m4wta, "wt_05__4.1_1", 0x0000, 0x010000, CRC(5e05485e) SHA1(062f16ca92518f746f5410a2b9b551542e1a68e3), "Bwb / hack?","Winner Takes All (Barcrest) (MPU4) (WN4 1.1 5)" ) +GAME_CUSTOM( 199?, m4wta__ae, m4wta, "wta5.4", 0x0000, 0x010000, CRC(00c64637) SHA1(54214edb107b28852a1bd3e095787bf9241e4fe3), "Bwb / hack?","Winner Takes All (Barcrest) (MPU4) (WN4 1.1, hack?)" ) // bad char alarm +// "(C)1996 B.W.B." and "WN5 3.0" +GAME_CUSTOM( 199?, m4wta__ac, m4wta, "wt_05__5.3_1", 0x0000, 0x010000, CRC(8a289bbd) SHA1(8ae0858716ed6aa02f6b4f93fd367c7cee85d13a), "Bwb / hack?","Winner Takes All (Barcrest) (MPU4) (WN5 3.0 5)" ) +// "BILLY WHIZZ" and "V1 0.1" +GAME_CUSTOM( 199?, m4wta__6, m4wta, "wta20p10.bin", 0x0000, 0x010000, CRC(c7f235b8) SHA1(a25f6f755140d70b0392985839b1729640cf5d5d), "hack","Winner Takes All (Barcrest) (MPU4) (V1 0.1, hack)" ) +// "197 COCO" and "WN4 1.1" (hack) +GAME_CUSTOM( 199?, m4wta__d, m4wta, "wta55", 0x0000, 0x010000, CRC(df3e66cd) SHA1(68e769816cb1a71dea8a3ccf4636414c45c01646), "hack","Winner Takes All (Barcrest) (MPU4) (WN4 1.1, hack, set 1)" ) +GAME_CUSTOM( 199?, m4wta__af, m4wta, "wta5.5n", 0x0000, 0x010000, CRC(85eed9b5) SHA1(6a11ff6a031b788524d23018e3af44767176246a), "hack","Winner Takes All (Barcrest) (MPU4) (WN4 1.1, hack, set 2)" ) #define M4GOODTM_EXTRA_ROMS \ @@ -1152,7 +1220,7 @@ GAME_CUSTOM( 199?, m4goodtm__a6, m4goodtm, "gts10y.p1", 0x0000, 0x020000, ROM_REGION( 0x48, "fakechr", 0 ) \ ROM_LOAD( "tri98.chr", 0x0000, 0x000048, CRC(8a4532a8) SHA1(c128fd513bbcba68a1c75a11e09a54ba1d23d6f4) ) \ ROM_REGION( 0x100000, "msm6376", 0 ) \ - ROM_LOAD( "jagsnd.p1", 0x080000, 0x080000, CRC(7488f7a7) SHA1(d581e9d6b5052ee8fee353a83e9d9031443d060a) ) + ROM_LOAD( "jagsnd.p1", 0x000000, 0x080000, CRC(7488f7a7) SHA1(d581e9d6b5052ee8fee353a83e9d9031443d060a) ) #undef GAME_CUSTOM #define GAME_CUSTOM(year, setname,parent,name,offset,length,hash,company,title) \ @@ -1162,16 +1230,20 @@ GAME_CUSTOM( 199?, m4goodtm__a6, m4goodtm, "gts10y.p1", 0x0000, 0x020000, M4JPGEM_EXTRA_ROMS \ ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4jpgem, 0, "cg4ad.p1", 0x0000, 0x010000, CRC(417c98c1) SHA1(2ce23e27742c418d5ebaa0f4f0597e29955ea57d), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 1)" ) + +// sets below give a hopper sense error (casino / club sets?) +// "(C)1991 BARCREST" and "CG4 0.7" +GAME_CUSTOM( 199?, m4jpgem, 0, "cg4s.p1", 0x0000, 0x010000, CRC(f25eba0b) SHA1(250189b7fb8aa82a8696c3a0099eb13ec74eeb10), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (CG4 0.7)" ) +GAME_CUSTOM( 199?, m4jpgem__g, m4jpgem, "cg4ad.p1", 0x0000, 0x010000, CRC(417c98c1) SHA1(2ce23e27742c418d5ebaa0f4f0597e29955ea57d), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (CG4 0.7AD)" ) GAME_CUSTOM( 199?, m4jpgem__a, m4jpgem, "cg4b.p1", 0x0000, 0x010000, CRC(c57cca63) SHA1(80a440912362d55cac6bc77b6ff6d6672af378c6), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4jpgem__b, m4jpgem, "cg4bd.p1", 0x0000, 0x010000, CRC(7604ea50) SHA1(3d6eee763bd21119ab52a2388229da076caf78a4), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4jpgem__c, m4jpgem, "cg4d.p1", 0x0000, 0x010000, CRC(87ea1087) SHA1(47f7c17fa3611745c881669ff50559e4b4386fd9), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 4)" ) GAME_CUSTOM( 199?, m4jpgem__d, m4jpgem, "cg4dk.p1", 0x0000, 0x010000, CRC(230284fb) SHA1(39ab2abdd8d3af4818e4e3738529f020055ba659), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 5)" ) GAME_CUSTOM( 199?, m4jpgem__e, m4jpgem, "cg4dy.p1", 0x0000, 0x010000, CRC(7d02342d) SHA1(097c9c9dc84bd00f1ddd64b1f9564f0cf7a9023f), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 6)" ) GAME_CUSTOM( 199?, m4jpgem__f, m4jpgem, "cg4k.p1", 0x0000, 0x010000, CRC(ba4ef5a8) SHA1(1673985aee634aa5c8129cc1239ce08fb9f5da2c), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4jpgem__g, m4jpgem, "cg4s.p1", 0x0000, 0x010000, CRC(f25eba0b) SHA1(250189b7fb8aa82a8696c3a0099eb13ec74eeb10), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 8)" ) GAME_CUSTOM( 199?, m4jpgem__h, m4jpgem, "cg4y.p1", 0x0000, 0x010000, CRC(237098d3) SHA1(9f54ed0d9ce37f3b4e6dca136fe4a12ba79c89f9), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4jpgem__i, m4jpgem, "cgt03ad.p1", 0x0000, 0x010000, CRC(88842c4a) SHA1(c86987b44f04cf28a6f68300e4345f635455d4bf), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 10)" ) +// "(C)1991 BARCREST" and "CG4 0.3" (startup shows CGT 0.3) +GAME_CUSTOM( 199?, m4jpgem__i, m4jpgem, "cgt03ad.p1", 0x0000, 0x010000, CRC(88842c4a) SHA1(c86987b44f04cf28a6f68300e4345f635455d4bf), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (CGT 0.3AD / CG4 0.3)" ) GAME_CUSTOM( 199?, m4jpgem__j, m4jpgem, "cgt03b.p1", 0x0000, 0x010000, CRC(99634ce1) SHA1(9fe867b0619070f563fb72b4415e4a9263c808e7), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4jpgem__k, m4jpgem, "cgt03bd.p1", 0x0000, 0x010000, CRC(be984100) SHA1(dfa7d97f02dc988b7743a1f57ab08c406f712559), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 12)" ) GAME_CUSTOM( 199?, m4jpgem__l, m4jpgem, "cgt03d.p1", 0x0000, 0x010000, CRC(aba3a305) SHA1(9a0203f830a0a8c6013eb5824bd48373c589dcb5), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 13)" ) @@ -1182,8 +1254,11 @@ GAME_CUSTOM( 199?, m4jpgem__p, m4jpgem, "cgt03k.p1", 0x0000, 0x010000, CR GAME_CUSTOM( 199?, m4jpgem__q, m4jpgem, "cgt03r.p1", 0x0000, 0x010000, CRC(85dd3733) SHA1(10b8c4d147d4b534ce31394d5ba69806b83a297e), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 18)" ) GAME_CUSTOM( 199?, m4jpgem__r, m4jpgem, "cgt03s.p1", 0x0000, 0x010000, CRC(b516cbcd) SHA1(c04d32818f9f8772b2a945cf40075ce7844b936e), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 19)" ) GAME_CUSTOM( 199?, m4jpgem__s, m4jpgem, "cgt03y.p1", 0x0000, 0x010000, CRC(57937087) SHA1(489bcbe5598020c24357f4c7b4e9096bc6332aa3), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4jpgem__t, m4jpgem, "cgts.p1", 0x0000, 0x010000, CRC(2a6f4489) SHA1(e410dd49cca50b3c051815a1b4be4bf2dc55f1af), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4jpgem__u, m4jpgem, "cgu02ad.p1", 0x0000, 0x010000, CRC(eee268a6) SHA1(ebc0d1e14ff27c5497b7c4e90e6fafa58916c83b), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 22)" ) +// "(C)1991 BARCREST" and "CG4 0.1" (startup shows CGT 0.1) +GAME_CUSTOM( 199?, m4jpgem__t, m4jpgem, "cgts.p1", 0x0000, 0x010000, CRC(2a6f4489) SHA1(e410dd49cca50b3c051815a1b4be4bf2dc55f1af), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (CGT 0.1 / CG4 0.1)" ) +// "(C)1991 BARCREST" and "CG4 0.2" (startup shows CGU 0.2) +GAME_CUSTOM( 199?, m4jpgem__3, m4jpgem, "cgu02s.p1", 0x0000, 0x010000, CRC(1cff0517) SHA1(162651a1af6273ea49490d0809a30ee9b13c728e), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (CGU 0.2 / CG4 0.2)" ) +GAME_CUSTOM( 199?, m4jpgem__u, m4jpgem, "cgu02ad.p1", 0x0000, 0x010000, CRC(eee268a6) SHA1(ebc0d1e14ff27c5497b7c4e90e6fafa58916c83b), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (CGU 0.2AD / CG4 0.2)" ) GAME_CUSTOM( 199?, m4jpgem__v, m4jpgem, "cgu02b.p1", 0x0000, 0x010000, CRC(7d05d069) SHA1(2a94b121528bf39939f5a8b36318c0073171997d), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 23)" ) GAME_CUSTOM( 199?, m4jpgem__w, m4jpgem, "cgu02bd.p1", 0x0000, 0x010000, CRC(d8fe05ec) SHA1(7e2de5c6ece6779d09daf23f3ab4b61817fad103), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 24)" ) GAME_CUSTOM( 199?, m4jpgem__x, m4jpgem, "cgu02d.p1", 0x0000, 0x010000, CRC(daaf1fe1) SHA1(f2606c454e191166d217c5f5c82e91794977384b), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 25)" ) @@ -1192,54 +1267,10 @@ GAME_CUSTOM( 199?, m4jpgem__z, m4jpgem, "cgu02dr.p1", 0x0000, 0x010000, CR GAME_CUSTOM( 199?, m4jpgem__0, m4jpgem, "cgu02dy.p1", 0x0000, 0x010000, CRC(5f1709d1) SHA1(36ae3cd57e5db956b8ef362043d5c63aea0da06a), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 28)" ) GAME_CUSTOM( 199?, m4jpgem__1, m4jpgem, "cgu02k.p1", 0x0000, 0x010000, CRC(90058f14) SHA1(0e73410253e422ff2d4182b034624ab8dd996cb8), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 29)" ) GAME_CUSTOM( 199?, m4jpgem__2, m4jpgem, "cgu02r.p1", 0x0000, 0x010000, CRC(8f1d071b) SHA1(caa05465a12ca7ab6df0dce458caefb40dad818a), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 30)" ) -GAME_CUSTOM( 199?, m4jpgem__3, m4jpgem, "cgu02s.p1", 0x0000, 0x010000, CRC(1cff0517) SHA1(162651a1af6273ea49490d0809a30ee9b13c728e), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 31)" ) GAME_CUSTOM( 199?, m4jpgem__4, m4jpgem, "cgu02y.p1", 0x0000, 0x010000, CRC(a2468782) SHA1(5f9161cffc6d9ffe8c30c41434ab012c16a48dfd), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 32)" ) -GAME_CUSTOM( 199?, m4jpgem__5, m4jpgem, "jagb.p1", 0x0000, 0x010000, CRC(75b9a4b6) SHA1(ecade0921cd535ee7f1b67767fa7d5ab3cd45b2c), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 33)" ) -GAME_CUSTOM( 199?, m4jpgem__6, m4jpgem, "jagd.p1", 0x0000, 0x010000, CRC(c7546004) SHA1(31bdbd6b681a3a2b13f380f2807691c0b0fec83e), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 34)" ) -GAME_CUSTOM( 199?, m4jpgem__7, m4jpgem, "jagdk.p1", 0x0000, 0x010000, CRC(313f7a1f) SHA1(358a33878ca70f2bcdb1d5d79c39e357586ebe8b), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 35)" ) -GAME_CUSTOM( 199?, m4jpgem__8, m4jpgem, "jagdy.p1", 0x0000, 0x010000, CRC(d105a41e) SHA1(365e382683362c815461801753fb03e2f084de65), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 36)" ) -GAME_CUSTOM( 199?, m4jpgem__9, m4jpgem, "jags.p1", 0x0000, 0x010000, CRC(dd93f084) SHA1(5cb25b3beb6d7a7b83227a6bb8382cfbcc285887), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 37)" ) -GAME_CUSTOM( 199?, m4jpgem__aa, m4jpgem, "jagy.p1", 0x0000, 0x010000, CRC(08d510ca) SHA1(b79c9fe8dc17152f3e8c601c27515beff1d67219), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 38)" ) -GAME_CUSTOM( 199?, m4jpgem__ab, m4jpgem, "jg3ad.p1", 0x0000, 0x010000, CRC(501bb879) SHA1(a97519042b4a4ed03efbcad9f11f279184dec847), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 39)" ) -GAME_CUSTOM( 199?, m4jpgem__ac, m4jpgem, "jg3b.p1", 0x0000, 0x010000, CRC(e568ae84) SHA1(9126f9b45633e7eb44626aa0ab40784c62870c8a), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 40)" ) -GAME_CUSTOM( 199?, m4jpgem__ad, m4jpgem, "jg3bd.p1", 0x0000, 0x010000, CRC(435d5d28) SHA1(1ea48323f48edc20ce1c28e4e7080e0824e73d3c), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 41)" ) -GAME_CUSTOM( 199?, m4jpgem__ae, m4jpgem, "jg3d.p1", 0x0000, 0x010000, CRC(774f9d41) SHA1(c99e9a46b1216f430007b5ebbf942899b5e691f9), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 42)" ) -GAME_CUSTOM( 199?, m4jpgem__af, m4jpgem, "jg3dk.p1", 0x0000, 0x010000, CRC(c422e514) SHA1(172b25bf75a529b555e328cef77a3340609d818b), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 43)" ) -GAME_CUSTOM( 199?, m4jpgem__ag, m4jpgem, "jg3dy.p1", 0x0000, 0x010000, CRC(5d1c886f) SHA1(b49ab97ba6cdc810e7baa520ffad25f54c0d8412), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 44)" ) -GAME_CUSTOM( 199?, m4jpgem__ah, m4jpgem, "jg3k.p1", 0x0000, 0x010000, CRC(8e7985ae) SHA1(8c8de22aab2508b2317d5edde779d54ebe67ac92), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 45)" ) -GAME_CUSTOM( 199?, m4jpgem__ai, m4jpgem, "jg3s.p1", 0x0000, 0x010000, CRC(91945adc) SHA1(d80321fc4c2e67461d69df2164e3e290caa905bc), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 46)" ) -GAME_CUSTOM( 199?, m4jpgem__aj, m4jpgem, "jg3y.p1", 0x0000, 0x010000, CRC(bf96ad55) SHA1(48d828398f32c3ddfafeb84cfd777f8e668df1b3), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 47)" ) -GAME_CUSTOM( 199?, m4jpgem__ak, m4jpgem, "jg8b.p1", 0x0000, 0x010000, CRC(f2e3d009) SHA1(90c85f9a300d157d560b08ccabfe79f826780d74), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 48)" ) -GAME_CUSTOM( 199?, m4jpgem__al, m4jpgem, "jg8c.p1", 0x0000, 0x010000, CRC(cc24cf15) SHA1(0c4c28633f33c78570f5da17c64c2e90bf3d5cd0), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 49)" ) -GAME_CUSTOM( 199?, m4jpgem__am, m4jpgem, "jg8d.p1", 0x0000, 0x010000, CRC(58eff94c) SHA1(9acde535ad808789233876dd8076c03a8d56a9e7), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 50)" ) -GAME_CUSTOM( 199?, m4jpgem__an, m4jpgem, "jg8db.p1", 0x0000, 0x010000, CRC(3006a36a) SHA1(37297cae02c1fd5308ba9935537b35c565374a07), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 51)" ) -GAME_CUSTOM( 199?, m4jpgem__ao, m4jpgem, "jg8dk.p1", 0x0000, 0x010000, CRC(199401d7) SHA1(33eef070e437386c7ad0d834b40353047f1a6a6f), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 52)" ) -GAME_CUSTOM( 199?, m4jpgem__ap, m4jpgem, "jg8dy.p1", 0x0000, 0x010000, CRC(ead58bed) SHA1(cd0e151c843f5268edddb2f82555201deccac65a), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 53)" ) -GAME_CUSTOM( 199?, m4jpgem__aq, m4jpgem, "jg8k.p1", 0x0000, 0x010000, CRC(f5b14363) SHA1(f0ace838cc0d0c262006bb514eff75903d92d679), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 54)" ) -GAME_CUSTOM( 199?, m4jpgem__ar, m4jpgem, "jg8s.p1", 0x0000, 0x010000, CRC(8cdd650a) SHA1(c4cb87513f0d7986e158b3c5ab1f034c8ba933a9), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 55)" ) -GAME_CUSTOM( 199?, m4jpgem__as, m4jpgem, "jgtad.p1", 0x0000, 0x010000, CRC(90e10b6c) SHA1(548c7537829ca9395cac460ccf76e0d566898e44), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 56)" ) -GAME_CUSTOM( 199?, m4jpgem__at, m4jpgem, "jgtb.p1", 0x0000, 0x010000, CRC(5f343a43) SHA1(033824e93b1fcd2f7c5f27a573a728747ef7b21a), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 57)" ) -GAME_CUSTOM( 199?, m4jpgem__au, m4jpgem, "jgtbd.p1", 0x0000, 0x010000, CRC(50ba2771) SHA1(f487ed2eeff0369e3fa718de68e3ba4912fd7576), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 58)" ) -GAME_CUSTOM( 199?, m4jpgem__av, m4jpgem, "jgtd.p1", 0x0000, 0x010000, CRC(2625da4a) SHA1(b1f9d22a46bf20283c5735fce5768d9cef299f59), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 59)" ) -GAME_CUSTOM( 199?, m4jpgem__aw, m4jpgem, "jgtdk.p1", 0x0000, 0x010000, CRC(94220901) SHA1(f62c9a59bb419e98f7de358f7fee072b08aab3f5), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 60)" ) -GAME_CUSTOM( 199?, m4jpgem__ax, m4jpgem, "jgtdr.p1", 0x0000, 0x010000, CRC(5011d1e3) SHA1(85e5d28d26449a951704698a4419cd2c0f7dd9c4), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 61)" ) -GAME_CUSTOM( 199?, m4jpgem__ay, m4jpgem, "jgtdy.p1", 0x0000, 0x010000, CRC(6397e38c) SHA1(ed0c165a5ab27524374c540fd9bdcfd41ce8096c), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 62)" ) -GAME_CUSTOM( 199?, m4jpgem__az, m4jpgem, "jgtk.p1", 0x0000, 0x010000, CRC(cb30d644) SHA1(751fc5c7ae07e64c07a3e89e74ace09dd2b99a02), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 63)" ) -GAME_CUSTOM( 199?, m4jpgem__a0, m4jpgem, "jgtr.p1", 0x0000, 0x010000, CRC(6224a93d) SHA1(6d36b64c2eaddf122a6a7e798b5efb44ec2e5b45), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 64)" ) -GAME_CUSTOM( 199?, m4jpgem__a1, m4jpgem, "jgts.p1", 0x0000, 0x010000, CRC(0e3810a7) SHA1(cf840bd84eba65d9dec2d6821a48112b6f2f9bca), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 65)" ) -GAME_CUSTOM( 199?, m4jpgem__a2, m4jpgem, "jgty.p1", 0x0000, 0x010000, CRC(84830d1f) SHA1(a4184a5bd08393c35f22bc05315377bff74f666c), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 66)" ) -GAME_CUSTOM( 199?, m4jpgem__a3, m4jpgem, "jgu02ad.p1", 0x0000, 0x010000, CRC(ccec7d40) SHA1(75cc1a0dfda9592e35c24c030e04a768871a9e41), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 67)" ) -GAME_CUSTOM( 199?, m4jpgem__a4, m4jpgem, "jgu02b.p1", 0x0000, 0x010000, CRC(daf0ebe3) SHA1(2e73f7b8171c0be7d06bf6da22e0395d5241b043), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 68)" ) -GAME_CUSTOM( 199?, m4jpgem__a5, m4jpgem, "jgu02bd.p1", 0x0000, 0x010000, CRC(faf0100a) SHA1(c97b8eadfd473650ec497c7caa98e8efc59ecb6f), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 69)" ) -GAME_CUSTOM( 199?, m4jpgem__a6, m4jpgem, "jgu02d.p1", 0x0000, 0x010000, CRC(b46e3f66) SHA1(1ede9d794effbc8cc9f097a06b7df4023d3d47ba), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 70)" ) -GAME_CUSTOM( 199?, m4jpgem__a7, m4jpgem, "jgu02dk.p1", 0x0000, 0x010000, CRC(cdbf0041) SHA1(fb90d4f8112e169dab16f78fdea9d1b5306e05d6), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 71)" ) -GAME_CUSTOM( 199?, m4jpgem__a8, m4jpgem, "jgu02dr.p1", 0x0000, 0x010000, CRC(41f1f723) SHA1(96623358e6dc450dbdc769d176703917f67e767a), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 72)" ) -GAME_CUSTOM( 199?, m4jpgem__a9, m4jpgem, "jgu02dy.p1", 0x0000, 0x010000, CRC(2023388d) SHA1(c9f1abaa12c78ac61304966b46044b82ea2ea3ff), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 73)" ) -GAME_CUSTOM( 199?, m4jpgem__ba, m4jpgem, "jgu02k.p1", 0x0000, 0x010000, CRC(615029e8) SHA1(aecba0fad8c74fef9a4d04e95df961432ac999b7), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 74)" ) -GAME_CUSTOM( 199?, m4jpgem__bb, m4jpgem, "jgu02r.p1", 0x0000, 0x010000, CRC(4bc55daa) SHA1(996f23bd66a4ef6ad8f77a28dc6ee67d9a293248), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 75)" ) -GAME_CUSTOM( 199?, m4jpgem__bc, m4jpgem, "jgu02s.p1", 0x0000, 0x010000, CRC(f8abd287) SHA1(906d2817f73ea21cf830b0bd9a1938d344cc0341), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 76)" ) -GAME_CUSTOM( 199?, m4jpgem__bd, m4jpgem, "jgu02y.p1", 0x0000, 0x010000, CRC(9b4325a8) SHA1(3d7c54691ed4d596acacec97e452a66b324957db), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 77)" ) -GAME_CUSTOM( 199?, m4jpgem__be, m4jpgem, "rrh01ad.p1", 0x0000, 0x010000, CRC(d4f21930) SHA1(cba034b42a3587c0e173bc06d80142d7e494c849), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 78)" ) +// "(C)1991 BARCREST" and "CG4 0.1" (startup shows RRH 0.1) +GAME_CUSTOM( 199?, m4jpgem__bo, m4jpgem, "rrh01s.p1", 0x0000, 0x010000, CRC(dea2f376) SHA1(92f43c75950553d9b76af8179192d106de95fc03), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (RRH 0.1 / CG4 0.1)" ) +GAME_CUSTOM( 199?, m4jpgem__be, m4jpgem, "rrh01ad.p1", 0x0000, 0x010000, CRC(d4f21930) SHA1(cba034b42a3587c0e173bc06d80142d7e494c849), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (RRH 0.1AD / CG4 0.1)" ) GAME_CUSTOM( 199?, m4jpgem__bf, m4jpgem, "rrh01b.p1", 0x0000, 0x010000, CRC(c85f9099) SHA1(f3c8f79c2e0cc58024202564761f4935f5d241b1), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 79)" ) GAME_CUSTOM( 199?, m4jpgem__bg, m4jpgem, "rrh01bd.p1", 0x0000, 0x010000, CRC(e2ee747a) SHA1(7f6cb93e3cbe4a2dd97d1ad15d17fa4f2f0a4b12), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 80)" ) GAME_CUSTOM( 199?, m4jpgem__bh, m4jpgem, "rrh01c.p1", 0x0000, 0x010000, CRC(00dfced2) SHA1(c497cb9835dca0d67f5ec6b6b1321a7b92612c9a), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 81)" ) @@ -1249,8 +1280,58 @@ GAME_CUSTOM( 199?, m4jpgem__bk, m4jpgem, "rrh01dr.p1", 0x0000, 0x010000, CR GAME_CUSTOM( 199?, m4jpgem__bl, m4jpgem, "rrh01dy.p1", 0x0000, 0x010000, CRC(d89136fd) SHA1(40fd0978bc76d81bfb5dc2f1e4a0c1c95b7c4e00), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 85)" ) GAME_CUSTOM( 199?, m4jpgem__bm, m4jpgem, "rrh01k.p1", 0x0000, 0x010000, CRC(da4a08c9) SHA1(3a86c0a543a7192680663b465ddfd1fa338cfec5), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 86)" ) GAME_CUSTOM( 199?, m4jpgem__bn, m4jpgem, "rrh01r.p1", 0x0000, 0x010000, CRC(fb45c547) SHA1(8d9c35c47c0f03c9dc6727fc5f952d64e25336f7), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 87)" ) -GAME_CUSTOM( 199?, m4jpgem__bo, m4jpgem, "rrh01s.p1", 0x0000, 0x010000, CRC(dea2f376) SHA1(92f43c75950553d9b76af8179192d106de95fc03), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 88)" ) GAME_CUSTOM( 199?, m4jpgem__bp, m4jpgem, "rrh01y.p1", 0x0000, 0x010000, CRC(27014453) SHA1(febc118fcb8f048806237b38958c02d02b9f2874), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 89)" ) +// sets below boot (regular arcade sets?) +// "(C)1991 BARCREST" and "JAG 0.4" +GAME_CUSTOM( 199?, m4jpgem__9, m4jpgem, "jags.p1", 0x0000, 0x010000, CRC(dd93f084) SHA1(5cb25b3beb6d7a7b83227a6bb8382cfbcc285887), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (JAG 0.4)" ) +GAME_CUSTOM( 199?, m4jpgem__5, m4jpgem, "jagb.p1", 0x0000, 0x010000, CRC(75b9a4b6) SHA1(ecade0921cd535ee7f1b67767fa7d5ab3cd45b2c), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (JAG 0.4B)" ) +GAME_CUSTOM( 199?, m4jpgem__6, m4jpgem, "jagd.p1", 0x0000, 0x010000, CRC(c7546004) SHA1(31bdbd6b681a3a2b13f380f2807691c0b0fec83e), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 34)" ) +GAME_CUSTOM( 199?, m4jpgem__7, m4jpgem, "jagdk.p1", 0x0000, 0x010000, CRC(313f7a1f) SHA1(358a33878ca70f2bcdb1d5d79c39e357586ebe8b), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 35)" ) +GAME_CUSTOM( 199?, m4jpgem__8, m4jpgem, "jagdy.p1", 0x0000, 0x010000, CRC(d105a41e) SHA1(365e382683362c815461801753fb03e2f084de65), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 36)" ) +GAME_CUSTOM( 199?, m4jpgem__aa, m4jpgem, "jagy.p1", 0x0000, 0x010000, CRC(08d510ca) SHA1(b79c9fe8dc17152f3e8c601c27515beff1d67219), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 38)" ) +// "(C)1991 BARCREST" and "JG3 0.1" +GAME_CUSTOM( 199?, m4jpgem__ai, m4jpgem, "jg3s.p1", 0x0000, 0x010000, CRC(91945adc) SHA1(d80321fc4c2e67461d69df2164e3e290caa905bc), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (JG3 0.1)" ) +GAME_CUSTOM( 199?, m4jpgem__ab, m4jpgem, "jg3ad.p1", 0x0000, 0x010000, CRC(501bb879) SHA1(a97519042b4a4ed03efbcad9f11f279184dec847), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (JG3 0.1AD)" ) +GAME_CUSTOM( 199?, m4jpgem__ac, m4jpgem, "jg3b.p1", 0x0000, 0x010000, CRC(e568ae84) SHA1(9126f9b45633e7eb44626aa0ab40784c62870c8a), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 40)" ) +GAME_CUSTOM( 199?, m4jpgem__ad, m4jpgem, "jg3bd.p1", 0x0000, 0x010000, CRC(435d5d28) SHA1(1ea48323f48edc20ce1c28e4e7080e0824e73d3c), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 41)" ) +GAME_CUSTOM( 199?, m4jpgem__ae, m4jpgem, "jg3d.p1", 0x0000, 0x010000, CRC(774f9d41) SHA1(c99e9a46b1216f430007b5ebbf942899b5e691f9), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 42)" ) +GAME_CUSTOM( 199?, m4jpgem__af, m4jpgem, "jg3dk.p1", 0x0000, 0x010000, CRC(c422e514) SHA1(172b25bf75a529b555e328cef77a3340609d818b), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 43)" ) +GAME_CUSTOM( 199?, m4jpgem__ag, m4jpgem, "jg3dy.p1", 0x0000, 0x010000, CRC(5d1c886f) SHA1(b49ab97ba6cdc810e7baa520ffad25f54c0d8412), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 44)" ) +GAME_CUSTOM( 199?, m4jpgem__ah, m4jpgem, "jg3k.p1", 0x0000, 0x010000, CRC(8e7985ae) SHA1(8c8de22aab2508b2317d5edde779d54ebe67ac92), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 45)" ) +GAME_CUSTOM( 199?, m4jpgem__aj, m4jpgem, "jg3y.p1", 0x0000, 0x010000, CRC(bf96ad55) SHA1(48d828398f32c3ddfafeb84cfd777f8e668df1b3), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 47)" ) +// "(C)1991 BARCREST" and "JG8 0.1" +GAME_CUSTOM( 199?, m4jpgem__ar, m4jpgem, "jg8s.p1", 0x0000, 0x010000, CRC(8cdd650a) SHA1(c4cb87513f0d7986e158b3c5ab1f034c8ba933a9), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (JG8 0.1)" ) +GAME_CUSTOM( 199?, m4jpgem__ak, m4jpgem, "jg8b.p1", 0x0000, 0x010000, CRC(f2e3d009) SHA1(90c85f9a300d157d560b08ccabfe79f826780d74), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (JG8 0.1B)" ) +GAME_CUSTOM( 199?, m4jpgem__al, m4jpgem, "jg8c.p1", 0x0000, 0x010000, CRC(cc24cf15) SHA1(0c4c28633f33c78570f5da17c64c2e90bf3d5cd0), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 49)" ) +GAME_CUSTOM( 199?, m4jpgem__am, m4jpgem, "jg8d.p1", 0x0000, 0x010000, CRC(58eff94c) SHA1(9acde535ad808789233876dd8076c03a8d56a9e7), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 50)" ) +GAME_CUSTOM( 199?, m4jpgem__an, m4jpgem, "jg8db.p1", 0x0000, 0x010000, CRC(3006a36a) SHA1(37297cae02c1fd5308ba9935537b35c565374a07), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 51)" ) +GAME_CUSTOM( 199?, m4jpgem__ao, m4jpgem, "jg8dk.p1", 0x0000, 0x010000, CRC(199401d7) SHA1(33eef070e437386c7ad0d834b40353047f1a6a6f), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 52)" ) +GAME_CUSTOM( 199?, m4jpgem__ap, m4jpgem, "jg8dy.p1", 0x0000, 0x010000, CRC(ead58bed) SHA1(cd0e151c843f5268edddb2f82555201deccac65a), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 53)" ) +GAME_CUSTOM( 199?, m4jpgem__aq, m4jpgem, "jg8k.p1", 0x0000, 0x010000, CRC(f5b14363) SHA1(f0ace838cc0d0c262006bb514eff75903d92d679), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 54)" ) +// "(C)1991 BARCREST" and "JGT 0.3" +GAME_CUSTOM( 199?, m4jpgem__a1, m4jpgem, "jgts.p1", 0x0000, 0x010000, CRC(0e3810a7) SHA1(cf840bd84eba65d9dec2d6821a48112b6f2f9bca), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (JGT 0.3)" ) +GAME_CUSTOM( 199?, m4jpgem__as, m4jpgem, "jgtad.p1", 0x0000, 0x010000, CRC(90e10b6c) SHA1(548c7537829ca9395cac460ccf76e0d566898e44), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (JGT 0.3AD)" ) +GAME_CUSTOM( 199?, m4jpgem__at, m4jpgem, "jgtb.p1", 0x0000, 0x010000, CRC(5f343a43) SHA1(033824e93b1fcd2f7c5f27a573a728747ef7b21a), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 57)" ) +GAME_CUSTOM( 199?, m4jpgem__au, m4jpgem, "jgtbd.p1", 0x0000, 0x010000, CRC(50ba2771) SHA1(f487ed2eeff0369e3fa718de68e3ba4912fd7576), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 58)" ) +GAME_CUSTOM( 199?, m4jpgem__av, m4jpgem, "jgtd.p1", 0x0000, 0x010000, CRC(2625da4a) SHA1(b1f9d22a46bf20283c5735fce5768d9cef299f59), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 59)" ) +GAME_CUSTOM( 199?, m4jpgem__aw, m4jpgem, "jgtdk.p1", 0x0000, 0x010000, CRC(94220901) SHA1(f62c9a59bb419e98f7de358f7fee072b08aab3f5), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 60)" ) +GAME_CUSTOM( 199?, m4jpgem__ax, m4jpgem, "jgtdr.p1", 0x0000, 0x010000, CRC(5011d1e3) SHA1(85e5d28d26449a951704698a4419cd2c0f7dd9c4), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 61)" ) +GAME_CUSTOM( 199?, m4jpgem__ay, m4jpgem, "jgtdy.p1", 0x0000, 0x010000, CRC(6397e38c) SHA1(ed0c165a5ab27524374c540fd9bdcfd41ce8096c), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 62)" ) +GAME_CUSTOM( 199?, m4jpgem__az, m4jpgem, "jgtk.p1", 0x0000, 0x010000, CRC(cb30d644) SHA1(751fc5c7ae07e64c07a3e89e74ace09dd2b99a02), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 63)" ) +GAME_CUSTOM( 199?, m4jpgem__a0, m4jpgem, "jgtr.p1", 0x0000, 0x010000, CRC(6224a93d) SHA1(6d36b64c2eaddf122a6a7e798b5efb44ec2e5b45), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 64)" ) +GAME_CUSTOM( 199?, m4jpgem__a2, m4jpgem, "jgty.p1", 0x0000, 0x010000, CRC(84830d1f) SHA1(a4184a5bd08393c35f22bc05315377bff74f666c), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 66)" ) +// "(C)1991 BARCREST" and "JGU 0.2" +GAME_CUSTOM( 199?, m4jpgem__bc, m4jpgem, "jgu02s.p1", 0x0000, 0x010000, CRC(f8abd287) SHA1(906d2817f73ea21cf830b0bd9a1938d344cc0341), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (JGU 0.2)" ) +GAME_CUSTOM( 199?, m4jpgem__a3, m4jpgem, "jgu02ad.p1", 0x0000, 0x010000, CRC(ccec7d40) SHA1(75cc1a0dfda9592e35c24c030e04a768871a9e41), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (JGU 0.2AD)" ) +GAME_CUSTOM( 199?, m4jpgem__a4, m4jpgem, "jgu02b.p1", 0x0000, 0x010000, CRC(daf0ebe3) SHA1(2e73f7b8171c0be7d06bf6da22e0395d5241b043), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 68)" ) +GAME_CUSTOM( 199?, m4jpgem__a5, m4jpgem, "jgu02bd.p1", 0x0000, 0x010000, CRC(faf0100a) SHA1(c97b8eadfd473650ec497c7caa98e8efc59ecb6f), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 69)" ) +GAME_CUSTOM( 199?, m4jpgem__a6, m4jpgem, "jgu02d.p1", 0x0000, 0x010000, CRC(b46e3f66) SHA1(1ede9d794effbc8cc9f097a06b7df4023d3d47ba), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 70)" ) +GAME_CUSTOM( 199?, m4jpgem__a7, m4jpgem, "jgu02dk.p1", 0x0000, 0x010000, CRC(cdbf0041) SHA1(fb90d4f8112e169dab16f78fdea9d1b5306e05d6), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 71)" ) +GAME_CUSTOM( 199?, m4jpgem__a8, m4jpgem, "jgu02dr.p1", 0x0000, 0x010000, CRC(41f1f723) SHA1(96623358e6dc450dbdc769d176703917f67e767a), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 72)" ) +GAME_CUSTOM( 199?, m4jpgem__a9, m4jpgem, "jgu02dy.p1", 0x0000, 0x010000, CRC(2023388d) SHA1(c9f1abaa12c78ac61304966b46044b82ea2ea3ff), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 73)" ) +GAME_CUSTOM( 199?, m4jpgem__ba, m4jpgem, "jgu02k.p1", 0x0000, 0x010000, CRC(615029e8) SHA1(aecba0fad8c74fef9a4d04e95df961432ac999b7), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 74)" ) +GAME_CUSTOM( 199?, m4jpgem__bb, m4jpgem, "jgu02r.p1", 0x0000, 0x010000, CRC(4bc55daa) SHA1(996f23bd66a4ef6ad8f77a28dc6ee67d9a293248), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 75)" ) +GAME_CUSTOM( 199?, m4jpgem__bd, m4jpgem, "jgu02y.p1", 0x0000, 0x010000, CRC(9b4325a8) SHA1(3d7c54691ed4d596acacec97e452a66b324957db), "Barcrest","Jackpot Gems (Barcrest) (MPU4) (set 77)" ) #define M4JPGEMC_EXTRA_ROMS \ ROM_REGION( 0x100000, "msm6376", ROMREGION_ERASE00 ) \ @@ -1265,7 +1346,9 @@ GAME_CUSTOM( 199?, m4jpgem__bp, m4jpgem, "rrh01y.p1", 0x0000, 0x010000, CR ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4jpgemc, 0, "gtc01ad.p1", 0x0000, 0x010000, CRC(e4f61afd) SHA1(36e007275cce0565c50b150dba4c8df272cd4c2e), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (set 1)" ) +// "(C)1991 BARCREST" and "CG4 0.1" (startup shows GTC) +GAME_CUSTOM( 199?, m4jpgemc, 0, "gtc01s.p1", 0x0000, 0x010000, CRC(af33337b) SHA1(97d28e224b73baa9d6d7b0c309385f57b6dd5d9b), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (GTC 0.1 / CG4 0.1)" ) +GAME_CUSTOM( 199?, m4jpgemc__j, m4jpgemc, "gtc01ad.p1", 0x0000, 0x010000, CRC(e4f61afd) SHA1(36e007275cce0565c50b150dba4c8df272cd4c2e), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (GTC 0.1AD / CG4 0.1)" ) GAME_CUSTOM( 199?, m4jpgemc__a, m4jpgemc, "gtc01b.p1", 0x0000, 0x010000, CRC(e4e27c71) SHA1(b46da3f00134d3a2f17ceb35529adb598c75ee4e), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4jpgemc__b, m4jpgemc, "gtc01bd.p1", 0x0000, 0x010000, CRC(d2ea77b7) SHA1(4f66fa8d692f26ffa92ae3aff4f43257fc573e93), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4jpgemc__c, m4jpgemc, "gtc01c.p1", 0x0000, 0x010000, CRC(21c4c4f7) SHA1(f8a2de8453c095db80ff19018a72b15b949bace9), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (set 4)" ) @@ -1275,9 +1358,10 @@ GAME_CUSTOM( 199?, m4jpgemc__f, m4jpgemc, "gtc01dr.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4jpgemc__g, m4jpgemc, "gtc01dy.p1", 0x0000, 0x010000, CRC(713dec4a) SHA1(3cb1e3f5299a5145addaa677022e7d9a164072d9), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (set 8)" ) GAME_CUSTOM( 199?, m4jpgemc__h, m4jpgemc, "gtc01k.p1", 0x0000, 0x010000, CRC(fb5102ec) SHA1(36c9c50c8266707542b00cfc55f57ec454401f70), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4jpgemc__i, m4jpgemc, "gtc01r.p1", 0x0000, 0x010000, CRC(e311ca39) SHA1(602aee41400793f46f47ac9c8a9e6ce7f2d5f203), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4jpgemc__j, m4jpgemc, "gtc01s.p1", 0x0000, 0x010000, CRC(af33337b) SHA1(97d28e224b73baa9d6d7b0c309385f57b6dd5d9b), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4jpgemc__k, m4jpgemc, "gtc01y.p1", 0x0000, 0x010000, CRC(59e8557a) SHA1(8493b160427c21bbb2834c01b39f8a6a8b221bb3), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4jpgemc__l, m4jpgemc, "hge01ad.p1", 0x0000, 0x010000, CRC(bb201074) SHA1(eb954d165c2d96f952439277d255e3ec3326ada3), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (set 13)" ) +// "(C)1991 BARCREST" and "CG4 0.1" (startup shows HGE) +GAME_CUSTOM( 199?, m4jpgemc__v, m4jpgemc, "hge01s.p1", 0x0000, 0x010000, CRC(b79f8c42) SHA1(7d8b3352fbd9a80b86f5a8b22833d6f5c4b9854b), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (HGE 0.1 / CG4 0.1)" ) +GAME_CUSTOM( 199?, m4jpgemc__l, m4jpgemc, "hge01ad.p1", 0x0000, 0x010000, CRC(bb201074) SHA1(eb954d165c2d96f952439277d255e3ec3326ada3), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (HGE 0.1AD / CG4 0.1)" ) GAME_CUSTOM( 199?, m4jpgemc__m, m4jpgemc, "hge01b.p1", 0x0000, 0x010000, CRC(d7ad2482) SHA1(ed90c4531608e66b14eb1079e85ea59573adf451), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (set 14)" ) GAME_CUSTOM( 199?, m4jpgemc__n, m4jpgemc, "hge01bd.p1", 0x0000, 0x010000, CRC(3ea0f524) SHA1(1967e5ec14c41c4140c7c39b07085f740c2d1f01), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (set 15)" ) GAME_CUSTOM( 199?, m4jpgemc__o, m4jpgemc, "hge01c.p1", 0x0000, 0x010000, CRC(498de7bf) SHA1(32dc31852fa69f7d2dd47bbcef695fcf5337f01f), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (set 16)" ) @@ -1287,7 +1371,6 @@ GAME_CUSTOM( 199?, m4jpgemc__r, m4jpgemc, "hge01dr.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4jpgemc__s, m4jpgemc, "hge01dy.p1", 0x0000, 0x010000, CRC(18ca3ae3) SHA1(ebb434a060564d3a1bc51876257729650e2903a6), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (set 20)" ) GAME_CUSTOM( 199?, m4jpgemc__t, m4jpgemc, "hge01k.p1", 0x0000, 0x010000, CRC(4161f733) SHA1(b551bb278666790f0c293c76d5c3fabf8f4d368e), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (set 21)" ) GAME_CUSTOM( 199?, m4jpgemc__u, m4jpgemc, "hge01r.p1", 0x0000, 0x010000, CRC(6dc8dc70) SHA1(e96fc4284ece65f76d5e9bd06c4a002de65bf4da), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4jpgemc__v, m4jpgemc, "hge01s.p1", 0x0000, 0x010000, CRC(b79f8c42) SHA1(7d8b3352fbd9a80b86f5a8b22833d6f5c4b9854b), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (set 23)" ) GAME_CUSTOM( 199?, m4jpgemc__w, m4jpgemc, "hge01y.p1", 0x0000, 0x010000, CRC(a96db093) SHA1(17520306112cee6f082829811e1f8c432c6aa354), "Barcrest","Jackpot Gems Classic (Barcrest) (MPU4) (set 24)" ) @@ -1306,6 +1389,8 @@ GAME_CUSTOM( 199?, m4jpgemc__w, m4jpgemc, "hge01y.p1", 0x0000, 0x010000, M4JOLGEM_EXTRA_ROMS \ ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) + + GAME_CUSTOM( 199?, m4jolgem, 0, "gem07s.p1", 0x0000, 0x020000, CRC(945ad0d2) SHA1(d636bc41a4f887d24affc0f5b644c5d5351cf0df), "Barcrest","Jolly Gems (Barcrest) (MPU4) (set 1)" ) GAME_CUSTOM( 199?, m4jolgem__a, m4jolgem, "gem05s", 0x0000, 0x020000, CRC(b7ceafc2) SHA1(b66d846da5ff20df912d31695eaef146dbbe759e), "Barcrest","Jolly Gems (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4jolgem__b, m4jolgem, "gem06ad.p1", 0x0000, 0x020000, CRC(a3270974) SHA1(59992779415ff20b8589843510099b77c9b157fd), "Barcrest","Jolly Gems (Barcrest) (MPU4) (set 3)" ) @@ -1377,17 +1462,8 @@ GAME_CUSTOM( 199?, m4jolgem__ap, m4jolgem, "jgs_xa_x.1_0", 0x0000, 0x020000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4hittop, 0, "hi4s.p1", 0x0000, 0x010000, CRC(3a04ee7a) SHA1(d23e9da2c22f6983a855bc519597ea9cea84f2dd), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4hittop__a, m4hittop, "chuad.p1", 0x0000, 0x010000, CRC(01d3b86c) SHA1(27af0e76661495d5b91ee6a53507f9a5d4e5ab85), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4hittop__b, m4hittop, "chub.p1", 0x0000, 0x010000, CRC(17ff4ed4) SHA1(f193a00a46c82d4989af18055f9f69d93df79ec6), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4hittop__c, m4hittop, "chubd.p1", 0x0000, 0x010000, CRC(3e7a6b1b) SHA1(8939a0cac8578ff5e1d1ab2b3a64b3809793c44a), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4hittop__d, m4hittop, "chud.p1", 0x0000, 0x010000, CRC(26875ed3) SHA1(06dbf594e2c5202ee624f4202f634281a89a3870), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4hittop__e, m4hittop, "chudk.p1", 0x0000, 0x010000, CRC(10c1f6c3) SHA1(e6ff6ea40f35cfd9ed7643e69eca62775f20b3a2), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4hittop__f, m4hittop, "chudy.p1", 0x0000, 0x010000, CRC(65302d8c) SHA1(de340cc182212b576cae46669492d0d760d2f288), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4hittop__g, m4hittop, "chuk.p1", 0x0000, 0x010000, CRC(7f333a2c) SHA1(73719997c200ec5291ceaa12f8667979a731212e), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4hittop__h, m4hittop, "chur.p1", 0x0000, 0x010000, CRC(dbb89a00) SHA1(70b2f2c78011b8b470aa58153d524f920d553b28), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4hittop__i, m4hittop, "chus.p1", 0x0000, 0x010000, CRC(8a39816e) SHA1(3869f7ae0c9b681cfb07e2f6c1a94fc81fa13fe3), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4hittop__j, m4hittop, "chuy.p1", 0x0000, 0x010000, CRC(e0902d74) SHA1(a34db63f1354853ad5a1026e4402ccd2e564c7d7), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 11)" ) +// "(C)1991 BARCREST" and "HI4 0.3" +GAME_CUSTOM( 199?, m4hittop, 0, "hi4s.p1", 0x0000, 0x010000, CRC(3a04ee7a) SHA1(d23e9da2c22f6983a855bc519597ea9cea84f2dd), "Barcrest","Hit The Top (Barcrest) (MPU4) (HI4 0.3)" ) GAME_CUSTOM( 199?, m4hittop__k, m4hittop, "hi4ad.p1", 0x0000, 0x010000, CRC(eeb958f3) SHA1(ee7f7615df2141ad5183288101949b74c4543de9), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 12)" ) GAME_CUSTOM( 199?, m4hittop__l, m4hittop, "hi4b.p1", 0x0000, 0x010000, CRC(68af264b) SHA1(e7f75b5294cc7541f9397c492c171c79b7a21a36), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 13)" ) GAME_CUSTOM( 199?, m4hittop__m, m4hittop, "hi4bd.p1", 0x0000, 0x010000, CRC(d72cd485) SHA1(d0d38cbb518c824d4a8107e1711f85120c39bc4c), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 14)" ) @@ -1396,7 +1472,20 @@ GAME_CUSTOM( 199?, m4hittop__o, m4hittop, "hi4dk.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4hittop__p, m4hittop, "hi4dy.p1", 0x0000, 0x010000, CRC(b1ddf7fe) SHA1(a334619b5dfc7a44e9082cc37cb5187413adb29f), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 17)" ) GAME_CUSTOM( 199?, m4hittop__q, m4hittop, "hi4k.p1", 0x0000, 0x010000, CRC(99cb8bc9) SHA1(106bf6e327643c49024f9422d6b87f5b157b452f), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 18)" ) GAME_CUSTOM( 199?, m4hittop__r, m4hittop, "hi4y.p1", 0x0000, 0x010000, CRC(c60e01e6) SHA1(c4a7ea44c36c78401cab3ef87d7e02add0b48ab5), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4hittop__s, m4hittop, "hit04ad.p1", 0x0000, 0x010000, CRC(cc9d10fa) SHA1(b7ce14fecfd8142fa7127c23f152c749dae74701), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 20)" ) +// "(C)1991 BARCREST" and "CHU 0.1" +GAME_CUSTOM( 199?, m4hittop__i, m4hittop, "chus.p1", 0x0000, 0x010000, CRC(8a39816e) SHA1(3869f7ae0c9b681cfb07e2f6c1a94fc81fa13fe3), "Barcrest","Hit The Top (Barcrest) (MPU4) (CHU 0.1)" ) +GAME_CUSTOM( 199?, m4hittop__a, m4hittop, "chuad.p1", 0x0000, 0x010000, CRC(01d3b86c) SHA1(27af0e76661495d5b91ee6a53507f9a5d4e5ab85), "Barcrest","Hit The Top (Barcrest) (MPU4) (CHU 0.1AD)" ) +GAME_CUSTOM( 199?, m4hittop__b, m4hittop, "chub.p1", 0x0000, 0x010000, CRC(17ff4ed4) SHA1(f193a00a46c82d4989af18055f9f69d93df79ec6), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4hittop__c, m4hittop, "chubd.p1", 0x0000, 0x010000, CRC(3e7a6b1b) SHA1(8939a0cac8578ff5e1d1ab2b3a64b3809793c44a), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4hittop__d, m4hittop, "chud.p1", 0x0000, 0x010000, CRC(26875ed3) SHA1(06dbf594e2c5202ee624f4202f634281a89a3870), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4hittop__e, m4hittop, "chudk.p1", 0x0000, 0x010000, CRC(10c1f6c3) SHA1(e6ff6ea40f35cfd9ed7643e69eca62775f20b3a2), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4hittop__f, m4hittop, "chudy.p1", 0x0000, 0x010000, CRC(65302d8c) SHA1(de340cc182212b576cae46669492d0d760d2f288), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4hittop__g, m4hittop, "chuk.p1", 0x0000, 0x010000, CRC(7f333a2c) SHA1(73719997c200ec5291ceaa12f8667979a731212e), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 8)" ) +GAME_CUSTOM( 199?, m4hittop__h, m4hittop, "chur.p1", 0x0000, 0x010000, CRC(dbb89a00) SHA1(70b2f2c78011b8b470aa58153d524f920d553b28), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 9)" ) +GAME_CUSTOM( 199?, m4hittop__j, m4hittop, "chuy.p1", 0x0000, 0x010000, CRC(e0902d74) SHA1(a34db63f1354853ad5a1026e4402ccd2e564c7d7), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 11)" ) +// "(C)1991 BARCREST" and "HIT 0.4" +GAME_CUSTOM( 199?, m4hittop__1, m4hittop, "hit04s.p1", 0x0000, 0x010000, CRC(05376f9f) SHA1(e59bdd6541669b150bb68eb97ea316c3fe451778), "Barcrest","Hit The Top (Barcrest) (MPU4) (HIT 0.4)" ) +GAME_CUSTOM( 199?, m4hittop__s, m4hittop, "hit04ad.p1", 0x0000, 0x010000, CRC(cc9d10fa) SHA1(b7ce14fecfd8142fa7127c23f152c749dae74701), "Barcrest","Hit The Top (Barcrest) (MPU4) (HIT 0.4AD)" ) GAME_CUSTOM( 199?, m4hittop__t, m4hittop, "hit04b.p1", 0x0000, 0x010000, CRC(da511063) SHA1(3f4fb8518cb2057ec4c2bb13fd3e61ee73bfa457), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 21)" ) GAME_CUSTOM( 199?, m4hittop__u, m4hittop, "hit04bd.p1", 0x0000, 0x010000, CRC(40a84b97) SHA1(416f78c19e08f405a3b36f886f69e7b88e5aa90a), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 22)" ) GAME_CUSTOM( 199?, m4hittop__v, m4hittop, "hit04d.p1", 0x0000, 0x010000, CRC(89607e84) SHA1(280209ca3030383547cc91eee2f71a810768353f), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 23)" ) @@ -1405,9 +1494,10 @@ GAME_CUSTOM( 199?, m4hittop__x, m4hittop, "hit04dr.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4hittop__y, m4hittop, "hit04dy.p1", 0x0000, 0x010000, CRC(25f54881) SHA1(9f4ae52295df5810cbe6c18cae66877bec006a28), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 26)" ) GAME_CUSTOM( 199?, m4hittop__z, m4hittop, "hit04k.p1", 0x0000, 0x010000, CRC(5ef3f78d) SHA1(e72727b3dc7793c36f182b3e7d363741254c0be7), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 27)" ) GAME_CUSTOM( 199?, m4hittop__0, m4hittop, "hit04r.p1", 0x0000, 0x010000, CRC(d87a9f60) SHA1(614224b80afaa6e407f9b40b45b8aecdf999e13a), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4hittop__1, m4hittop, "hit04s.p1", 0x0000, 0x010000, CRC(05376f9f) SHA1(e59bdd6541669b150bb68eb97ea316c3fe451778), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 29)" ) GAME_CUSTOM( 199?, m4hittop__2, m4hittop, "hit04y.p1", 0x0000, 0x010000, CRC(c398df63) SHA1(5e93cb95da37b1593d030e99e97996252ad6cda1), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 30)" ) -GAME_CUSTOM( 199?, m4hittop__3, m4hittop, "ht201ad.p1", 0x0000, 0x010000, CRC(b0f3873b) SHA1(6e7d1b20dff4b81ebd171d6d92c95e46817bdf90), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 31)" ) +// "(C)1991 BARCREST" and "HT2 0.1" +GAME_CUSTOM( 199?, m4hittop__ac, m4hittop, "ht201s.p1", 0x0000, 0x010000, CRC(37b20464) SHA1(e87b0a2023416fa7b63201e19850319723eb6c10), "Barcrest","Hit The Top (Barcrest) (MPU4) (HT2 0.1)" ) +GAME_CUSTOM( 199?, m4hittop__3, m4hittop, "ht201ad.p1", 0x0000, 0x010000, CRC(b0f3873b) SHA1(6e7d1b20dff4b81ebd171d6d92c95e46817bdf90), "Barcrest","Hit The Top (Barcrest) (MPU4) (HT2 0.1AD)" ) GAME_CUSTOM( 199?, m4hittop__4, m4hittop, "ht201b.p1", 0x0000, 0x010000, CRC(9dbe41fc) SHA1(ce5ed2707ab63057a2f66a1098e3752acaa72dac), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 32)" ) GAME_CUSTOM( 199?, m4hittop__5, m4hittop, "ht201bd.p1", 0x0000, 0x010000, CRC(be23c8b6) SHA1(0d4ab2d3c7ac063ec1ce10b2af28c8770d8bd818), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 33)" ) GAME_CUSTOM( 199?, m4hittop__6, m4hittop, "ht201d.p1", 0x0000, 0x010000, CRC(25b9fcd7) SHA1(8bebbf0b621a704ed9811e67eab003f4ddebcde2), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 34)" ) @@ -1416,9 +1506,10 @@ GAME_CUSTOM( 199?, m4hittop__8, m4hittop, "ht201dr.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4hittop__9, m4hittop, "ht201dy.p1", 0x0000, 0x010000, CRC(811cafc0) SHA1(e31ad353ee8ce4ea059d6a469baaa14357b738c9), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 37)" ) GAME_CUSTOM( 199?, m4hittop__aa, m4hittop, "ht201k.p1", 0x0000, 0x010000, CRC(191ca612) SHA1(a2a80b64cc04aa590046413f1474340cd3a5b03a), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 38)" ) GAME_CUSTOM( 199?, m4hittop__ab, m4hittop, "ht201r.p1", 0x0000, 0x010000, CRC(154643be) SHA1(280ae761c434bbed84317d85aef2ad4a78c61d1d), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 39)" ) -GAME_CUSTOM( 199?, m4hittop__ac, m4hittop, "ht201s.p1", 0x0000, 0x010000, CRC(37b20464) SHA1(e87b0a2023416fa7b63201e19850319723eb6c10), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 40)" ) GAME_CUSTOM( 199?, m4hittop__ad, m4hittop, "ht201y.p1", 0x0000, 0x010000, CRC(84778efc) SHA1(bdc43973913d0e8be0e16ee89da01b1bcdc2da6f), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 41)" ) -GAME_CUSTOM( 199?, m4hittop__ae, m4hittop, "ht501ad.p1", 0x0000, 0x010000, CRC(7bf00848) SHA1(700d90218d0bd31860dc905c00d0afbf3a1e8704), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 42)" ) +// "(C)1991 BARCREST" and "HT5 0.1" +GAME_CUSTOM( 199?, m4hittop__an, m4hittop, "ht501s.p1", 0x0000, 0x010000, CRC(ac440a2b) SHA1(f3f3d0c9c8dcb41509307c970f0776ebcfffdeb0), "Barcrest","Hit The Top (Barcrest) (MPU4) (HT5 0.1)" ) +GAME_CUSTOM( 199?, m4hittop__ae, m4hittop, "ht501ad.p1", 0x0000, 0x010000, CRC(7bf00848) SHA1(700d90218d0bd31860dc905c00d0afbf3a1e8704), "Barcrest","Hit The Top (Barcrest) (MPU4) (HT5 0.1AD)" ) GAME_CUSTOM( 199?, m4hittop__af, m4hittop, "ht501b.p1", 0x0000, 0x010000, CRC(c06dd046) SHA1(a47c62fc299842e66694f34844b43a55d6f20c3d), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 43)" ) GAME_CUSTOM( 199?, m4hittop__ag, m4hittop, "ht501bd.p1", 0x0000, 0x010000, CRC(d4a3843f) SHA1(cc66ebaa334bab86b9bcb1623316c31318e84d2a), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 44)" ) GAME_CUSTOM( 199?, m4hittop__ah, m4hittop, "ht501d.p1", 0x0000, 0x010000, CRC(67d3c040) SHA1(beec134c53715544080327319b5d6231b625fbb4), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 45)" ) @@ -1427,16 +1518,16 @@ GAME_CUSTOM( 199?, m4hittop__aj, m4hittop, "ht501dr.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4hittop__ak, m4hittop, "ht501dy.p1", 0x0000, 0x010000, CRC(756c7ae9) SHA1(42a731e472f073845b98d7fcc47fe70f57181ce6), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 48)" ) GAME_CUSTOM( 199?, m4hittop__al, m4hittop, "ht501k.p1", 0x0000, 0x010000, CRC(93269e53) SHA1(7e40ac4e9f4b26755867353fdccadf0f976402b4), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 49)" ) GAME_CUSTOM( 199?, m4hittop__am, m4hittop, "ht501r.p1", 0x0000, 0x010000, CRC(9aec0493) SHA1(6b0b7e5f4a988ff4d2bc123978adc09195eb4232), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 50)" ) -GAME_CUSTOM( 199?, m4hittop__an, m4hittop, "ht501s.p1", 0x0000, 0x010000, CRC(ac440a2b) SHA1(f3f3d0c9c8dcb41509307c970f0776ebcfffdeb0), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 51)" ) GAME_CUSTOM( 199?, m4hittop__ao, m4hittop, "ht501y.p1", 0x0000, 0x010000, CRC(a7f8ece6) SHA1(f4472c040c9255eaef5b1109c3bec44f4978b600), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 52)" ) -GAME_CUSTOM( 199?, m4hittop__ap, m4hittop, "httad.p1", 0x0000, 0x010000, CRC(e5a3df45) SHA1(70bebb33cbe466c379f278347d0b47862b1d01a8), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 53)" ) +// "(C)1991 BARCREST" and "HTT 0.5" +GAME_CUSTOM( 199?, m4hittop__aw, m4hittop, "htts.p1", 0x0000, 0x010000, CRC(6c794eb2) SHA1(347a7c74b1fd7631fbcd398bf5e7c36af088109e), "Barcrest","Hit The Top (Barcrest) (MPU4) (HTT 0.5)" ) +GAME_CUSTOM( 199?, m4hittop__ap, m4hittop, "httad.p1", 0x0000, 0x010000, CRC(e5a3df45) SHA1(70bebb33cbe466c379f278347d0b47862b1d01a8), "Barcrest","Hit The Top (Barcrest) (MPU4) (HTT 0.5AD)" ) GAME_CUSTOM( 199?, m4hittop__aq, m4hittop, "httb.p1", 0x0000, 0x010000, CRC(5c921ff2) SHA1(a9184e4e3916c1ab92761d0e33b42cce4a58e7b1), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 54)" ) GAME_CUSTOM( 199?, m4hittop__ar, m4hittop, "httbd.p1", 0x0000, 0x010000, CRC(9d19fac9) SHA1(17072ac5b49cd947bf397dfbe9b6b0bd269dd1b4), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 55)" ) GAME_CUSTOM( 199?, m4hittop__as, m4hittop, "httd.p1", 0x0000, 0x010000, CRC(5e5bacb9) SHA1(d673010cdf2fb9352fc510409deade42b5508b29), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 56)" ) GAME_CUSTOM( 199?, m4hittop__at, m4hittop, "httdk.p1", 0x0000, 0x010000, CRC(17b1db87) SHA1(196163f68c82c4600ecacee52ee8044739568fbf), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 57)" ) GAME_CUSTOM( 199?, m4hittop__au, m4hittop, "httdy.p1", 0x0000, 0x010000, CRC(428af7bf) SHA1(954a512105d1a5998d4ffcbf21be0c9d9a65bbeb), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 58)" ) GAME_CUSTOM( 199?, m4hittop__av, m4hittop, "httk.p1", 0x0000, 0x010000, CRC(581dd34a) SHA1(00cad1860f5edf056b8f9397ca46165593be4755), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 59)" ) -GAME_CUSTOM( 199?, m4hittop__aw, m4hittop, "htts.p1", 0x0000, 0x010000, CRC(6c794eb2) SHA1(347a7c74b1fd7631fbcd398bf5e7c36af088109e), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 60)" ) GAME_CUSTOM( 199?, m4hittop__ax, m4hittop, "htty.p1", 0x0000, 0x010000, CRC(c9b402b2) SHA1(2165c1892fc1f0b9b0c39127f322f15c9e1912b1), "Barcrest","Hit The Top (Barcrest) (MPU4) (set 61)" ) @@ -1454,9 +1545,22 @@ GAME_CUSTOM( 199?, m4hittop__ax, m4hittop, "htty.p1", 0x0000, 0x010000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4nnww, 0, "nn5bd.p1", 0x0000, 0x010000, CRC(56cc9559) SHA1(53e109a579e422932dd25c52cf2beca51d3a53e3), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4nnww__a, m4nnww, "cf301s", 0x0000, 0x010000, CRC(1d8abf59) SHA1(81e47797baddd777fbbb1b1e044df1bfe3d49cb2), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4nnww__b, m4nnww, "cni01ad.p1", 0x0000, 0x010000, CRC(788e47b1) SHA1(6d07500a38b54e1a9038e35d82fdb4a0f22d23ba), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 3)" ) +// the rom codes, and startup message differ in several of these, I've put the startup display code first (which seems to match the rom label) followed by the code stored in the ROM header +// I think the code in the header was just not updated properly. +// "(C)1991 BARCREST" and "NN4 0.2" +GAME_CUSTOM( 199?, m4nnww, 0, "nn5s.p1", 0x0000, 0x010000, CRC(459e5663) SHA1(66ae821e5202d6d3ba05be44d0c1f26da60a3a32), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (NN5 0.2 / NN4 0.2)" ) +GAME_CUSTOM( 199?, m4nnww__aq, m4nnww, "nn5bd.p1", 0x0000, 0x010000, CRC(56cc9559) SHA1(53e109a579e422932dd25c52cf2beca51d3a53e3), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (NN5 0.2BD / NN4 0.2)" ) +GAME_CUSTOM( 199?, m4nnww__ai, m4nnww, "nn5ad.p1", 0x0000, 0x010000, CRC(22537184) SHA1(aef542a34e2b14a5db624e42d1cd2682de237b52), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 46)" ) +GAME_CUSTOM( 199?, m4nnww__aj, m4nnww, "nn5b.p1", 0x0000, 0x010000, CRC(e2a99408) SHA1(a0868a38c290a84926089c60d1b5555706485bff), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 47)" ) +GAME_CUSTOM( 199?, m4nnww__ak, m4nnww, "nn5d.p1", 0x0000, 0x010000, CRC(ef1a21b6) SHA1(ba763b06583af1273e384b878fbacc68f88714dc), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 48)" ) +GAME_CUSTOM( 199?, m4nnww__al, m4nnww, "nn5dk.p1", 0x0000, 0x010000, CRC(74c48e28) SHA1(db6be2275b6122845c662dd5f12266b66e888221), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 49)" ) +GAME_CUSTOM( 199?, m4nnww__am, m4nnww, "nn5dr.p1", 0x0000, 0x010000, CRC(f52c9f87) SHA1(e8b1037c9ed5d9452abccb6b07bae46b45c4705e), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 50)" ) +GAME_CUSTOM( 199?, m4nnww__an, m4nnww, "nn5dy.p1", 0x0000, 0x010000, CRC(6847b769) SHA1(1b4d42774c72a3c7b40551c7181413ea1fca0b88), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 51)" ) +GAME_CUSTOM( 199?, m4nnww__ao, m4nnww, "nn5k.p1", 0x0000, 0x010000, CRC(ceab49d9) SHA1(633e7bab6a30176dbcea2bd3e7bab0f7833409ba), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 52)" ) +GAME_CUSTOM( 199?, m4nnww__ap, m4nnww, "nn5r.p1", 0x0000, 0x010000, CRC(144523cd) SHA1(d12586ccea659ecb75af944d87ddd480da917eaf), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 53)" ) +GAME_CUSTOM( 199?, m4nnww__ar, m4nnww, "nn5y.p1", 0x0000, 0x010000, CRC(892e0b23) SHA1(ff3f550e20e71e868d52b60740f743a7d2d6c645), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 55)" ) +// "(C)1991 BARCREST" and "NN4 0.1" (startup CN1 0.1) +GAME_CUSTOM( 199?, m4nnww__b, m4nnww, "cni01ad.p1", 0x0000, 0x010000, CRC(788e47b1) SHA1(6d07500a38b54e1a9038e35d82fdb4a0f22d23ba), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (CN1 0.1 / NN4 0.1)" ) GAME_CUSTOM( 199?, m4nnww__c, m4nnww, "cni01b.p1", 0x0000, 0x010000, CRC(33512643) SHA1(865ed3b68fe3b737833734513b5045c5db97791e), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 4)" ) GAME_CUSTOM( 199?, m4nnww__d, m4nnww, "cni01bd.p1", 0x0000, 0x010000, CRC(8a00d73b) SHA1(702579ea1bc586aacd5cba889919f3e86ea05771), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 5)" ) GAME_CUSTOM( 199?, m4nnww__e, m4nnww, "cni01c.p1", 0x0000, 0x010000, CRC(b836ee44) SHA1(832914461492f120894ec7e63f6aa1ad00b89b41), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 6)" ) @@ -1468,7 +1572,8 @@ GAME_CUSTOM( 199?, m4nnww__j, m4nnww, "cni01k.p1", 0x0000, 0x010000, CRC(f GAME_CUSTOM( 199?, m4nnww__k, m4nnww, "cni01r.p1", 0x0000, 0x010000, CRC(c611b1eb) SHA1(524ee18da8a086d15277d9fb0ea383ee3d49d47a), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 12)" ) GAME_CUSTOM( 199?, m4nnww__l, m4nnww, "cni01s.p1", 0x0000, 0x010000, CRC(5ed6a396) SHA1(299767467b56d1aa93602f98cc387e7ff18bda9d), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 13)" ) GAME_CUSTOM( 199?, m4nnww__m, m4nnww, "cni01y.p1", 0x0000, 0x010000, CRC(d3612bf2) SHA1(40a8ff08a38c4411946a67f380891945d166d199), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4nnww__n, m4nnww, "cnuad.p1", 0x0000, 0x010000, CRC(f4b28628) SHA1(7323525a44477e2a3f89562f6094ed7bb47a16cc), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 15)" ) +// "(C)1991 BARCREST" and "NN4 0.2" (startup CNU 0.2) +GAME_CUSTOM( 199?, m4nnww__n, m4nnww, "cnuad.p1", 0x0000, 0x010000, CRC(f4b28628) SHA1(7323525a44477e2a3f89562f6094ed7bb47a16cc), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (CNU 0.2AD / NN4 0.2)" ) GAME_CUSTOM( 199?, m4nnww__o, m4nnww, "cnub.p1", 0x0000, 0x010000, CRC(735260a3) SHA1(e08fff6314d7cb4e396107366fdc16dcbf7f5d67), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 16)" ) GAME_CUSTOM( 199?, m4nnww__p, m4nnww, "cnubd.p1", 0x0000, 0x010000, CRC(fbe1ee39) SHA1(21bdaa6f9af686b4e44958ee09a131d0e12c2c53), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 17)" ) GAME_CUSTOM( 199?, m4nnww__q, m4nnww, "cnud.p1", 0x0000, 0x010000, CRC(d3a0eff1) SHA1(2b18c3e14a43d072ae5702bc77fcac65dbd8305c), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 18)" ) @@ -1479,7 +1584,8 @@ GAME_CUSTOM( 199?, m4nnww__u, m4nnww, "cnuk.p1", 0x0000, 0x010000, CRC(b GAME_CUSTOM( 199?, m4nnww__v, m4nnww, "cnur.p1", 0x0000, 0x010000, CRC(729d89ea) SHA1(c98a89dd8f85dde7ab005bcb7eba1fcc31162e08), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 23)" ) GAME_CUSTOM( 199?, m4nnww__w, m4nnww, "cnus.p1", 0x0000, 0x010000, CRC(6afee8e1) SHA1(35464eef29a5a66b8efea890987ff120ca5b7409), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 24)" ) GAME_CUSTOM( 199?, m4nnww__x, m4nnww, "cnuy.p1", 0x0000, 0x010000, CRC(eff6a104) SHA1(021baf5fe88defca05627a85501622d86e846233), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4nnww__y, m4nnww, "nn3xad.p1", 0x0000, 0x010000, CRC(8ccfceb8) SHA1(762ab26826d3d2a4dd7999a71724389344e9dafb), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 26)" ) +// "(C)1991 BARCREST" and "NN3 0.1" +GAME_CUSTOM( 199?, m4nnww__y, m4nnww, "nn3xad.p1", 0x0000, 0x010000, CRC(8ccfceb8) SHA1(762ab26826d3d2a4dd7999a71724389344e9dafb), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (NN3 0.1XAD)" ) GAME_CUSTOM( 199?, m4nnww__z, m4nnww, "nn3xb.p1", 0x0000, 0x010000, CRC(9b0dd473) SHA1(9975dafea8c7d6ccfc9f826adb1a0d3d0ed9740a), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 27)" ) GAME_CUSTOM( 199?, m4nnww__0, m4nnww, "nn3xbd.p1", 0x0000, 0x010000, CRC(21bf4a89) SHA1(200c9ccc4bc2a93fcd0f68bb00ad4391bdeecda1), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 28)" ) GAME_CUSTOM( 199?, m4nnww__1, m4nnww, "nn3xd.p1", 0x0000, 0x010000, CRC(11e22c45) SHA1(6da31eea7b25612d99cc79f6f9579622f105c862), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 29)" ) @@ -1490,7 +1596,8 @@ GAME_CUSTOM( 199?, m4nnww__5, m4nnww, "nn3xr.p1", 0x0000, 0x010000, CRC(6 GAME_CUSTOM( 199?, m4nnww__6, m4nnww, "nn3xrd.p1", 0x0000, 0x010000, CRC(0fd3f9b9) SHA1(99115b217cfc54b52469ffc77e7a7592907c53ea), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 34)" ) GAME_CUSTOM( 199?, m4nnww__7, m4nnww, "nn3xs.p1", 0x0000, 0x010000, CRC(13d02d21) SHA1(8e4dac8e60538884d3f3a92fc1bb9f41276be4c8), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 35)" ) GAME_CUSTOM( 199?, m4nnww__8, m4nnww, "nn3xy.p1", 0x0000, 0x010000, CRC(8a5d0f4b) SHA1(ef727e7ee8bb20d1b201927186a1a4f83e1e7497), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 36)" ) -GAME_CUSTOM( 199?, m4nnww__9, m4nnww, "nn4ad.p1", 0x0000, 0x010000, CRC(827b832f) SHA1(4448ccb03282b9d39c6a00d02cea4d8ce2225b0e), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 37)" ) +// "(C)1991 BARCREST" and "NN4 0.2" +GAME_CUSTOM( 199?, m4nnww__9, m4nnww, "nn4ad.p1", 0x0000, 0x010000, CRC(827b832f) SHA1(4448ccb03282b9d39c6a00d02cea4d8ce2225b0e), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (NN4 0.2AD)" ) GAME_CUSTOM( 199?, m4nnww__aa, m4nnww, "nn4b.p1", 0x0000, 0x010000, CRC(65e16330) SHA1(cfd18693155b4b7c5692064a2f693eb198d02749), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 38)" ) GAME_CUSTOM( 199?, m4nnww__ab, m4nnww, "nn4bd.p1", 0x0000, 0x010000, CRC(b467ee65) SHA1(79030aa06ca8fd9c8becff62d56628939e9b5075), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 39)" ) GAME_CUSTOM( 199?, m4nnww__ac, m4nnww, "nn4d.p1", 0x0000, 0x010000, CRC(548dacb9) SHA1(55949910374fae419ba015b70780e3e9e269caa0), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 40)" ) @@ -1499,24 +1606,20 @@ GAME_CUSTOM( 199?, m4nnww__ae, m4nnww, "nn4dy.p1", 0x0000, 0x010000, CRC(5 GAME_CUSTOM( 199?, m4nnww__af, m4nnww, "nn4k.p1", 0x0000, 0x010000, CRC(09a808c0) SHA1(c74c3acb2c1f52fd1e83003fb1a022f80f55e0b8), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 43)" ) GAME_CUSTOM( 199?, m4nnww__ag, m4nnww, "nn4s.p1", 0x0000, 0x010000, CRC(ec4f01ee) SHA1(443da7ed359a3e208417f7bca0dc52a09594a927), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 44)" ) GAME_CUSTOM( 199?, m4nnww__ah, m4nnww, "nn4y.p1", 0x0000, 0x010000, CRC(a1eff941) SHA1(369ec89b82f97c3d8266d41e5eb27be7770bdca4), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 45)" ) -GAME_CUSTOM( 199?, m4nnww__ai, m4nnww, "nn5ad.p1", 0x0000, 0x010000, CRC(22537184) SHA1(aef542a34e2b14a5db624e42d1cd2682de237b52), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 46)" ) -GAME_CUSTOM( 199?, m4nnww__aj, m4nnww, "nn5b.p1", 0x0000, 0x010000, CRC(e2a99408) SHA1(a0868a38c290a84926089c60d1b5555706485bff), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 47)" ) -GAME_CUSTOM( 199?, m4nnww__ak, m4nnww, "nn5d.p1", 0x0000, 0x010000, CRC(ef1a21b6) SHA1(ba763b06583af1273e384b878fbacc68f88714dc), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 48)" ) -GAME_CUSTOM( 199?, m4nnww__al, m4nnww, "nn5dk.p1", 0x0000, 0x010000, CRC(74c48e28) SHA1(db6be2275b6122845c662dd5f12266b66e888221), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 49)" ) -GAME_CUSTOM( 199?, m4nnww__am, m4nnww, "nn5dr.p1", 0x0000, 0x010000, CRC(f52c9f87) SHA1(e8b1037c9ed5d9452abccb6b07bae46b45c4705e), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 50)" ) -GAME_CUSTOM( 199?, m4nnww__an, m4nnww, "nn5dy.p1", 0x0000, 0x010000, CRC(6847b769) SHA1(1b4d42774c72a3c7b40551c7181413ea1fca0b88), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 51)" ) -GAME_CUSTOM( 199?, m4nnww__ao, m4nnww, "nn5k.p1", 0x0000, 0x010000, CRC(ceab49d9) SHA1(633e7bab6a30176dbcea2bd3e7bab0f7833409ba), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 52)" ) -GAME_CUSTOM( 199?, m4nnww__ap, m4nnww, "nn5r.p1", 0x0000, 0x010000, CRC(144523cd) SHA1(d12586ccea659ecb75af944d87ddd480da917eaf), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 53)" ) -GAME_CUSTOM( 199?, m4nnww__aq, m4nnww, "nn5s.p1", 0x0000, 0x010000, CRC(459e5663) SHA1(66ae821e5202d6d3ba05be44d0c1f26da60a3a32), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 54)" ) -GAME_CUSTOM( 199?, m4nnww__ar, m4nnww, "nn5y.p1", 0x0000, 0x010000, CRC(892e0b23) SHA1(ff3f550e20e71e868d52b60740f743a7d2d6c645), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 55)" ) -GAME_CUSTOM( 199?, m4nnww__as, m4nnww, "nnu40x.bin", 0x0000, 0x010000, CRC(63e3d7df) SHA1(1a5a00185ec5150f5b05765f06297d7884540aaf), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 56)" ) +// "(C)1991 BARCREST" and "NNU 5.2" GAME_CUSTOM( 199?, m4nnww__at, m4nnww, "nnus.p1", 0x0000, 0x010000, CRC(3e3a829e) SHA1(5aa3a56e007bad4dacdc3c993c87569e4250eecd), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 57)" ) GAME_CUSTOM( 199?, m4nnww__au, m4nnww, "nnux.p1", 0x0000, 0x010000, CRC(38806ebf) SHA1(a897a33e3260de1b284b01a65d1da7cbe05d51f8), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 58)" ) GAME_CUSTOM( 199?, m4nnww__av, m4nnww, "nnuxb.p1", 0x0000, 0x010000, CRC(c4dba8df) SHA1(0f8516cc9b2f0be9d1c936667974cd8116018dad), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 59)" ) GAME_CUSTOM( 199?, m4nnww__aw, m4nnww, "nnuxc.p1", 0x0000, 0x010000, CRC(797e0c4d) SHA1(211b0a804643731275d0075461f8d94985fde1db), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 60)" ) -GAME_CUSTOM( 199?, m4nnww__ax, m4nnww, "nnwink.hex", 0x0000, 0x010000, CRC(f77bd6c4) SHA1(1631040fbfe3fc37c2cbd3145857c31d16b92bde), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 61)" ) -GAME_CUSTOM( 199?, m4nnww__ay, m4nnww, "nnww2010", 0x0000, 0x010000, CRC(67b1c7b5) SHA1(495e25bc2051ab78e473cd0c36e0c1825c06db14), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 62)" ) -GAME_CUSTOM( 199?, m4nnww__az, m4nnww, "wink2010", 0x0000, 0x010000, CRC(056a2ffa) SHA1(9da96d70ff850b6672ae7009253e179fa7159db4), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (set 63)" ) +// "(C)1991 BARCREST" and "NNU 4.0" +GAME_CUSTOM( 199?, m4nnww__as, m4nnww, "nnu40x.bin", 0x0000, 0x010000, CRC(63e3d7df) SHA1(1a5a00185ec5150f5b05765f06297d7884540aaf), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (NNU 4.0X)" ) +// "(C)1991 BARCREST" and "NN4 0.1" (startup CH3 0.1) +GAME_CUSTOM( 199?, m4nnww__ax, m4nnww, "nnwink.hex", 0x0000, 0x010000, CRC(f77bd6c4) SHA1(1631040fbfe3fc37c2cbd3145857c31d16b92bde), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (CH3 0.1B / NN4 0.1)" ) +// "(C)1991 BARCREST" and "NN4 0.1" (startup CF3 0.1) +GAME_CUSTOM( 199?, m4nnww__a, m4nnww, "cf301s", 0x0000, 0x010000, CRC(1d8abf59) SHA1(81e47797baddd777fbbb1b1e044df1bfe3d49cb2), "Barcrest","Nudge Nudge Wink Wink (Barcrest) (MPU4) (CF3 0.1 / NN4 0.1)" ) +// no copyright string and "NNU 3.4" +GAME_CUSTOM( 199?, m4nnww__ay, m4nnww, "nnww2010", 0x0000, 0x010000, CRC(67b1c7b5) SHA1(495e25bc2051ab78e473cd0c36e0c1825c06db14), "hack","Nudge Nudge Wink Wink (Barcrest) (MPU4) (NNU 3.4, hack, set 1)" ) +GAME_CUSTOM( 199?, m4nnww__az, m4nnww, "wink2010", 0x0000, 0x010000, CRC(056a2ffa) SHA1(9da96d70ff850b6672ae7009253e179fa7159db4), "hack","Nudge Nudge Wink Wink (Barcrest) (MPU4) (NNU 3.4, hack, set 2)" ) #define M4RFYM_EXTRA_ROMS \ @@ -1534,17 +1637,26 @@ GAME_CUSTOM( 199?, m4nnww__az, m4nnww, "wink2010", 0x0000, 0x010000, CRC(0 ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4rfym, 0, "rund.p1", 0x0000, 0x010000, CRC(2be2a66d) SHA1(a66d74ccf1783912673cfcb6c1ae7fbb6d70ca0e), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4rfym__a, m4rfym, "ap1ad.p1", 0x0000, 0x010000, CRC(d1adbf80) SHA1(08801f38b8ba5034fd83b53b6cfff864104525b4), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 2)" ) +// "(C)1993 BARCREST" and "RUN 0.5" +GAME_CUSTOM( 199?, m4rfym, 0, "runs.p1", 0x0000, 0x010000, CRC(e20f5a06) SHA1(f0f71f8870db7003fce96f1dfe09804cf17c3ab3), "Barcrest","Run For Your Money (Barcrest) (MPU4) (RUN 0.5)" ) +GAME_CUSTOM( 199?, m4rfym__ar, m4rfym, "rund.p1", 0x0000, 0x010000, CRC(2be2a66d) SHA1(a66d74ccf1783912673cfcb6c1ae7fbb6d70ca0e), "Barcrest","Run For Your Money (Barcrest) (MPU4) (RUN 0.5D)" ) +GAME_CUSTOM( 199?, m4rfym__ao, m4rfym, "runc.p1", 0x0000, 0x010000, CRC(09f53ddf) SHA1(f46be95bfacac751102a5f4d4a0917a5e51a653e), "Barcrest","Run For Your Money (Barcrest) (MPU4) (RUN 0.5C)" ) +GAME_CUSTOM( 199?, m4rfym__ap, m4rfym, "rundy.p1", 0x0000, 0x010000, CRC(a6f69a24) SHA1(8370287dcc890fcb7529d3d4c7a3c2e2e688f6a8), "Barcrest","Run For Your Money (Barcrest) (MPU4) (RUN 0.5YD)" ) +GAME_CUSTOM( 199?, m4rfym__aq, m4rfym, "runk.p1", 0x0000, 0x010000, CRC(a2828b82) SHA1(0ae371a441df679fd9c699771ae9f58ce960d4a1), "Barcrest","Run For Your Money (Barcrest) (MPU4) (RUN 0.5K)" ) +GAME_CUSTOM( 199?, m4rfym__as, m4rfym, "runy.p1", 0x0000, 0x010000, CRC(0e311ab4) SHA1(c98540c07e9cc23ec70ecfbcb2f4d66f2c716fc3), "Barcrest","Run For Your Money (Barcrest) (MPU4) (RUN 0.5Y)" ) +// "(C)1993 BARCREST" and "AP1 0.1" +GAME_CUSTOM( 199?, m4rfym__h, m4rfym, "ap1s.p1", 0x0000, 0x010000, CRC(7474509c) SHA1(c87e20f10806ec87fd33f97b43b8378d304f7d67), "Barcrest","Run For Your Money (Barcrest) (MPU4) (AP1 0.1)" ) +GAME_CUSTOM( 199?, m4rfym__a, m4rfym, "ap1ad.p1", 0x0000, 0x010000, CRC(d1adbf80) SHA1(08801f38b8ba5034fd83b53b6cfff864104525b4), "Barcrest","Run For Your Money (Barcrest) (MPU4) (AP1 0.1AD)" ) GAME_CUSTOM( 199?, m4rfym__b, m4rfym, "ap1b.p1", 0x0000, 0x010000, CRC(4939f186) SHA1(389d46d603e75d3aaeeca990f4e1143c61f1565f), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4rfym__c, m4rfym, "ap1bd.p1", 0x0000, 0x010000, CRC(08a33b2c) SHA1(ef38e9cd0c9bc8393530e36060c803d1250c46a6), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 4)" ) GAME_CUSTOM( 199?, m4rfym__d, m4rfym, "ap1d.p1", 0x0000, 0x010000, CRC(edef44fe) SHA1(4907804c1bebc1f13aa3eb9dad0e9189de8e9601), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 5)" ) GAME_CUSTOM( 199?, m4rfym__e, m4rfym, "ap1dk.p1", 0x0000, 0x010000, CRC(873a402c) SHA1(1315a4ad18544ca5d65526ea0f620cac528e4cad), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 6)" ) GAME_CUSTOM( 199?, m4rfym__f, m4rfym, "ap1dy.p1", 0x0000, 0x010000, CRC(e8436c00) SHA1(1c2f171e55c3519d63d6c4dd0d56df4e1daad6af), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 7)" ) GAME_CUSTOM( 199?, m4rfym__g, m4rfym, "ap1k.p1", 0x0000, 0x010000, CRC(9afeb1e7) SHA1(5fc5d73a2c976d227a0598fb1dd802c6336415d1), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4rfym__h, m4rfym, "ap1s.p1", 0x0000, 0x010000, CRC(7474509c) SHA1(c87e20f10806ec87fd33f97b43b8378d304f7d67), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4rfym__i, m4rfym, "ap1y.p1", 0x0000, 0x010000, CRC(152bf7cb) SHA1(8dd8b621f9dac430c293b29ca03814fc21a148b9), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4rfym__j, m4rfym, "ap502ad.p1", 0x0000, 0x010000, CRC(ab059e57) SHA1(45ba91989b0fd1a44628f696b78eae2a349e3e4a), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 11)" ) +// "(C)1993 BARCREST" and "AP5 0.2" +GAME_CUSTOM( 199?, m4rfym__s, m4rfym, "ap502s.p1", 0x0000, 0x010000, CRC(8502a09a) SHA1(e635552b7f0c7b2e142d7f4d0f1fd93edac6132d), "Barcrest","Run For Your Money (Barcrest) (MPU4) (AP5 0.2)" ) +GAME_CUSTOM( 199?, m4rfym__j, m4rfym, "ap502ad.p1", 0x0000, 0x010000, CRC(ab059e57) SHA1(45ba91989b0fd1a44628f696b78eae2a349e3e4a), "Barcrest","Run For Your Money (Barcrest) (MPU4) (AP5 0.2AD)" ) GAME_CUSTOM( 199?, m4rfym__k, m4rfym, "ap502b.p1", 0x0000, 0x010000, CRC(9ed27a6e) SHA1(2d655305a178e4ebe43f3d429dfec5a2ef6b9873), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 12)" ) GAME_CUSTOM( 199?, m4rfym__l, m4rfym, "ap502bd.p1", 0x0000, 0x010000, CRC(48e83fcd) SHA1(3e2de0416722df5004f00baae2d3f6846ff596e5), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 13)" ) GAME_CUSTOM( 199?, m4rfym__m, m4rfym, "ap502d.p1", 0x0000, 0x010000, CRC(d0560301) SHA1(c35e97391c588f6567eeb253eb9de59bec9e1724), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 14)" ) @@ -1553,9 +1665,10 @@ GAME_CUSTOM( 199?, m4rfym__o, m4rfym, "ap502dr.p1", 0x0000, 0x010000, CRC(1 GAME_CUSTOM( 199?, m4rfym__p, m4rfym, "ap502dy.p1", 0x0000, 0x010000, CRC(819019ec) SHA1(36d2093a7a592850533d4206e0c9dd28cdc17568), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 17)" ) GAME_CUSTOM( 199?, m4rfym__q, m4rfym, "ap502k.p1", 0x0000, 0x010000, CRC(5064a894) SHA1(3e67358fe5ed9bfac05f621d7e72e5be7aae67df), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 18)" ) GAME_CUSTOM( 199?, m4rfym__r, m4rfym, "ap502r.p1", 0x0000, 0x010000, CRC(2503c7da) SHA1(2478bab8b19ab68ff01be8fae2e86e47894b3d7c), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4rfym__s, m4rfym, "ap502s.p1", 0x0000, 0x010000, CRC(8502a09a) SHA1(e635552b7f0c7b2e142d7f4d0f1fd93edac6132d), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 20)" ) GAME_CUSTOM( 199?, m4rfym__t, m4rfym, "ap502y.p1", 0x0000, 0x010000, CRC(b868ef34) SHA1(a773503afd2f59b71e0b9a7e202d3e7120ec88ff), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4rfym__u, m4rfym, "aprad.p1", 0x0000, 0x010000, CRC(936f59ac) SHA1(325708d965d56a9a7482dbeaa089ca871d5c01b5), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 22)" ) +// "(C)1993 BARCREST" and "APR 0.1" +GAME_CUSTOM( 199?, m4rfym__2, m4rfym, "aprs.p1", 0x0000, 0x010000, CRC(a114a96a) SHA1(b0a9091cac86750329513a0927dd39b76995b2f2), "Barcrest","Run For Your Money (Barcrest) (MPU4) (APR 0.1)" ) +GAME_CUSTOM( 199?, m4rfym__u, m4rfym, "aprad.p1", 0x0000, 0x010000, CRC(936f59ac) SHA1(325708d965d56a9a7482dbeaa089ca871d5c01b5), "Barcrest","Run For Your Money (Barcrest) (MPU4) (APR 0.1AD)" ) GAME_CUSTOM( 199?, m4rfym__v, m4rfym, "aprb.p1", 0x0000, 0x010000, CRC(72ad662a) SHA1(11f1695e05ecf34a58f8df3ffbc72ab2dd7d02c9), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 23)" ) GAME_CUSTOM( 199?, m4rfym__w, m4rfym, "aprbd.p1", 0x0000, 0x010000, CRC(13af990d) SHA1(604d2173e3d6d25252b30b5bf386b53470c35581), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 24)" ) GAME_CUSTOM( 199?, m4rfym__x, m4rfym, "aprc.p1", 0x0000, 0x010000, CRC(fd3ece9a) SHA1(e11d1d258a415865f7477cdfddcd47e9bdb1c9b5), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 25)" ) @@ -1563,47 +1676,48 @@ GAME_CUSTOM( 199?, m4rfym__y, m4rfym, "aprd.p1", 0x0000, 0x010000, CRC(8 GAME_CUSTOM( 199?, m4rfym__z, m4rfym, "aprdk.p1", 0x0000, 0x010000, CRC(58a41fcd) SHA1(e8c92dfb5c9662c90d363b5b7a7e0a4b4894d4cb), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 27)" ) GAME_CUSTOM( 199?, m4rfym__0, m4rfym, "aprdy.p1", 0x0000, 0x010000, CRC(9496cfad) SHA1(cb24779db99d283f1df86864886f21ad333cb98b), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 28)" ) GAME_CUSTOM( 199?, m4rfym__1, m4rfym, "aprk.p1", 0x0000, 0x010000, CRC(7277ef07) SHA1(dc509d125f8d377d4b2cb011d32be5bdba1daa17), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 29)" ) -GAME_CUSTOM( 199?, m4rfym__2, m4rfym, "aprs.p1", 0x0000, 0x010000, CRC(a114a96a) SHA1(b0a9091cac86750329513a0927dd39b76995b2f2), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 30)" ) GAME_CUSTOM( 199?, m4rfym__3, m4rfym, "apry.p1", 0x0000, 0x010000, CRC(bf2120bc) SHA1(473374a9510dd53e39b94bfcf1369e13647239e6), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 31)" ) -GAME_CUSTOM( 199?, m4rfym__4, m4rfym, "rfym20", 0x0000, 0x010000, CRC(5e1d70e2) SHA1(2da1b8033a77d367c4b5c3d83a0e5def4e5e5d78), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 32)" ) -GAME_CUSTOM( 199?, m4rfym__5, m4rfym, "rfym2010", 0x0000, 0x010000, CRC(ec440e7e) SHA1(21f8d4708b5d779dcefcc1e921a5efe17dd6f8c7), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 33)" ) -GAME_CUSTOM( 199?, m4rfym__6, m4rfym, "rfym510l", 0x0000, 0x010000, CRC(24af47f3) SHA1(3d1ec9b013f3f7b497cfb62b42fbb2fa914b24b6), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 34)" ) -GAME_CUSTOM( 199?, m4rfym__7, m4rfym, "rfym55", 0x0000, 0x010000, CRC(b7d638d8) SHA1(6064ceffd94ff149d8bcb117fd823de52030ac64), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 35)" ) -GAME_CUSTOM( 199?, m4rfym__8, m4rfym, "ru5ad.p1", 0x0000, 0x010000, CRC(1c3e1f39) SHA1(a45cdaaa875e52cf5cd5adf986c98f4a22a14785), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 36)" ) +// "(C)1993 BARCREST" and "RU5 0.1" +GAME_CUSTOM( 199?, m4rfym__af, m4rfym, "ru5s.p1", 0x0000, 0x010000, CRC(41795ea3) SHA1(6bfb6da6c0f7e762d628ce8a9dcdcbc3c0326ca6), "Barcrest","Run For Your Money (Barcrest) (MPU4) (RU5 0.1)" ) +GAME_CUSTOM( 199?, m4rfym__8, m4rfym, "ru5ad.p1", 0x0000, 0x010000, CRC(1c3e1f39) SHA1(a45cdaaa875e52cf5cd5adf986c98f4a22a14785), "Barcrest","Run For Your Money (Barcrest) (MPU4) (RU5 0.1AD)" ) GAME_CUSTOM( 199?, m4rfym__9, m4rfym, "ru5b.p1", 0x0000, 0x010000, CRC(41e44d37) SHA1(8eb409b96864fb0f7c3bf5c66a20a63c8cbc68af), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 37)" ) GAME_CUSTOM( 199?, m4rfym__aa, m4rfym, "ru5bd.p1", 0x0000, 0x010000, CRC(8d4db415) SHA1(b023a13f89b7e5c2f72fd213179f723621871faf), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 38)" ) GAME_CUSTOM( 199?, m4rfym__ab, m4rfym, "ru5d.p1", 0x0000, 0x010000, CRC(fcb70a63) SHA1(df81c3c26c066c1326b20b9e0dda2863ee9635a6), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 39)" ) GAME_CUSTOM( 199?, m4rfym__ac, m4rfym, "ru5dk.p1", 0x0000, 0x010000, CRC(b4d83863) SHA1(02aebf94773d0a9454119b4ad663b6d8475fc8d3), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 40)" ) GAME_CUSTOM( 199?, m4rfym__ad, m4rfym, "ru5dy.p1", 0x0000, 0x010000, CRC(66375af5) SHA1(0a6d10357c163e5e27e7436f8190070e36e3ef90), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 41)" ) GAME_CUSTOM( 199?, m4rfym__ae, m4rfym, "ru5k.p1", 0x0000, 0x010000, CRC(7871c141) SHA1(e1e9d2972c87d2835b1e5a62502160cb4abb7736), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 42)" ) -GAME_CUSTOM( 199?, m4rfym__af, m4rfym, "ru5s.p1", 0x0000, 0x010000, CRC(41795ea3) SHA1(6bfb6da6c0f7e762d628ce8a9dcdcbc3c0326ca6), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 43)" ) GAME_CUSTOM( 199?, m4rfym__ag, m4rfym, "ru5y.p1", 0x0000, 0x010000, CRC(ee217541) SHA1(68474c2e430d95ded2856183b9a02be917d092d6), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 44)" ) -GAME_CUSTOM( 199?, m4rfym__ah, m4rfym, "ru8c.p1", 0x0000, 0x010000, CRC(93290724) SHA1(37b17b08f77b308289d4392900576dc66a0377eb), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 45)" ) +// "(C)1993 BARCREST" and "RU8 0.1" +GAME_CUSTOM( 199?, m4rfym__am, m4rfym, "ru8s.p1", 0x0000, 0x010000, CRC(d6ce5891) SHA1(c130e7bf614c67767c9af6f38e3cd41ce63d11ef), "Barcrest","Run For Your Money (Barcrest) (MPU4) (RU8 0.1)" ) +GAME_CUSTOM( 199?, m4rfym__ah, m4rfym, "ru8c.p1", 0x0000, 0x010000, CRC(93290724) SHA1(37b17b08f77b308289d4392900576dc66a0377eb), "Barcrest","Run For Your Money (Barcrest) (MPU4) (RU8 0.1C)" ) GAME_CUSTOM( 199?, m4rfym__ai, m4rfym, "ru8d.p1", 0x0000, 0x010000, CRC(3e7d6ebb) SHA1(a836a52aef9fe4a9021835e99109b7fefb4ead76), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 46)" ) GAME_CUSTOM( 199?, m4rfym__aj, m4rfym, "ru8dk.p1", 0x0000, 0x010000, CRC(b2983dc1) SHA1(412bf4a643c807371fa465fb5f9a85bc3e46623d), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 47)" ) GAME_CUSTOM( 199?, m4rfym__ak, m4rfym, "ru8dy.p1", 0x0000, 0x010000, CRC(7d06cdcc) SHA1(d68f6ee59eb7689df30412288db4e9ee6c4bf178), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 48)" ) GAME_CUSTOM( 199?, m4rfym__al, m4rfym, "ru8k.p1", 0x0000, 0x010000, CRC(42f6226e) SHA1(c4bac8efd9c17f96dd9d973e9f64c85ceeacb36b), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 49)" ) -GAME_CUSTOM( 199?, m4rfym__am, m4rfym, "ru8s.p1", 0x0000, 0x010000, CRC(d6ce5891) SHA1(c130e7bf614c67767c9af6f38e3cd41ce63d11ef), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 50)" ) GAME_CUSTOM( 199?, m4rfym__an, m4rfym, "ru8y.p1", 0x0000, 0x010000, CRC(f1fc1e75) SHA1(f6f1008349505ee0c494fcdde27db2a15147b6cb), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 51)" ) -GAME_CUSTOM( 199?, m4rfym__ao, m4rfym, "runc.p1", 0x0000, 0x010000, CRC(09f53ddf) SHA1(f46be95bfacac751102a5f4d4a0917a5e51a653e), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 52)" ) -GAME_CUSTOM( 199?, m4rfym__ap, m4rfym, "rundy.p1", 0x0000, 0x010000, CRC(a6f69a24) SHA1(8370287dcc890fcb7529d3d4c7a3c2e2e688f6a8), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 53)" ) -GAME_CUSTOM( 199?, m4rfym__aq, m4rfym, "runk.p1", 0x0000, 0x010000, CRC(a2828b82) SHA1(0ae371a441df679fd9c699771ae9f58ce960d4a1), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 54)" ) -GAME_CUSTOM( 199?, m4rfym__ar, m4rfym, "runs.p1", 0x0000, 0x010000, CRC(e20f5a06) SHA1(f0f71f8870db7003fce96f1dfe09804cf17c3ab3), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 55)" ) -GAME_CUSTOM( 199?, m4rfym__as, m4rfym, "runy.p1", 0x0000, 0x010000, CRC(0e311ab4) SHA1(c98540c07e9cc23ec70ecfbcb2f4d66f2c716fc3), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 56)" ) -GAME_CUSTOM( 199?, m4rfym__at, m4rfym, "rutad.p1", 0x0000, 0x010000, CRC(f27090c9) SHA1(28b7bb8046f67a3f8b90069de845b0b791b57078), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 57)" ) +// "(C)1993 BARCREST" and "RUT 0.1" +GAME_CUSTOM( 199?, m4rfym__a0, m4rfym, "ruts.p1", 0x0000, 0x010000, CRC(efaf4e03) SHA1(da19d6e28a6727eb9afb69c23fd5685f0dbcc31a), "Barcrest","Run For Your Money (Barcrest) (MPU4) (RUT 0.1)" ) +GAME_CUSTOM( 199?, m4rfym__at, m4rfym, "rutad.p1", 0x0000, 0x010000, CRC(f27090c9) SHA1(28b7bb8046f67a3f8b90069de845b0b791b57078), "Barcrest","Run For Your Money (Barcrest) (MPU4) (RUT 0.1AD)" ) GAME_CUSTOM( 199?, m4rfym__au, m4rfym, "rutb.p1", 0x0000, 0x010000, CRC(cb7a74bf) SHA1(24274c7e3b40642d698f5c3a9a10cfeb23faaf1b), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 58)" ) GAME_CUSTOM( 199?, m4rfym__av, m4rfym, "rutbd.p1", 0x0000, 0x010000, CRC(19aba8f2) SHA1(cb726130837149c25adb5d87718b72259cb63a63), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 59)" ) GAME_CUSTOM( 199?, m4rfym__aw, m4rfym, "rutd.p1", 0x0000, 0x010000, CRC(16a872bd) SHA1(47ad5eb9b473805e2eb86e0d4d9ef4b2e6e3c926), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 60)" ) GAME_CUSTOM( 199?, m4rfym__ax, m4rfym, "rutdk.p1", 0x0000, 0x010000, CRC(a8259673) SHA1(443081395ea0c1b0a07e6cd4b17670b3e01bb50f), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 61)" ) GAME_CUSTOM( 199?, m4rfym__ay, m4rfym, "rutdy.p1", 0x0000, 0x010000, CRC(6b799f68) SHA1(87482236f1116983e80a7f190710524d3809cd3a), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 62)" ) GAME_CUSTOM( 199?, m4rfym__az, m4rfym, "rutk.p1", 0x0000, 0x010000, CRC(20962e5e) SHA1(0be43050d403750b67c796a007b503e132014f4c), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 63)" ) -GAME_CUSTOM( 199?, m4rfym__a0, m4rfym, "ruts.p1", 0x0000, 0x010000, CRC(efaf4e03) SHA1(da19d6e28a6727eb9afb69c23fd5685f0dbcc31a), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 64)" ) GAME_CUSTOM( 199?, m4rfym__a1, m4rfym, "ruty.p1", 0x0000, 0x010000, CRC(abb708c5) SHA1(6fe3b52a0ba484576fc83ed35aefeda01d275aec), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 65)" ) -GAME_CUSTOM( 199?, m4rfym__a2, m4rfym, "rfym20.10", 0x0000, 0x010000, CRC(947d00d2) SHA1(2c99da689541de247e35ac39eadfe070ac3196b5), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 66)" ) -GAME_CUSTOM( 199?, m4rfym__a3, m4rfym, "rfym5.10", 0x0000, 0x010000, CRC(c2ce2cc2) SHA1(d5633e01f669ee8772ed77befa90180c6aa0111c), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 67)" ) -GAME_CUSTOM( 199?, m4rfym__a4, m4rfym, "rfym5.4", 0x0000, 0x010000, CRC(fe613006) SHA1(898b90893bfcb121575952c22c16570a27948bce), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 68)" ) -GAME_CUSTOM( 199?, m4rfym__a5, m4rfym, "rfym5.8t", 0x0000, 0x010000, CRC(c600718a) SHA1(168fa558f1b5b91fb805d483f3f4351ac80f90ff), "Barcrest","Run For Your Money (Barcrest) (MPU4) (set 69)" ) - +// "(C)1996 B.W.B." and "RUC 1.3" (hack?) +GAME_CUSTOM( 199?, m4rfym__6, m4rfym, "rfym510l", 0x0000, 0x010000, CRC(24af47f3) SHA1(3d1ec9b013f3f7b497cfb62b42fbb2fa914b24b6), "Bwb","Run For Your Money (Barcrest) (MPU4) (RUC 1.3, hack?, set 1)" ) +GAME_CUSTOM( 199?, m4rfym__a3, m4rfym, "rfym5.10", 0x0000, 0x010000, CRC(c2ce2cc2) SHA1(d5633e01f669ee8772ed77befa90180c6aa0111c), "Bwb","Run For Your Money (Barcrest) (MPU4) (RUC 1.3, hack?, set 2)" ) +// "(C)1996 B.W.B." and "RU4 1.1" (hack?) +GAME_CUSTOM( 199?, m4rfym__a4, m4rfym, "rfym5.4", 0x0000, 0x010000, CRC(fe613006) SHA1(898b90893bfcb121575952c22c16570a27948bce), "Bwb","Run For Your Money (Barcrest) (MPU4) (RU4 1.1, hack?)" ) +// "(C)1996 B.W.B." and "RU8 1.2" (hack?) +GAME_CUSTOM( 199?, m4rfym__a5, m4rfym, "rfym5.8t", 0x0000, 0x010000, CRC(c600718a) SHA1(168fa558f1b5b91fb805d483f3f4351ac80f90ff), "Bwb","Run For Your Money (Barcrest) (MPU4) (RU8 1.2, hack?)" ) +// "BILL AND BEN" and "V1 8 0.1" (hack) +GAME_CUSTOM( 199?, m4rfym__4, m4rfym, "rfym20", 0x0000, 0x010000, CRC(5e1d70e2) SHA1(2da1b8033a77d367c4b5c3d83a0e5def4e5e5d78), "hack","Run For Your Money (Barcrest) (MPU4) (V1 8 0.1, hack, set 1)" ) +GAME_CUSTOM( 199?, m4rfym__5, m4rfym, "rfym2010", 0x0000, 0x010000, CRC(ec440e7e) SHA1(21f8d4708b5d779dcefcc1e921a5efe17dd6f8c7), "hack","Run For Your Money (Barcrest) (MPU4) (V1 8 0.1, hack, set 2)" ) +GAME_CUSTOM( 199?, m4rfym__a2, m4rfym, "rfym20.10", 0x0000, 0x010000, CRC(947d00d2) SHA1(2c99da689541de247e35ac39eadfe070ac3196b5), "hack","Run For Your Money (Barcrest) (MPU4) (V1 8 0.1, hack, set 3)" ) +// "1997 COCO" and "RU4 1.1" (hack) +GAME_CUSTOM( 199?, m4rfym__7, m4rfym, "rfym55", 0x0000, 0x010000, CRC(b7d638d8) SHA1(6064ceffd94ff149d8bcb117fd823de52030ac64), "hack","Run For Your Money (Barcrest) (MPU4) (RU4 1.1, hack)" ) #define M4READY_EXTRA_ROMS \ ROM_REGION( 0x48, "fakechr", 0 ) \ @@ -1620,75 +1734,88 @@ GAME_CUSTOM( 199?, m4rfym__a5, m4rfym, "rfym5.8t", 0x0000, 0x010000, CRC(c ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4ready, 0, "rgob.p1", 0x0000, 0x010000, CRC(43ac7b73) SHA1(994d6256432543e1353521359f8faaea671a7bea), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4ready__a, m4ready, "cgo11ad.p1", 0x0000, 0x010000, CRC(9f8bbdaf) SHA1(210cdc9ce493edbf55d43a3127b10931e3ce2fee), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4ready__b, m4ready, "cgo11b.p1", 0x0000, 0x010000, CRC(2ea96acb) SHA1(ffcf1fcb2b769b29b53b00c9ce80af061cc21b9d), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4ready__c, m4ready, "cgo11bd.p1", 0x0000, 0x010000, CRC(4cabc589) SHA1(2b0b91f4ac6ebd18edb7a913b8079acc9f026e7d), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4ready__d, m4ready, "cgo11c.p1", 0x0000, 0x010000, CRC(76d36b80) SHA1(2699982fed3c2116ff0187d24059f59d3b6c1cae), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4ready__e, m4ready, "cgo11d.p1", 0x0000, 0x010000, CRC(63516954) SHA1(abefafe43e3386a5c916e55503bcb623d74840e1), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4ready__f, m4ready, "cgo11dk.p1", 0x0000, 0x010000, CRC(84f112ef) SHA1(85fa44c7b25aeb83fa2c199abafe099a8ae92bf8), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4ready__g, m4ready, "cgo11dr.p1", 0x0000, 0x010000, CRC(07d13cf6) SHA1(11685efebf9c7091191654fec1f2ac6ad3d05ce1), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4ready__h, m4ready, "cgo11dy.p1", 0x0000, 0x010000, CRC(13c5b934) SHA1(3212ba2534726c8fca9a70325acff3f6e85dd1f7), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4ready__i, m4ready, "cgo11k.p1", 0x0000, 0x010000, CRC(4f46e7f6) SHA1(9485edbcbb3a81b1a335a7c420aa676af8b14050), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4ready__j, m4ready, "cgo11r.p1", 0x0000, 0x010000, CRC(f44dd36f) SHA1(6623daaa237e97b9d63815393562fe8abdb8d732), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4ready__k, m4ready, "cgo11s.p1", 0x0000, 0x010000, CRC(a6b9ddd4) SHA1(b06d5d19b165b82c76b29f7925e0936aeccedb8c), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4ready__l, m4ready, "cgo11y.p1", 0x0000, 0x010000, CRC(d91653f6) SHA1(6445958cd07088fbf08c37a8b5540e3eb561d021), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4ready__m, m4ready, "drr02ad.p1", 0x0000, 0x010000, CRC(5acc5189) SHA1(abf66b90f4a64c3fb9ac4bf16f3bba2758f54482), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4ready__n, m4ready, "drr02b.p1", 0x0000, 0x010000, CRC(729e13c9) SHA1(dcefdd44592464616570101a5e05db31289fc66c), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4ready__o, m4ready, "drr02bd.p1", 0x0000, 0x010000, CRC(70c5b183) SHA1(b1431d0c2c48941d1ff6d6115c8d1ab026d71f63), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4ready__p, m4ready, "drr02c.p1", 0x0000, 0x010000, CRC(258acbf9) SHA1(ced9dbef9162ddadb4838ad430d50aa14574e97d), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4ready__q, m4ready, "drr02d.p1", 0x0000, 0x010000, CRC(60940b5a) SHA1(a4d293944e0e65f99dea9391d9d7e1066aa7b83d), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4ready__r, m4ready, "drr02dk.p1", 0x0000, 0x010000, CRC(0335775e) SHA1(4d943c3e522f5c42ddd2104c316f75eec90f494f), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4ready__s, m4ready, "drr02dr.p1", 0x0000, 0x010000, CRC(c05eef66) SHA1(ac5966ea0ff036d9c9179df6bc7aabd149f41d6c), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4ready__t, m4ready, "drr02dy.p1", 0x0000, 0x010000, CRC(6a700473) SHA1(4025a99aa9e87a80875d150e965650d339d2a143), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4ready__u, m4ready, "drr02k.p1", 0x0000, 0x010000, CRC(525e370e) SHA1(9849399643731beb31b7163b7eebd8774caf9289), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4ready__v, m4ready, "drr02r.p1", 0x0000, 0x010000, CRC(352613a0) SHA1(052e7770d55dd379d1bf3501e46d973bc4fc48d8), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4ready__w, m4ready, "drr02s.p1", 0x0000, 0x010000, CRC(67b03b7f) SHA1(61e09db8b7622e6e094c4e585dbcfea724155829), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4ready__x, m4ready, "drr02y.p1", 0x0000, 0x010000, CRC(009c7ece) SHA1(48463d7d0e521d51bad83ac5ddaaffabc68bf610), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4ready__y, m4ready, "hjj.hex", 0x0000, 0x010000, CRC(48ab2375) SHA1(4d9360a89e97a6bb7bdb099940d73f425eadd63d), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4ready__z, m4ready, "hjj02ad.p1", 0x0000, 0x010000, CRC(9f787e01) SHA1(d6cae1c1ae15b74285076e87c7fd8105f6a114ae), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4ready__0, m4ready, "hjj02b.p1", 0x0000, 0x010000, CRC(778ec121) SHA1(98454562da1da56d57ce3e6279805207671d7337), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4ready__1, m4ready, "hjj02bd.p1", 0x0000, 0x010000, CRC(7e8dbab0) SHA1(5b40536503b2d62792f874535367f5658acf8d2e), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 29)" ) -GAME_CUSTOM( 199?, m4ready__2, m4ready, "hjj02c.p1", 0x0000, 0x010000, CRC(fbb149fc) SHA1(6a8305a3ef4a1818a12dab3d380e79b7e642a904), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 30)" ) -GAME_CUSTOM( 199?, m4ready__3, m4ready, "hjj02d.p1", 0x0000, 0x010000, CRC(9e657e28) SHA1(3eaf9f8a0511f4533e9b47105d4417c71248fab2), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 31)" ) -GAME_CUSTOM( 199?, m4ready__4, m4ready, "hjj02dk.p1", 0x0000, 0x010000, CRC(2e1bab77) SHA1(76a2784bc183c6d79a845bb7306eae687ced82a0), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 32)" ) -GAME_CUSTOM( 199?, m4ready__5, m4ready, "hjj02dr.p1", 0x0000, 0x010000, CRC(9d26064f) SHA1(6596b3a671ab8e38b8357023f8994948ef1c1f0f), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 33)" ) -GAME_CUSTOM( 199?, m4ready__6, m4ready, "hjj02dy.p1", 0x0000, 0x010000, CRC(0ab388b6) SHA1(cc8f157a8a91e3fb8bd1fbdd35989d72c8684c50), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 34)" ) -GAME_CUSTOM( 199?, m4ready__7, m4ready, "hjj02k.p1", 0x0000, 0x010000, CRC(c224c58a) SHA1(5f9b5ff92e2f1b0438380d635b255ec8b4fc080f), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 35)" ) -GAME_CUSTOM( 199?, m4ready__8, m4ready, "hjj02r.p1", 0x0000, 0x010000, CRC(32fefefe) SHA1(f58e228a1496b0858903c2d850c8453835b6f24b), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 36)" ) -GAME_CUSTOM( 199?, m4ready__9, m4ready, "hjj02s.p1", 0x0000, 0x010000, CRC(39de9801) SHA1(c29e883c45ed6b272d65c7922b1871199a424244), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 37)" ) -GAME_CUSTOM( 199?, m4ready__aa, m4ready, "hjj02y.p1", 0x0000, 0x010000, CRC(0178cc91) SHA1(d618ff2eb0a1992b88f3b5427ffc54d34bf8c124), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 38)" ) -GAME_CUSTOM( 199?, m4ready__ab, m4ready, "ppl02ad.p1", 0x0000, 0x010000, CRC(d8b3be27) SHA1(95d1d979b439303817670fd686b5df324feb618f), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 39)" ) -GAME_CUSTOM( 199?, m4ready__ac, m4ready, "ppl02b.p1", 0x0000, 0x010000, CRC(dbd56cf1) SHA1(968c1d09626e493c51d7637e19a7f092047b283f), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 40)" ) -GAME_CUSTOM( 199?, m4ready__ad, m4ready, "ppl02bd.p1", 0x0000, 0x010000, CRC(eeafd36d) SHA1(68c314e937d24a59ca305facc409218c63bef24e), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 41)" ) -GAME_CUSTOM( 199?, m4ready__ae, m4ready, "ppl02c.p1", 0x0000, 0x010000, CRC(ad6f5c6d) SHA1(91f3d7bad3cdb7014ff3caa1631e6567cb95f47e), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 42)" ) -GAME_CUSTOM( 199?, m4ready__af, m4ready, "ppl02d.p1", 0x0000, 0x010000, CRC(041f0fd8) SHA1(8e32c88f7b0a541a9460926a2fec0318a7239279), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 43)" ) -GAME_CUSTOM( 199?, m4ready__ag, m4ready, "ppl02dk.p1", 0x0000, 0x010000, CRC(632ecd46) SHA1(9e90279db99aa22923a79e309b053b35b70c9f8e), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 44)" ) -GAME_CUSTOM( 199?, m4ready__ah, m4ready, "ppl02dy.p1", 0x0000, 0x010000, CRC(4fb07726) SHA1(f234018ea18511217d176023b489254cf5a5a15e), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 45)" ) -GAME_CUSTOM( 199?, m4ready__ai, m4ready, "ppl02k.p1", 0x0000, 0x010000, CRC(7fcc03d7) SHA1(359743edec7ca54bd9a780f81ac25d314ada2d7e), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 46)" ) -GAME_CUSTOM( 199?, m4ready__aj, m4ready, "ppl02r.p1", 0x0000, 0x010000, CRC(e35580e3) SHA1(397bd2ce068aa45f3c55a3ddd97ae3e09391a7da), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 47)" ) -GAME_CUSTOM( 199?, m4ready__ak, m4ready, "ppl02s.p1", 0x0000, 0x010000, CRC(40c1d256) SHA1(abd55dcc06b49d54976743c610ad3de21278ac2d), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 48)" ) -GAME_CUSTOM( 199?, m4ready__al, m4ready, "ppl02y.p1", 0x0000, 0x010000, CRC(7802f70c) SHA1(c96758c02bebff4b85436a93ae012c80c6cb2963), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 49)" ) -GAME_CUSTOM( 199?, m4ready__am, m4ready, "rgoad.p1", 0x0000, 0x010000, CRC(d4ed739c) SHA1(6a7d5f63eaf59f08a8f870aba8523e2dc59d20cd), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 50)" ) -GAME_CUSTOM( 199?, m4ready__an, m4ready, "rgobd.p1", 0x0000, 0x010000, CRC(0505340c) SHA1(e61b007dc50beb22bf3efa2c3cfab595880d3248), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 51)" ) -GAME_CUSTOM( 199?, m4ready__ao, m4ready, "rgod.p1", 0x0000, 0x010000, CRC(f3898077) SHA1(4d2f32b4c3f01a0b54966dd0558dcadcf89fd229), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 52)" ) -GAME_CUSTOM( 199?, m4ready__ap, m4ready, "rgodk.p1", 0x0000, 0x010000, CRC(9a9b61c7) SHA1(756ed419451d1e070809303467789e01949dea2b), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 53)" ) -GAME_CUSTOM( 199?, m4ready__aq, m4ready, "rgody.p1", 0x0000, 0x010000, CRC(a0eef0f0) SHA1(781de603d19eab0ee771b10374f53c149432c877), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 54)" ) -GAME_CUSTOM( 199?, m4ready__ar, m4ready, "rgok.p1", 0x0000, 0x010000, CRC(00413e8f) SHA1(580efbdf3ba092978648d83b6d21b5a4966d57e3), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 55)" ) -GAME_CUSTOM( 199?, m4ready__as, m4ready, "rgos.p1", 0x0000, 0x010000, CRC(d00d3540) SHA1(0fd6a08477d05d1c129038c8de47de68a28c0a56), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 56)" ) -GAME_CUSTOM( 199?, m4ready__at, m4ready, "rgoy.p1", 0x0000, 0x010000, CRC(cfdfce82) SHA1(68464381f658f08efb3f790eea1e7dd61086f936), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 57)" ) -GAME_CUSTOM( 199?, m4ready__au, m4ready, "rgt10ad.p1", 0x0000, 0x010000, CRC(22f65e05) SHA1(d488e4c65059b3b7e8e88e39a05e0cc9eae2d836), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 58)" ) -GAME_CUSTOM( 199?, m4ready__av, m4ready, "rgt10b.p1", 0x0000, 0x010000, CRC(5d86b45a) SHA1(a7553848a1e4304acaf72f9d293123ca2af629f0), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 59)" ) -GAME_CUSTOM( 199?, m4ready__aw, m4ready, "rgt10bd.p1", 0x0000, 0x010000, CRC(6280594e) SHA1(d2b666aaac8ebe94bfab1c4404d0e42bd6c8b176), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 60)" ) -GAME_CUSTOM( 199?, m4ready__ax, m4ready, "rgt10c.p1", 0x0000, 0x010000, CRC(91f28aa6) SHA1(42c21d11df3145a0919f7aef53a5621b2beca353), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 61)" ) -GAME_CUSTOM( 199?, m4ready__ay, m4ready, "rgt10d.p1", 0x0000, 0x010000, CRC(abd4a67e) SHA1(183746cd2cd661587854a80ad5455074fcf143cc), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 62)" ) -GAME_CUSTOM( 199?, m4ready__az, m4ready, "rgt10dk.p1", 0x0000, 0x010000, CRC(63ee9525) SHA1(e1fa5348672d05149e6ab26f31af047e38192f2c), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 63)" ) -GAME_CUSTOM( 199?, m4ready__a0, m4ready, "rgt10dr.p1", 0x0000, 0x010000, CRC(481ffebc) SHA1(3608faa929b703d2e45ea37b4f7051d5bb37f073), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 64)" ) -GAME_CUSTOM( 199?, m4ready__a1, m4ready, "rgt10dy.p1", 0x0000, 0x010000, CRC(fe2498e9) SHA1(bd81c775daf860c2484af88a8b11b75df00ccaaa), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 65)" ) -GAME_CUSTOM( 199?, m4ready__a2, m4ready, "rgt10k.p1", 0x0000, 0x010000, CRC(78d6eff1) SHA1(d3172ffc9ef3a4f60680081d993e1487e4229625), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 66)" ) -GAME_CUSTOM( 199?, m4ready__a3, m4ready, "rgt10r.p1", 0x0000, 0x010000, CRC(1992945e) SHA1(716b62ca8edc5523fd83355e650982b50b4f9458), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 67)" ) -GAME_CUSTOM( 199?, m4ready__a4, m4ready, "rgt10s.p1", 0x0000, 0x010000, CRC(dd289204) SHA1(431f73cb45d248c672c50dc8fbc579209e41207d), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 68)" ) -GAME_CUSTOM( 199?, m4ready__a5, m4ready, "rgt10y.p1", 0x0000, 0x010000, CRC(8dab3aca) SHA1(0fe8f87a17acd8df0b7b75b852b58eb1e273eb27), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (set 69)" ) +// "(C)1991 BARCREST" and "RGO 0.8" +GAME_CUSTOM( 199?, m4ready, 0, "rgos.p1", 0x0000, 0x010000, CRC(d00d3540) SHA1(0fd6a08477d05d1c129038c8de47de68a28c0a56), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGO 0.8)" ) +GAME_CUSTOM( 199?, m4ready__as, m4ready, "rgob.p1", 0x0000, 0x010000, CRC(43ac7b73) SHA1(994d6256432543e1353521359f8faaea671a7bea), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGO 0.8B)" ) +GAME_CUSTOM( 199?, m4ready__ar, m4ready, "rgok.p1", 0x0000, 0x010000, CRC(00413e8f) SHA1(580efbdf3ba092978648d83b6d21b5a4966d57e3), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGO 0.8K)" ) +GAME_CUSTOM( 199?, m4ready__at, m4ready, "rgoy.p1", 0x0000, 0x010000, CRC(cfdfce82) SHA1(68464381f658f08efb3f790eea1e7dd61086f936), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGO 0.8Y)" ) +// datapak sets +GAME_CUSTOM( 199?, m4ready__ao, m4ready, "rgod.p1", 0x0000, 0x010000, CRC(f3898077) SHA1(4d2f32b4c3f01a0b54966dd0558dcadcf89fd229), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGO 0.8D)" ) +GAME_CUSTOM( 199?, m4ready__am, m4ready, "rgoad.p1", 0x0000, 0x010000, CRC(d4ed739c) SHA1(6a7d5f63eaf59f08a8f870aba8523e2dc59d20cd), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGO 0.8AD)" ) +GAME_CUSTOM( 199?, m4ready__an, m4ready, "rgobd.p1", 0x0000, 0x010000, CRC(0505340c) SHA1(e61b007dc50beb22bf3efa2c3cfab595880d3248), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGO 0.8BD)" ) +GAME_CUSTOM( 199?, m4ready__ap, m4ready, "rgodk.p1", 0x0000, 0x010000, CRC(9a9b61c7) SHA1(756ed419451d1e070809303467789e01949dea2b), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGO 0.8KD)" ) +GAME_CUSTOM( 199?, m4ready__aq, m4ready, "rgody.p1", 0x0000, 0x010000, CRC(a0eef0f0) SHA1(781de603d19eab0ee771b10374f53c149432c877), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGO 0.8YD)" ) +// "(C)1991 BARCREST" and "CGO 1.1" +GAME_CUSTOM( 199?, m4ready__k, m4ready, "cgo11s.p1", 0x0000, 0x010000, CRC(a6b9ddd4) SHA1(b06d5d19b165b82c76b29f7925e0936aeccedb8c), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (CGO 1.1)" ) +GAME_CUSTOM( 199?, m4ready__b, m4ready, "cgo11b.p1", 0x0000, 0x010000, CRC(2ea96acb) SHA1(ffcf1fcb2b769b29b53b00c9ce80af061cc21b9d), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (CGO 1.1B)" ) +GAME_CUSTOM( 199?, m4ready__d, m4ready, "cgo11c.p1", 0x0000, 0x010000, CRC(76d36b80) SHA1(2699982fed3c2116ff0187d24059f59d3b6c1cae), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (CGO 1.1C)" ) +GAME_CUSTOM( 199?, m4ready__i, m4ready, "cgo11k.p1", 0x0000, 0x010000, CRC(4f46e7f6) SHA1(9485edbcbb3a81b1a335a7c420aa676af8b14050), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (CGO 1.1K)" ) +GAME_CUSTOM( 199?, m4ready__j, m4ready, "cgo11r.p1", 0x0000, 0x010000, CRC(f44dd36f) SHA1(6623daaa237e97b9d63815393562fe8abdb8d732), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (CGO 1.1R)" ) +GAME_CUSTOM( 199?, m4ready__l, m4ready, "cgo11y.p1", 0x0000, 0x010000, CRC(d91653f6) SHA1(6445958cd07088fbf08c37a8b5540e3eb561d021), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (CGO 1.1Y)" ) +// datapak sets +GAME_CUSTOM( 199?, m4ready__e, m4ready, "cgo11d.p1", 0x0000, 0x010000, CRC(63516954) SHA1(abefafe43e3386a5c916e55503bcb623d74840e1), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (CGO 1.1D)" ) +GAME_CUSTOM( 199?, m4ready__a, m4ready, "cgo11ad.p1", 0x0000, 0x010000, CRC(9f8bbdaf) SHA1(210cdc9ce493edbf55d43a3127b10931e3ce2fee), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (CGO 1.1AD)" ) +GAME_CUSTOM( 199?, m4ready__c, m4ready, "cgo11bd.p1", 0x0000, 0x010000, CRC(4cabc589) SHA1(2b0b91f4ac6ebd18edb7a913b8079acc9f026e7d), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (CGO 1.1BD)" ) +GAME_CUSTOM( 199?, m4ready__f, m4ready, "cgo11dk.p1", 0x0000, 0x010000, CRC(84f112ef) SHA1(85fa44c7b25aeb83fa2c199abafe099a8ae92bf8), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (CGO 1.1KD)" ) +GAME_CUSTOM( 199?, m4ready__g, m4ready, "cgo11dr.p1", 0x0000, 0x010000, CRC(07d13cf6) SHA1(11685efebf9c7091191654fec1f2ac6ad3d05ce1), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (CGO 1.1RD)" ) +GAME_CUSTOM( 199?, m4ready__h, m4ready, "cgo11dy.p1", 0x0000, 0x010000, CRC(13c5b934) SHA1(3212ba2534726c8fca9a70325acff3f6e85dd1f7), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (CGO 1.1YD)" ) +// "(C)1991 BARCREST" and "DRR 0.2" +GAME_CUSTOM( 199?, m4ready__w, m4ready, "drr02s.p1", 0x0000, 0x010000, CRC(67b03b7f) SHA1(61e09db8b7622e6e094c4e585dbcfea724155829), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (DRR 0.2)" ) +GAME_CUSTOM( 199?, m4ready__n, m4ready, "drr02b.p1", 0x0000, 0x010000, CRC(729e13c9) SHA1(dcefdd44592464616570101a5e05db31289fc66c), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (DRR 0.2B)" ) +GAME_CUSTOM( 199?, m4ready__p, m4ready, "drr02c.p1", 0x0000, 0x010000, CRC(258acbf9) SHA1(ced9dbef9162ddadb4838ad430d50aa14574e97d), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (DRR 0.2C)" ) +GAME_CUSTOM( 199?, m4ready__u, m4ready, "drr02k.p1", 0x0000, 0x010000, CRC(525e370e) SHA1(9849399643731beb31b7163b7eebd8774caf9289), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (DRR 0.2K)" ) +GAME_CUSTOM( 199?, m4ready__v, m4ready, "drr02r.p1", 0x0000, 0x010000, CRC(352613a0) SHA1(052e7770d55dd379d1bf3501e46d973bc4fc48d8), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (DRR 0.2R)" ) +GAME_CUSTOM( 199?, m4ready__x, m4ready, "drr02y.p1", 0x0000, 0x010000, CRC(009c7ece) SHA1(48463d7d0e521d51bad83ac5ddaaffabc68bf610), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (DRR 0.2Y)" ) +// datapak sets +GAME_CUSTOM( 199?, m4ready__q, m4ready, "drr02d.p1", 0x0000, 0x010000, CRC(60940b5a) SHA1(a4d293944e0e65f99dea9391d9d7e1066aa7b83d), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (DRR 0.2D)" ) +GAME_CUSTOM( 199?, m4ready__m, m4ready, "drr02ad.p1", 0x0000, 0x010000, CRC(5acc5189) SHA1(abf66b90f4a64c3fb9ac4bf16f3bba2758f54482), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (DRR 0.2AD)" ) +GAME_CUSTOM( 199?, m4ready__o, m4ready, "drr02bd.p1", 0x0000, 0x010000, CRC(70c5b183) SHA1(b1431d0c2c48941d1ff6d6115c8d1ab026d71f63), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (DRR 0.2BD)" ) +GAME_CUSTOM( 199?, m4ready__r, m4ready, "drr02dk.p1", 0x0000, 0x010000, CRC(0335775e) SHA1(4d943c3e522f5c42ddd2104c316f75eec90f494f), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (DRR 0.2KD)" ) +GAME_CUSTOM( 199?, m4ready__s, m4ready, "drr02dr.p1", 0x0000, 0x010000, CRC(c05eef66) SHA1(ac5966ea0ff036d9c9179df6bc7aabd149f41d6c), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (DRR 0.2RD)" ) +GAME_CUSTOM( 199?, m4ready__t, m4ready, "drr02dy.p1", 0x0000, 0x010000, CRC(6a700473) SHA1(4025a99aa9e87a80875d150e965650d339d2a143), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (DRR 0.2YD)" ) +// "(C)1991 BARCREST" and "HJJ 0.1" +GAME_CUSTOM( 199?, m4ready__y, m4ready, "hjj.hex", 0x0000, 0x010000, CRC(48ab2375) SHA1(4d9360a89e97a6bb7bdb099940d73f425eadd63d), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (HJJ 0.1)" ) +// "(C)1991 BARCREST" and "HJJ 0.2" +GAME_CUSTOM( 199?, m4ready__9, m4ready, "hjj02s.p1", 0x0000, 0x010000, CRC(39de9801) SHA1(c29e883c45ed6b272d65c7922b1871199a424244), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (HJJ 0.2)" ) +GAME_CUSTOM( 199?, m4ready__0, m4ready, "hjj02b.p1", 0x0000, 0x010000, CRC(778ec121) SHA1(98454562da1da56d57ce3e6279805207671d7337), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (HJJ 0.2B)" ) +GAME_CUSTOM( 199?, m4ready__2, m4ready, "hjj02c.p1", 0x0000, 0x010000, CRC(fbb149fc) SHA1(6a8305a3ef4a1818a12dab3d380e79b7e642a904), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (HJJ 0.2C)" ) +GAME_CUSTOM( 199?, m4ready__7, m4ready, "hjj02k.p1", 0x0000, 0x010000, CRC(c224c58a) SHA1(5f9b5ff92e2f1b0438380d635b255ec8b4fc080f), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (HJJ 0.2K)" ) +GAME_CUSTOM( 199?, m4ready__8, m4ready, "hjj02r.p1", 0x0000, 0x010000, CRC(32fefefe) SHA1(f58e228a1496b0858903c2d850c8453835b6f24b), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (HJJ 0.2R)" ) +GAME_CUSTOM( 199?, m4ready__aa, m4ready, "hjj02y.p1", 0x0000, 0x010000, CRC(0178cc91) SHA1(d618ff2eb0a1992b88f3b5427ffc54d34bf8c124), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (HJJ 0.2Y)" ) +// datapak sets +GAME_CUSTOM( 199?, m4ready__3, m4ready, "hjj02d.p1", 0x0000, 0x010000, CRC(9e657e28) SHA1(3eaf9f8a0511f4533e9b47105d4417c71248fab2), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (HJJ 0.2D)" ) +GAME_CUSTOM( 199?, m4ready__z, m4ready, "hjj02ad.p1", 0x0000, 0x010000, CRC(9f787e01) SHA1(d6cae1c1ae15b74285076e87c7fd8105f6a114ae), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (HJJ 0.2AD)" ) +GAME_CUSTOM( 199?, m4ready__1, m4ready, "hjj02bd.p1", 0x0000, 0x010000, CRC(7e8dbab0) SHA1(5b40536503b2d62792f874535367f5658acf8d2e), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (HJJ 0.2BD)" ) +GAME_CUSTOM( 199?, m4ready__4, m4ready, "hjj02dk.p1", 0x0000, 0x010000, CRC(2e1bab77) SHA1(76a2784bc183c6d79a845bb7306eae687ced82a0), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (HJJ 0.2KD)" ) +GAME_CUSTOM( 199?, m4ready__5, m4ready, "hjj02dr.p1", 0x0000, 0x010000, CRC(9d26064f) SHA1(6596b3a671ab8e38b8357023f8994948ef1c1f0f), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (HJJ 0.2RD)" ) +GAME_CUSTOM( 199?, m4ready__6, m4ready, "hjj02dy.p1", 0x0000, 0x010000, CRC(0ab388b6) SHA1(cc8f157a8a91e3fb8bd1fbdd35989d72c8684c50), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (HJJ 0.2YD)" ) +// "(C)1991 BARCREST" and "PPL 0.2" +GAME_CUSTOM( 199?, m4ready__ak, m4ready, "ppl02s.p1", 0x0000, 0x010000, CRC(40c1d256) SHA1(abd55dcc06b49d54976743c610ad3de21278ac2d), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (PPL 0.2)" ) +GAME_CUSTOM( 199?, m4ready__ac, m4ready, "ppl02b.p1", 0x0000, 0x010000, CRC(dbd56cf1) SHA1(968c1d09626e493c51d7637e19a7f092047b283f), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (PPL 0.2B)" ) +GAME_CUSTOM( 199?, m4ready__ae, m4ready, "ppl02c.p1", 0x0000, 0x010000, CRC(ad6f5c6d) SHA1(91f3d7bad3cdb7014ff3caa1631e6567cb95f47e), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (PPL 0.2C)" ) +GAME_CUSTOM( 199?, m4ready__ai, m4ready, "ppl02k.p1", 0x0000, 0x010000, CRC(7fcc03d7) SHA1(359743edec7ca54bd9a780f81ac25d314ada2d7e), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (PPL 0.2K)" ) +GAME_CUSTOM( 199?, m4ready__aj, m4ready, "ppl02r.p1", 0x0000, 0x010000, CRC(e35580e3) SHA1(397bd2ce068aa45f3c55a3ddd97ae3e09391a7da), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (PPL 0.2R)" ) +GAME_CUSTOM( 199?, m4ready__al, m4ready, "ppl02y.p1", 0x0000, 0x010000, CRC(7802f70c) SHA1(c96758c02bebff4b85436a93ae012c80c6cb2963), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (PPL 0.2Y)" ) +// datapak sets +GAME_CUSTOM( 199?, m4ready__af, m4ready, "ppl02d.p1", 0x0000, 0x010000, CRC(041f0fd8) SHA1(8e32c88f7b0a541a9460926a2fec0318a7239279), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (PPL 0.2D)" ) +GAME_CUSTOM( 199?, m4ready__ab, m4ready, "ppl02ad.p1", 0x0000, 0x010000, CRC(d8b3be27) SHA1(95d1d979b439303817670fd686b5df324feb618f), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (PPL 0.2AD)" ) +GAME_CUSTOM( 199?, m4ready__ad, m4ready, "ppl02bd.p1", 0x0000, 0x010000, CRC(eeafd36d) SHA1(68c314e937d24a59ca305facc409218c63bef24e), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (PPL 0.2BD)" ) +GAME_CUSTOM( 199?, m4ready__ag, m4ready, "ppl02dk.p1", 0x0000, 0x010000, CRC(632ecd46) SHA1(9e90279db99aa22923a79e309b053b35b70c9f8e), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (PPL 0.2KD)" ) +GAME_CUSTOM( 199?, m4ready__ah, m4ready, "ppl02dy.p1", 0x0000, 0x010000, CRC(4fb07726) SHA1(f234018ea18511217d176023b489254cf5a5a15e), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (PPL 0.2YD)" ) +// "(C)1991 BARCREST" and "RGT 1.0" +GAME_CUSTOM( 199?, m4ready__a4, m4ready, "rgt10s.p1", 0x0000, 0x010000, CRC(dd289204) SHA1(431f73cb45d248c672c50dc8fbc579209e41207d), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGT 1.0)" ) +GAME_CUSTOM( 199?, m4ready__av, m4ready, "rgt10b.p1", 0x0000, 0x010000, CRC(5d86b45a) SHA1(a7553848a1e4304acaf72f9d293123ca2af629f0), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGT 1.0B)" ) +GAME_CUSTOM( 199?, m4ready__ax, m4ready, "rgt10c.p1", 0x0000, 0x010000, CRC(91f28aa6) SHA1(42c21d11df3145a0919f7aef53a5621b2beca353), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGT 1.0C)" ) +GAME_CUSTOM( 199?, m4ready__a2, m4ready, "rgt10k.p1", 0x0000, 0x010000, CRC(78d6eff1) SHA1(d3172ffc9ef3a4f60680081d993e1487e4229625), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGT 1.0K)" ) +GAME_CUSTOM( 199?, m4ready__a3, m4ready, "rgt10r.p1", 0x0000, 0x010000, CRC(1992945e) SHA1(716b62ca8edc5523fd83355e650982b50b4f9458), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGT 1.0R)" ) +GAME_CUSTOM( 199?, m4ready__a5, m4ready, "rgt10y.p1", 0x0000, 0x010000, CRC(8dab3aca) SHA1(0fe8f87a17acd8df0b7b75b852b58eb1e273eb27), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGT 1.0Y)" ) +// datapak sets +GAME_CUSTOM( 199?, m4ready__ay, m4ready, "rgt10d.p1", 0x0000, 0x010000, CRC(abd4a67e) SHA1(183746cd2cd661587854a80ad5455074fcf143cc), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGT 1.0D)" ) +GAME_CUSTOM( 199?, m4ready__au, m4ready, "rgt10ad.p1", 0x0000, 0x010000, CRC(22f65e05) SHA1(d488e4c65059b3b7e8e88e39a05e0cc9eae2d836), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGT 1.0AD)" ) +GAME_CUSTOM( 199?, m4ready__aw, m4ready, "rgt10bd.p1", 0x0000, 0x010000, CRC(6280594e) SHA1(d2b666aaac8ebe94bfab1c4404d0e42bd6c8b176), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGT 1.0BD)" ) +GAME_CUSTOM( 199?, m4ready__az, m4ready, "rgt10dk.p1", 0x0000, 0x010000, CRC(63ee9525) SHA1(e1fa5348672d05149e6ab26f31af047e38192f2c), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGT 1.0KD)" ) +GAME_CUSTOM( 199?, m4ready__a0, m4ready, "rgt10dr.p1", 0x0000, 0x010000, CRC(481ffebc) SHA1(3608faa929b703d2e45ea37b4f7051d5bb37f073), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGT 1.0RD)" ) +GAME_CUSTOM( 199?, m4ready__a1, m4ready, "rgt10dy.p1", 0x0000, 0x010000, CRC(fe2498e9) SHA1(bd81c775daf860c2484af88a8b11b75df00ccaaa), "Barcrest","Ready Steady Go (Barcrest) (type 2) (MPU4) (RGT 1.0YD)" ) #define M4MAG7S_EXTRA_ROMS \ @@ -1856,59 +1983,73 @@ GAME_CUSTOM( 199?, m4makmnt__as, m4makmnt, "ma_x6a_c.3_1", 0x0000, 0x010000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4vivaes, 0, "5p5vivaespana6-0.bin", 0x0000, 0x010000, CRC(adf02a7b) SHA1(2c61e175b920a67098503eb4d80b07b828c9f91d), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4vivaes__a, m4vivaes, "ep8ad.p1", 0x0000, 0x010000, CRC(1591cc9b) SHA1(b7574b71955d7780f3f127670e458befad951383), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4vivaes__b, m4vivaes, "ep8b.p1", 0x0000, 0x010000, CRC(33b085b3) SHA1(5fc22ee8ae2d597392c82b09a830893bb04e1014), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4vivaes__c, m4vivaes, "ep8bd.p1", 0x0000, 0x010000, CRC(d1eedaac) SHA1(9773fbb9b15dbbe313d76b0746698fbc12e26dd2), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4vivaes__d, m4vivaes, "ep8c.p1", 0x0000, 0x010000, CRC(d2a8aaf5) SHA1(7aabe3e0522877700453068c30c74cbe2c058e9a), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4vivaes__e, m4vivaes, "ep8d.p1", 0x0000, 0x010000, CRC(06f87010) SHA1(636707d4077bee0ea2f221904fa0e187ea4a1e31), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4vivaes__f, m4vivaes, "ep8dk.p1", 0x0000, 0x010000, CRC(e87b56da) SHA1(f3de0ab0badc9bd14505822c63f110b9b2521d55), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4vivaes__g, m4vivaes, "ep8dy.p1", 0x0000, 0x010000, CRC(d20ec7ed) SHA1(dffd4fcaf360b2b9f4b7241fe80bb6ee983b6d57), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4vivaes__h, m4vivaes, "ep8k.p1", 0x0000, 0x010000, CRC(0a2509c5) SHA1(d0fd30953cbc36363a6d4941b4a0805f9663aebb), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4vivaes__i, m4vivaes, "ep8s.p1", 0x0000, 0x010000, CRC(51537f2d) SHA1(a837a525cd7da724f338c47e716be175c37070b0), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4vivaes__j, m4vivaes, "ep8y.p1", 0x0000, 0x010000, CRC(4cc454e4) SHA1(a08ec2a4a17600eba86300dcb6b150b1b5a7fc74), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4vivaes__k, m4vivaes, "espc.p1", 0x0000, 0x010000, CRC(9534d0d0) SHA1(8e4a1081821d472eb4d9aa01e38b6956a1388d28), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4vivaes__l, m4vivaes, "espd.p1", 0x0000, 0x010000, CRC(012fbc14) SHA1(5e4a1cd7989f804ac52c7cbf46d7f9c1d7200336), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4vivaes__m, m4vivaes, "espdy.p1", 0x0000, 0x010000, CRC(90efbb8e) SHA1(a7338c5d71719b86f524f35d7edd176f41383f15), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4vivaes__n, m4vivaes, "espk.p1", 0x0000, 0x010000, CRC(775a56d6) SHA1(b0e47b56315948a7162ae00c3f5197fbb7b81ec5), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4vivaes__o, m4vivaes, "esps.p1", 0x0000, 0x010000, CRC(0c83b014) SHA1(e7cc513b66534b4fec89170d7b739c99a1ba3831), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4vivaes__p, m4vivaes, "espy.p1", 0x0000, 0x010000, CRC(020aa8bb) SHA1(497dae13fe9f9eba624db907e9f4a5bef1584a64), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4vivaes__q, m4vivaes, "ve5ad.p1", 0x0000, 0x010000, CRC(c545d5f0) SHA1(6ad168d2c1f2da2fff85fe0e21a3191cba8f5838), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4vivaes__r, m4vivaes, "ve5b.p1", 0x0000, 0x010000, CRC(ed02fa94) SHA1(9980b2f78ea8f40715e77fd8fafe883739ac1165), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4vivaes__s, m4vivaes, "ve5bd.p1", 0x0000, 0x010000, CRC(fce73b5c) SHA1(35e635ade9b4a7a992c568e317190d12576f78c9), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4vivaes__t, m4vivaes, "ve5d.p1", 0x0000, 0x010000, CRC(e739556d) SHA1(0816aa256cf8ac253ff37999595e981e90874d39), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4vivaes__u, m4vivaes, "ve5dk.p1", 0x0000, 0x010000, CRC(64f174d0) SHA1(f51b28607715931a9d4c1c14fc71b4f8bb8e56fb), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4vivaes__v, m4vivaes, "ve5dy.p1", 0x0000, 0x010000, CRC(fe6339c6) SHA1(82f14d80e96b65eeea08f1029ffaebf2e505091e), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4vivaes__w, m4vivaes, "ve5k.p1", 0x0000, 0x010000, CRC(05428018) SHA1(b6884a1bfd2cf8268258d3d9a8d2c482ba92e5af), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4vivaes__x, m4vivaes, "ve5s.p1", 0x0000, 0x010000, CRC(65df6cf1) SHA1(26eadbad30b93df6dfd37f984be2dec77f1d6442), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4vivaes__y, m4vivaes, "ve5y.p1", 0x0000, 0x010000, CRC(2fe06579) SHA1(9e11b371edd8fab78e9594ed864f8eb487112150), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4vivaes__z, m4vivaes, "vesp05_11", 0x0000, 0x010000, CRC(32100a2e) SHA1(bb7324267708a0c0850fb77885df9868954d86cd), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4vivaes__0, m4vivaes, "vesp10_11", 0x0000, 0x010000, CRC(2a1dfcb2) SHA1(7d4ef072c41779554a2b8046688957585821e356), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4vivaes__1, m4vivaes, "vesp20_11", 0x0000, 0x010000, CRC(06233420) SHA1(06101dbe871617ae6ff098e070316ec98a15b704), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 29)" ) -GAME_CUSTOM( 199?, m4vivaes__2, m4vivaes, "vetad.p1", 0x0000, 0x010000, CRC(fb9564dc) SHA1(9782d04eaec7d9c19138abf4f2dd3daa6c745c2a), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 30)" ) -GAME_CUSTOM( 199?, m4vivaes__3, m4vivaes, "vetb.p1", 0x0000, 0x010000, CRC(2a8d7beb) SHA1(e503bdc388c2ab7551cc84dd9e45b85bd2420ef8), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 31)" ) -GAME_CUSTOM( 199?, m4vivaes__4, m4vivaes, "vetbd.p1", 0x0000, 0x010000, CRC(ebaffb7d) SHA1(b54a581927fc28ce14ab9efe6fe62e074831a42a), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 32)" ) -GAME_CUSTOM( 199?, m4vivaes__5, m4vivaes, "vetd.p1", 0x0000, 0x010000, CRC(365dff45) SHA1(6ce756f1d6133e05c46e8e7b7ad554f9f512b722), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 33)" ) -GAME_CUSTOM( 199?, m4vivaes__6, m4vivaes, "vetdk.p1", 0x0000, 0x010000, CRC(5fb1ba90) SHA1(57a7f225d7bd8ed78c2ebf5d363e06b7694efc5f), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 34)" ) -GAME_CUSTOM( 199?, m4vivaes__7, m4vivaes, "vetdy.p1", 0x0000, 0x010000, CRC(100261cb) SHA1(f834c5b848059673b9e9824854e6600dae6c4499), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 35)" ) -GAME_CUSTOM( 199?, m4vivaes__8, m4vivaes, "vetk.p1", 0x0000, 0x010000, CRC(db48f34b) SHA1(013d84b27c4ea6d7b538011c22a3cd573f1d12cc), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 36)" ) -GAME_CUSTOM( 199?, m4vivaes__9, m4vivaes, "vets.p1", 0x0000, 0x010000, CRC(d7e00f9d) SHA1(df2d85ff9eae7adf662b7d8a9c6f874ec8c07183), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 37)" ) -GAME_CUSTOM( 199?, m4vivaes__aa, m4vivaes, "vety.p1", 0x0000, 0x010000, CRC(ba3b19c7) SHA1(6e9ee238ec6a272ef16ebfba0dc49bc076e741de), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 38)" ) -GAME_CUSTOM( 199?, m4vivaes__ab, m4vivaes, "viva206", 0x0000, 0x010000, CRC(76ab9a5d) SHA1(455699cbc05f744eafe58881a8fb120b24cfe5c8), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 39)" ) -GAME_CUSTOM( 199?, m4vivaes__ac, m4vivaes, "ve_05a__.3_1", 0x0000, 0x010000, CRC(92e0e121) SHA1(f32c8f1c8008794283bd32f9440e0a580f77b5b3), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 40)" ) -GAME_CUSTOM( 199?, m4vivaes__ad, m4vivaes, "ve_10a__.5_1", 0x0000, 0x010000, CRC(afdc0a2f) SHA1(ab8fec2c48db07c0aba31930893fe7211b306468), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 41)" ) -GAME_CUSTOM( 199?, m4vivaes__ae, m4vivaes, "vei05___.4_1", 0x0000, 0x010000, CRC(687a511b) SHA1(362e1d5557b6b7d551c9b9c5ef70d7944b44a3ce), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 42)" ) -GAME_CUSTOM( 199?, m4vivaes__af, m4vivaes, "vei10___.4_1", 0x0000, 0x010000, CRC(b9e2471f) SHA1(3fa561466332ed14e233d97bf9170ec08a019bd0), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 43)" ) -GAME_CUSTOM( 199?, m4vivaes__ag, m4vivaes, "vesp5.8c", 0x0000, 0x010000, CRC(266d42cf) SHA1(b1e583652d6184db2a5f03cb7ae3f694627591c8), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 44)" ) -GAME_CUSTOM( 199?, m4vivaes__ah, m4vivaes, "vesp5.8t", 0x0000, 0x010000, CRC(bf8c9dfa) SHA1(69f28d3ce04efdb89db688dbc2341d19c27c5ba8), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 45)" ) -GAME_CUSTOM( 199?, m4vivaes__ai, m4vivaes, "vesp510l", 0x0000, 0x010000, CRC(15c33530) SHA1(888625c383e52825c06cbf1e7022cd8b02bf549c), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 46)" ) -GAME_CUSTOM( 199?, m4vivaes__aj, m4vivaes, "vesp55", 0x0000, 0x010000, CRC(9cc395ef) SHA1(d62cb55664246e3fada3d971ee317eef51739018), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 47)" ) -GAME_CUSTOM( 199?, m4vivaes__ak, m4vivaes, "vesp58c", 0x0000, 0x010000, CRC(d8cc868d) SHA1(0b9fa8b61998badbd870827e32af4937548b583e), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 48)" ) -GAME_CUSTOM( 199?, m4vivaes__al, m4vivaes, "vesp_10.4", 0x0000, 0x010000, CRC(95e95339) SHA1(59633b7c01da25237342bce7e989259bf723ba6f), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 49)" ) -GAME_CUSTOM( 199?, m4vivaes__am, m4vivaes, "vesp_10.8", 0x0000, 0x010000, CRC(8054766d) SHA1(8e7fd6f8cd74d2760e2923af32813ca93fbf98e6), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 50)" ) -GAME_CUSTOM( 199?, m4vivaes__an, m4vivaes, "vesp_20_.8", 0x0000, 0x010000, CRC(35f90f05) SHA1(0013ff32c809603efdad782306140bd7086be965), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 51)" ) -GAME_CUSTOM( 199?, m4vivaes__ao, m4vivaes, "vesp_5.4", 0x0000, 0x010000, CRC(3b6762ce) SHA1(9dc53dce453a7b124ea2b65a590aff6c7d05831f), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 52)" ) -GAME_CUSTOM( 199?, m4vivaes__ap, m4vivaes, "vesp_5.8", 0x0000, 0x010000, CRC(63abf642) SHA1(6b585147a771e4bd445b525aafc25293845f660b), "Barcrest","Viva Espana (Barcrest) (MPU4) (set 53)" ) +// "(C)1993 BARCREST" and "EP8 0.1" +GAME_CUSTOM( 199?, m4vivaes, 0, "ep8s.p1", 0x0000, 0x010000, CRC(51537f2d) SHA1(a837a525cd7da724f338c47e716be175c37070b0), "Barcrest","Viva Espana (Barcrest) (MPU4) (EP8 0.1)" ) +GAME_CUSTOM( 199?, m4vivaes__a, m4vivaes, "ep8ad.p1", 0x0000, 0x010000, CRC(1591cc9b) SHA1(b7574b71955d7780f3f127670e458befad951383), "Barcrest","Viva Espana (Barcrest) (MPU4) (EP8 0.1AD)" ) +GAME_CUSTOM( 199?, m4vivaes__b, m4vivaes, "ep8b.p1", 0x0000, 0x010000, CRC(33b085b3) SHA1(5fc22ee8ae2d597392c82b09a830893bb04e1014), "Barcrest","Viva Espana (Barcrest) (MPU4) (EP8 0.1B)" ) +GAME_CUSTOM( 199?, m4vivaes__c, m4vivaes, "ep8bd.p1", 0x0000, 0x010000, CRC(d1eedaac) SHA1(9773fbb9b15dbbe313d76b0746698fbc12e26dd2), "Barcrest","Viva Espana (Barcrest) (MPU4) (EP8 0.1BD)" ) +GAME_CUSTOM( 199?, m4vivaes__d, m4vivaes, "ep8c.p1", 0x0000, 0x010000, CRC(d2a8aaf5) SHA1(7aabe3e0522877700453068c30c74cbe2c058e9a), "Barcrest","Viva Espana (Barcrest) (MPU4) (EP8 0.1C)" ) +GAME_CUSTOM( 199?, m4vivaes__e, m4vivaes, "ep8d.p1", 0x0000, 0x010000, CRC(06f87010) SHA1(636707d4077bee0ea2f221904fa0e187ea4a1e31), "Barcrest","Viva Espana (Barcrest) (MPU4) (EP8 0.1D)" ) +GAME_CUSTOM( 199?, m4vivaes__f, m4vivaes, "ep8dk.p1", 0x0000, 0x010000, CRC(e87b56da) SHA1(f3de0ab0badc9bd14505822c63f110b9b2521d55), "Barcrest","Viva Espana (Barcrest) (MPU4) (EP8 0.1KD)" ) +GAME_CUSTOM( 199?, m4vivaes__g, m4vivaes, "ep8dy.p1", 0x0000, 0x010000, CRC(d20ec7ed) SHA1(dffd4fcaf360b2b9f4b7241fe80bb6ee983b6d57), "Barcrest","Viva Espana (Barcrest) (MPU4) (EP8 0.1YD)" ) +GAME_CUSTOM( 199?, m4vivaes__h, m4vivaes, "ep8k.p1", 0x0000, 0x010000, CRC(0a2509c5) SHA1(d0fd30953cbc36363a6d4941b4a0805f9663aebb), "Barcrest","Viva Espana (Barcrest) (MPU4) (EP8 0.1K)" ) +GAME_CUSTOM( 199?, m4vivaes__i, m4vivaes, "ep8y.p1", 0x0000, 0x010000, CRC(4cc454e4) SHA1(a08ec2a4a17600eba86300dcb6b150b1b5a7fc74), "Barcrest","Viva Espana (Barcrest) (MPU4) (EP8 0.1Y)" ) +// "(C)1993 BARCREST" and "ESP 0.3" +GAME_CUSTOM( 199?, m4vivaes__k, m4vivaes, "espc.p1", 0x0000, 0x010000, CRC(9534d0d0) SHA1(8e4a1081821d472eb4d9aa01e38b6956a1388d28), "Barcrest","Viva Espana (Barcrest) (MPU4) (ESP 0.3C)" ) +GAME_CUSTOM( 199?, m4vivaes__l, m4vivaes, "espd.p1", 0x0000, 0x010000, CRC(012fbc14) SHA1(5e4a1cd7989f804ac52c7cbf46d7f9c1d7200336), "Barcrest","Viva Espana (Barcrest) (MPU4) (ESP 0.3D)" ) +GAME_CUSTOM( 199?, m4vivaes__m, m4vivaes, "espdy.p1", 0x0000, 0x010000, CRC(90efbb8e) SHA1(a7338c5d71719b86f524f35d7edd176f41383f15), "Barcrest","Viva Espana (Barcrest) (MPU4) (ESP 0.3YD)" ) +GAME_CUSTOM( 199?, m4vivaes__n, m4vivaes, "espk.p1", 0x0000, 0x010000, CRC(775a56d6) SHA1(b0e47b56315948a7162ae00c3f5197fbb7b81ec5), "Barcrest","Viva Espana (Barcrest) (MPU4) (ESP 0.3K)" ) +GAME_CUSTOM( 199?, m4vivaes__o, m4vivaes, "esps.p1", 0x0000, 0x010000, CRC(0c83b014) SHA1(e7cc513b66534b4fec89170d7b739c99a1ba3831), "Barcrest","Viva Espana (Barcrest) (MPU4) (ESP 0.3)" ) +GAME_CUSTOM( 199?, m4vivaes__p, m4vivaes, "espy.p1", 0x0000, 0x010000, CRC(020aa8bb) SHA1(497dae13fe9f9eba624db907e9f4a5bef1584a64), "Barcrest","Viva Espana (Barcrest) (MPU4) (ESP 0.3Y)" ) +// "(C)1993 BARCREST" and "ESP 0.2" +GAME_CUSTOM( 199?, m4vivaes__aq, m4vivaes, "vspa20st", 0x0000, 0x010000, CRC(267388eb) SHA1(2621724ebdd5031fc513692ff90989bf3b6115d1), "Barcrest","Viva Espana (Barcrest) (MPU4) (ESP 0.2)" ) +// "(C)1993 BARCREST" and "VE5 0.2" +GAME_CUSTOM( 199?, m4vivaes__q, m4vivaes, "ve5ad.p1", 0x0000, 0x010000, CRC(c545d5f0) SHA1(6ad168d2c1f2da2fff85fe0e21a3191cba8f5838), "Barcrest","Viva Espana (Barcrest) (MPU4) (VE5 0.2AD)" ) +GAME_CUSTOM( 199?, m4vivaes__r, m4vivaes, "ve5b.p1", 0x0000, 0x010000, CRC(ed02fa94) SHA1(9980b2f78ea8f40715e77fd8fafe883739ac1165), "Barcrest","Viva Espana (Barcrest) (MPU4) (VE5 0.2B)" ) +GAME_CUSTOM( 199?, m4vivaes__s, m4vivaes, "ve5bd.p1", 0x0000, 0x010000, CRC(fce73b5c) SHA1(35e635ade9b4a7a992c568e317190d12576f78c9), "Barcrest","Viva Espana (Barcrest) (MPU4) (VE5 0.2BD)" ) +GAME_CUSTOM( 199?, m4vivaes__t, m4vivaes, "ve5d.p1", 0x0000, 0x010000, CRC(e739556d) SHA1(0816aa256cf8ac253ff37999595e981e90874d39), "Barcrest","Viva Espana (Barcrest) (MPU4) (VE5 0.2D)" ) +GAME_CUSTOM( 199?, m4vivaes__u, m4vivaes, "ve5dk.p1", 0x0000, 0x010000, CRC(64f174d0) SHA1(f51b28607715931a9d4c1c14fc71b4f8bb8e56fb), "Barcrest","Viva Espana (Barcrest) (MPU4) (VE5 0.2KD)" ) +GAME_CUSTOM( 199?, m4vivaes__v, m4vivaes, "ve5dy.p1", 0x0000, 0x010000, CRC(fe6339c6) SHA1(82f14d80e96b65eeea08f1029ffaebf2e505091e), "Barcrest","Viva Espana (Barcrest) (MPU4) (VE5 0.2YD)" ) +GAME_CUSTOM( 199?, m4vivaes__w, m4vivaes, "ve5k.p1", 0x0000, 0x010000, CRC(05428018) SHA1(b6884a1bfd2cf8268258d3d9a8d2c482ba92e5af), "Barcrest","Viva Espana (Barcrest) (MPU4) (VE5 0.2K)" ) +GAME_CUSTOM( 199?, m4vivaes__x, m4vivaes, "ve5s.p1", 0x0000, 0x010000, CRC(65df6cf1) SHA1(26eadbad30b93df6dfd37f984be2dec77f1d6442), "Barcrest","Viva Espana (Barcrest) (MPU4) (VE5 0.2)" ) +GAME_CUSTOM( 199?, m4vivaes__y, m4vivaes, "ve5y.p1", 0x0000, 0x010000, CRC(2fe06579) SHA1(9e11b371edd8fab78e9594ed864f8eb487112150), "Barcrest","Viva Espana (Barcrest) (MPU4) (VE5 0.2Y)" ) +// "(C)1993 BARCREST" and "VET 0.2" +GAME_CUSTOM( 199?, m4vivaes__2, m4vivaes, "vetad.p1", 0x0000, 0x010000, CRC(fb9564dc) SHA1(9782d04eaec7d9c19138abf4f2dd3daa6c745c2a), "Barcrest","Viva Espana (Barcrest) (MPU4) (VET 0.2AD)" ) +GAME_CUSTOM( 199?, m4vivaes__3, m4vivaes, "vetb.p1", 0x0000, 0x010000, CRC(2a8d7beb) SHA1(e503bdc388c2ab7551cc84dd9e45b85bd2420ef8), "Barcrest","Viva Espana (Barcrest) (MPU4) (VET 0.2B)" ) +GAME_CUSTOM( 199?, m4vivaes__4, m4vivaes, "vetbd.p1", 0x0000, 0x010000, CRC(ebaffb7d) SHA1(b54a581927fc28ce14ab9efe6fe62e074831a42a), "Barcrest","Viva Espana (Barcrest) (MPU4) (VET 0.2BD)" ) +GAME_CUSTOM( 199?, m4vivaes__5, m4vivaes, "vetd.p1", 0x0000, 0x010000, CRC(365dff45) SHA1(6ce756f1d6133e05c46e8e7b7ad554f9f512b722), "Barcrest","Viva Espana (Barcrest) (MPU4) (VET 0.2D)" ) +GAME_CUSTOM( 199?, m4vivaes__6, m4vivaes, "vetdk.p1", 0x0000, 0x010000, CRC(5fb1ba90) SHA1(57a7f225d7bd8ed78c2ebf5d363e06b7694efc5f), "Barcrest","Viva Espana (Barcrest) (MPU4) (VET 0.2KD)" ) +GAME_CUSTOM( 199?, m4vivaes__7, m4vivaes, "vetdy.p1", 0x0000, 0x010000, CRC(100261cb) SHA1(f834c5b848059673b9e9824854e6600dae6c4499), "Barcrest","Viva Espana (Barcrest) (MPU4) (VET 0.2YD)" ) +GAME_CUSTOM( 199?, m4vivaes__8, m4vivaes, "vetk.p1", 0x0000, 0x010000, CRC(db48f34b) SHA1(013d84b27c4ea6d7b538011c22a3cd573f1d12cc), "Barcrest","Viva Espana (Barcrest) (MPU4) (VET 0.2K)" ) +GAME_CUSTOM( 199?, m4vivaes__9, m4vivaes, "vets.p1", 0x0000, 0x010000, CRC(d7e00f9d) SHA1(df2d85ff9eae7adf662b7d8a9c6f874ec8c07183), "Barcrest","Viva Espana (Barcrest) (MPU4) (VET 0.2)" ) +GAME_CUSTOM( 199?, m4vivaes__aa, m4vivaes, "vety.p1", 0x0000, 0x010000, CRC(ba3b19c7) SHA1(6e9ee238ec6a272ef16ebfba0dc49bc076e741de), "Barcrest","Viva Espana (Barcrest) (MPU4) (VET 0.2Y)" ) +// a lot of the Bwb sets just give characterizer alarm (different protection? hacks?) some boot, 2 boot without scrambled reels, so are probably hacked to not use the characterizer +// "(C)1995 B.W.B." and "VE5 6.0" +GAME_CUSTOM( 199?, m4vivaes__ai, m4vivaes, "vesp510l", 0x0000, 0x010000, CRC(15c33530) SHA1(888625c383e52825c06cbf1e7022cd8b02bf549c), "Bwb","Viva Espana (Barcrest) (MPU4) (VE5 6.0C, set 1)" ) +GAME_CUSTOM( 199?, m4vivaes__aj, m4vivaes, "vesp55", 0x0000, 0x010000, CRC(9cc395ef) SHA1(d62cb55664246e3fada3d971ee317eef51739018), "Bwb","Viva Espana (Barcrest) (MPU4) (VE5 6.0C, set 2)" ) +GAME_CUSTOM( 199?, m4vivaes__ag, m4vivaes, "vesp5.8c", 0x0000, 0x010000, CRC(266d42cf) SHA1(b1e583652d6184db2a5f03cb7ae3f694627591c8), "Bwb / hack?","Viva Espana (Barcrest) (MPU4) (VE5 6.0C, set 3)" ) // reels don't seem scrambled on this, hack / bootleg? +GAME_CUSTOM( 199?, m4vivaes__ah, m4vivaes, "vesp5.8t", 0x0000, 0x010000, CRC(bf8c9dfa) SHA1(69f28d3ce04efdb89db688dbc2341d19c27c5ba8), "Bwb / hack?","Viva Espana (Barcrest) (MPU4) (VE5 6.0)" ) // reels don't seem scrambled on this, hack / bootleg? +// "(C)1995 B.W.B." and "VE5 5.0" +GAME_CUSTOM( 199?, m4vivaes__z, m4vivaes, "vesp05_11", 0x0000, 0x010000, CRC(32100a2e) SHA1(bb7324267708a0c0850fb77885df9868954d86cd), "Bwb","Viva Espana (Barcrest) (MPU4) (VE5 5.0, set 1)" ) +GAME_CUSTOM( 199?, m4vivaes__ao, m4vivaes, "vesp_5.4", 0x0000, 0x010000, CRC(3b6762ce) SHA1(9dc53dce453a7b124ea2b65a590aff6c7d05831f), "Bwb","Viva Espana (Barcrest) (MPU4) (VE5 5.0, set 2)" ) +GAME_CUSTOM( 199?, m4vivaes__ap, m4vivaes, "vesp_5.8", 0x0000, 0x010000, CRC(63abf642) SHA1(6b585147a771e4bd445b525aafc25293845f660b), "Bwb","Viva Espana (Barcrest) (MPU4) (VE5 5.0, set 3)" ) +// "(C)1995 B.W.B." and "VE105.0" +GAME_CUSTOM( 199?, m4vivaes__am, m4vivaes, "vesp_10.8", 0x0000, 0x010000, CRC(8054766d) SHA1(8e7fd6f8cd74d2760e2923af32813ca93fbf98e6), "Bwb","Viva Espana (Barcrest) (MPU4) (VE105.0, set 1)" ) +GAME_CUSTOM( 199?, m4vivaes__al, m4vivaes, "vesp_10.4", 0x0000, 0x010000, CRC(95e95339) SHA1(59633b7c01da25237342bce7e989259bf723ba6f), "Bwb","Viva Espana (Barcrest) (MPU4) (VE105.0, set 2)" ) +GAME_CUSTOM( 199?, m4vivaes__0, m4vivaes, "vesp10_11", 0x0000, 0x010000, CRC(2a1dfcb2) SHA1(7d4ef072c41779554a2b8046688957585821e356), "Bwb","Viva Espana (Barcrest) (MPU4) (VE105.0, set 3)" ) +GAME_CUSTOM( 199?, m4vivaes__ad, m4vivaes, "ve_10a__.5_1", 0x0000, 0x010000, CRC(afdc0a2f) SHA1(ab8fec2c48db07c0aba31930893fe7211b306468), "Bwb","Viva Espana (Barcrest) (MPU4) (VE105.0, set 4)" ) // boots +// "(C)1995 B.W.B." and "VE5 3.0" +GAME_CUSTOM( 199?, m4vivaes__ac, m4vivaes, "ve_05a__.3_1", 0x0000, 0x010000, CRC(92e0e121) SHA1(f32c8f1c8008794283bd32f9440e0a580f77b5b3), "Bwb","Viva Espana (Barcrest) (MPU4) (VE5 3.0)" ) // boots +// "(C)1995 B.W.B." and "VE5 4.0" +GAME_CUSTOM( 199?, m4vivaes__ae, m4vivaes, "vei05___.4_1", 0x0000, 0x010000, CRC(687a511b) SHA1(362e1d5557b6b7d551c9b9c5ef70d7944b44a3ce), "Bwb","Viva Espana (Barcrest) (MPU4) (VE5 4.0C, set 1)" ) // boots +GAME_CUSTOM( 199?, m4vivaes__ak, m4vivaes, "vesp58c", 0x0000, 0x010000, CRC(d8cc868d) SHA1(0b9fa8b61998badbd870827e32af4937548b583e), "Bwb","Viva Espana (Barcrest) (MPU4) (VE5 4.0C, set 2)" ) // boots +// "(C)1995 B.W.B." and "VE104.0" +GAME_CUSTOM( 199?, m4vivaes__af, m4vivaes, "vei10___.4_1", 0x0000, 0x010000, CRC(b9e2471f) SHA1(3fa561466332ed14e233d97bf9170ec08a019bd0), "Bwb","Viva Espana (Barcrest) (MPU4) (VE104.0)" ) // boots +// no copyright string and "8V1 0.3" +GAME_CUSTOM( 199?, m4vivaes__1, m4vivaes, "vesp20_11", 0x0000, 0x010000, CRC(06233420) SHA1(06101dbe871617ae6ff098e070316ec98a15b704), "hack", "Viva Espana (Barcrest) (MPU4) (8V1 0.3, hack, set 1)" ) +GAME_CUSTOM( 199?, m4vivaes__an, m4vivaes, "vesp_20_.8", 0x0000, 0x010000, CRC(35f90f05) SHA1(0013ff32c809603efdad782306140bd7086be965), "hack", "Viva Espana (Barcrest) (MPU4) (8V1 0.3, hack, set 2)" ) +// "(C)1997 CUCKOO" and "VE5 6.0" (hack) +GAME_CUSTOM( 199?, m4vivaes__j, m4vivaes, "5p5vivaespana6-0.bin", 0x0000, 0x010000, CRC(adf02a7b) SHA1(2c61e175b920a67098503eb4d80b07b828c9f91d), "hack", "Viva Espana (Barcrest) (MPU4) (VE5 6.0, hack)" ) #define M4POTBLK_EXTRA_ROMS \ @@ -2076,21 +2217,8 @@ GAME_CUSTOM( 199?, m4placbt__ao, m4placbt, "pyh06y.p1", 0x0000, 0x020000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4c9, 0, "c9211.p1", 0x0000, 0x010000, CRC(44e5cc87) SHA1(36fca9493d36ee6988d02da1b4c575278c43748c), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4c9__a, m4c9, "c915.hex", 0x0000, 0x010000, CRC(dabfa3f3) SHA1(f507c78e61cba74e9b776bebaf0cc4fa40b6de95), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4c9__b, m4c9, "c9210dk.p1", 0x0000, 0x010000, CRC(169a3ce4) SHA1(74d5d533c145908d17bb3e6ac6fea6e3c826ef1e), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4c9__c, m4c9, "c9510ad.p1", 0x0000, 0x010000, CRC(e1a6a573) SHA1(d653d8dce8d8df4151e2fcd8b93964e326bfbe7f), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4c9__d, m4c9, "c9510b.p1", 0x0000, 0x010000, CRC(80c1d5bb) SHA1(5928f58f7963710e4ec9043aae4f656d98888e5b), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4c9__e, m4c9, "c9510bd.p1", 0x0000, 0x010000, CRC(0aadc7d5) SHA1(143d937ef7b17d86d2e41065bb8f851b548ac8a3), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4c9__f, m4c9, "c9510d.p1", 0x0000, 0x010000, CRC(e669989f) SHA1(a9ee5e1d309585f21882681a06f064f6ed03951f), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4c9__g, m4c9, "c9510dk.p1", 0x0000, 0x010000, CRC(43be243e) SHA1(3974051fe47a192c135eceb2a7966e6a41b01a3d), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4c9__h, m4c9, "c9510dr.p1", 0x0000, 0x010000, CRC(8edf7aa6) SHA1(ac15a8c1d0e24cc99452b560b68a664e16e8d82f), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4c9__i, m4c9, "c9510dy.p1", 0x0000, 0x010000, CRC(b0ffae04) SHA1(81921a45a06c38a5391ed3edec57da74b220a181), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4c9__j, m4c9, "c9510k.p1", 0x0000, 0x010000, CRC(665b330a) SHA1(75fe5fbe6f3b11a21092f6d18f7f50980c92febe), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4c9__k, m4c9, "c9510r.p1", 0x0000, 0x010000, CRC(a9f25224) SHA1(3fe4091b27a2d789a8c5d00cb4fc00289639588f), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4c9__l, m4c9, "c9510s.p1", 0x0000, 0x010000, CRC(dc70433e) SHA1(86f158909fea49baf4239821ccf092d8ef1027b7), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4c9__m, m4c9, "c9510y.p1", 0x0000, 0x010000, CRC(3a93bc6a) SHA1(2832b48b6391746dbcea3484715dd6a169c081af), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4c9__n, m4c9, "clnv.p1", 0x0000, 0x010000, CRC(486097d8) SHA1(33e9eab0fb1c750160a8cb2b75eca73145d6956e), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 15)" ) +// "(C)1991 BARCREST" and "C92 1.1" +GAME_CUSTOM( 199?, m4c9, 0, "c9211.p1", 0x0000, 0x010000, CRC(44e5cc87) SHA1(36fca9493d36ee6988d02da1b4c575278c43748c), "Barcrest","Cloud Nine (Barcrest) (MPU4) (C92 1.1)" ) GAME_CUSTOM( 199?, m4c9__o, m4c9, "c9211ad.p1", 0x0000, 0x010000, CRC(dcabab11) SHA1(d73f33da37decfc403975a844916b49d527ee8f8), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 16)" ) GAME_CUSTOM( 199?, m4c9__p, m4c9, "c9211b.p1", 0x0000, 0x010000, CRC(2f10f98b) SHA1(4add53d98f31f4a8bedb621906e91e92622d2c95), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 17)" ) GAME_CUSTOM( 199?, m4c9__q, m4c9, "c9211bd.p1", 0x0000, 0x010000, CRC(6dc2add7) SHA1(26a2b9cd629132d7ba48c9ea3476c574006ad4af), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 18)" ) @@ -2102,18 +2230,8 @@ GAME_CUSTOM( 199?, m4c9__v, m4c9, "c9211dy.p1", 0x0000, 0x010000, CRC(a8a GAME_CUSTOM( 199?, m4c9__w, m4c9, "c9211k.p1", 0x0000, 0x010000, CRC(4f9b6b6d) SHA1(5722c0698c3915eb380b24468539dccad6978218), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 24)" ) GAME_CUSTOM( 199?, m4c9__x, m4c9, "c9211r.p1", 0x0000, 0x010000, CRC(43f8b759) SHA1(cb0f731f1584e4d23602d276c085b31be6966bb1), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 25)" ) GAME_CUSTOM( 199?, m4c9__y, m4c9, "c9211y.p1", 0x0000, 0x010000, CRC(de939fb7) SHA1(a305bdf247f498f86cd681fba7d0593a668067c7), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4c9__z, m4c9, "ct202ad.p1", 0x0000, 0x010000, CRC(c8484dfd) SHA1(778fc30597b942fd75f5230ef3193b9f599abd03), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4c9__0, m4c9, "ct202b.p1", 0x0000, 0x010000, CRC(b7c611aa) SHA1(d7d4e7d4d06e7198424206b8259ca66cc06062bb), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4c9__1, m4c9, "ct202bd.p1", 0x0000, 0x010000, CRC(fe5420b7) SHA1(f443f1669b4f263b678526e2890671ad4e5848be), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 29)" ) -GAME_CUSTOM( 199?, m4c9__2, m4c9, "ct202c.p1", 0x0000, 0x010000, CRC(a0997fbb) SHA1(52d6172d6b737a65d24d6750847ccf2797eb54d4), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 30)" ) -GAME_CUSTOM( 199?, m4c9__3, m4c9, "ct202d.p1", 0x0000, 0x010000, CRC(5811f1a2) SHA1(87614b915aa697869739026bf45f53574123c6f2), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 31)" ) -GAME_CUSTOM( 199?, m4c9__4, m4c9, "ct202dk.p1", 0x0000, 0x010000, CRC(58857027) SHA1(bcb37032237c7542bfde915de815eb93b5def43e), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 32)" ) -GAME_CUSTOM( 199?, m4c9__5, m4c9, "ct202dr.p1", 0x0000, 0x010000, CRC(b2769912) SHA1(b3030c07a07774462e956201b5843e366df39c47), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 33)" ) -GAME_CUSTOM( 199?, m4c9__6, m4c9, "ct202dy.p1", 0x0000, 0x010000, CRC(47aa690b) SHA1(a3fd71dae7a94402641048b5e986f13347bc28ac), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 34)" ) -GAME_CUSTOM( 199?, m4c9__7, m4c9, "ct202k.p1", 0x0000, 0x010000, CRC(990cf3cd) SHA1(13d29f3111d193e8cca45d8319f8657066b2ac8a), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 35)" ) -GAME_CUSTOM( 199?, m4c9__8, m4c9, "ct202r.p1", 0x0000, 0x010000, CRC(0da3e958) SHA1(37760de8134e9298212ddebaebe79a08016da7e9), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 36)" ) -GAME_CUSTOM( 199?, m4c9__9, m4c9, "ct202s.p1", 0x0000, 0x010000, CRC(19214c6e) SHA1(93c8c40fd7b3a8873715e7bee88a09a995b44b28), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 37)" ) -GAME_CUSTOM( 199?, m4c9__aa, m4c9, "ct202y.p1", 0x0000, 0x010000, CRC(79362dcc) SHA1(80782ddb98f896101fa89f77ce76aa6f63391645), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 38)" ) +// "(C)1991 BARCREST" and "CT3 0.2" +GAME_CUSTOM( 199?, m4c9__a, m4c9, "c915.hex", 0x0000, 0x010000, CRC(dabfa3f3) SHA1(f507c78e61cba74e9b776bebaf0cc4fa40b6de95), "Barcrest","Cloud Nine (Barcrest) (MPU4) (CT3 0.2)" ) GAME_CUSTOM( 199?, m4c9__ab, m4c9, "ct302ad.p1", 0x0000, 0x010000, CRC(2f29a7e9) SHA1(059f73b6a9c2a1d8f9b8bbef9050c61c2d4f13bb), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 39)" ) GAME_CUSTOM( 199?, m4c9__ac, m4c9, "ct302b.p1", 0x0000, 0x010000, CRC(1e677623) SHA1(c6ee2686f853626e390f28a611e8861cc8f935b0), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 40)" ) GAME_CUSTOM( 199?, m4c9__ad, m4c9, "ct302bd.p1", 0x0000, 0x010000, CRC(70e60d8f) SHA1(139d92aa978df03af7b7913b6d4e56b211e9ddba), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 41)" ) @@ -2125,6 +2243,37 @@ GAME_CUSTOM( 199?, m4c9__ai, m4c9, "ct302dy.p1", 0x0000, 0x010000, CRC(8da GAME_CUSTOM( 199?, m4c9__aj, m4c9, "ct302k.p1", 0x0000, 0x010000, CRC(cfb85369) SHA1(c5726477aeea5a70e8eef74e57732fe85abea737), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 47)" ) GAME_CUSTOM( 199?, m4c9__ak, m4c9, "ct302r.p1", 0x0000, 0x010000, CRC(10c64611) SHA1(d85df4ca0fc13ddab219a5602019e54471b83aaf), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 48)" ) GAME_CUSTOM( 199?, m4c9__al, m4c9, "ct302y.p1", 0x0000, 0x010000, CRC(46514a44) SHA1(71e698c88488a67e94c322cb393f637c7e35d633), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 49)" ) +// "(C)1991 BARCREST" and "C92 1.0" +GAME_CUSTOM( 199?, m4c9__b, m4c9, "c9210dk.p1", 0x0000, 0x010000, CRC(169a3ce4) SHA1(74d5d533c145908d17bb3e6ac6fea6e3c826ef1e), "Barcrest","Cloud Nine (Barcrest) (MPU4) (C92 1.0KD)" ) +// "(C)1991 BARCREST" and "C95 1.0" +GAME_CUSTOM( 199?, m4c9__l, m4c9, "c9510s.p1", 0x0000, 0x010000, CRC(dc70433e) SHA1(86f158909fea49baf4239821ccf092d8ef1027b7), "Barcrest","Cloud Nine (Barcrest) (MPU4) (C95 1.0)" ) +GAME_CUSTOM( 199?, m4c9__c, m4c9, "c9510ad.p1", 0x0000, 0x010000, CRC(e1a6a573) SHA1(d653d8dce8d8df4151e2fcd8b93964e326bfbe7f), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4c9__d, m4c9, "c9510b.p1", 0x0000, 0x010000, CRC(80c1d5bb) SHA1(5928f58f7963710e4ec9043aae4f656d98888e5b), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4c9__e, m4c9, "c9510bd.p1", 0x0000, 0x010000, CRC(0aadc7d5) SHA1(143d937ef7b17d86d2e41065bb8f851b548ac8a3), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4c9__f, m4c9, "c9510d.p1", 0x0000, 0x010000, CRC(e669989f) SHA1(a9ee5e1d309585f21882681a06f064f6ed03951f), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4c9__g, m4c9, "c9510dk.p1", 0x0000, 0x010000, CRC(43be243e) SHA1(3974051fe47a192c135eceb2a7966e6a41b01a3d), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 8)" ) +GAME_CUSTOM( 199?, m4c9__h, m4c9, "c9510dr.p1", 0x0000, 0x010000, CRC(8edf7aa6) SHA1(ac15a8c1d0e24cc99452b560b68a664e16e8d82f), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 9)" ) +GAME_CUSTOM( 199?, m4c9__i, m4c9, "c9510dy.p1", 0x0000, 0x010000, CRC(b0ffae04) SHA1(81921a45a06c38a5391ed3edec57da74b220a181), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 10)" ) +GAME_CUSTOM( 199?, m4c9__j, m4c9, "c9510k.p1", 0x0000, 0x010000, CRC(665b330a) SHA1(75fe5fbe6f3b11a21092f6d18f7f50980c92febe), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 11)" ) +GAME_CUSTOM( 199?, m4c9__k, m4c9, "c9510r.p1", 0x0000, 0x010000, CRC(a9f25224) SHA1(3fe4091b27a2d789a8c5d00cb4fc00289639588f), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 12)" ) +GAME_CUSTOM( 199?, m4c9__m, m4c9, "c9510y.p1", 0x0000, 0x010000, CRC(3a93bc6a) SHA1(2832b48b6391746dbcea3484715dd6a169c081af), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 14)" ) +// "(C)1991 BARCREST" and "CLN 4.0" +GAME_CUSTOM( 199?, m4c9__n, m4c9, "clnv.p1", 0x0000, 0x010000, CRC(486097d8) SHA1(33e9eab0fb1c750160a8cb2b75eca73145d6956e), "Barcrest","Cloud Nine (Barcrest) (MPU4) (CLN 4.0V)" ) +// "(C)1991 BARCREST" and "CT2 0.2" +GAME_CUSTOM( 199?, m4c9__9, m4c9, "ct202s.p1", 0x0000, 0x010000, CRC(19214c6e) SHA1(93c8c40fd7b3a8873715e7bee88a09a995b44b28), "Barcrest","Cloud Nine (Barcrest) (MPU4) (CT2 0.2)" ) +GAME_CUSTOM( 199?, m4c9__z, m4c9, "ct202ad.p1", 0x0000, 0x010000, CRC(c8484dfd) SHA1(778fc30597b942fd75f5230ef3193b9f599abd03), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 27)" ) +GAME_CUSTOM( 199?, m4c9__0, m4c9, "ct202b.p1", 0x0000, 0x010000, CRC(b7c611aa) SHA1(d7d4e7d4d06e7198424206b8259ca66cc06062bb), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 28)" ) +GAME_CUSTOM( 199?, m4c9__1, m4c9, "ct202bd.p1", 0x0000, 0x010000, CRC(fe5420b7) SHA1(f443f1669b4f263b678526e2890671ad4e5848be), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 29)" ) +GAME_CUSTOM( 199?, m4c9__2, m4c9, "ct202c.p1", 0x0000, 0x010000, CRC(a0997fbb) SHA1(52d6172d6b737a65d24d6750847ccf2797eb54d4), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 30)" ) +GAME_CUSTOM( 199?, m4c9__3, m4c9, "ct202d.p1", 0x0000, 0x010000, CRC(5811f1a2) SHA1(87614b915aa697869739026bf45f53574123c6f2), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 31)" ) +GAME_CUSTOM( 199?, m4c9__4, m4c9, "ct202dk.p1", 0x0000, 0x010000, CRC(58857027) SHA1(bcb37032237c7542bfde915de815eb93b5def43e), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 32)" ) +GAME_CUSTOM( 199?, m4c9__5, m4c9, "ct202dr.p1", 0x0000, 0x010000, CRC(b2769912) SHA1(b3030c07a07774462e956201b5843e366df39c47), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 33)" ) +GAME_CUSTOM( 199?, m4c9__6, m4c9, "ct202dy.p1", 0x0000, 0x010000, CRC(47aa690b) SHA1(a3fd71dae7a94402641048b5e986f13347bc28ac), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 34)" ) +GAME_CUSTOM( 199?, m4c9__7, m4c9, "ct202k.p1", 0x0000, 0x010000, CRC(990cf3cd) SHA1(13d29f3111d193e8cca45d8319f8657066b2ac8a), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 35)" ) +GAME_CUSTOM( 199?, m4c9__8, m4c9, "ct202r.p1", 0x0000, 0x010000, CRC(0da3e958) SHA1(37760de8134e9298212ddebaebe79a08016da7e9), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 36)" ) +GAME_CUSTOM( 199?, m4c9__aa, m4c9, "ct202y.p1", 0x0000, 0x010000, CRC(79362dcc) SHA1(80782ddb98f896101fa89f77ce76aa6f63391645), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 38)" ) +// "(C)1991 BARCREST" and "CT5 0.2" +GAME_CUSTOM( 199?, m4c9__aw, m4c9, "ct502s.p1", 0x0000, 0x010000, CRC(cb02b9e7) SHA1(786c64abd0b9c5dc23b1508a2527e87e385acfa9), "Barcrest","Cloud Nine (Barcrest) (MPU4) (CT5 0.2)" ) GAME_CUSTOM( 199?, m4c9__am, m4c9, "ct502ad.p1", 0x0000, 0x010000, CRC(ff0ec7a7) SHA1(80ddc21a0df33aaa1c76ed5f57598494a1c36c5a), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 50)" ) GAME_CUSTOM( 199?, m4c9__an, m4c9, "ct502b.p1", 0x0000, 0x010000, CRC(2585dc82) SHA1(10ee12ecc6dfc09f9f9993b2fce837b0989c19ee), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 51)" ) GAME_CUSTOM( 199?, m4c9__ao, m4c9, "ct502bd.p1", 0x0000, 0x010000, CRC(0d80572d) SHA1(6dfb48438accef039e2de12962ad826eaa3caee4), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 52)" ) @@ -2135,14 +2284,15 @@ GAME_CUSTOM( 199?, m4c9__as, m4c9, "ct502dr.p1", 0x0000, 0x010000, CRC(0e8 GAME_CUSTOM( 199?, m4c9__at, m4c9, "ct502dy.p1", 0x0000, 0x010000, CRC(54d27491) SHA1(ba4474f98474da828ebc7bf9db52ead05df0cdfc), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 57)" ) GAME_CUSTOM( 199?, m4c9__au, m4c9, "ct502k.p1", 0x0000, 0x010000, CRC(f53ee613) SHA1(678f59b923054e6d91ea1bd91515b6522f192a8c), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 58)" ) GAME_CUSTOM( 199?, m4c9__av, m4c9, "ct502r.p1", 0x0000, 0x010000, CRC(b678557d) SHA1(fbf3c367d40d2f914906eb7cd7e95713bfe7fc30), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 59)" ) -GAME_CUSTOM( 199?, m4c9__aw, m4c9, "ct502s.p1", 0x0000, 0x010000, CRC(cb02b9e7) SHA1(786c64abd0b9c5dc23b1508a2527e87e385acfa9), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 60)" ) GAME_CUSTOM( 199?, m4c9__ax, m4c9, "ct502y.p1", 0x0000, 0x010000, CRC(f4cc4dc9) SHA1(d23757467830dfbdeed2a52a0c7e31276124d24d), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 61)" ) -GAME_CUSTOM( 199?, m4c9__ay, m4c9, "c9o02__1.1", 0x0000, 0x010000, CRC(109f7040) SHA1(3fe9da13d9746e1cdaf6dcd539e4af624d2cec71), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 62)" ) -GAME_CUSTOM( 199?, m4c9__az, m4c9, "c9o05__1.1", 0x0000, 0x010000, CRC(2c821aa8) SHA1(33fba7dea0f66e7b0251971864d5a2923f96f8cd), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 63)" ) -GAME_CUSTOM( 199?, m4c9__a0, m4c9, "c9o10__1.1", 0x0000, 0x010000, CRC(c5063185) SHA1(ca98038ccd85ebc370cacce8583ddbc1f759558d), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 64)" ) -GAME_CUSTOM( 199?, m4c9__a1, m4c9, "c9o10d_1.1", 0x0000, 0x010000, CRC(6b20b16d) SHA1(15079fc5f14f545c291d357a795e6b41ca1d5a47), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 65)" ) -GAME_CUSTOM( 199?, m4c9__a2, m4c9, "c9o20__1.1", 0x0000, 0x010000, CRC(e05fa532) SHA1(63d070416a4e6979302901bb33e20c994cb3723e), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 66)" ) -GAME_CUSTOM( 199?, m4c9__a3, m4c9, "c9o20d_1.1", 0x0000, 0x010000, CRC(047b2d83) SHA1(b83f8fe6477226ef3e75f406020ea4f8b3d55c32), "Barcrest","Cloud Nine (Barcrest) (MPU4) (set 67)" ) +// "(C)1993 B.W.B." and "SC9 5.0" +GAME_CUSTOM( 199?, m4c9__a2, m4c9, "c9o20__1.1", 0x0000, 0x010000, CRC(e05fa532) SHA1(63d070416a4e6979302901bb33e20c994cb3723e), "Bwb","Cloud Nine (Barcrest) (MPU4) (SC9 5.0)" ) +GAME_CUSTOM( 199?, m4c9__a3, m4c9, "c9o20d_1.1", 0x0000, 0x010000, CRC(047b2d83) SHA1(b83f8fe6477226ef3e75f406020ea4f8b3d55c32), "Bwb","Cloud Nine (Barcrest) (MPU4) (SC9 5.0D)" ) +// no copyright string and "SC9 1.0" (hack or early Bwb set?) +GAME_CUSTOM( 199?, m4c9__ay, m4c9, "c9o02__1.1", 0x0000, 0x010000, CRC(109f7040) SHA1(3fe9da13d9746e1cdaf6dcd539e4af624d2cec71), "hack?","Cloud Nine (Barcrest) (MPU4) (SC9 1.0, hack?, set 1)" ) +GAME_CUSTOM( 199?, m4c9__az, m4c9, "c9o05__1.1", 0x0000, 0x010000, CRC(2c821aa8) SHA1(33fba7dea0f66e7b0251971864d5a2923f96f8cd), "hack?","Cloud Nine (Barcrest) (MPU4) (SC9 1.0, hack?, set 2)" ) +GAME_CUSTOM( 199?, m4c9__a0, m4c9, "c9o10__1.1", 0x0000, 0x010000, CRC(c5063185) SHA1(ca98038ccd85ebc370cacce8583ddbc1f759558d), "hack?","Cloud Nine (Barcrest) (MPU4) (SC9 1.0, hack?, set 3)" ) +GAME_CUSTOM( 199?, m4c9__a1, m4c9, "c9o10d_1.1", 0x0000, 0x010000, CRC(6b20b16d) SHA1(15079fc5f14f545c291d357a795e6b41ca1d5a47), "hack?","Cloud Nine (Barcrest) (MPU4) (SC9 1.0, hack?, set 4)" ) #define M4TUTFRT_EXTRA_ROMS \ @@ -2163,50 +2313,8 @@ GAME_CUSTOM( 199?, m4c9__a3, m4c9, "c9o20d_1.1", 0x0000, 0x010000, CRC(047 ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4tutfrt, 0, "tft04s.p1", 0x0000, 0x010000, CRC(c20c3589) SHA1(55d1bc5d5f4ae14acafb36bd640faaf4ffccc6eb), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4tutfrt__a, m4tutfrt, "ctuad.p1", 0x0000, 0x010000, CRC(0ec1661b) SHA1(162ddc30c341fd8eda8ce57a60edf06b4e39a24f), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4tutfrt__b, m4tutfrt, "ctub.p1", 0x0000, 0x010000, CRC(f4289621) SHA1(a4078552146c88c05845cbdcd551e4564840fea4), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4tutfrt__c, m4tutfrt, "ctubd.p1", 0x0000, 0x010000, CRC(38dd0b51) SHA1(04df9511f366cc575a1a06d3a5d60ec0245f64a7), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4tutfrt__d, m4tutfrt, "ctud.p1", 0x0000, 0x010000, CRC(6033fae5) SHA1(f5bdd1821344d4546eea8caa52d76e3bd509810e), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4tutfrt__e, m4tutfrt, "ctudk.p1", 0x0000, 0x010000, CRC(36dd1e41) SHA1(ad5ad7cae12634149d38e286e6873b81bda52871), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4tutfrt__f, m4tutfrt, "ctudy.p1", 0x0000, 0x010000, CRC(58c02db6) SHA1(faf85caeaa0678b5771d801cf3d9645d7767767c), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4tutfrt__g, m4tutfrt, "ctuk.p1", 0x0000, 0x010000, CRC(4c247447) SHA1(f5aebb4a75632c9a74dca1f3e9559399c89ac679), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4tutfrt__h, m4tutfrt, "ctur.p1", 0x0000, 0x010000, CRC(705a2b52) SHA1(40b0738146d073f93877a15f63830ff3e07814c1), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4tutfrt__i, m4tutfrt, "ctus.p1", 0x0000, 0x010000, CRC(1b282170) SHA1(e3082aed6e96587de56c5593d32d0129c47fe667), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4tutfrt__j, m4tutfrt, "ctuy.p1", 0x0000, 0x010000, CRC(ed3103bc) SHA1(eefb72728e026fad3dd031665510ee0aba23e14b), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4tutfrt__k, m4tutfrt, "f1u01ad.p1", 0x0000, 0x010000, CRC(7573d8cf) SHA1(fe1553ca8f588554fdd495dc2f048e50e00590bb), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4tutfrt__l, m4tutfrt, "f1u01b.p1", 0x0000, 0x010000, CRC(158d1a3a) SHA1(da80334e9982f778a908a6fe89a593863e7c763e), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4tutfrt__m, m4tutfrt, "f1u01bd.p1", 0x0000, 0x010000, CRC(9844e568) SHA1(a580176338cdeed5fb4d1744b537bde1f499293e), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4tutfrt__n, m4tutfrt, "f1u01c.p1", 0x0000, 0x010000, CRC(4709bd66) SHA1(c15f64767315ea0434a57b9e494a9e8090f1e05a), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4tutfrt__o, m4tutfrt, "f1u01d.p1", 0x0000, 0x010000, CRC(3a3c6745) SHA1(f270bccb4bdedb5cfaf0130da6e480dc31889682), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4tutfrt__p, m4tutfrt, "f1u01dk.p1", 0x0000, 0x010000, CRC(4fa79f23) SHA1(ce9a0815d96a94d564edf5a775af94ea10070ff5), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4tutfrt__q, m4tutfrt, "f1u01dr.p1", 0x0000, 0x010000, CRC(6fcc4d76) SHA1(27d8fdd5965ba565cb5b6113b7cba5e820650419), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4tutfrt__r, m4tutfrt, "f1u01dy.p1", 0x0000, 0x010000, CRC(cdd43fc2) SHA1(6f4da20de3040675592b4338a1d72654800c20eb), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4tutfrt__s, m4tutfrt, "f1u01k.p1", 0x0000, 0x010000, CRC(7e9c3110) SHA1(56ab6e5362ce8795c65d0cf11742e3ddb6d8b8a3), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4tutfrt__t, m4tutfrt, "f1u01r.p1", 0x0000, 0x010000, CRC(0e6b2132) SHA1(8757713677e2eb0400c69d3cdde6506662e0ef0b), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4tutfrt__u, m4tutfrt, "f1u01s.p1", 0x0000, 0x010000, CRC(d69668d2) SHA1(86ea656a3a4d4e6701c70b5e730ae8402cd70342), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4tutfrt__v, m4tutfrt, "f1u01y.p1", 0x0000, 0x010000, CRC(33e7d5fd) SHA1(96f53fbb228e98ce3a848b2c72bdb8876c9de160), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4tutfrt__w, m4tutfrt, "f3u01ad.p1", 0x0000, 0x010000, CRC(acb1bfb3) SHA1(8aa22c45d98ecec324fa031b46689496f9a2842c), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4tutfrt__x, m4tutfrt, "f3u01b.p1", 0x0000, 0x010000, CRC(a0d14e25) SHA1(16f2444334608702748a3b0b2556ac1a7760615a), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4tutfrt__y, m4tutfrt, "f3u01bd.p1", 0x0000, 0x010000, CRC(9aadd2f9) SHA1(4dbff4f6fd4d02778733eb846a354177f0e204a5), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4tutfrt__z, m4tutfrt, "f3u01c.p1", 0x0000, 0x010000, CRC(a3ad34d5) SHA1(e8c435f80b4fd3f7af16f341e107a85a33f1fe1c), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4tutfrt__0, m4tutfrt, "f3u01d.p1", 0x0000, 0x010000, CRC(c6790301) SHA1(fb0b619e75e1227f4d293b613e80d8d653517eec), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4tutfrt__1, m4tutfrt, "f3u01dk.p1", 0x0000, 0x010000, CRC(ee0554fe) SHA1(12cd26d6205fec35590fd23682c578f06466eb01), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 29)" ) -GAME_CUSTOM( 199?, m4tutfrt__2, m4tutfrt, "f3u01dr.p1", 0x0000, 0x010000, CRC(32d761eb) SHA1(aa1098629d2a1c98c606a71a7cf0ae97f381aebe), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 30)" ) -GAME_CUSTOM( 199?, m4tutfrt__3, m4tutfrt, "f3u01dy.p1", 0x0000, 0x010000, CRC(3ad66969) SHA1(4c79edc52095cfa1fae8215caaaaf434cd38199d), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 31)" ) -GAME_CUSTOM( 199?, m4tutfrt__4, m4tutfrt, "f3u01k.p1", 0x0000, 0x010000, CRC(2b6c0f0f) SHA1(64e50adc6656225c9cdaaee64ae59cafcd1623ee), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 32)" ) -GAME_CUSTOM( 199?, m4tutfrt__5, m4tutfrt, "f3u01r.p1", 0x0000, 0x010000, CRC(93cb1bfb) SHA1(e29439caed4a2f4512e50ff158427b61b5a9c4a9), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 33)" ) -GAME_CUSTOM( 199?, m4tutfrt__6, m4tutfrt, "f3u01s.p1", 0x0000, 0x010000, CRC(dce2e5be) SHA1(3c218cdb939d5b7cc650c820737ae3ac653435ce), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 34)" ) -GAME_CUSTOM( 199?, m4tutfrt__7, m4tutfrt, "f3u01y.p1", 0x0000, 0x010000, CRC(9aae0ca2) SHA1(83192225d886848ee0320973fb9dbd85cf9045b8), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 35)" ) -GAME_CUSTOM( 199?, m4tutfrt__8, m4tutfrt, "tf4ad.p1", 0x0000, 0x010000, CRC(6ddc90a9) SHA1(76dd22c5e65fc46360123e200016d11a8946d2f3), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 36)" ) -GAME_CUSTOM( 199?, m4tutfrt__9, m4tutfrt, "tf4b.p1", 0x0000, 0x010000, CRC(c3a70eac) SHA1(ea5a39e33af96e84ce0ea184850d5f580dbf19ce), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 37)" ) -GAME_CUSTOM( 199?, m4tutfrt__aa, m4tutfrt, "tf4bd.p1", 0x0000, 0x010000, CRC(54ae2498) SHA1(54a63a0de794eb2ce321f79b09a56485d9e77715), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 38)" ) -GAME_CUSTOM( 199?, m4tutfrt__ab, m4tutfrt, "tf4d.p1", 0x0000, 0x010000, CRC(d8ff9045) SHA1(ae7307212614c6f1b4e3d72d3a1ae68ca1d0b470), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 39)" ) -GAME_CUSTOM( 199?, m4tutfrt__ac, m4tutfrt, "tf4dk.p1", 0x0000, 0x010000, CRC(a2e3b67f) SHA1(dea9958caba08b5cdec6eec9e4c17038ecb0ca55), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 40)" ) -GAME_CUSTOM( 199?, m4tutfrt__ad, m4tutfrt, "tf4dy.p1", 0x0000, 0x010000, CRC(ff4f26c4) SHA1(21ef226bf92deeab15c9368d707bf75b7104e7c3), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 41)" ) -GAME_CUSTOM( 199?, m4tutfrt__ae, m4tutfrt, "tf4k.p1", 0x0000, 0x010000, CRC(1a4eb247) SHA1(f6b4c85dd8b155b672bd96ea7ee6630df773c6ca), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 42)" ) -GAME_CUSTOM( 199?, m4tutfrt__af, m4tutfrt, "tf4s.p1", 0x0000, 0x010000, CRC(2d298c58) SHA1(568c2babdb002da871df7a36d16e4f7810cac265), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 43)" ) -GAME_CUSTOM( 199?, m4tutfrt__ag, m4tutfrt, "tf4y.p1", 0x0000, 0x010000, CRC(06cd8b06) SHA1(92205e9edd42f80de67d5d6652de8ea80bc60af7), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 44)" ) +// "(C)1991 BARCREST" and "TF4 0.4" (TFT 0.4 on startup) +GAME_CUSTOM( 199?, m4tutfrt, 0, "tft04s.p1", 0x0000, 0x010000, CRC(c20c3589) SHA1(55d1bc5d5f4ae14acafb36bd640faaf4ffccc6eb), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (TFT 0.4 / TF4 0.4)" ) GAME_CUSTOM( 199?, m4tutfrt__ai, m4tutfrt, "tft04ad.p1", 0x0000, 0x010000, CRC(2994aa14) SHA1(af0e618f24cdedd14e3a347701313360d9fc73d1), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 46)" ) GAME_CUSTOM( 199?, m4tutfrt__aj, m4tutfrt, "tft04b.p1", 0x0000, 0x010000, CRC(e95eab06) SHA1(70e85e38493ac1fd30a79582bab45af5227d835a), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 47)" ) GAME_CUSTOM( 199?, m4tutfrt__ak, m4tutfrt, "tft04bd.p1", 0x0000, 0x010000, CRC(060d3572) SHA1(e78b6248d3aef6cd08f4b30e0b00bd4cf254e630), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 48)" ) @@ -2218,19 +2326,70 @@ GAME_CUSTOM( 199?, m4tutfrt__ap, m4tutfrt, "tft04dy.p1", 0x0000, 0 GAME_CUSTOM( 199?, m4tutfrt__aq, m4tutfrt, "tft04k.p1", 0x0000, 0x010000, CRC(ffbf53e1) SHA1(a003bb5d94b43d6ae9b45c599cccb0006bd8a89a), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 54)" ) GAME_CUSTOM( 199?, m4tutfrt__ar, m4tutfrt, "tft04r.p1", 0x0000, 0x010000, CRC(cbf79555) SHA1(0aacb3f28984637919294a18f40858e8f46a18b3), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 55)" ) GAME_CUSTOM( 199?, m4tutfrt__as, m4tutfrt, "tft04y.p1", 0x0000, 0x010000, CRC(569cbdbb) SHA1(8a978dfba876e5a2e12226f5fe55c29b5f079fad), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 56)" ) -GAME_CUSTOM( 199?, m4tutfrt__at, m4tutfrt, "tut25.bin", 0x0000, 0x010000, CRC(c98fb5bb) SHA1(1a3bc343a38b5978a919b454e9a2e806dce7a78a), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 57)" ) -GAME_CUSTOM( 199?, m4tutfrt__au, m4tutfrt, "tut25patched.bin", 0x0000, 0x010000, CRC(b4443cf5) SHA1(e79ec52730146f1591140555b814cbd20b5dfe78), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 58)" ) -GAME_CUSTOM( 199?, m4tutfrt__av, m4tutfrt, "tu_05___.1a3", 0x0000, 0x010000, CRC(97acc82d) SHA1(be53e60cb8a33b91a7f5556715ab4befe7170dd2), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 59)" ) -GAME_CUSTOM( 199?, m4tutfrt__aw, m4tutfrt, "tu_05_d_.1a3", 0x0000, 0x010000, CRC(33bb3018) SHA1(2c2f49c31919682ac03e61a665ce15d835e22467), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 60)" ) -GAME_CUSTOM( 199?, m4tutfrt__ax, m4tutfrt, "tu_10___.1a3", 0x0000, 0x010000, CRC(7878827f) SHA1(ac692ae50e63e632d45e7240c2520df83d2baaf5), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 61)" ) -GAME_CUSTOM( 199?, m4tutfrt__ay, m4tutfrt, "tu_20___.1a3", 0x0000, 0x010000, CRC(cada1c42) SHA1(6a4048da89a0bffeebfd21549c2d9812cc275bd5), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 62)" ) -GAME_CUSTOM( 199?, m4tutfrt__az, m4tutfrt, "tu_20_b_.1a3", 0x0000, 0x010000, CRC(a8f1bc11) SHA1(03596171540e6490133f374cca69f4fd0359952e), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 63)" ) -GAME_CUSTOM( 199?, m4tutfrt__a0, m4tutfrt, "tu_20_d_.1a3", 0x0000, 0x010000, CRC(6ecde477) SHA1(694296eb226c59069800d6936c9dee2623105db0), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 64)" ) -GAME_CUSTOM( 199?, m4tutfrt__a1, m4tutfrt, "tu_20_k_.1a3", 0x0000, 0x010000, CRC(0ce64424) SHA1(7415c9de9982aa7f15f71ef791cbd8ad5a9331d3), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 65)" ) -GAME_CUSTOM( 199?, m4tutfrt__a2, m4tutfrt, "tu_20bg_.1a3", 0x0000, 0x010000, CRC(31a6196d) SHA1(1113737dd3b209afda14ec273d923e2057ea7d99), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 66)" ) -GAME_CUSTOM( 199?, m4tutfrt__a3, m4tutfrt, "tuf20__1.0", 0x0000, 0x010000, CRC(ddadbcb6) SHA1(2d2934ec73d979de45d0998f8975361d33358dd3), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 67)" ) -GAME_CUSTOM( 199?, m4tutfrt__a4, m4tutfrt, "tuf20ad1.0", 0x0000, 0x010000, CRC(5a74ead3) SHA1(3216c8d0c67aaeb18f791a6e1f3f6e30145d6beb), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 68)" ) -GAME_CUSTOM( 199?, m4tutfrt__a5, m4tutfrt, "tui05___.1a3", 0x0000, 0x010000, CRC(42e3d400) SHA1(4cf914141dfc1f88704403b467176da77369da06), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 69)" ) +// "(C)1991 BARCREST" and "CTU 0.1" +GAME_CUSTOM( 199?, m4tutfrt__i, m4tutfrt, "ctus.p1", 0x0000, 0x010000, CRC(1b282170) SHA1(e3082aed6e96587de56c5593d32d0129c47fe667), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (CTU 0.1)" ) +GAME_CUSTOM( 199?, m4tutfrt__a, m4tutfrt, "ctuad.p1", 0x0000, 0x010000, CRC(0ec1661b) SHA1(162ddc30c341fd8eda8ce57a60edf06b4e39a24f), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 2)" ) +GAME_CUSTOM( 199?, m4tutfrt__b, m4tutfrt, "ctub.p1", 0x0000, 0x010000, CRC(f4289621) SHA1(a4078552146c88c05845cbdcd551e4564840fea4), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4tutfrt__c, m4tutfrt, "ctubd.p1", 0x0000, 0x010000, CRC(38dd0b51) SHA1(04df9511f366cc575a1a06d3a5d60ec0245f64a7), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4tutfrt__d, m4tutfrt, "ctud.p1", 0x0000, 0x010000, CRC(6033fae5) SHA1(f5bdd1821344d4546eea8caa52d76e3bd509810e), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4tutfrt__e, m4tutfrt, "ctudk.p1", 0x0000, 0x010000, CRC(36dd1e41) SHA1(ad5ad7cae12634149d38e286e6873b81bda52871), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4tutfrt__f, m4tutfrt, "ctudy.p1", 0x0000, 0x010000, CRC(58c02db6) SHA1(faf85caeaa0678b5771d801cf3d9645d7767767c), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4tutfrt__g, m4tutfrt, "ctuk.p1", 0x0000, 0x010000, CRC(4c247447) SHA1(f5aebb4a75632c9a74dca1f3e9559399c89ac679), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 8)" ) +GAME_CUSTOM( 199?, m4tutfrt__h, m4tutfrt, "ctur.p1", 0x0000, 0x010000, CRC(705a2b52) SHA1(40b0738146d073f93877a15f63830ff3e07814c1), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 9)" ) +GAME_CUSTOM( 199?, m4tutfrt__j, m4tutfrt, "ctuy.p1", 0x0000, 0x010000, CRC(ed3103bc) SHA1(eefb72728e026fad3dd031665510ee0aba23e14b), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 11)" ) +// "(C)1991 BARCREST" and "F1U 0.1" +GAME_CUSTOM( 199?, m4tutfrt__u, m4tutfrt, "f1u01s.p1", 0x0000, 0x010000, CRC(d69668d2) SHA1(86ea656a3a4d4e6701c70b5e730ae8402cd70342), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (F1U 0.1)" ) +GAME_CUSTOM( 199?, m4tutfrt__k, m4tutfrt, "f1u01ad.p1", 0x0000, 0x010000, CRC(7573d8cf) SHA1(fe1553ca8f588554fdd495dc2f048e50e00590bb), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 12)" ) +GAME_CUSTOM( 199?, m4tutfrt__l, m4tutfrt, "f1u01b.p1", 0x0000, 0x010000, CRC(158d1a3a) SHA1(da80334e9982f778a908a6fe89a593863e7c763e), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 13)" ) +GAME_CUSTOM( 199?, m4tutfrt__m, m4tutfrt, "f1u01bd.p1", 0x0000, 0x010000, CRC(9844e568) SHA1(a580176338cdeed5fb4d1744b537bde1f499293e), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 14)" ) +GAME_CUSTOM( 199?, m4tutfrt__n, m4tutfrt, "f1u01c.p1", 0x0000, 0x010000, CRC(4709bd66) SHA1(c15f64767315ea0434a57b9e494a9e8090f1e05a), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 15)" ) +GAME_CUSTOM( 199?, m4tutfrt__o, m4tutfrt, "f1u01d.p1", 0x0000, 0x010000, CRC(3a3c6745) SHA1(f270bccb4bdedb5cfaf0130da6e480dc31889682), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 16)" ) +GAME_CUSTOM( 199?, m4tutfrt__p, m4tutfrt, "f1u01dk.p1", 0x0000, 0x010000, CRC(4fa79f23) SHA1(ce9a0815d96a94d564edf5a775af94ea10070ff5), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 17)" ) +GAME_CUSTOM( 199?, m4tutfrt__q, m4tutfrt, "f1u01dr.p1", 0x0000, 0x010000, CRC(6fcc4d76) SHA1(27d8fdd5965ba565cb5b6113b7cba5e820650419), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 18)" ) +GAME_CUSTOM( 199?, m4tutfrt__r, m4tutfrt, "f1u01dy.p1", 0x0000, 0x010000, CRC(cdd43fc2) SHA1(6f4da20de3040675592b4338a1d72654800c20eb), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 19)" ) +GAME_CUSTOM( 199?, m4tutfrt__s, m4tutfrt, "f1u01k.p1", 0x0000, 0x010000, CRC(7e9c3110) SHA1(56ab6e5362ce8795c65d0cf11742e3ddb6d8b8a3), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 20)" ) +GAME_CUSTOM( 199?, m4tutfrt__t, m4tutfrt, "f1u01r.p1", 0x0000, 0x010000, CRC(0e6b2132) SHA1(8757713677e2eb0400c69d3cdde6506662e0ef0b), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 21)" ) +GAME_CUSTOM( 199?, m4tutfrt__v, m4tutfrt, "f1u01y.p1", 0x0000, 0x010000, CRC(33e7d5fd) SHA1(96f53fbb228e98ce3a848b2c72bdb8876c9de160), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 23)" ) +// "(C)1991 BARCREST" and "F3U 0.1" +GAME_CUSTOM( 199?, m4tutfrt__6, m4tutfrt, "f3u01s.p1", 0x0000, 0x010000, CRC(dce2e5be) SHA1(3c218cdb939d5b7cc650c820737ae3ac653435ce), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (F3U 0.1)" ) +GAME_CUSTOM( 199?, m4tutfrt__w, m4tutfrt, "f3u01ad.p1", 0x0000, 0x010000, CRC(acb1bfb3) SHA1(8aa22c45d98ecec324fa031b46689496f9a2842c), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 24)" ) +GAME_CUSTOM( 199?, m4tutfrt__x, m4tutfrt, "f3u01b.p1", 0x0000, 0x010000, CRC(a0d14e25) SHA1(16f2444334608702748a3b0b2556ac1a7760615a), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 25)" ) +GAME_CUSTOM( 199?, m4tutfrt__y, m4tutfrt, "f3u01bd.p1", 0x0000, 0x010000, CRC(9aadd2f9) SHA1(4dbff4f6fd4d02778733eb846a354177f0e204a5), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 26)" ) +GAME_CUSTOM( 199?, m4tutfrt__z, m4tutfrt, "f3u01c.p1", 0x0000, 0x010000, CRC(a3ad34d5) SHA1(e8c435f80b4fd3f7af16f341e107a85a33f1fe1c), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 27)" ) +GAME_CUSTOM( 199?, m4tutfrt__0, m4tutfrt, "f3u01d.p1", 0x0000, 0x010000, CRC(c6790301) SHA1(fb0b619e75e1227f4d293b613e80d8d653517eec), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 28)" ) +GAME_CUSTOM( 199?, m4tutfrt__1, m4tutfrt, "f3u01dk.p1", 0x0000, 0x010000, CRC(ee0554fe) SHA1(12cd26d6205fec35590fd23682c578f06466eb01), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 29)" ) +GAME_CUSTOM( 199?, m4tutfrt__2, m4tutfrt, "f3u01dr.p1", 0x0000, 0x010000, CRC(32d761eb) SHA1(aa1098629d2a1c98c606a71a7cf0ae97f381aebe), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 30)" ) +GAME_CUSTOM( 199?, m4tutfrt__3, m4tutfrt, "f3u01dy.p1", 0x0000, 0x010000, CRC(3ad66969) SHA1(4c79edc52095cfa1fae8215caaaaf434cd38199d), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 31)" ) +GAME_CUSTOM( 199?, m4tutfrt__4, m4tutfrt, "f3u01k.p1", 0x0000, 0x010000, CRC(2b6c0f0f) SHA1(64e50adc6656225c9cdaaee64ae59cafcd1623ee), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 32)" ) +GAME_CUSTOM( 199?, m4tutfrt__5, m4tutfrt, "f3u01r.p1", 0x0000, 0x010000, CRC(93cb1bfb) SHA1(e29439caed4a2f4512e50ff158427b61b5a9c4a9), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 33)" ) +GAME_CUSTOM( 199?, m4tutfrt__7, m4tutfrt, "f3u01y.p1", 0x0000, 0x010000, CRC(9aae0ca2) SHA1(83192225d886848ee0320973fb9dbd85cf9045b8), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 35)" ) +// "(C)1991 BARCREST" and "TF4 0.2" +GAME_CUSTOM( 199?, m4tutfrt__af, m4tutfrt, "tf4s.p1", 0x0000, 0x010000, CRC(2d298c58) SHA1(568c2babdb002da871df7a36d16e4f7810cac265), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (TF4 0.2)" ) +GAME_CUSTOM( 199?, m4tutfrt__8, m4tutfrt, "tf4ad.p1", 0x0000, 0x010000, CRC(6ddc90a9) SHA1(76dd22c5e65fc46360123e200016d11a8946d2f3), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 36)" ) +GAME_CUSTOM( 199?, m4tutfrt__9, m4tutfrt, "tf4b.p1", 0x0000, 0x010000, CRC(c3a70eac) SHA1(ea5a39e33af96e84ce0ea184850d5f580dbf19ce), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 37)" ) +GAME_CUSTOM( 199?, m4tutfrt__aa, m4tutfrt, "tf4bd.p1", 0x0000, 0x010000, CRC(54ae2498) SHA1(54a63a0de794eb2ce321f79b09a56485d9e77715), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 38)" ) +GAME_CUSTOM( 199?, m4tutfrt__ab, m4tutfrt, "tf4d.p1", 0x0000, 0x010000, CRC(d8ff9045) SHA1(ae7307212614c6f1b4e3d72d3a1ae68ca1d0b470), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 39)" ) +GAME_CUSTOM( 199?, m4tutfrt__ac, m4tutfrt, "tf4dk.p1", 0x0000, 0x010000, CRC(a2e3b67f) SHA1(dea9958caba08b5cdec6eec9e4c17038ecb0ca55), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 40)" ) +GAME_CUSTOM( 199?, m4tutfrt__ad, m4tutfrt, "tf4dy.p1", 0x0000, 0x010000, CRC(ff4f26c4) SHA1(21ef226bf92deeab15c9368d707bf75b7104e7c3), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 41)" ) +GAME_CUSTOM( 199?, m4tutfrt__ae, m4tutfrt, "tf4k.p1", 0x0000, 0x010000, CRC(1a4eb247) SHA1(f6b4c85dd8b155b672bd96ea7ee6630df773c6ca), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 42)" ) +GAME_CUSTOM( 199?, m4tutfrt__ag, m4tutfrt, "tf4y.p1", 0x0000, 0x010000, CRC(06cd8b06) SHA1(92205e9edd42f80de67d5d6652de8ea80bc60af7), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (set 44)" ) +// "I.G.T SUCKS" and "F2U 0.1" +GAME_CUSTOM( 199?, m4tutfrt__at, m4tutfrt, "tut25.bin", 0x0000, 0x010000, CRC(c98fb5bb) SHA1(1a3bc343a38b5978a919b454e9a2e806dce7a78a), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (F2U 0.1, hack, set 1)" ) +GAME_CUSTOM( 199?, m4tutfrt__au, m4tutfrt, "tut25patched.bin", 0x0000, 0x010000, CRC(b4443cf5) SHA1(e79ec52730146f1591140555b814cbd20b5dfe78), "Barcrest","Tutti Fruity (Barcrest) (MPU4) (F2U 0.1, hack, set 2)" ) + + +// I think these might be for a different game with the same name, maybe MPU4 Video. +GAME_CUSTOM( 199?, m4tutfrt__av, m4tutfrt, "tu_05___.1a3", 0x0000, 0x010000, CRC(97acc82d) SHA1(be53e60cb8a33b91a7f5556715ab4befe7170dd2), "Bwb","Tutti Fruity (Bwb) (MPU4) (set 1)" ) +GAME_CUSTOM( 199?, m4tutfrt__aw, m4tutfrt, "tu_05_d_.1a3", 0x0000, 0x010000, CRC(33bb3018) SHA1(2c2f49c31919682ac03e61a665ce15d835e22467), "Bwb","Tutti Fruity (Bwb) (MPU4) (set 2)" ) +GAME_CUSTOM( 199?, m4tutfrt__ax, m4tutfrt, "tu_10___.1a3", 0x0000, 0x010000, CRC(7878827f) SHA1(ac692ae50e63e632d45e7240c2520df83d2baaf5), "Bwb","Tutti Fruity (Bwb) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4tutfrt__ay, m4tutfrt, "tu_20___.1a3", 0x0000, 0x010000, CRC(cada1c42) SHA1(6a4048da89a0bffeebfd21549c2d9812cc275bd5), "Bwb","Tutti Fruity (Bwb) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4tutfrt__az, m4tutfrt, "tu_20_b_.1a3", 0x0000, 0x010000, CRC(a8f1bc11) SHA1(03596171540e6490133f374cca69f4fd0359952e), "Bwb","Tutti Fruity (Bwb) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4tutfrt__a0, m4tutfrt, "tu_20_d_.1a3", 0x0000, 0x010000, CRC(6ecde477) SHA1(694296eb226c59069800d6936c9dee2623105db0), "Bwb","Tutti Fruity (Bwb) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4tutfrt__a1, m4tutfrt, "tu_20_k_.1a3", 0x0000, 0x010000, CRC(0ce64424) SHA1(7415c9de9982aa7f15f71ef791cbd8ad5a9331d3), "Bwb","Tutti Fruity (Bwb) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4tutfrt__a2, m4tutfrt, "tu_20bg_.1a3", 0x0000, 0x010000, CRC(31a6196d) SHA1(1113737dd3b209afda14ec273d923e2057ea7d99), "Bwb","Tutti Fruity (Bwb) (MPU4) (set 8)" ) +GAME_CUSTOM( 199?, m4tutfrt__a3, m4tutfrt, "tuf20__1.0", 0x0000, 0x010000, CRC(ddadbcb6) SHA1(2d2934ec73d979de45d0998f8975361d33358dd3), "Bwb","Tutti Fruity (Bwb) (MPU4) (set 9)" ) +GAME_CUSTOM( 199?, m4tutfrt__a4, m4tutfrt, "tuf20ad1.0", 0x0000, 0x010000, CRC(5a74ead3) SHA1(3216c8d0c67aaeb18f791a6e1f3f6e30145d6beb), "Bwb","Tutti Fruity (Bwb) (MPU4) (set 10)" ) +GAME_CUSTOM( 199?, m4tutfrt__a5, m4tutfrt, "tui05___.1a3", 0x0000, 0x010000, CRC(42e3d400) SHA1(4cf914141dfc1f88704403b467176da77369da06), "Bwb","Tutti Fruity (Bwb) (MPU4) (set 11)" ) #define M4CASHAT_EXTRA_ROMS \ @@ -2248,49 +2407,9 @@ GAME_CUSTOM( 199?, m4tutfrt__a5, m4tutfrt, "tui05___.1a3", 0x0000, 0 ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4cashat, 0, "csa12y.p1", 0x0000, 0x020000, CRC(0374584a) SHA1(446e1d122d5b38e4ee11d98a4235d7198d98b541), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4cashat__a, m4cashat, "caa22ad.p1", 0x0000, 0x020000, CRC(b6274874) SHA1(7c2dc0f3e8e7bb76f3b90300141b320fa0ca39ac), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4cashat__b, m4cashat, "caa22b.p1", 0x0000, 0x020000, CRC(e7f6f5e5) SHA1(fc16b50ae00525a3c84c0cbf7b418898cc5db1bc), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4cashat__c, m4cashat, "caa22bd.p1", 0x0000, 0x020000, CRC(581b2b6f) SHA1(55f910c7646d5e7d3be6ffd5b4ec0f04fb98b82e), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4cashat__d, m4cashat, "caa22d.p1", 0x0000, 0x020000, CRC(cc494044) SHA1(13ff215f41833aa133fe9d120792c834d1e0752b), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4cashat__e, m4cashat, "caa22dh.p1", 0x0000, 0x020000, CRC(18ae14fa) SHA1(20a8f197075ec153ac116b9a85e3591d9d4d045d), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4cashat__f, m4cashat, "caa22dk.p1", 0x0000, 0x020000, CRC(71fa4ee7) SHA1(ddf2cee47f93cc5794d64922658d5892993c8d2f), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4cashat__g, m4cashat, "caa22dr.p1", 0x0000, 0x020000, CRC(c2f5f5d6) SHA1(aebedb84ae388a1f0c558d36893d1341c1959594), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4cashat__h, m4cashat, "caa22dy.p1", 0x0000, 0x020000, CRC(3b3de6b1) SHA1(d72ce7851969466063c6d7952787691a7c44c9dd), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4cashat__i, m4cashat, "caa22h.p1", 0x0000, 0x020000, CRC(a743ca70) SHA1(e4b5ee02524873c2ccb66b4bfca39464c23eb43e), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4cashat__j, m4cashat, "caa22k.p1", 0x0000, 0x020000, CRC(ce17906d) SHA1(18a302132e683b00509982c09c6e3b00ae1201a0), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4cashat__k, m4cashat, "caa22r.p1", 0x0000, 0x020000, CRC(7d182b5c) SHA1(801d1b032e94cc45302a9f84ba7f9ce2b74f6449), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4cashat__l, m4cashat, "caa22s.p1", 0x0000, 0x020000, CRC(e7edf653) SHA1(f2bdf45cc18ad4b45b47d2b2b4641460fcdfa963), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4cashat__m, m4cashat, "caa22y.p1", 0x0000, 0x020000, CRC(84d0383b) SHA1(791666ce17fd65067df446a3320efd22bce23925), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4cashat__n, m4cashat, "caa23ad.p1", 0x0000, 0x020000, CRC(a8641c35) SHA1(18dad4634e27e4f0b791c331b9efcf5e1d56d3bb), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4cashat__o, m4cashat, "caa23b.p1", 0x0000, 0x020000, CRC(a867c129) SHA1(9b0b577938ae0500a8b80211710ed5c0b2a597fa), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4cashat__p, m4cashat, "caa23bd.p1", 0x0000, 0x020000, CRC(46587f2e) SHA1(b14ed6b810ba3039824a0d13c5b75fedd40803b3), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4cashat__q, m4cashat, "caa23d.p1", 0x0000, 0x020000, CRC(83d87488) SHA1(1e13a47de4837e42650c6a4a13a838eb68d0beae), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4cashat__r, m4cashat, "caa23dh.p1", 0x0000, 0x020000, CRC(06ed40bb) SHA1(68f2923c4ecd91231cc66a4be7c797d7b2a46ae0), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4cashat__s, m4cashat, "caa23dk.p1", 0x0000, 0x020000, CRC(6fb91aa6) SHA1(5966be8aa9d5348bbdcb85b21acceaabc3c02602), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4cashat__t, m4cashat, "caa23dr.p1", 0x0000, 0x020000, CRC(dcb6a197) SHA1(a18af78ba604b53a2af1e9b8dfdc6858964f631d), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4cashat__u, m4cashat, "caa23dy.p1", 0x0000, 0x020000, CRC(257eb2f0) SHA1(0a5f9743afb5dd7392425951580532ea5f8f17f1), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4cashat__v, m4cashat, "caa23h.p1", 0x0000, 0x020000, CRC(e8d2febc) SHA1(14fe5e1699fef74145f2f6fff61e75fe3e3a0b3b), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4cashat__w, m4cashat, "caa23k.p1", 0x0000, 0x020000, CRC(8186a4a1) SHA1(0d8f59df0fb5a1044f6fb7d81f50f9c9b94add9b), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4cashat__x, m4cashat, "caa23r.p1", 0x0000, 0x020000, CRC(32891f90) SHA1(c832c2610606bc5a3beeff8f85c31af496b14427), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4cashat__y, m4cashat, "caa23s.p1", 0x0000, 0x020000, CRC(26a49cdd) SHA1(ee28a22eeb8c4e8ddf041122505f9846d6b6d7d6), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4cashat__z, m4cashat, "caa23y.p1", 0x0000, 0x020000, CRC(cb410cf7) SHA1(31d34a766939a9b2a23be00c2ffd658d854b3ab4), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4cashat__0, m4cashat, "casattack8.bin", 0x0000, 0x020000, CRC(e29ea247) SHA1(ad00ea3bfd2eab51b20fd786cb1ce84de0d98173), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4cashat__1, m4cashat, "catt15g", 0x0000, 0x020000, CRC(3f7a8863) SHA1(df8ed393aeb3a5ec3fd5bdc01c9dbbb630e6d254), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 29)" ) -GAME_CUSTOM( 199?, m4cashat__2, m4cashat, "catt15t", 0x0000, 0x020000, CRC(c6760c3a) SHA1(b7f4a3af52faf7e430e5b4ec75e2dc97e3f07dc0), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 30)" ) -GAME_CUSTOM( 199?, m4cashat__3, m4cashat, "csa11ad.p1", 0x0000, 0x020000, CRC(7c1daa59) SHA1(9c0479094ba2f985803e58360b738b0baa2e410a), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 31)" ) -GAME_CUSTOM( 199?, m4cashat__4, m4cashat, "csa11b.p1", 0x0000, 0x020000, CRC(c740daba) SHA1(afa5bdf9f6aacb3a5126aa828e4d0d2518efe663), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 32)" ) -GAME_CUSTOM( 199?, m4cashat__5, m4cashat, "csa11bd.p1", 0x0000, 0x020000, CRC(55fccfd1) SHA1(b7c748573e5fb32a6be5e069e7f165a11c62b7d5), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 33)" ) -GAME_CUSTOM( 199?, m4cashat__6, m4cashat, "csa11d.p1", 0x0000, 0x020000, CRC(ecff6f1b) SHA1(3f37d8e20d5663e376c9dc5876a910a320edcf7d), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 34)" ) -GAME_CUSTOM( 199?, m4cashat__7, m4cashat, "csa11dh.p1", 0x0000, 0x020000, CRC(bbc0acca) SHA1(80d95505041fd4c869f9d835d0527070f2f582d9), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 35)" ) -GAME_CUSTOM( 199?, m4cashat__8, m4cashat, "csa11dk.p1", 0x0000, 0x020000, CRC(1549f044) SHA1(22bc130106a23d0e9c354b4aa97d7b7fd8776082), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 36)" ) -GAME_CUSTOM( 199?, m4cashat__9, m4cashat, "csa11dr.p1", 0x0000, 0x020000, CRC(cf121168) SHA1(aa52b528ac565684399dc58aeb56691457727035), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 37)" ) -GAME_CUSTOM( 199?, m4cashat__aa, m4cashat, "csa11dy.p1", 0x0000, 0x020000, CRC(36da020f) SHA1(ca202c7127450d905e4717776e1f1d32fa89279b), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 38)" ) -GAME_CUSTOM( 199?, m4cashat__ab, m4cashat, "csa11h.p1", 0x0000, 0x020000, CRC(297cb9a1) SHA1(63460eed75242fc7c27ee1fc9da28221e7bb21b1), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 39)" ) -GAME_CUSTOM( 199?, m4cashat__ac, m4cashat, "csa11k.p1", 0x0000, 0x020000, CRC(87f5e52f) SHA1(30b7f8c17198045bba30aaabbe74b3c1dc7d0320), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 40)" ) -GAME_CUSTOM( 199?, m4cashat__ad, m4cashat, "csa11r.p1", 0x0000, 0x020000, CRC(5dae0403) SHA1(6f2238f0fe0797bf0926044bb251fed6f97dbed6), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 41)" ) -GAME_CUSTOM( 199?, m4cashat__ae, m4cashat, "csa11s.p1", 0x0000, 0x020000, CRC(bef7a119) SHA1(88fc2003a7adda928e2e0fb78db32c7ffcbda924), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 42)" ) -GAME_CUSTOM( 199?, m4cashat__af, m4cashat, "csa11y.p1", 0x0000, 0x020000, CRC(a4661764) SHA1(740be82275358b8e3dcec5982b18a083d043d99d), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 43)" ) +// "(C)1993 BARCREST" and "CSA 1.2" +GAME_CUSTOM( 199?, m4cashat, 0, "csa12s.p1", 0x0000, 0x020000, CRC(61c8af36) SHA1(d81a4056b573194a8627a3618f805d379140ff6a), "Barcrest","Cash Attack (Barcrest) (MPU4) (CSA 1.2)" ) +GAME_CUSTOM( 199?, m4cashat__ar, m4cashat, "csa12y.p1", 0x0000, 0x020000, CRC(0374584a) SHA1(446e1d122d5b38e4ee11d98a4235d7198d98b541), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 1)" ) GAME_CUSTOM( 199?, m4cashat__ag, m4cashat, "csa12ad.p1", 0x0000, 0x020000, CRC(b15c5c64) SHA1(7a8c7b929ecaf0e14d9a5d6cdea303f5e3fc1dec), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 44)" ) GAME_CUSTOM( 199?, m4cashat__ah, m4cashat, "csa12b.p1", 0x0000, 0x020000, CRC(60529594) SHA1(a5e70b55b8df6a94c963b970c3a4398b64b0286b), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 45)" ) GAME_CUSTOM( 199?, m4cashat__ai, m4cashat, "csa12bd.p1", 0x0000, 0x020000, CRC(98bd39ec) SHA1(ebc5a2690f1453adae0f8faee0159a01df91dd6e), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 46)" ) @@ -2302,7 +2421,53 @@ GAME_CUSTOM( 199?, m4cashat__an, m4cashat, "csa12dy.p1", 0x0000, 0x020 GAME_CUSTOM( 199?, m4cashat__ao, m4cashat, "csa12h.p1", 0x0000, 0x020000, CRC(8e6ef68f) SHA1(b6ac0993938bb065f02498a71628cf532085b347), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 52)" ) GAME_CUSTOM( 199?, m4cashat__ap, m4cashat, "csa12k.p1", 0x0000, 0x020000, CRC(20e7aa01) SHA1(093786b0992c1d9ce5e2d2cfad1eaf1d8e6dc733), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 53)" ) GAME_CUSTOM( 199?, m4cashat__aq, m4cashat, "csa12r.p1", 0x0000, 0x020000, CRC(fabc4b2d) SHA1(3710b7b4bf56e46c60a60fcae82342bf201e38dc), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 54)" ) -GAME_CUSTOM( 199?, m4cashat__ar, m4cashat, "csa12s.p1", 0x0000, 0x020000, CRC(61c8af36) SHA1(d81a4056b573194a8627a3618f805d379140ff6a), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 55)" ) +// "(C)1993 BARCREST" and "CSA 1.1" +GAME_CUSTOM( 199?, m4cashat__ae, m4cashat, "csa11s.p1", 0x0000, 0x020000, CRC(bef7a119) SHA1(88fc2003a7adda928e2e0fb78db32c7ffcbda924), "Barcrest","Cash Attack (Barcrest) (MPU4) (CSA 1.1)" ) +GAME_CUSTOM( 199?, m4cashat__3, m4cashat, "csa11ad.p1", 0x0000, 0x020000, CRC(7c1daa59) SHA1(9c0479094ba2f985803e58360b738b0baa2e410a), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 31)" ) +GAME_CUSTOM( 199?, m4cashat__4, m4cashat, "csa11b.p1", 0x0000, 0x020000, CRC(c740daba) SHA1(afa5bdf9f6aacb3a5126aa828e4d0d2518efe663), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 32)" ) +GAME_CUSTOM( 199?, m4cashat__5, m4cashat, "csa11bd.p1", 0x0000, 0x020000, CRC(55fccfd1) SHA1(b7c748573e5fb32a6be5e069e7f165a11c62b7d5), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 33)" ) +GAME_CUSTOM( 199?, m4cashat__6, m4cashat, "csa11d.p1", 0x0000, 0x020000, CRC(ecff6f1b) SHA1(3f37d8e20d5663e376c9dc5876a910a320edcf7d), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 34)" ) +GAME_CUSTOM( 199?, m4cashat__7, m4cashat, "csa11dh.p1", 0x0000, 0x020000, CRC(bbc0acca) SHA1(80d95505041fd4c869f9d835d0527070f2f582d9), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 35)" ) +GAME_CUSTOM( 199?, m4cashat__8, m4cashat, "csa11dk.p1", 0x0000, 0x020000, CRC(1549f044) SHA1(22bc130106a23d0e9c354b4aa97d7b7fd8776082), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 36)" ) +GAME_CUSTOM( 199?, m4cashat__9, m4cashat, "csa11dr.p1", 0x0000, 0x020000, CRC(cf121168) SHA1(aa52b528ac565684399dc58aeb56691457727035), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 37)" ) +GAME_CUSTOM( 199?, m4cashat__aa, m4cashat, "csa11dy.p1", 0x0000, 0x020000, CRC(36da020f) SHA1(ca202c7127450d905e4717776e1f1d32fa89279b), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 38)" ) +GAME_CUSTOM( 199?, m4cashat__ab, m4cashat, "csa11h.p1", 0x0000, 0x020000, CRC(297cb9a1) SHA1(63460eed75242fc7c27ee1fc9da28221e7bb21b1), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 39)" ) +GAME_CUSTOM( 199?, m4cashat__ac, m4cashat, "csa11k.p1", 0x0000, 0x020000, CRC(87f5e52f) SHA1(30b7f8c17198045bba30aaabbe74b3c1dc7d0320), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 40)" ) +GAME_CUSTOM( 199?, m4cashat__ad, m4cashat, "csa11r.p1", 0x0000, 0x020000, CRC(5dae0403) SHA1(6f2238f0fe0797bf0926044bb251fed6f97dbed6), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 41)" ) +GAME_CUSTOM( 199?, m4cashat__af, m4cashat, "csa11y.p1", 0x0000, 0x020000, CRC(a4661764) SHA1(740be82275358b8e3dcec5982b18a083d043d99d), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 43)" ) +// "(C)1993 BARCREST" and "CAA 2.3" +GAME_CUSTOM( 199?, m4cashat__y, m4cashat, "caa23s.p1", 0x0000, 0x020000, CRC(26a49cdd) SHA1(ee28a22eeb8c4e8ddf041122505f9846d6b6d7d6), "Barcrest","Cash Attack (Barcrest) (MPU4) (CAA 2.3)" ) +GAME_CUSTOM( 199?, m4cashat__n, m4cashat, "caa23ad.p1", 0x0000, 0x020000, CRC(a8641c35) SHA1(18dad4634e27e4f0b791c331b9efcf5e1d56d3bb), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 15)" ) +GAME_CUSTOM( 199?, m4cashat__o, m4cashat, "caa23b.p1", 0x0000, 0x020000, CRC(a867c129) SHA1(9b0b577938ae0500a8b80211710ed5c0b2a597fa), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 16)" ) +GAME_CUSTOM( 199?, m4cashat__p, m4cashat, "caa23bd.p1", 0x0000, 0x020000, CRC(46587f2e) SHA1(b14ed6b810ba3039824a0d13c5b75fedd40803b3), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 17)" ) +GAME_CUSTOM( 199?, m4cashat__q, m4cashat, "caa23d.p1", 0x0000, 0x020000, CRC(83d87488) SHA1(1e13a47de4837e42650c6a4a13a838eb68d0beae), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 18)" ) +GAME_CUSTOM( 199?, m4cashat__r, m4cashat, "caa23dh.p1", 0x0000, 0x020000, CRC(06ed40bb) SHA1(68f2923c4ecd91231cc66a4be7c797d7b2a46ae0), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 19)" ) +GAME_CUSTOM( 199?, m4cashat__s, m4cashat, "caa23dk.p1", 0x0000, 0x020000, CRC(6fb91aa6) SHA1(5966be8aa9d5348bbdcb85b21acceaabc3c02602), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 20)" ) +GAME_CUSTOM( 199?, m4cashat__t, m4cashat, "caa23dr.p1", 0x0000, 0x020000, CRC(dcb6a197) SHA1(a18af78ba604b53a2af1e9b8dfdc6858964f631d), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 21)" ) +GAME_CUSTOM( 199?, m4cashat__u, m4cashat, "caa23dy.p1", 0x0000, 0x020000, CRC(257eb2f0) SHA1(0a5f9743afb5dd7392425951580532ea5f8f17f1), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 22)" ) +GAME_CUSTOM( 199?, m4cashat__v, m4cashat, "caa23h.p1", 0x0000, 0x020000, CRC(e8d2febc) SHA1(14fe5e1699fef74145f2f6fff61e75fe3e3a0b3b), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 23)" ) +GAME_CUSTOM( 199?, m4cashat__w, m4cashat, "caa23k.p1", 0x0000, 0x020000, CRC(8186a4a1) SHA1(0d8f59df0fb5a1044f6fb7d81f50f9c9b94add9b), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 24)" ) +GAME_CUSTOM( 199?, m4cashat__x, m4cashat, "caa23r.p1", 0x0000, 0x020000, CRC(32891f90) SHA1(c832c2610606bc5a3beeff8f85c31af496b14427), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 25)" ) +GAME_CUSTOM( 199?, m4cashat__z, m4cashat, "caa23y.p1", 0x0000, 0x020000, CRC(cb410cf7) SHA1(31d34a766939a9b2a23be00c2ffd658d854b3ab4), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 27)" ) +// "(C)1993 BARCREST" and "CAA 2.2" +GAME_CUSTOM( 199?, m4cashat__l, m4cashat, "caa22s.p1", 0x0000, 0x020000, CRC(e7edf653) SHA1(f2bdf45cc18ad4b45b47d2b2b4641460fcdfa963), "Barcrest","Cash Attack (Barcrest) (MPU4) (CAA 2.2)" ) +GAME_CUSTOM( 199?, m4cashat__a, m4cashat, "caa22ad.p1", 0x0000, 0x020000, CRC(b6274874) SHA1(7c2dc0f3e8e7bb76f3b90300141b320fa0ca39ac), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 2)" ) +GAME_CUSTOM( 199?, m4cashat__b, m4cashat, "caa22b.p1", 0x0000, 0x020000, CRC(e7f6f5e5) SHA1(fc16b50ae00525a3c84c0cbf7b418898cc5db1bc), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4cashat__c, m4cashat, "caa22bd.p1", 0x0000, 0x020000, CRC(581b2b6f) SHA1(55f910c7646d5e7d3be6ffd5b4ec0f04fb98b82e), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4cashat__d, m4cashat, "caa22d.p1", 0x0000, 0x020000, CRC(cc494044) SHA1(13ff215f41833aa133fe9d120792c834d1e0752b), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4cashat__e, m4cashat, "caa22dh.p1", 0x0000, 0x020000, CRC(18ae14fa) SHA1(20a8f197075ec153ac116b9a85e3591d9d4d045d), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4cashat__f, m4cashat, "caa22dk.p1", 0x0000, 0x020000, CRC(71fa4ee7) SHA1(ddf2cee47f93cc5794d64922658d5892993c8d2f), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4cashat__g, m4cashat, "caa22dr.p1", 0x0000, 0x020000, CRC(c2f5f5d6) SHA1(aebedb84ae388a1f0c558d36893d1341c1959594), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 8)" ) +GAME_CUSTOM( 199?, m4cashat__h, m4cashat, "caa22dy.p1", 0x0000, 0x020000, CRC(3b3de6b1) SHA1(d72ce7851969466063c6d7952787691a7c44c9dd), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 9)" ) +GAME_CUSTOM( 199?, m4cashat__i, m4cashat, "caa22h.p1", 0x0000, 0x020000, CRC(a743ca70) SHA1(e4b5ee02524873c2ccb66b4bfca39464c23eb43e), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 10)" ) +GAME_CUSTOM( 199?, m4cashat__j, m4cashat, "caa22k.p1", 0x0000, 0x020000, CRC(ce17906d) SHA1(18a302132e683b00509982c09c6e3b00ae1201a0), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 11)" ) +GAME_CUSTOM( 199?, m4cashat__k, m4cashat, "caa22r.p1", 0x0000, 0x020000, CRC(7d182b5c) SHA1(801d1b032e94cc45302a9f84ba7f9ce2b74f6449), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 12)" ) +GAME_CUSTOM( 199?, m4cashat__m, m4cashat, "caa22y.p1", 0x0000, 0x020000, CRC(84d0383b) SHA1(791666ce17fd65067df446a3320efd22bce23925), "Barcrest","Cash Attack (Barcrest) (MPU4) (set 14)" ) +// no copyright string and "CAA 2.3" +GAME_CUSTOM( 199?, m4cashat__0, m4cashat, "casattack8.bin", 0x0000, 0x020000, CRC(e29ea247) SHA1(ad00ea3bfd2eab51b20fd786cb1ce84de0d98173), "hack","Cash Attack (Barcrest) (MPU4) (CAA 2.3, hack, set 1)" ) +GAME_CUSTOM( 199?, m4cashat__1, m4cashat, "catt15g", 0x0000, 0x020000, CRC(3f7a8863) SHA1(df8ed393aeb3a5ec3fd5bdc01c9dbbb630e6d254), "hack","Cash Attack (Barcrest) (MPU4) (CAA 2.3, hack, set 2)" ) +// no copyright string and "CSA 1.2" +GAME_CUSTOM( 199?, m4cashat__2, m4cashat, "catt15t", 0x0000, 0x020000, CRC(c6760c3a) SHA1(b7f4a3af52faf7e430e5b4ec75e2dc97e3f07dc0), "hack","Cash Attack (Barcrest) (MPU4) (CSA 1.2, hack)" ) #define M4RHR_EXTRA_ROMS \ @@ -2321,7 +2486,8 @@ GAME_CUSTOM( 199?, m4cashat__ar, m4cashat, "csa12s.p1", 0x0000, 0x020 ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4rhr, 0, "rhr15.hex", 0x0000, 0x010000, CRC(895ebbda) SHA1(f2117e743a30f3c9fc6af7fd7843bc333699db9d), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 1)" ) +// "(C)1991 BARCREST" and "CR4 0.9" +GAME_CUSTOM( 199?, m4rhr, 0, "cr4s.p1", 0x0000, 0x010000, CRC(836c3e49) SHA1(34dde2fd4fe82ab4a9e16dcf7915705f7b8a007f), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (CR4 0.9)" ) GAME_CUSTOM( 199?, m4rhr__a, m4rhr, "cr4ad.p1", 0x0000, 0x010000, CRC(b99b3d14) SHA1(2ff68b33881e9b3c2db48c335ccbad783013084a), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4rhr__b, m4rhr, "cr4b.p1", 0x0000, 0x010000, CRC(ae2691b8) SHA1(360c5c3d94bf85cf5ead114dd570ea6c61082aa9), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4rhr__c, m4rhr, "cr4bd.p1", 0x0000, 0x010000, CRC(9ba444bf) SHA1(adebf23827a5ac5e3a6d56e3352e0d3f3dc809c0), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 4)" ) @@ -2329,8 +2495,11 @@ GAME_CUSTOM( 199?, m4rhr__d, m4rhr, "cr4d.p1", 0x0000, 0x010000, CRC( GAME_CUSTOM( 199?, m4rhr__e, m4rhr, "cr4dk.p1", 0x0000, 0x010000, CRC(200486b4) SHA1(3916e131801c44985668ccd57dc3e812268f9417), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 6)" ) GAME_CUSTOM( 199?, m4rhr__f, m4rhr, "cr4dy.p1", 0x0000, 0x010000, CRC(5b5ebe79) SHA1(6c72271258e6b951f2d6c815cfef5032e23cf7bc), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 7)" ) GAME_CUSTOM( 199?, m4rhr__g, m4rhr, "cr4k.p1", 0x0000, 0x010000, CRC(2cc956e8) SHA1(37fad3d3b9460763ba4d8f569ee71778f9907853), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4rhr__h, m4rhr, "cr4s.p1", 0x0000, 0x010000, CRC(836c3e49) SHA1(34dde2fd4fe82ab4a9e16dcf7915705f7b8a007f), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4rhr__i, m4rhr, "cr4y.p1", 0x0000, 0x010000, CRC(5a3588e8) SHA1(b25156f38fb67dc1f1e36a50af0a9b93882572d0), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 10)" ) +GAME_CUSTOM( 199?, m4rhr__h, m4rhr, "cr4y.p1", 0x0000, 0x010000, CRC(5a3588e8) SHA1(b25156f38fb67dc1f1e36a50af0a9b93882572d0), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 10)" ) +// "(C)1991 BARCREST" and "CR4 0.2" (HHN 0.2 on startup) +GAME_CUSTOM( 199?, m4rhr__i, m4rhr, "rhr15.hex", 0x0000, 0x010000, CRC(895ebbda) SHA1(f2117e743a30f3c9fc6af7fd7843bc333699db9d), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (HHN 0.2KD / CR4 0.2)" ) +// "(C)1991 BARCREST" and "CR4 0.3" (CRT 0.3 on startup) +GAME_CUSTOM( 199?, m4rhr__t, m4rhr, "crt03s.p1", 0x0000, 0x010000, CRC(2b4c24d2) SHA1(94b19b0e8090dbbde2c67d5949f19d4050972fb1), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (CRT 0.3 / CR4 0.3)" ) GAME_CUSTOM( 199?, m4rhr__j, m4rhr, "crt03ad.p1", 0x0000, 0x010000, CRC(5b779273) SHA1(b9a278cc6b4af622af35f7d4fdacdca54c94a47f), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4rhr__k, m4rhr, "crt03b.p1", 0x0000, 0x010000, CRC(da5b3fa3) SHA1(66c570a193665ae0df4542112547fa6f5f9b7b79), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 12)" ) GAME_CUSTOM( 199?, m4rhr__l, m4rhr, "crt03bd.p1", 0x0000, 0x010000, CRC(6d6bff39) SHA1(08f4235bb2cadcc49c13991fe3e2c806c0be801d), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 13)" ) @@ -2341,8 +2510,9 @@ GAME_CUSTOM( 199?, m4rhr__p, m4rhr, "crt03dr.p1", 0x0000, 0x010000, CRC( GAME_CUSTOM( 199?, m4rhr__q, m4rhr, "crt03dy.p1", 0x0000, 0x010000, CRC(3439dc85) SHA1(092dcd36e2ea43ecf62cfc1bf1498ea7777213dc), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 18)" ) GAME_CUSTOM( 199?, m4rhr__r, m4rhr, "crt03k.p1", 0x0000, 0x010000, CRC(0b841ae9) SHA1(5a78381122a3b718e3f212f30f76dc61e2e3ac5e), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 19)" ) GAME_CUSTOM( 199?, m4rhr__s, m4rhr, "crt03r.p1", 0x0000, 0x010000, CRC(2a8bd767) SHA1(a9547ef37da9494bd4ffe5fbb68eca67fe63c3ba), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4rhr__t, m4rhr, "crt03s.p1", 0x0000, 0x010000, CRC(2b4c24d2) SHA1(94b19b0e8090dbbde2c67d5949f19d4050972fb1), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 21)" ) GAME_CUSTOM( 199?, m4rhr__u, m4rhr, "crt03y.p1", 0x0000, 0x010000, CRC(40c3a105) SHA1(7ad988f71a3523ad2b19fa7d6cdf74d4328fb3e1), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 22)" ) +// "(C)1991 BARCREST" and "CRU 0.1" +GAME_CUSTOM( 199?, m4rhr__2, m4rhr, "crus.p1", 0x0000, 0x010000, CRC(bf2ff034) SHA1(7ee7ef30da4283dbb2b1b040fdd3313cb2e1b7e5), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (CRU 0.1)" ) GAME_CUSTOM( 199?, m4rhr__v, m4rhr, "cruad.p1", 0x0000, 0x010000, CRC(3a680f14) SHA1(cd3c2bf77b148ee4f4ce76b2c1bc142491117890), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 23)" ) GAME_CUSTOM( 199?, m4rhr__w, m4rhr, "crub.p1", 0x0000, 0x010000, CRC(4cee9020) SHA1(b919ba28294c39b49e4fcfa54a75e852f9c873ed), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 24)" ) GAME_CUSTOM( 199?, m4rhr__x, m4rhr, "crubd.p1", 0x0000, 0x010000, CRC(7184b193) SHA1(392cb5887ec988e3aa1cba2491885103da1e503a), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 25)" ) @@ -2350,20 +2520,20 @@ GAME_CUSTOM( 199?, m4rhr__y, m4rhr, "crud.p1", 0x0000, 0x010000, CRC( GAME_CUSTOM( 199?, m4rhr__z, m4rhr, "crudk.p1", 0x0000, 0x010000, CRC(73465d95) SHA1(3eddaee64a681727743b23fd0bec0285ed59a5ef), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 27)" ) GAME_CUSTOM( 199?, m4rhr__0, m4rhr, "crudy.p1", 0x0000, 0x010000, CRC(e08696f9) SHA1(37c97bb22ae0d09657d7d589f76adfbe6fb642e0), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 28)" ) GAME_CUSTOM( 199?, m4rhr__1, m4rhr, "cruk.p1", 0x0000, 0x010000, CRC(168627f0) SHA1(c6c21f8442ff88736d3fd25860d815beb5a6b845), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 29)" ) -GAME_CUSTOM( 199?, m4rhr__2, m4rhr, "crus.p1", 0x0000, 0x010000, CRC(bf2ff034) SHA1(7ee7ef30da4283dbb2b1b040fdd3313cb2e1b7e5), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 30)" ) GAME_CUSTOM( 199?, m4rhr__3, m4rhr, "cruy.p1", 0x0000, 0x010000, CRC(edf1346b) SHA1(c250178991885a922f676424e70c637e11089efb), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 31)" ) -GAME_CUSTOM( 199?, m4rhr__4, m4rhr, "redhot8.bin", 0x0000, 0x010000, CRC(1dc62d7b) SHA1(640a5b29314a7dc67db271cce06c23c676d77eee), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 32)" ) -GAME_CUSTOM( 199?, m4rhr__5, m4rhr, "rhr03.r", 0x0000, 0x010000, CRC(98d81b1e) SHA1(17ab0dced53be9755aada7954aff2dc2a6973190), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 33)" ) -GAME_CUSTOM( 199?, m4rhr__6, m4rhr, "rhr10", 0x0000, 0x010000, CRC(2a18a033) SHA1(add907c5ab155c28142dcee57825059715afd80d), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 34)" ) -GAME_CUSTOM( 199?, m4rhr__7, m4rhr, "rhr2015", 0x0000, 0x010000, CRC(dbfd3b95) SHA1(4fc7ae32f7d76be3d3d07d627391884bd4d6de09), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 35)" ) -GAME_CUSTOM( 199?, m4rhr__8, m4rhr, "rhr2515", 0x0000, 0x010000, CRC(e4554c23) SHA1(6d977beb282fd638de3457e467e842ce79b5be7c), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 36)" ) -GAME_CUSTOM( 199?, m4rhr__9, m4rhr, "rhr2pprg.bin", 0x0000, 0x010000, CRC(f97047b2) SHA1(d3ed8c93e405f9e7448b3924ff9aa84223b76046), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 37)" ) +// "(C)1991 BARCREST" and "RH8 0.1" +GAME_CUSTOM( 199?, m4rhr__4, m4rhr, "redhot8.bin", 0x0000, 0x010000, CRC(1dc62d7b) SHA1(640a5b29314a7dc67db271cce06c23c676d77eee), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (RH8 0.1K)" ) +GAME_CUSTOM( 1991, m4rhr__a4, m4rhr, "rh8c.p1", 0x0000, 0x010000, CRC(e36d7ca0) SHA1(73970761c5c7004669b02ba9f3a299f36f2d00e9), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (RH8 0.1C)" ) +// "(C)1991 BARCREST" and "RHR 0.3" +GAME_CUSTOM( 199?, m4rhr__af, m4rhr, "rhrs.p1", 0x0000, 0x010000, CRC(a0e5d5b6) SHA1(c730e6319bbea6f035fb3e249991983783ef5743), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (RHR 0.3)" ) +GAME_CUSTOM( 199?, m4rhr__5, m4rhr, "rhr03.r", 0x0000, 0x010000, CRC(98d81b1e) SHA1(17ab0dced53be9755aada7954aff2dc2a6973190), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (RHR 0.3R)" ) GAME_CUSTOM( 199?, m4rhr__aa, m4rhr, "rhrb.p1", 0x0000, 0x010000, CRC(876fbe46) SHA1(1c7faf68ddef2ccbb8e3cd2cf5c709a7a4f4daef), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 38)" ) GAME_CUSTOM( 199?, m4rhr__ab, m4rhr, "rhrbd.p1", 0x0000, 0x010000, CRC(f0fa0c7b) SHA1(96bfce8ea54e392a36cb8d82a032438bff992f07), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 39)" ) GAME_CUSTOM( 199?, m4rhr__ac, m4rhr, "rhrc.p1", 0x0000, 0x010000, CRC(76a0e556) SHA1(1a9bae286ca40d8e72022645d006a219f113e31a), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 40)" ) GAME_CUSTOM( 199?, m4rhr__ad, m4rhr, "rhrd.p1", 0x0000, 0x010000, CRC(58a5dd6f) SHA1(3646b8cb3d49e8c530e321daad052f27cdf4bb3d), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 41)" ) GAME_CUSTOM( 199?, m4rhr__ae, m4rhr, "rhrk.p1", 0x0000, 0x010000, CRC(2212cebb) SHA1(224e7e243b17f3ca90a6daa529984e9a879ff266), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 42)" ) -GAME_CUSTOM( 199?, m4rhr__af, m4rhr, "rhrs.p1", 0x0000, 0x010000, CRC(a0e5d5b6) SHA1(c730e6319bbea6f035fb3e249991983783ef5743), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 43)" ) +// "(C)1991 BARCREST" and "RHT 0.3" +GAME_CUSTOM( 199?, m4rhr__ap, m4rhr, "rhts.p1", 0x0000, 0x010000, CRC(fecb7076) SHA1(43086c6bfd878d0ca1ec8d45285d3e941a62ac8e), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (RHT 0.3)" ) GAME_CUSTOM( 199?, m4rhr__ag, m4rhr, "rhtad.p1", 0x0000, 0x010000, CRC(ae3a31a0) SHA1(7e1f05a21cf5b3d2aceba755136c567b5d6ecfcd), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 44)" ) GAME_CUSTOM( 199?, m4rhr__ah, m4rhr, "rhtb.p1", 0x0000, 0x010000, CRC(7ceb13c8) SHA1(f0f22149bd0fb12ef06c4c3ecba605df33f52c51), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 45)" ) GAME_CUSTOM( 199?, m4rhr__ai, m4rhr, "rhtbd.p1", 0x0000, 0x010000, CRC(e4b290fc) SHA1(bf16d06429d67936118264f6c4f1ae637753d5db), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 46)" ) @@ -2373,8 +2543,9 @@ GAME_CUSTOM( 199?, m4rhr__al, m4rhr, "rhtdr.p1", 0x0000, 0x010000, CRC( GAME_CUSTOM( 199?, m4rhr__am, m4rhr, "rhtdy.p1", 0x0000, 0x010000, CRC(42f5746d) SHA1(964bd8801b44de9ea45c43b290b1cd6284e97578), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 50)" ) GAME_CUSTOM( 199?, m4rhr__an, m4rhr, "rhtk.p1", 0x0000, 0x010000, CRC(c3bfb174) SHA1(2579bf17252988de17a1367546ae187420f95cc5), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 51)" ) GAME_CUSTOM( 199?, m4rhr__ao, m4rhr, "rhtr.p1", 0x0000, 0x010000, CRC(f53f4876) SHA1(feda495361d384c662554d445a95191a2c52a56a), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 52)" ) -GAME_CUSTOM( 199?, m4rhr__ap, m4rhr, "rhts.p1", 0x0000, 0x010000, CRC(fecb7076) SHA1(43086c6bfd878d0ca1ec8d45285d3e941a62ac8e), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 53)" ) GAME_CUSTOM( 199?, m4rhr__aq, m4rhr, "rhty.p1", 0x0000, 0x010000, CRC(68546098) SHA1(57981c06efcb44915d8c2d4b6e1cba377c4a8590), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 54)" ) +// "(C)1991 BARCREST" and "RHU 0.2" +GAME_CUSTOM( 199?, m4rhr__a0, m4rhr, "rhus.p1", 0x0000, 0x010000, CRC(31e776fc) SHA1(e51799e9db5a08cbfb0b6c5466a0a085c3d91db4), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (RHU 0.2)" ) GAME_CUSTOM( 199?, m4rhr__ar, m4rhr, "rhuad.p1", 0x0000, 0x010000, CRC(2093126b) SHA1(942994793697cec730c461c87b24a1429e46cc02), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 55)" ) GAME_CUSTOM( 199?, m4rhr__as, m4rhr, "rhub.p1", 0x0000, 0x010000, CRC(2be41a3a) SHA1(a50c7b5b93a619e541be480646517e278da8e579), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 56)" ) GAME_CUSTOM( 199?, m4rhr__at, m4rhr, "rhubd.p1", 0x0000, 0x010000, CRC(168f7f21) SHA1(9c9e09673bdadd146883a06a8db3c0ee4b304eab), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 57)" ) @@ -2384,182 +2555,18 @@ GAME_CUSTOM( 199?, m4rhr__aw, m4rhr, "rhudr.p1", 0x0000, 0x010000, CRC( GAME_CUSTOM( 199?, m4rhr__ax, m4rhr, "rhudy.p1", 0x0000, 0x010000, CRC(692bf4eb) SHA1(136f36073f236b48442a20e06aa51a978135f1b3), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 61)" ) GAME_CUSTOM( 199?, m4rhr__ay, m4rhr, "rhuk.p1", 0x0000, 0x010000, CRC(9e4e1e91) SHA1(f671858c41dc0e55189e9a86fff1846938b5c2e5), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 62)" ) GAME_CUSTOM( 199?, m4rhr__az, m4rhr, "rhur.p1", 0x0000, 0x010000, CRC(6e9425e5) SHA1(1e2827f3469af15e8d390d9af839c7b474ea95a7), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 63)" ) -GAME_CUSTOM( 199?, m4rhr__a0, m4rhr, "rhus.p1", 0x0000, 0x010000, CRC(31e776fc) SHA1(e51799e9db5a08cbfb0b6c5466a0a085c3d91db4), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 64)" ) GAME_CUSTOM( 199?, m4rhr__a1, m4rhr, "rhuy.p1", 0x0000, 0x010000, CRC(5d12178a) SHA1(18525828fac1931bb8e11f96b79db143ed533771), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 65)" ) -GAME_CUSTOM( 199?, m4rhr__a2, m4rhr, "cr__x__x.5_0", 0x0000, 0x010000, CRC(278fe91e) SHA1(dcfed3a7796d1ee365e535115b66c7d6cbe0ab74), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 66)" ) -GAME_CUSTOM( 199?, m4rhr__a3, m4rhr, "cr__x_dx.2_0", 0x0000, 0x010000, CRC(73fb120c) SHA1(4c0f39253dee9b528763a9cb609dec31e8529713), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (set 67)" ) -GAME_CUSTOM( 1991, m4rhr__a4, m4rhr, "rh8c.p1", 0x0000, 0x010000, CRC(e36d7ca0) SHA1(73970761c5c7004669b02ba9f3a299f36f2d00e9), "Barcrest","Red Hot Roll (Barcrest) (MPU4) (RH8 0.1C)" ) - - -#define M4UUAW_EXTRA_ROMS \ - ROM_REGION( 0x100000, "msm6376", 0 ) \ - ROM_LOAD( "uuasnd.p1", 0x00000, 0x080000, CRC(be1a1131) SHA1(b7f50d8db6b7d134757e0746e7d9faf9fd3a2c7e) ) \ - ROM_LOAD( "uuasnd.p2", 0x080000, 0x080000, CRC(c8492b3a) SHA1(d390e37f4a62869079bb38395a2e86a5ad24392f) ) -#undef GAME_CUSTOM -#define GAME_CUSTOM(year, setname,parent,name,offset,length,hash,company,title) \ - ROM_START( setname ) \ - ROM_REGION( length, "maincpu", 0 ) \ - ROM_LOAD( name, offset, length, hash ) \ - M4UUAW_EXTRA_ROMS \ - ROM_END \ - GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) - - -GAME_CUSTOM( 199?, m4uuaw, 0, "uua21h.p1", 0x0000, 0x020000, CRC(199e6dae) SHA1(ecd95ba2c2255afbaa8df96d625a8bfc97e4d3bc), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4uuaw__a, m4uuaw, "upa15g", 0x0000, 0x020000, CRC(d20b8b92) SHA1(6fcddc781c204dfd34de2c4e4ce0ec35fb3ec4e0), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4uuaw__b, m4uuaw, "upa15t", 0x0000, 0x020000, CRC(85e3e82a) SHA1(e90183fab082f159d76ea14da794d52ee6ab8200), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4uuaw__c, m4uuaw, "ups21ad.p1", 0x0000, 0x020000, CRC(c19fa891) SHA1(c2772ec20a65ce999d901e8c873ec687113b18d4), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4uuaw__d, m4uuaw, "ups21b.p1", 0x0000, 0x020000, CRC(01320407) SHA1(a3273c59733e42013c3448b2a5c7c575ec0182b9), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4uuaw__e, m4uuaw, "ups21bd.p1", 0x0000, 0x020000, CRC(2fa3cb8a) SHA1(8df994ce93fc6f0df27a6ee73676d9ee73593091), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4uuaw__f, m4uuaw, "ups21d.p1", 0x0000, 0x020000, CRC(2a8db1a6) SHA1(873ab3757920c9153c1542748a74b36ce5e190c2), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4uuaw__g, m4uuaw, "ups21dh.p1", 0x0000, 0x020000, CRC(7bcfbb46) SHA1(b93dfa71e3ec0ea96eaf2db4cd382b0a2852a1ff), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4uuaw__h, m4uuaw, "ups21dk.p1", 0x0000, 0x020000, CRC(0642ae02) SHA1(8898341f8dc4f4c8c45ce6d04a01bd919cb0548a), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4uuaw__i, m4uuaw, "ups21dr.p1", 0x0000, 0x020000, CRC(b54d1533) SHA1(1f9220342dcab675b04895f69a7ca75579ba729f), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4uuaw__j, m4uuaw, "ups21dy.p1", 0x0000, 0x020000, CRC(4c850654) SHA1(21f386060301adef646fe469c1fcfb002d3e3424), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4uuaw__k, m4uuaw, "ups21h.p1", 0x0000, 0x020000, CRC(555e74cb) SHA1(14246b54839eb334576a119d7c87901f3b2f25ad), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4uuaw__l, m4uuaw, "ups21k.p1", 0x0000, 0x020000, CRC(28d3618f) SHA1(186337119e4b663dadc129533ce8a913013390a9), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4uuaw__m, m4uuaw, "ups21r.p1", 0x0000, 0x020000, CRC(9bdcdabe) SHA1(db0bb90705abec92a220a3dbe0ea69266d5e0558), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4uuaw__n, m4uuaw, "ups21s.p1", 0x0000, 0x020000, CRC(c4a8a542) SHA1(61063d55c6017cf17d704df576cb62da5bd75820), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4uuaw__o, m4uuaw, "ups21y.p1", 0x0000, 0x020000, CRC(6214c9d9) SHA1(d25fecc9798e342207d358a54efad1908c0e2247), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4uuaw__p, m4uuaw, "ups22ad.p1", 0x0000, 0x020000, CRC(ee0f53a6) SHA1(eabe58efa82015eb2266a793853e8ade546d6da1), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4uuaw__q, m4uuaw, "ups22b.p1", 0x0000, 0x020000, CRC(e7dbf5ae) SHA1(0fbbc3da1af8b60993a7f6082bd5e96da21cd0b8), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4uuaw__r, m4uuaw, "ups22bd.p1", 0x0000, 0x020000, CRC(003330bd) SHA1(42ad6ddfd7639909151dcee5e40e82a23074fd59), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4uuaw__s, m4uuaw, "ups22d.p1", 0x0000, 0x020000, CRC(cc64400f) SHA1(0ff7858c637fbb43a7cd1313bbf046177e4b7761), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4uuaw__t, m4uuaw, "ups22dh.p1", 0x0000, 0x020000, CRC(545f4071) SHA1(3947499d78d31fb0b269a63a518790b503a97685), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4uuaw__u, m4uuaw, "ups22dk.p1", 0x0000, 0x020000, CRC(29d25535) SHA1(7f053741d12cce467dd437ea998064e13d1ca52b), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4uuaw__v, m4uuaw, "ups22dr.p1", 0x0000, 0x020000, CRC(9addee04) SHA1(45c15536c8846da825a994a667b6e46598c1642e), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4uuaw__w, m4uuaw, "ups22dy.p1", 0x0000, 0x020000, CRC(6315fd63) SHA1(9a5fcab51d4e94b96669149285dda28cd41020b8), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4uuaw__x, m4uuaw, "ups22h.p1", 0x0000, 0x020000, CRC(b3b78562) SHA1(3e75fa20156faa3d38c2b5ac824bffe47e72b7bc), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4uuaw__y, m4uuaw, "ups22k.p1", 0x0000, 0x020000, CRC(ce3a9026) SHA1(80977176c5bae809a564f4fc0e3d6370f91f829b), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4uuaw__z, m4uuaw, "ups22r.p1", 0x0000, 0x020000, CRC(7d352b17) SHA1(d2d1d016a587be318e9018eb1953e68fe83620df), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4uuaw__0, m4uuaw, "ups22s.p1", 0x0000, 0x020000, CRC(ac990aa9) SHA1(396c9eded9c18ab2bcb0f4066a890f6e239830f1), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4uuaw__1, m4uuaw, "ups22y.p1", 0x0000, 0x020000, CRC(84fd3870) SHA1(8d294ae1a92d1e99c4c3f17a2d77fe1d994b2c33), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 29)" ) -GAME_CUSTOM( 199?, m4uuaw__2, m4uuaw, "uua21ad.p1", 0x0000, 0x020000, CRC(2a18c292) SHA1(5853cb069eb5caa23372e5dedd33868103125780), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 30)" ) -GAME_CUSTOM( 199?, m4uuaw__3, m4uuaw, "uua21b.p1", 0x0000, 0x020000, CRC(d71cc3db) SHA1(7d783110341237769165a08fd86f597225f8d90c), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 31)" ) -GAME_CUSTOM( 199?, m4uuaw__4, m4uuaw, "uua21bd.p1", 0x0000, 0x020000, CRC(f04323be) SHA1(194c996d4c8e2fed2bcb02e29423e68b53900a1f), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 32)" ) -GAME_CUSTOM( 199?, m4uuaw__5, m4uuaw, "uua21d.p1", 0x0000, 0x020000, CRC(664da8c3) SHA1(c93b0b5e796fcde0850e2b3054f1db0417f4e9ed), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 33)" ) -GAME_CUSTOM( 199?, m4uuaw__6, m4uuaw, "uua21dh.p1", 0x0000, 0x020000, CRC(3ec18dcb) SHA1(fb5fe8ba0b59a21401cf091f43ad9f2a4df3447c), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 34)" ) -GAME_CUSTOM( 199?, m4uuaw__7, m4uuaw, "uua21dk.p1", 0x0000, 0x020000, CRC(84919e1c) SHA1(c7315a3d1985180ec5ae1f4e5c7f0c99c1e0bac4), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 35)" ) -GAME_CUSTOM( 199?, m4uuaw__8, m4uuaw, "uua21dr.p1", 0x0000, 0x020000, CRC(434c988f) SHA1(eb6126048df5bc4ff98d9838a3bb6cf24a9ab895), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 36)" ) -GAME_CUSTOM( 199?, m4uuaw__9, m4uuaw, "uua21dy.p1", 0x0000, 0x020000, CRC(098b30d9) SHA1(48daa77f3aafdcd52d7291cdda533e8a9428de0e), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 37)" ) -GAME_CUSTOM( 199?, m4uuaw__aa, m4uuaw, "uua21k.p1", 0x0000, 0x020000, CRC(a3ce7e79) SHA1(8670d2cb7281ccabc15c5288a3e0dd99cfc1ae36), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 38)" ) -GAME_CUSTOM( 199?, m4uuaw__ab, m4uuaw, "uua21r.p1", 0x0000, 0x020000, CRC(641378ea) SHA1(de0282af6a17c7fc16c7eca10e81ffb208675779), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 39)" ) -GAME_CUSTOM( 199?, m4uuaw__ac, m4uuaw, "uua21s.p1", 0x0000, 0x020000, CRC(27c46fcc) SHA1(68a03fcce5d8155d6c0115d813c17217c4120375), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 40)" ) -GAME_CUSTOM( 199?, m4uuaw__ad, m4uuaw, "uua21y.p1", 0x0000, 0x020000, CRC(2ed4d0bc) SHA1(ffb0585e729b389855d24015e1ef7582eab88d3e), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 41)" ) -GAME_CUSTOM( 199?, m4uuaw__ae, m4uuaw, "uua22ad.p1", 0x0000, 0x020000, CRC(b2ace4d5) SHA1(da02abe111fea3fbfb9495e9b447139cd67a61e0), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 42)" ) -GAME_CUSTOM( 199?, m4uuaw__af, m4uuaw, "uua22b.p1", 0x0000, 0x020000, CRC(71a6374a) SHA1(c14ed22fceb83b5ac72021322c9b8bb3d5afeffb), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 43)" ) -GAME_CUSTOM( 199?, m4uuaw__ag, m4uuaw, "uua22bd.p1", 0x0000, 0x020000, CRC(68f705f9) SHA1(678ba97241f3dede96239265eed418d4717637a6), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 44)" ) -GAME_CUSTOM( 199?, m4uuaw__ah, m4uuaw, "uua22d.p1", 0x0000, 0x020000, CRC(c0f75c52) SHA1(a4e1e496b0cbb24767f017fbe228fbb8ab2bb907), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 45)" ) -GAME_CUSTOM( 199?, m4uuaw__ai, m4uuaw, "uua22dh.p1", 0x0000, 0x020000, CRC(a675ab8c) SHA1(37fb437b95f9ff50fe41ebce825e3dd1b361925e), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 46)" ) -GAME_CUSTOM( 199?, m4uuaw__aj, m4uuaw, "uua22dk.p1", 0x0000, 0x020000, CRC(1c25b85b) SHA1(b42cdae2e2c00644376eb5f0c5b7567d3811b162), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 47)" ) -GAME_CUSTOM( 199?, m4uuaw__ak, m4uuaw, "uua22dr.p1", 0x0000, 0x020000, CRC(dbf8bec8) SHA1(b3ac5ed5b8cbc0457e5dfadefcab563e3197b045), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 48)" ) -GAME_CUSTOM( 199?, m4uuaw__al, m4uuaw, "uua22dy.p1", 0x0000, 0x020000, CRC(913f169e) SHA1(9f82f5d868a9be046ced838f8b53730140ed50b2), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 49)" ) -GAME_CUSTOM( 199?, m4uuaw__am, m4uuaw, "uua22h.p1", 0x0000, 0x020000, CRC(bf24993f) SHA1(618d6d2f2b762d61eb58087a3597ffb709658631), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 50)" ) -GAME_CUSTOM( 199?, m4uuaw__an, m4uuaw, "uua22k.p1", 0x0000, 0x020000, CRC(05748ae8) SHA1(d9aeee26c8471bb6ee58a4a838e5c9930da92725), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 51)" ) -GAME_CUSTOM( 199?, m4uuaw__ao, m4uuaw, "uua22r.p1", 0x0000, 0x020000, CRC(c2a98c7b) SHA1(115f7c7a4b9eab5f3270f43a2db7a320dfc4e223), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 52)" ) -GAME_CUSTOM( 199?, m4uuaw__ap, m4uuaw, "uua22s.p1", 0x0000, 0x020000, CRC(65f57c0c) SHA1(7b2526cdd1ec973a91bc7ade116e16e03b32596a), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 53)" ) -GAME_CUSTOM( 199?, m4uuaw__aq, m4uuaw, "uua22y.p1", 0x0000, 0x020000, CRC(886e242d) SHA1(4b49b70fc2635fcf7b538b35b42a358cf4dd60b3), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 54)" ) - - -#define M4RICHFM_EXTRA_ROMS \ - ROM_REGION( 0x100000, "msm6376", 0 ) \ - ROM_LOAD( "rfamouss1.hex", 0x000000, 0x080000, CRC(b237c8b8) SHA1(b2322d68fe57cca0ed49b01ae0d3a0e93a623eac) ) \ - ROM_LOAD( "rfamouss2.hex", 0x080000, 0x080000, CRC(12c295d5) SHA1(0758354cfb5242b4ce3f5f25c3458d91f4b4a1ec) ) -#undef GAME_CUSTOM -#define GAME_CUSTOM(year, setname,parent,name,offset,length,hash,company,title) \ - ROM_START( setname ) \ - ROM_REGION( length, "maincpu", 0 ) \ - ROM_LOAD( name, offset, length, hash ) \ - M4RICHFM_EXTRA_ROMS \ - ROM_END \ - GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4richfm, 0, "rfts.p1", 0x0000, 0x010000, CRC(2a747164) SHA1(a4c8e160f09ebea4fca6dd32ff020d3f1a4f1a1c), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4richfm__a, m4richfm, "rafc.p1", 0x0000, 0x010000, CRC(d92f602f) SHA1(c93131138deb4018d499b9b45c07d4517c5072b7), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4richfm__b, m4richfm, "rafd.p1", 0x0000, 0x010000, CRC(b0e9f470) SHA1(cad080a5d7f24968524fe10f6c43b088f35d7364), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4richfm__c, m4richfm, "rafs.p1", 0x0000, 0x010000, CRC(f312b2e3) SHA1(8bf2cb7b73cfc320143d05d25e28c15fb4f26045), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4richfm__d, m4richfm, "rafy.p1", 0x0000, 0x010000, CRC(a8812d45) SHA1(c0b89833f87ed90eb3e9c3299fcea362d501ed90), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4richfm__e, m4richfm, "rchfam8", 0x0000, 0x004000, CRC(55f16698) SHA1(9853b17bbb81371192a564376be7b3074908dbca), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4richfm__f, m4richfm, "rf5ad.p1", 0x0000, 0x010000, CRC(cd280292) SHA1(605d89608e106979229a00701a2e5b578df50d60), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4richfm__g, m4richfm, "rf5b.p1", 0x0000, 0x010000, CRC(e1edf753) SHA1(677f0397ec57422241f4669be610cffd33a9b44a), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4richfm__h, m4richfm, "rf5bd.p1", 0x0000, 0x010000, CRC(2d698365) SHA1(7f91cee0d34550aba9ac0f4ee398df4de6fd6f7e), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4richfm__i, m4richfm, "rf5d.p1", 0x0000, 0x010000, CRC(034cab0b) SHA1(79eaeb84377dbb8e6bda1dd2ae29a1f79656b9e4), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4richfm__j, m4richfm, "rf5dk.p1", 0x0000, 0x010000, CRC(14fc0f13) SHA1(a2b294da18c3f5bc9c81eb3f3af5ab5ca58c9cad), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4richfm__k, m4richfm, "rf5dy.p1", 0x0000, 0x010000, CRC(a2664c64) SHA1(2256b6e0d6472faa901348cb5be849ad012f1d16), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4richfm__l, m4richfm, "rf5k.p1", 0x0000, 0x010000, CRC(d8787b25) SHA1(885ac7ddd3de4cb475539d02aefbf38fed7c1f2c), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4richfm__m, m4richfm, "rf5s.p1", 0x0000, 0x010000, CRC(8d1ed193) SHA1(a4ca973dac8a8fd550bf7e57a8cdc627c28da4b8), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4richfm__n, m4richfm, "rf5y.p1", 0x0000, 0x010000, CRC(ad288548) SHA1(a7222ab5bffe8e5e0844f8e6f13e09afe74b08a8), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4richfm__o, m4richfm, "rf8b.p1", 0x0000, 0x010000, CRC(105c24e1) SHA1(cb417976a74441bf2ca888198b57fed81d758c15), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4richfm__p, m4richfm, "rf8c.p1", 0x0000, 0x010000, CRC(8924a706) SHA1(abb1a1f6cdeb15884dfa63fc04882f794453d4ec), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4richfm__q, m4richfm, "rft20.10", 0x0000, 0x010000, CRC(41e6ef75) SHA1(d836fdea5a89b845687d2ff929365bd81737c760), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4richfm__r, m4richfm, "rftad.p1", 0x0000, 0x010000, CRC(8553386f) SHA1(ad834d52e51c7f375a370dc6d8586668921a9795), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4richfm__s, m4richfm, "rftb.p1", 0x0000, 0x010000, CRC(0189cc2f) SHA1(62ccc85c50c56aa2e0bcbb42b5c24d402f00d366), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4richfm__t, m4richfm, "rftbd.p1", 0x0000, 0x010000, CRC(08351e03) SHA1(d08d38d46793828b147ccde8121fbb9bf422cd60), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4richfm__u, m4richfm, "rftd.p1", 0x0000, 0x010000, CRC(689f02ed) SHA1(1a30aac5454b0c477a698e9c573fe313bc1fe858), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4richfm__v, m4richfm, "rftdk.p1", 0x0000, 0x010000, CRC(098b88f5) SHA1(4559b561380055c429a5b4741326f64ad89d8481), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4richfm__w, m4richfm, "rftdy.p1", 0x0000, 0x010000, CRC(26b912f8) SHA1(1719d63b4a25293199b0729235beb5b93c484490), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4richfm__x, m4richfm, "rftk.p1", 0x0000, 0x010000, CRC(6a48bd98) SHA1(2f17194869ca008f7a2eb622bd3725bc91950a17), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4richfm__y, m4richfm, "rfty.p1", 0x0000, 0x010000, CRC(723fe46e) SHA1(51bb8aff358d527483eaf1b1e20606d94a937dc6), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4richfm__z, m4richfm, "rich2010", 0x0000, 0x010000, CRC(baecbdbc) SHA1(5fffecf3c91e832d3cfc13dbf5e6b74fc3d6a146), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4richfm__0, m4richfm, "r&f5.10", 0x0000, 0x010000, CRC(45d493d0) SHA1(9a549821a005fa65c2eb8b35c5f15659bd897519), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4richfm__1, m4richfm, "r&f5.4", 0x0000, 0x010000, CRC(0441d833) SHA1(361910fd64bc7291f6200fe354c468d16e7d6c80), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 29)" ) -GAME_CUSTOM( 199?, m4richfm__2, m4richfm, "r&f5.8t", 0x0000, 0x010000, CRC(525e2520) SHA1(84b2ff86d6a54ebb3bcf0138930b2619a8733161), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 30)" ) -GAME_CUSTOM( 199?, m4richfm__3, m4richfm, "r&f55", 0x0000, 0x010000, CRC(6095a72b) SHA1(af25f7c2fb5241064ea995d35fe4fd2f242e3750), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 31)" ) - - -#define M4NNWWC_EXTRA_ROMS \ - ROM_REGION( 0x100000, "msm6376", ROMREGION_ERASE00 ) \ - /* missing, maybe the same as NNWW */ -#undef GAME_CUSTOM -#define GAME_CUSTOM(year, setname,parent,name,offset,length,hash,company,title) \ - ROM_START( setname ) \ - ROM_REGION( length, "maincpu", 0 ) \ - ROM_LOAD( name, offset, length, hash ) \ - M4NNWWC_EXTRA_ROMS \ - ROM_END \ - GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4nnwwc, 0, "cn302c.p1", 0x0000, 0x010000, CRC(fd9de050) SHA1(14c80deba1396aa5be0a1d02964ecd4b946f2ee8), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4nnwwc__a, m4nnwwc, "cf302ad.p1", 0x0000, 0x010000, CRC(6c6aa0cd) SHA1(5a58a19c35b0b195f3b4e7a21f57ca61d45ec1fb), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4nnwwc__b, m4nnwwc, "cf302b.p1", 0x0000, 0x010000, CRC(9ca07939) SHA1(6eb0a5675bb803a11c4c874dc0516d94c48194b7), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4nnwwc__c, m4nnwwc, "cf302bd.p1", 0x0000, 0x010000, CRC(8ba33b7d) SHA1(ebfb62a390de512dc1482cfb9ab64196cbcc5831), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4nnwwc__d, m4nnwwc, "cf302c.p1", 0x0000, 0x010000, CRC(26be2dc4) SHA1(157ca96ebd36f2fbfb501945d0351cc3be38f3b7), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4nnwwc__e, m4nnwwc, "cf302d.p1", 0x0000, 0x010000, CRC(b52d5b47) SHA1(1583963b0bac1288bd20ed0550ad793be0980b03), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4nnwwc__f, m4nnwwc, "cf302dk.p1", 0x0000, 0x010000, CRC(c3d4c74d) SHA1(9a34c1f2fabb20da17988f63c9190ec4dd0b65fb), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4nnwwc__g, m4nnwwc, "cf302dr.p1", 0x0000, 0x010000, CRC(0b25e6b9) SHA1(5fd42abbe985dbdcfe09da50673551330dd26175), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4nnwwc__h, m4nnwwc, "cf302dy.p1", 0x0000, 0x010000, CRC(420b47c1) SHA1(0cb1a843cec3ace21d806fe98212250201a72f12), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4nnwwc__i, m4nnwwc, "cf302k.p1", 0x0000, 0x010000, CRC(07ca4c45) SHA1(8f6ee3c17527b05a6652845019919d490cc00c64), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4nnwwc__j, m4nnwwc, "cf302r.p1", 0x0000, 0x010000, CRC(e09f43bd) SHA1(65dcdf8d223936c4415ddc3f734b83367d6b8db7), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4nnwwc__k, m4nnwwc, "cf302s.p1", 0x0000, 0x010000, CRC(7a3e8ead) SHA1(590dc78b98f9928d6fa87ef661234f88dccfdff8), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4nnwwc__l, m4nnwwc, "cf302y.p1", 0x0000, 0x010000, CRC(c1063a32) SHA1(e1c8fc463b1a1db87110f272a8727435f9d9b97a), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4nnwwc__m, m4nnwwc, "ch302ad.p1", 0x0000, 0x010000, CRC(20405f4e) SHA1(7f87c881f428f704c98b0f4be459980062ccd29a), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4nnwwc__n, m4nnwwc, "ch302b.p1", 0x0000, 0x010000, CRC(cf7543ac) SHA1(2fe810741bfc18f800ad8028724218557d93a830), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4nnwwc__o, m4nnwwc, "ch302bd.p1", 0x0000, 0x010000, CRC(4c3e5664) SHA1(87a1f2133cad624683dac89f1da85d70b018f846), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4nnwwc__p, m4nnwwc, "ch302c.p1", 0x0000, 0x010000, CRC(dcde4d0a) SHA1(d1535f8754d2c0f8183c2c9db97edafdcdfed82e), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4nnwwc__q, m4nnwwc, "ch302d.p1", 0x0000, 0x010000, CRC(e1a02108) SHA1(fa8271a1246a3ae1289bb314494743cfec31f4e2), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4nnwwc__r, m4nnwwc, "ch302dk.p1", 0x0000, 0x010000, CRC(a3f636af) SHA1(c3de325ef5baa3cccd4c9997e615e87521b9e537), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4nnwwc__s, m4nnwwc, "ch302dr.p1", 0x0000, 0x010000, CRC(0620b0c0) SHA1(31aabba5f5b096254908221f884b5088a5a6e883), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4nnwwc__t, m4nnwwc, "ch302dy.p1", 0x0000, 0x010000, CRC(9b4b982e) SHA1(c7c9c501eb1c936ffb8bc2fe1fe9258e92b1d548), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4nnwwc__u, m4nnwwc, "ch302k.p1", 0x0000, 0x010000, CRC(908d8b10) SHA1(a80a5ce1a83d05f1e68e66d14bacc424bc833aa7), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4nnwwc__v, m4nnwwc, "ch302r.p1", 0x0000, 0x010000, CRC(c31c4c28) SHA1(e94c7588211044dae7c5ac587e6232b0ace2fc7b), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4nnwwc__w, m4nnwwc, "ch302s.p1", 0x0000, 0x010000, CRC(e7d0ceb2) SHA1(b75d58136b9e1e4bfde86730ef4e95bc98494813), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4nnwwc__x, m4nnwwc, "ch302y.p1", 0x0000, 0x010000, CRC(5e7764c6) SHA1(05a61a57ac906cbea1d72fffd1c8ea707852b895), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4nnwwc__y, m4nnwwc, "cn302ad.p1", 0x0000, 0x010000, CRC(7a6acd9b) SHA1(9a1f0ed19d66428c6b541ce1c8e169d9b4be3ef1), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4nnwwc__z, m4nnwwc, "cn302b.p1", 0x0000, 0x010000, CRC(b69cb520) SHA1(7313f2740960ca86ecea8609fe8fd58d84a3248c), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4nnwwc__0, m4nnwwc, "cn302bd.p1", 0x0000, 0x010000, CRC(ab828a0b) SHA1(53fa6dad9bdae1d46479596c98cf2c3f4454bb95), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4nnwwc__1, m4nnwwc, "cn302d.p1", 0x0000, 0x010000, CRC(8c6ac365) SHA1(a32b104968aaa4da060072a241a4c54fbdf3c404), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 29)" ) -GAME_CUSTOM( 199?, m4nnwwc__2, m4nnwwc, "cn302dk.p1", 0x0000, 0x010000, CRC(24cbab96) SHA1(77fe3b21fc9470653bada31c700ce926d55ce82e), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 30)" ) -GAME_CUSTOM( 199?, m4nnwwc__3, m4nnwwc, "cn302dr.p1", 0x0000, 0x010000, CRC(09069f0e) SHA1(68b2a34644ee1fca3ce5191e2f25aa808b85fb09), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 31)" ) -GAME_CUSTOM( 199?, m4nnwwc__4, m4nnwwc, "cn302dy.p1", 0x0000, 0x010000, CRC(946db7e0) SHA1(fe29c1da478e3f1a53ad55c661ddcc7003679304), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 32)" ) -GAME_CUSTOM( 199?, m4nnwwc__5, m4nnwwc, "cn302k.p1", 0x0000, 0x010000, CRC(7a3202f1) SHA1(2dd5e8195120b1efc3eb51214cf054432fc50aed), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 33)" ) -GAME_CUSTOM( 199?, m4nnwwc__6, m4nnwwc, "cn302r.p1", 0x0000, 0x010000, CRC(e7cf9e1e) SHA1(66a1e54fc928c09d16f7ac1c002685eee841315f), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 34)" ) -GAME_CUSTOM( 199?, m4nnwwc__7, m4nnwwc, "cn302s.p1", 0x0000, 0x010000, CRC(87703a1a) SHA1(6582ffa42a61b60e92e456a794c4c219a9901a1c), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 35)" ) -GAME_CUSTOM( 199?, m4nnwwc__8, m4nnwwc, "cn302y.p1", 0x0000, 0x010000, CRC(7aa4b6f0) SHA1(2c185a9a7c8a4957fb5901305883661c41cb0cb4), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 36)" ) -GAME_CUSTOM( 199?, m4nnwwc__9, m4nnwwc, "cnc03s.p1", 0x0000, 0x010000, CRC(57a03b29) SHA1(52cc8eb3f02c4a812de06ceec0588ca930e07876), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 37)" ) -GAME_CUSTOM( 199?, m4nnwwc__aa, m4nnwwc, "cl__x__x.2_0", 0x0000, 0x010000, CRC(c3de4791) SHA1(220d32b961b6710d508c0c7e6b2d8e4d292746f4), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 38)" ) -GAME_CUSTOM( 199?, m4nnwwc__ab, m4nnwwc, "cl__x_dx.2_0", 0x0000, 0x010000, CRC(c79833f8) SHA1(b3519b55f6f2a4f081b69483ac0b8860aa8190d9), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 39)" ) -GAME_CUSTOM( 199?, m4nnwwc__ac, m4nnwwc, "cl__xa_x.2_0", 0x0000, 0x010000, CRC(4c3021a1) SHA1(7e7258808dd1693adb956a5e6b076f925eb0a026), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 40)" ) -GAME_CUSTOM( 199?, m4nnwwc__ad, m4nnwwc, "cl__xb_x.2_0", 0x0000, 0x010000, CRC(75a5add7) SHA1(6802ec81b4ebcde9ed014a0440fdc50211a8a350), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 41)" ) - +// "(C)1998 B.W.B." and "SS2 1.0" +GAME_CUSTOM( 199?, m4rhr__9, m4rhr, "rhr2pprg.bin", 0x0000, 0x010000, CRC(f97047b2) SHA1(d3ed8c93e405f9e7448b3924ff9aa84223b76046), "Bwb","Red Hot Roll (Barcrest) (MPU4) (SS2 1.0, hack?)" ) +// "(C)2000 BWB" and "RHR 5.0" +GAME_CUSTOM( 199?, m4rhr__a2, m4rhr, "cr__x__x.5_0", 0x0000, 0x010000, CRC(278fe91e) SHA1(dcfed3a7796d1ee365e535115b66c7d6cbe0ab74), "Bwb","Red Hot Roll (Barcrest) (MPU4) (RHR 5.0)" ) +// "(C)1998 BWB" and "RHR 2.0" +GAME_CUSTOM( 199?, m4rhr__a3, m4rhr, "cr__x_dx.2_0", 0x0000, 0x010000, CRC(73fb120c) SHA1(4c0f39253dee9b528763a9cb609dec31e8529713), "Bwb","Red Hot Roll (Barcrest) (MPU4) (RHR 2.0)" ) +// "RONNIE BARKER" and "RH8 0.1" +GAME_CUSTOM( 199?, m4rhr__6, m4rhr, "rhr10", 0x0000, 0x010000, CRC(2a18a033) SHA1(add907c5ab155c28142dcee57825059715afd80d), "hack","Red Hot Roll (Barcrest) (MPU4) (RH8 0.1, hack, set 1)" ) +GAME_CUSTOM( 199?, m4rhr__7, m4rhr, "rhr2015", 0x0000, 0x010000, CRC(dbfd3b95) SHA1(4fc7ae32f7d76be3d3d07d627391884bd4d6de09), "hack","Red Hot Roll (Barcrest) (MPU4) (RH8 0.1, hack, set 2)" ) +// no copyright and "RHT 0.3" +GAME_CUSTOM( 199?, m4rhr__8, m4rhr, "rhr2515", 0x0000, 0x010000, CRC(e4554c23) SHA1(6d977beb282fd638de3457e467e842ce79b5be7c), "hack","Red Hot Roll (Barcrest) (MPU4) (RHT 0.3, hack)" ) #define M4RHRC_EXTRA_ROMS \ @@ -2575,8 +2582,9 @@ GAME_CUSTOM( 199?, m4nnwwc__ad, m4nnwwc, "cl__xb_x.2_0", 0x0000, 0x010000 ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4rhrc, 0, "cld03ad.p1", 0x0000, 0x010000, CRC(821fde63) SHA1(61f77eeb01331e735cc8c736526d09371e6bdf56), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 1)" ) +// "(C)1991 BARCREST" and "CRU 0.3" (CLD 0.3 on startup) +GAME_CUSTOM( 199?, m4rhrc, 0, "cld03s.p1", 0x0000, 0x010000, CRC(03f8a6bf) SHA1(29ee59fd60d89fca0f236be8b4c12c885db032e7), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (CLD 0.3 / CRU 0.3)" ) +GAME_CUSTOM( 199?, m4rhrc__j, m4rhrc, "cld03ad.p1", 0x0000, 0x010000, CRC(821fde63) SHA1(61f77eeb01331e735cc8c736526d09371e6bdf56), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 1)" ) GAME_CUSTOM( 199?, m4rhrc__a, m4rhrc, "cld03b.p1", 0x0000, 0x010000, CRC(c67a2e82) SHA1(b76110c73d5bd0290fdd31d8300914f63a56c25e), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4rhrc__b, m4rhrc, "cld03bd.p1", 0x0000, 0x010000, CRC(0995fd93) SHA1(c3cc84f78adc54f4698280bf7d0831bb54c3fc3f), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4rhrc__c, m4rhrc, "cld03c.p1", 0x0000, 0x010000, CRC(6e7b319f) SHA1(3da4feb72cb9d4ee24a8e0568f8d9c80a71caf9b), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 4)" ) @@ -2586,8 +2594,9 @@ GAME_CUSTOM( 199?, m4rhrc__f, m4rhrc, "cld03dr.p1", 0x0000, 0x010000, C GAME_CUSTOM( 199?, m4rhrc__g, m4rhrc, "cld03dy.p1", 0x0000, 0x010000, CRC(ed519095) SHA1(ac174166bf2cc6ab81f9782f1be4a9fbe226f34d), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 8)" ) GAME_CUSTOM( 199?, m4rhrc__h, m4rhrc, "cld03k.p1", 0x0000, 0x010000, CRC(3bad05a9) SHA1(1b00ac52f6c87b5c79088b6fc3e6d00f57876ebc), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4rhrc__i, m4rhrc, "cld03r.p1", 0x0000, 0x010000, CRC(2de70bdc) SHA1(d8d0170ca71fde4c79d0b465d09d4bb31acf40cf), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4rhrc__j, m4rhrc, "cld03s.p1", 0x0000, 0x010000, CRC(03f8a6bf) SHA1(29ee59fd60d89fca0f236be8b4c12c885db032e7), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4rhrc__k, m4rhrc, "cld03y.p1", 0x0000, 0x010000, CRC(b08c2332) SHA1(1cdf7fc0e95a50766df2d1cd51cb803b922c30c8), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 12)" ) +// "(C)1991 BARCREST" and "CR4 0.3" (HHN 0.3 on startup) +GAME_CUSTOM( 199?, m4rhrc__v, m4rhrc, "hhn03s.p1", 0x0000, 0x010000, CRC(b531ae78) SHA1(87d043541c23b88b8ec4067c67be77812095faaa), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (HHN 0.3 / CR4 0.3)" ) GAME_CUSTOM( 199?, m4rhrc__l, m4rhrc, "hhn03ad.p1", 0x0000, 0x010000, CRC(e7da568e) SHA1(00f9eecd06131bc5770a6ab650b3548f5b7a8c15), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 13)" ) GAME_CUSTOM( 199?, m4rhrc__m, m4rhrc, "hhn03b.p1", 0x0000, 0x010000, CRC(406e47cd) SHA1(193aed33ac62eb04d89cf63beb33e8e4e28e286e), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 14)" ) GAME_CUSTOM( 199?, m4rhrc__n, m4rhrc, "hhn03bd.p1", 0x0000, 0x010000, CRC(66aed369) SHA1(6c3151790292a277a1d44a1fceae985e52014749), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 15)" ) @@ -2598,8 +2607,9 @@ GAME_CUSTOM( 199?, m4rhrc__r, m4rhrc, "hhn03dr.p1", 0x0000, 0x010000, C GAME_CUSTOM( 199?, m4rhrc__s, m4rhrc, "hhn03dy.p1", 0x0000, 0x010000, CRC(15c8a1b5) SHA1(5a2f28f290fa087b5010f778d4ad8d6c63a3d13e), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 20)" ) GAME_CUSTOM( 199?, m4rhrc__t, m4rhrc, "hhn03k.p1", 0x0000, 0x010000, CRC(95450230) SHA1(3c1c239e84a89ef6acd44ac9c81d33021ac6b0e3), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 21)" ) GAME_CUSTOM( 199?, m4rhrc__u, m4rhrc, "hhn03r.p1", 0x0000, 0x010000, CRC(d96d6825) SHA1(89c3f5494d97326369f10c982842310592456874), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4rhrc__v, m4rhrc, "hhn03s.p1", 0x0000, 0x010000, CRC(b531ae78) SHA1(87d043541c23b88b8ec4067c67be77812095faaa), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 23)" ) GAME_CUSTOM( 199?, m4rhrc__w, m4rhrc, "hhn03y.p1", 0x0000, 0x010000, CRC(440640cb) SHA1(de6b6edcdc99aaa0122ecd24a9a7437e6b44aad2), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 24)" ) +// "(C)1991 BARCREST" and "CR4 0.3" (RRD 0.3 on startup) +GAME_CUSTOM( 199?, m4rhrc__7, m4rhrc, "rrd03s.p1", 0x0000, 0x010000, CRC(e59b79dd) SHA1(32e515bdc861a4d548caedd56a1825c91a318a34), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (RRD 0.3 / CR4 0.3)" ) GAME_CUSTOM( 199?, m4rhrc__x, m4rhrc, "rrd03ad.p1", 0x0000, 0x010000, CRC(6f49d7d1) SHA1(2195a3ad4836e8ffd2e7e6a90e94319d5a5a0ce8), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 25)" ) GAME_CUSTOM( 199?, m4rhrc__y, m4rhrc, "rrd03b.p1", 0x0000, 0x010000, CRC(e8447a3d) SHA1(8bf5936782e0fbec25a8ef892b8df04b6543bc74), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 26)" ) GAME_CUSTOM( 199?, m4rhrc__z, m4rhrc, "rrd03bd.p1", 0x0000, 0x010000, CRC(52cf0357) SHA1(ab4668df6d5ad9614410aede7ad4e030283b78ca), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 27)" ) @@ -2610,9 +2620,203 @@ GAME_CUSTOM( 199?, m4rhrc__3, m4rhrc, "rrd03dr.p1", 0x0000, 0x010000, C GAME_CUSTOM( 199?, m4rhrc__4, m4rhrc, "rrd03dy.p1", 0x0000, 0x010000, CRC(b60b6e51) SHA1(eb6ed1de44d7c982ac8aa0621d4c1ed8e41db5de), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 32)" ) GAME_CUSTOM( 199?, m4rhrc__5, m4rhrc, "rrd03k.p1", 0x0000, 0x010000, CRC(31adc6d6) SHA1(ea68d0d13978bf6cfa7fb9aa1cf91ddfd6258a3a), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 33)" ) GAME_CUSTOM( 199?, m4rhrc__6, m4rhrc, "rrd03r.p1", 0x0000, 0x010000, CRC(11c61483) SHA1(66cd30096bca2f4356acaaa15179c00301c8bc3a), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 34)" ) -GAME_CUSTOM( 199?, m4rhrc__7, m4rhrc, "rrd03s.p1", 0x0000, 0x010000, CRC(e59b79dd) SHA1(32e515bdc861a4d548caedd56a1825c91a318a34), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 35)" ) GAME_CUSTOM( 199?, m4rhrc__8, m4rhrc, "rrd03y.p1", 0x0000, 0x010000, CRC(66fff07a) SHA1(586279533d6d85abf7e97124c9c5342a6a1b0496), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 36)" ) -GAME_CUSTOM( 199?, m4rhrc__aa, m4rhrc, "cr__x_dx.5_0", 0x0000, 0x010000, CRC(4bcf5c02) SHA1(603935880c87f86e7bc765c176266c1c08a6114f), "Barcrest","Red Hot Roll Classic (Barcrest) (MPU4) (set 38)" ) +// "(C)2000 BWB" and "RHR 5.0" +GAME_CUSTOM( 199?, m4rhrc__aa, m4rhrc, "cr__x_dx.5_0", 0x0000, 0x010000, CRC(4bcf5c02) SHA1(603935880c87f86e7bc765c176266c1c08a6114f), "Bwb","Red Hot Roll Classic (Barcrest) (MPU4) (RHR 5.0)" ) + + + +#define M4UUAW_EXTRA_ROMS \ + ROM_REGION( 0x100000, "msm6376", 0 ) \ + ROM_LOAD( "uuasnd.p1", 0x00000, 0x080000, CRC(be1a1131) SHA1(b7f50d8db6b7d134757e0746e7d9faf9fd3a2c7e) ) \ + ROM_LOAD( "uuasnd.p2", 0x080000, 0x080000, CRC(c8492b3a) SHA1(d390e37f4a62869079bb38395a2e86a5ad24392f) ) +#undef GAME_CUSTOM +#define GAME_CUSTOM(year, setname,parent,name,offset,length,hash,company,title) \ + ROM_START( setname ) \ + ROM_REGION( length, "maincpu", 0 ) \ + ROM_LOAD( name, offset, length, hash ) \ + M4UUAW_EXTRA_ROMS \ + ROM_END \ + GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) + +// "(C)1993 BARCREST" and "UPS 2.1" +GAME_CUSTOM( 199?, m4uuaw, 0, "ups21s.p1", 0x0000, 0x020000, CRC(c4a8a542) SHA1(61063d55c6017cf17d704df576cb62da5bd75820), "Barcrest","Up Up and Away (Barcrest) (MPU4) (UPS 2.1)" ) +GAME_CUSTOM( 199?, m4uuaw__n, m4uuaw, "uua21h.p1", 0x0000, 0x020000, CRC(199e6dae) SHA1(ecd95ba2c2255afbaa8df96d625a8bfc97e4d3bc), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 1)" ) +GAME_CUSTOM( 199?, m4uuaw__c, m4uuaw, "ups21ad.p1", 0x0000, 0x020000, CRC(c19fa891) SHA1(c2772ec20a65ce999d901e8c873ec687113b18d4), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4uuaw__d, m4uuaw, "ups21b.p1", 0x0000, 0x020000, CRC(01320407) SHA1(a3273c59733e42013c3448b2a5c7c575ec0182b9), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4uuaw__e, m4uuaw, "ups21bd.p1", 0x0000, 0x020000, CRC(2fa3cb8a) SHA1(8df994ce93fc6f0df27a6ee73676d9ee73593091), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4uuaw__f, m4uuaw, "ups21d.p1", 0x0000, 0x020000, CRC(2a8db1a6) SHA1(873ab3757920c9153c1542748a74b36ce5e190c2), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4uuaw__g, m4uuaw, "ups21dh.p1", 0x0000, 0x020000, CRC(7bcfbb46) SHA1(b93dfa71e3ec0ea96eaf2db4cd382b0a2852a1ff), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 8)" ) +GAME_CUSTOM( 199?, m4uuaw__h, m4uuaw, "ups21dk.p1", 0x0000, 0x020000, CRC(0642ae02) SHA1(8898341f8dc4f4c8c45ce6d04a01bd919cb0548a), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 9)" ) +GAME_CUSTOM( 199?, m4uuaw__i, m4uuaw, "ups21dr.p1", 0x0000, 0x020000, CRC(b54d1533) SHA1(1f9220342dcab675b04895f69a7ca75579ba729f), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 10)" ) +GAME_CUSTOM( 199?, m4uuaw__j, m4uuaw, "ups21dy.p1", 0x0000, 0x020000, CRC(4c850654) SHA1(21f386060301adef646fe469c1fcfb002d3e3424), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 11)" ) +GAME_CUSTOM( 199?, m4uuaw__k, m4uuaw, "ups21h.p1", 0x0000, 0x020000, CRC(555e74cb) SHA1(14246b54839eb334576a119d7c87901f3b2f25ad), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 12)" ) +GAME_CUSTOM( 199?, m4uuaw__l, m4uuaw, "ups21k.p1", 0x0000, 0x020000, CRC(28d3618f) SHA1(186337119e4b663dadc129533ce8a913013390a9), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 13)" ) +GAME_CUSTOM( 199?, m4uuaw__m, m4uuaw, "ups21r.p1", 0x0000, 0x020000, CRC(9bdcdabe) SHA1(db0bb90705abec92a220a3dbe0ea69266d5e0558), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 14)" ) +GAME_CUSTOM( 199?, m4uuaw__o, m4uuaw, "ups21y.p1", 0x0000, 0x020000, CRC(6214c9d9) SHA1(d25fecc9798e342207d358a54efad1908c0e2247), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 16)" ) +// "(C)1993 BARCREST" and "UPS 2.2" +GAME_CUSTOM( 199?, m4uuaw__0, m4uuaw, "ups22s.p1", 0x0000, 0x020000, CRC(ac990aa9) SHA1(396c9eded9c18ab2bcb0f4066a890f6e239830f1), "Barcrest","Up Up and Away (Barcrest) (MPU4) (UPS 2.2)" ) +GAME_CUSTOM( 199?, m4uuaw__p, m4uuaw, "ups22ad.p1", 0x0000, 0x020000, CRC(ee0f53a6) SHA1(eabe58efa82015eb2266a793853e8ade546d6da1), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 17)" ) +GAME_CUSTOM( 199?, m4uuaw__q, m4uuaw, "ups22b.p1", 0x0000, 0x020000, CRC(e7dbf5ae) SHA1(0fbbc3da1af8b60993a7f6082bd5e96da21cd0b8), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 18)" ) +GAME_CUSTOM( 199?, m4uuaw__r, m4uuaw, "ups22bd.p1", 0x0000, 0x020000, CRC(003330bd) SHA1(42ad6ddfd7639909151dcee5e40e82a23074fd59), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 19)" ) +GAME_CUSTOM( 199?, m4uuaw__s, m4uuaw, "ups22d.p1", 0x0000, 0x020000, CRC(cc64400f) SHA1(0ff7858c637fbb43a7cd1313bbf046177e4b7761), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 20)" ) +GAME_CUSTOM( 199?, m4uuaw__t, m4uuaw, "ups22dh.p1", 0x0000, 0x020000, CRC(545f4071) SHA1(3947499d78d31fb0b269a63a518790b503a97685), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 21)" ) +GAME_CUSTOM( 199?, m4uuaw__u, m4uuaw, "ups22dk.p1", 0x0000, 0x020000, CRC(29d25535) SHA1(7f053741d12cce467dd437ea998064e13d1ca52b), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 22)" ) +GAME_CUSTOM( 199?, m4uuaw__v, m4uuaw, "ups22dr.p1", 0x0000, 0x020000, CRC(9addee04) SHA1(45c15536c8846da825a994a667b6e46598c1642e), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 23)" ) +GAME_CUSTOM( 199?, m4uuaw__w, m4uuaw, "ups22dy.p1", 0x0000, 0x020000, CRC(6315fd63) SHA1(9a5fcab51d4e94b96669149285dda28cd41020b8), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 24)" ) +GAME_CUSTOM( 199?, m4uuaw__x, m4uuaw, "ups22h.p1", 0x0000, 0x020000, CRC(b3b78562) SHA1(3e75fa20156faa3d38c2b5ac824bffe47e72b7bc), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 25)" ) +GAME_CUSTOM( 199?, m4uuaw__y, m4uuaw, "ups22k.p1", 0x0000, 0x020000, CRC(ce3a9026) SHA1(80977176c5bae809a564f4fc0e3d6370f91f829b), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 26)" ) +GAME_CUSTOM( 199?, m4uuaw__z, m4uuaw, "ups22r.p1", 0x0000, 0x020000, CRC(7d352b17) SHA1(d2d1d016a587be318e9018eb1953e68fe83620df), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 27)" ) +GAME_CUSTOM( 199?, m4uuaw__1, m4uuaw, "ups22y.p1", 0x0000, 0x020000, CRC(84fd3870) SHA1(8d294ae1a92d1e99c4c3f17a2d77fe1d994b2c33), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 29)" ) +// "(C)1993 BARCREST" and "UUA 2.1" +GAME_CUSTOM( 199?, m4uuaw__ac, m4uuaw, "uua21s.p1", 0x0000, 0x020000, CRC(27c46fcc) SHA1(68a03fcce5d8155d6c0115d813c17217c4120375), "Barcrest","Up Up and Away (Barcrest) (MPU4) (UUA 2.1)" ) +GAME_CUSTOM( 199?, m4uuaw__2, m4uuaw, "uua21ad.p1", 0x0000, 0x020000, CRC(2a18c292) SHA1(5853cb069eb5caa23372e5dedd33868103125780), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 30)" ) +GAME_CUSTOM( 199?, m4uuaw__3, m4uuaw, "uua21b.p1", 0x0000, 0x020000, CRC(d71cc3db) SHA1(7d783110341237769165a08fd86f597225f8d90c), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 31)" ) +GAME_CUSTOM( 199?, m4uuaw__4, m4uuaw, "uua21bd.p1", 0x0000, 0x020000, CRC(f04323be) SHA1(194c996d4c8e2fed2bcb02e29423e68b53900a1f), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 32)" ) +GAME_CUSTOM( 199?, m4uuaw__5, m4uuaw, "uua21d.p1", 0x0000, 0x020000, CRC(664da8c3) SHA1(c93b0b5e796fcde0850e2b3054f1db0417f4e9ed), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 33)" ) +GAME_CUSTOM( 199?, m4uuaw__6, m4uuaw, "uua21dh.p1", 0x0000, 0x020000, CRC(3ec18dcb) SHA1(fb5fe8ba0b59a21401cf091f43ad9f2a4df3447c), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 34)" ) +GAME_CUSTOM( 199?, m4uuaw__7, m4uuaw, "uua21dk.p1", 0x0000, 0x020000, CRC(84919e1c) SHA1(c7315a3d1985180ec5ae1f4e5c7f0c99c1e0bac4), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 35)" ) +GAME_CUSTOM( 199?, m4uuaw__8, m4uuaw, "uua21dr.p1", 0x0000, 0x020000, CRC(434c988f) SHA1(eb6126048df5bc4ff98d9838a3bb6cf24a9ab895), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 36)" ) +GAME_CUSTOM( 199?, m4uuaw__9, m4uuaw, "uua21dy.p1", 0x0000, 0x020000, CRC(098b30d9) SHA1(48daa77f3aafdcd52d7291cdda533e8a9428de0e), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 37)" ) +GAME_CUSTOM( 199?, m4uuaw__aa, m4uuaw, "uua21k.p1", 0x0000, 0x020000, CRC(a3ce7e79) SHA1(8670d2cb7281ccabc15c5288a3e0dd99cfc1ae36), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 38)" ) +GAME_CUSTOM( 199?, m4uuaw__ab, m4uuaw, "uua21r.p1", 0x0000, 0x020000, CRC(641378ea) SHA1(de0282af6a17c7fc16c7eca10e81ffb208675779), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 39)" ) +GAME_CUSTOM( 199?, m4uuaw__ad, m4uuaw, "uua21y.p1", 0x0000, 0x020000, CRC(2ed4d0bc) SHA1(ffb0585e729b389855d24015e1ef7582eab88d3e), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 41)" ) +// "(C)1993 BARCREST" and "UUA 2.2" +GAME_CUSTOM( 199?, m4uuaw__ap, m4uuaw, "uua22s.p1", 0x0000, 0x020000, CRC(65f57c0c) SHA1(7b2526cdd1ec973a91bc7ade116e16e03b32596a), "Barcrest","Up Up and Away (Barcrest) (MPU4) (UUA 2.2)" ) +GAME_CUSTOM( 199?, m4uuaw__ae, m4uuaw, "uua22ad.p1", 0x0000, 0x020000, CRC(b2ace4d5) SHA1(da02abe111fea3fbfb9495e9b447139cd67a61e0), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 42)" ) +GAME_CUSTOM( 199?, m4uuaw__af, m4uuaw, "uua22b.p1", 0x0000, 0x020000, CRC(71a6374a) SHA1(c14ed22fceb83b5ac72021322c9b8bb3d5afeffb), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 43)" ) +GAME_CUSTOM( 199?, m4uuaw__ag, m4uuaw, "uua22bd.p1", 0x0000, 0x020000, CRC(68f705f9) SHA1(678ba97241f3dede96239265eed418d4717637a6), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 44)" ) +GAME_CUSTOM( 199?, m4uuaw__ah, m4uuaw, "uua22d.p1", 0x0000, 0x020000, CRC(c0f75c52) SHA1(a4e1e496b0cbb24767f017fbe228fbb8ab2bb907), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 45)" ) +GAME_CUSTOM( 199?, m4uuaw__ai, m4uuaw, "uua22dh.p1", 0x0000, 0x020000, CRC(a675ab8c) SHA1(37fb437b95f9ff50fe41ebce825e3dd1b361925e), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 46)" ) +GAME_CUSTOM( 199?, m4uuaw__aj, m4uuaw, "uua22dk.p1", 0x0000, 0x020000, CRC(1c25b85b) SHA1(b42cdae2e2c00644376eb5f0c5b7567d3811b162), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 47)" ) +GAME_CUSTOM( 199?, m4uuaw__ak, m4uuaw, "uua22dr.p1", 0x0000, 0x020000, CRC(dbf8bec8) SHA1(b3ac5ed5b8cbc0457e5dfadefcab563e3197b045), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 48)" ) +GAME_CUSTOM( 199?, m4uuaw__al, m4uuaw, "uua22dy.p1", 0x0000, 0x020000, CRC(913f169e) SHA1(9f82f5d868a9be046ced838f8b53730140ed50b2), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 49)" ) +GAME_CUSTOM( 199?, m4uuaw__am, m4uuaw, "uua22h.p1", 0x0000, 0x020000, CRC(bf24993f) SHA1(618d6d2f2b762d61eb58087a3597ffb709658631), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 50)" ) +GAME_CUSTOM( 199?, m4uuaw__an, m4uuaw, "uua22k.p1", 0x0000, 0x020000, CRC(05748ae8) SHA1(d9aeee26c8471bb6ee58a4a838e5c9930da92725), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 51)" ) +GAME_CUSTOM( 199?, m4uuaw__ao, m4uuaw, "uua22r.p1", 0x0000, 0x020000, CRC(c2a98c7b) SHA1(115f7c7a4b9eab5f3270f43a2db7a320dfc4e223), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 52)" ) +GAME_CUSTOM( 199?, m4uuaw__aq, m4uuaw, "uua22y.p1", 0x0000, 0x020000, CRC(886e242d) SHA1(4b49b70fc2635fcf7b538b35b42a358cf4dd60b3), "Barcrest","Up Up and Away (Barcrest) (MPU4) (set 54)" ) +// no copyright string and "UUA 2.0" +GAME_CUSTOM( 199?, m4uuaw__a, m4uuaw, "upa15g", 0x0000, 0x020000, CRC(d20b8b92) SHA1(6fcddc781c204dfd34de2c4e4ce0ec35fb3ec4e0), "hack","Up Up and Away (Barcrest) (MPU4) (UUA 2.0, hack)" ) +// no copyright string and "UPS 2.0" +GAME_CUSTOM( 199?, m4uuaw__b, m4uuaw, "upa15t", 0x0000, 0x020000, CRC(85e3e82a) SHA1(e90183fab082f159d76ea14da794d52ee6ab8200), "hack","Up Up and Away (Barcrest) (MPU4) (UPS 2.0, hack)" ) + + +#define M4RICHFM_EXTRA_ROMS \ + ROM_REGION( 0x100000, "msm6376", 0 ) \ + ROM_LOAD( "rfamouss1.hex", 0x000000, 0x080000, CRC(b237c8b8) SHA1(b2322d68fe57cca0ed49b01ae0d3a0e93a623eac) ) \ + ROM_LOAD( "rfamouss2.hex", 0x080000, 0x080000, CRC(12c295d5) SHA1(0758354cfb5242b4ce3f5f25c3458d91f4b4a1ec) ) +#undef GAME_CUSTOM +#define GAME_CUSTOM(year, setname,parent,name,offset,length,hash,company,title) \ + ROM_START( setname ) \ + ROM_REGION( length, "maincpu", 0 ) \ + ROM_LOAD( name, offset, length, hash ) \ + M4RICHFM_EXTRA_ROMS \ + ROM_END \ + GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) + +// "(C)1993 BARCREST" and "RFT 0.2" +GAME_CUSTOM( 199?, m4richfm, 0, "rfts.p1", 0x0000, 0x010000, CRC(2a747164) SHA1(a4c8e160f09ebea4fca6dd32ff020d3f1a4f1a1c), "Barcrest","Rich & Famous (Barcrest) (MPU4) (RFT 0.2)" ) +GAME_CUSTOM( 199?, m4richfm__r, m4richfm, "rftad.p1", 0x0000, 0x010000, CRC(8553386f) SHA1(ad834d52e51c7f375a370dc6d8586668921a9795), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 19)" ) +GAME_CUSTOM( 199?, m4richfm__s, m4richfm, "rftb.p1", 0x0000, 0x010000, CRC(0189cc2f) SHA1(62ccc85c50c56aa2e0bcbb42b5c24d402f00d366), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 20)" ) +GAME_CUSTOM( 199?, m4richfm__t, m4richfm, "rftbd.p1", 0x0000, 0x010000, CRC(08351e03) SHA1(d08d38d46793828b147ccde8121fbb9bf422cd60), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 21)" ) +GAME_CUSTOM( 199?, m4richfm__u, m4richfm, "rftd.p1", 0x0000, 0x010000, CRC(689f02ed) SHA1(1a30aac5454b0c477a698e9c573fe313bc1fe858), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 22)" ) +GAME_CUSTOM( 199?, m4richfm__v, m4richfm, "rftdk.p1", 0x0000, 0x010000, CRC(098b88f5) SHA1(4559b561380055c429a5b4741326f64ad89d8481), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 23)" ) +GAME_CUSTOM( 199?, m4richfm__w, m4richfm, "rftdy.p1", 0x0000, 0x010000, CRC(26b912f8) SHA1(1719d63b4a25293199b0729235beb5b93c484490), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 24)" ) +GAME_CUSTOM( 199?, m4richfm__x, m4richfm, "rftk.p1", 0x0000, 0x010000, CRC(6a48bd98) SHA1(2f17194869ca008f7a2eb622bd3725bc91950a17), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 25)" ) +GAME_CUSTOM( 199?, m4richfm__y, m4richfm, "rfty.p1", 0x0000, 0x010000, CRC(723fe46e) SHA1(51bb8aff358d527483eaf1b1e20606d94a937dc6), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 26)" ) +// "(C)1993 BARCREST" and "RAF 0.3" +GAME_CUSTOM( 199?, m4richfm__c, m4richfm, "rafs.p1", 0x0000, 0x010000, CRC(f312b2e3) SHA1(8bf2cb7b73cfc320143d05d25e28c15fb4f26045), "Barcrest","Rich & Famous (Barcrest) (MPU4) (RAF 0.3)" ) +GAME_CUSTOM( 199?, m4richfm__a, m4richfm, "rafc.p1", 0x0000, 0x010000, CRC(d92f602f) SHA1(c93131138deb4018d499b9b45c07d4517c5072b7), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 2)" ) +GAME_CUSTOM( 199?, m4richfm__b, m4richfm, "rafd.p1", 0x0000, 0x010000, CRC(b0e9f470) SHA1(cad080a5d7f24968524fe10f6c43b088f35d7364), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4richfm__d, m4richfm, "rafy.p1", 0x0000, 0x010000, CRC(a8812d45) SHA1(c0b89833f87ed90eb3e9c3299fcea362d501ed90), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 5)" ) +// "(C)1993 BARCREST" and "RF5 0.2" +GAME_CUSTOM( 199?, m4richfm__m, m4richfm, "rf5s.p1", 0x0000, 0x010000, CRC(8d1ed193) SHA1(a4ca973dac8a8fd550bf7e57a8cdc627c28da4b8), "Barcrest","Rich & Famous (Barcrest) (MPU4) (RF5 0.2)" ) +GAME_CUSTOM( 199?, m4richfm__f, m4richfm, "rf5ad.p1", 0x0000, 0x010000, CRC(cd280292) SHA1(605d89608e106979229a00701a2e5b578df50d60), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4richfm__g, m4richfm, "rf5b.p1", 0x0000, 0x010000, CRC(e1edf753) SHA1(677f0397ec57422241f4669be610cffd33a9b44a), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 8)" ) +GAME_CUSTOM( 199?, m4richfm__h, m4richfm, "rf5bd.p1", 0x0000, 0x010000, CRC(2d698365) SHA1(7f91cee0d34550aba9ac0f4ee398df4de6fd6f7e), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 9)" ) +GAME_CUSTOM( 199?, m4richfm__i, m4richfm, "rf5d.p1", 0x0000, 0x010000, CRC(034cab0b) SHA1(79eaeb84377dbb8e6bda1dd2ae29a1f79656b9e4), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 10)" ) +GAME_CUSTOM( 199?, m4richfm__j, m4richfm, "rf5dk.p1", 0x0000, 0x010000, CRC(14fc0f13) SHA1(a2b294da18c3f5bc9c81eb3f3af5ab5ca58c9cad), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 11)" ) +GAME_CUSTOM( 199?, m4richfm__k, m4richfm, "rf5dy.p1", 0x0000, 0x010000, CRC(a2664c64) SHA1(2256b6e0d6472faa901348cb5be849ad012f1d16), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 12)" ) +GAME_CUSTOM( 199?, m4richfm__l, m4richfm, "rf5k.p1", 0x0000, 0x010000, CRC(d8787b25) SHA1(885ac7ddd3de4cb475539d02aefbf38fed7c1f2c), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 13)" ) +GAME_CUSTOM( 199?, m4richfm__n, m4richfm, "rf5y.p1", 0x0000, 0x010000, CRC(ad288548) SHA1(a7222ab5bffe8e5e0844f8e6f13e09afe74b08a8), "Barcrest","Rich & Famous (Barcrest) (MPU4) (set 15)" ) +// "(C)1993 BARCREST" and "RF8 0.1" +GAME_CUSTOM( 199?, m4richfm__o, m4richfm, "rf8b.p1", 0x0000, 0x010000, CRC(105c24e1) SHA1(cb417976a74441bf2ca888198b57fed81d758c15), "Barcrest","Rich & Famous (Barcrest) (MPU4) (RF8 0.1B)" ) +GAME_CUSTOM( 199?, m4richfm__p, m4richfm, "rf8c.p1", 0x0000, 0x010000, CRC(8924a706) SHA1(abb1a1f6cdeb15884dfa63fc04882f794453d4ec), "Barcrest","Rich & Famous (Barcrest) (MPU4) (RF8 0.1C)" ) +// "(C)1993 BARCREST" and "RFT 0.2" but hack +GAME_CUSTOM( 199?, m4richfm__q, m4richfm, "rft20.10", 0x0000, 0x010000, CRC(41e6ef75) SHA1(d836fdea5a89b845687d2ff929365bd81737c760), "Barcrest","Rich & Famous (Barcrest) (MPU4) (RFT 0.2, hack, set 1)" ) +GAME_CUSTOM( 199?, m4richfm__z, m4richfm, "rich2010", 0x0000, 0x010000, CRC(baecbdbc) SHA1(5fffecf3c91e832d3cfc13dbf5e6b74fc3d6a146), "Barcrest","Rich & Famous (Barcrest) (MPU4) (RFT 0.2, hack, set 2)" ) +// "(C)1997 B.W.B." and "RFC 1.3" +GAME_CUSTOM( 199?, m4richfm__0, m4richfm, "r&f5.10", 0x0000, 0x010000, CRC(45d493d0) SHA1(9a549821a005fa65c2eb8b35c5f15659bd897519), "Bwb","Rich & Famous (Barcrest) (MPU4) (RFC 1.3)" ) +// "(C)1997 B.W.B." and "RF4 1.1" +GAME_CUSTOM( 199?, m4richfm__1, m4richfm, "r&f5.4", 0x0000, 0x010000, CRC(0441d833) SHA1(361910fd64bc7291f6200fe354c468d16e7d6c80), "Bwb","Rich & Famous (Barcrest) (MPU4) (RF4 1.1)" ) +// "(C)1997 B.W.B." and "RF8 1.2" +GAME_CUSTOM( 199?, m4richfm__2, m4richfm, "r&f5.8t", 0x0000, 0x010000, CRC(525e2520) SHA1(84b2ff86d6a54ebb3bcf0138930b2619a8733161), "Bwb","Rich & Famous (Barcrest) (MPU4) (RF8 1.2)" ) +// "1997 COCO" and "RF4 1.1" +GAME_CUSTOM( 199?, m4richfm__3, m4richfm, "r&f55", 0x0000, 0x010000, CRC(6095a72b) SHA1(af25f7c2fb5241064ea995d35fe4fd2f242e3750), "hack","Rich & Famous (Barcrest) (MPU4) (RF4 1.1, hack)" ) +// bad dump (most of the rom is missing) but doesn't seem a 100% match for a set we have a complete dump of +GAME_CUSTOM( 199?, m4richfm__e, m4richfm, "rchfam8", 0x0000, 0x004000, CRC(55f16698) SHA1(9853b17bbb81371192a564376be7b3074908dbca), "Barcrest","Rich & Famous (Barcrest) (MPU4) (bad)" ) + +#define M4NNWWC_EXTRA_ROMS \ + ROM_REGION( 0x100000, "msm6376", ROMREGION_ERASE00 ) \ + /* missing, maybe the same as NNWW */ +#undef GAME_CUSTOM +#define GAME_CUSTOM(year, setname,parent,name,offset,length,hash,company,title) \ + ROM_START( setname ) \ + ROM_REGION( length, "maincpu", 0 ) \ + ROM_LOAD( name, offset, length, hash ) \ + M4NNWWC_EXTRA_ROMS \ + ROM_END \ + GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) + + +/// "(C)1991 BARCREST" and "NN4 0.2" (CN3 0.2 on startup) +GAME_CUSTOM( 199?, m4nnwwc, 0, "cn302s.p1", 0x0000, 0x010000, CRC(87703a1a) SHA1(6582ffa42a61b60e92e456a794c4c219a9901a1c), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (CN3 0.2 / NN4 0.2)" ) +GAME_CUSTOM( 199?, m4nnwwc__7, m4nnwwc, "cn302c.p1", 0x0000, 0x010000, CRC(fd9de050) SHA1(14c80deba1396aa5be0a1d02964ecd4b946f2ee8), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 1)" ) +GAME_CUSTOM( 199?, m4nnwwc__y, m4nnwwc, "cn302ad.p1", 0x0000, 0x010000, CRC(7a6acd9b) SHA1(9a1f0ed19d66428c6b541ce1c8e169d9b4be3ef1), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 26)" ) +GAME_CUSTOM( 199?, m4nnwwc__z, m4nnwwc, "cn302b.p1", 0x0000, 0x010000, CRC(b69cb520) SHA1(7313f2740960ca86ecea8609fe8fd58d84a3248c), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 27)" ) +GAME_CUSTOM( 199?, m4nnwwc__0, m4nnwwc, "cn302bd.p1", 0x0000, 0x010000, CRC(ab828a0b) SHA1(53fa6dad9bdae1d46479596c98cf2c3f4454bb95), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 28)" ) +GAME_CUSTOM( 199?, m4nnwwc__1, m4nnwwc, "cn302d.p1", 0x0000, 0x010000, CRC(8c6ac365) SHA1(a32b104968aaa4da060072a241a4c54fbdf3c404), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 29)" ) +GAME_CUSTOM( 199?, m4nnwwc__2, m4nnwwc, "cn302dk.p1", 0x0000, 0x010000, CRC(24cbab96) SHA1(77fe3b21fc9470653bada31c700ce926d55ce82e), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 30)" ) +GAME_CUSTOM( 199?, m4nnwwc__3, m4nnwwc, "cn302dr.p1", 0x0000, 0x010000, CRC(09069f0e) SHA1(68b2a34644ee1fca3ce5191e2f25aa808b85fb09), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 31)" ) +GAME_CUSTOM( 199?, m4nnwwc__4, m4nnwwc, "cn302dy.p1", 0x0000, 0x010000, CRC(946db7e0) SHA1(fe29c1da478e3f1a53ad55c661ddcc7003679304), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 32)" ) +GAME_CUSTOM( 199?, m4nnwwc__5, m4nnwwc, "cn302k.p1", 0x0000, 0x010000, CRC(7a3202f1) SHA1(2dd5e8195120b1efc3eb51214cf054432fc50aed), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 33)" ) +GAME_CUSTOM( 199?, m4nnwwc__6, m4nnwwc, "cn302r.p1", 0x0000, 0x010000, CRC(e7cf9e1e) SHA1(66a1e54fc928c09d16f7ac1c002685eee841315f), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 34)" ) +GAME_CUSTOM( 199?, m4nnwwc__8, m4nnwwc, "cn302y.p1", 0x0000, 0x010000, CRC(7aa4b6f0) SHA1(2c185a9a7c8a4957fb5901305883661c41cb0cb4), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 36)" ) +/// "(C)1991 BARCREST" and "NN4 0.2" (CF3 0.2 on startup) +GAME_CUSTOM( 199?, m4nnwwc__k, m4nnwwc, "cf302s.p1", 0x0000, 0x010000, CRC(7a3e8ead) SHA1(590dc78b98f9928d6fa87ef661234f88dccfdff8), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (CF3 0.2 / NN4 0.2)" ) +GAME_CUSTOM( 199?, m4nnwwc__a, m4nnwwc, "cf302ad.p1", 0x0000, 0x010000, CRC(6c6aa0cd) SHA1(5a58a19c35b0b195f3b4e7a21f57ca61d45ec1fb), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 2)" ) +GAME_CUSTOM( 199?, m4nnwwc__b, m4nnwwc, "cf302b.p1", 0x0000, 0x010000, CRC(9ca07939) SHA1(6eb0a5675bb803a11c4c874dc0516d94c48194b7), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4nnwwc__c, m4nnwwc, "cf302bd.p1", 0x0000, 0x010000, CRC(8ba33b7d) SHA1(ebfb62a390de512dc1482cfb9ab64196cbcc5831), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4nnwwc__d, m4nnwwc, "cf302c.p1", 0x0000, 0x010000, CRC(26be2dc4) SHA1(157ca96ebd36f2fbfb501945d0351cc3be38f3b7), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4nnwwc__e, m4nnwwc, "cf302d.p1", 0x0000, 0x010000, CRC(b52d5b47) SHA1(1583963b0bac1288bd20ed0550ad793be0980b03), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4nnwwc__f, m4nnwwc, "cf302dk.p1", 0x0000, 0x010000, CRC(c3d4c74d) SHA1(9a34c1f2fabb20da17988f63c9190ec4dd0b65fb), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4nnwwc__g, m4nnwwc, "cf302dr.p1", 0x0000, 0x010000, CRC(0b25e6b9) SHA1(5fd42abbe985dbdcfe09da50673551330dd26175), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 8)" ) +GAME_CUSTOM( 199?, m4nnwwc__h, m4nnwwc, "cf302dy.p1", 0x0000, 0x010000, CRC(420b47c1) SHA1(0cb1a843cec3ace21d806fe98212250201a72f12), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 9)" ) +GAME_CUSTOM( 199?, m4nnwwc__i, m4nnwwc, "cf302k.p1", 0x0000, 0x010000, CRC(07ca4c45) SHA1(8f6ee3c17527b05a6652845019919d490cc00c64), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 10)" ) +GAME_CUSTOM( 199?, m4nnwwc__j, m4nnwwc, "cf302r.p1", 0x0000, 0x010000, CRC(e09f43bd) SHA1(65dcdf8d223936c4415ddc3f734b83367d6b8db7), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 11)" ) +GAME_CUSTOM( 199?, m4nnwwc__l, m4nnwwc, "cf302y.p1", 0x0000, 0x010000, CRC(c1063a32) SHA1(e1c8fc463b1a1db87110f272a8727435f9d9b97a), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 13)" ) +/// "(C)1991 BARCREST" and "NN4 0.2" (CH3 0.2 on startup) +GAME_CUSTOM( 199?, m4nnwwc__w, m4nnwwc, "ch302s.p1", 0x0000, 0x010000, CRC(e7d0ceb2) SHA1(b75d58136b9e1e4bfde86730ef4e95bc98494813), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (CH3 0.2 / NN4 0.2)" ) +GAME_CUSTOM( 199?, m4nnwwc__m, m4nnwwc, "ch302ad.p1", 0x0000, 0x010000, CRC(20405f4e) SHA1(7f87c881f428f704c98b0f4be459980062ccd29a), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 14)" ) +GAME_CUSTOM( 199?, m4nnwwc__n, m4nnwwc, "ch302b.p1", 0x0000, 0x010000, CRC(cf7543ac) SHA1(2fe810741bfc18f800ad8028724218557d93a830), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 15)" ) +GAME_CUSTOM( 199?, m4nnwwc__o, m4nnwwc, "ch302bd.p1", 0x0000, 0x010000, CRC(4c3e5664) SHA1(87a1f2133cad624683dac89f1da85d70b018f846), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 16)" ) +GAME_CUSTOM( 199?, m4nnwwc__p, m4nnwwc, "ch302c.p1", 0x0000, 0x010000, CRC(dcde4d0a) SHA1(d1535f8754d2c0f8183c2c9db97edafdcdfed82e), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 17)" ) +GAME_CUSTOM( 199?, m4nnwwc__q, m4nnwwc, "ch302d.p1", 0x0000, 0x010000, CRC(e1a02108) SHA1(fa8271a1246a3ae1289bb314494743cfec31f4e2), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 18)" ) +GAME_CUSTOM( 199?, m4nnwwc__r, m4nnwwc, "ch302dk.p1", 0x0000, 0x010000, CRC(a3f636af) SHA1(c3de325ef5baa3cccd4c9997e615e87521b9e537), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 19)" ) +GAME_CUSTOM( 199?, m4nnwwc__s, m4nnwwc, "ch302dr.p1", 0x0000, 0x010000, CRC(0620b0c0) SHA1(31aabba5f5b096254908221f884b5088a5a6e883), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 20)" ) +GAME_CUSTOM( 199?, m4nnwwc__t, m4nnwwc, "ch302dy.p1", 0x0000, 0x010000, CRC(9b4b982e) SHA1(c7c9c501eb1c936ffb8bc2fe1fe9258e92b1d548), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 21)" ) +GAME_CUSTOM( 199?, m4nnwwc__u, m4nnwwc, "ch302k.p1", 0x0000, 0x010000, CRC(908d8b10) SHA1(a80a5ce1a83d05f1e68e66d14bacc424bc833aa7), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 22)" ) +GAME_CUSTOM( 199?, m4nnwwc__v, m4nnwwc, "ch302r.p1", 0x0000, 0x010000, CRC(c31c4c28) SHA1(e94c7588211044dae7c5ac587e6232b0ace2fc7b), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 23)" ) +GAME_CUSTOM( 199?, m4nnwwc__x, m4nnwwc, "ch302y.p1", 0x0000, 0x010000, CRC(5e7764c6) SHA1(05a61a57ac906cbea1d72fffd1c8ea707852b895), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (set 25)" ) +/// "(C)1991 BARCREST" and "NN4 0.1" (CN3 0.1 on startup) +GAME_CUSTOM( 199?, m4nnwwc__9, m4nnwwc, "cnc03s.p1", 0x0000, 0x010000, CRC(57a03b29) SHA1(52cc8eb3f02c4a812de06ceec0588ca930e07876), "Barcrest","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (CN3 0.1 / NN4 0.1)" ) +// "(C)2000 BWB" and "CNN 2.0" +GAME_CUSTOM( 199?, m4nnwwc__aa, m4nnwwc, "cl__x__x.2_0", 0x0000, 0x010000, CRC(c3de4791) SHA1(220d32b961b6710d508c0c7e6b2d8e4d292746f4), "Bwb","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (CNN 2.0, set 1)" ) +GAME_CUSTOM( 199?, m4nnwwc__ab, m4nnwwc, "cl__x_dx.2_0", 0x0000, 0x010000, CRC(c79833f8) SHA1(b3519b55f6f2a4f081b69483ac0b8860aa8190d9), "Bwb","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (CNN 2.0, set 2)" ) +GAME_CUSTOM( 199?, m4nnwwc__ac, m4nnwwc, "cl__xa_x.2_0", 0x0000, 0x010000, CRC(4c3021a1) SHA1(7e7258808dd1693adb956a5e6b076f925eb0a026), "Bwb","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (CNN 2.0, set 3)" ) +GAME_CUSTOM( 199?, m4nnwwc__ad, m4nnwwc, "cl__xb_x.2_0", 0x0000, 0x010000, CRC(75a5add7) SHA1(6802ec81b4ebcde9ed014a0440fdc50211a8a350), "Bwb","Nudge Nudge Wink Wink Classic (Barcrest) (MPU4) (CNN 2.0, set 4)" ) + + #define M4VIZ_EXTRA_ROMS \ ROM_REGION( 0x48, "fakechr", 0 ) \ @@ -2629,32 +2833,36 @@ GAME_CUSTOM( 199?, m4rhrc__aa, m4rhrc, "cr__x_dx.5_0", 0x0000, 0x010000, C ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4viz, 0, "viz208c", 0x0000, 0x010000, CRC(00a65029) SHA1(8dfb68d1a9f4cd00f239ed87a1d330ccb655c35b), "Barcrest","Viz (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4viz__a, m4viz, "viz20_101", 0x0000, 0x010000, CRC(0847b812) SHA1(6de9e9dad272932a22ebe457ac50da1126d931ea), "Barcrest","Viz (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4viz__b, m4viz, "viz20pv2", 0x0000, 0x010000, CRC(7e56ff95) SHA1(83679b64881adbe547b43255374de061859e17ef), "Barcrest","Viz (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4viz__c, m4viz, "viz58c", 0x0000, 0x010000, CRC(95b8918b) SHA1(4ad4ff9098e98c2076e7058493c181da705acb52), "Barcrest","Viz (Barcrest) (MPU4) (set 4)" ) +// "(C)1991 BARCREST" and "VIZ 0.6" +GAME_CUSTOM( 199?, m4viz, 0, "vizs.p1", 0x0000, 0x010000, CRC(86b487dc) SHA1(62215752e1da1ca923e6b9e410c8445577be34dd), "Barcrest","Viz (Barcrest) (MPU4) (VIZ 0.6)" ) GAME_CUSTOM( 199?, m4viz__d, m4viz, "vizb.p1", 0x0000, 0x010000, CRC(afdc6306) SHA1(4d35703267b3742dd7008c00ec525689c56bf227), "Barcrest","Viz (Barcrest) (MPU4) (set 5)" ) GAME_CUSTOM( 199?, m4viz__e, m4viz, "vizc.p1", 0x0000, 0x010000, CRC(876c30fc) SHA1(f126496e87d7e84ca39d2921bf9f2be0fa2c7586), "Barcrest","Viz (Barcrest) (MPU4) (set 6)" ) GAME_CUSTOM( 199?, m4viz__f, m4viz, "vizd.p1", 0x0000, 0x010000, CRC(46bee8cd) SHA1(4094651fd8954ca2f5cfc2bba4fc51d865c86098), "Barcrest","Viz (Barcrest) (MPU4) (set 7)" ) GAME_CUSTOM( 199?, m4viz__g, m4viz, "vizdk.p1", 0x0000, 0x010000, CRC(24476360) SHA1(b5141a40f8c1ed3b3fbaf43ae539ae2f1aedbcca), "Barcrest","Viz (Barcrest) (MPU4) (set 8)" ) GAME_CUSTOM( 199?, m4viz__h, m4viz, "vizdy.p1", 0x0000, 0x010000, CRC(88807a1f) SHA1(dc1539a5e69b5f0b3f68ccf7360ff4f240f6b7c7), "Barcrest","Viz (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4viz__i, m4viz, "vizk.p1", 0x0000, 0x010000, CRC(6647f592) SHA1(2ce7222bd9e173480ddc901f84859ca3ad7aded1), "Barcrest","Viz (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4viz__j, m4viz, "vizs.p1", 0x0000, 0x010000, CRC(86b487dc) SHA1(62215752e1da1ca923e6b9e410c8445577be34dd), "Barcrest","Viz (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4viz__k, m4viz, "vizy.p1", 0x0000, 0x010000, CRC(0e12112d) SHA1(4a34832dd95246e80e616affe3eab3c8794ca769), "Barcrest","Viz (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4viz__l, m4viz, "vizzzvkn", 0x0000, 0x010000, CRC(cf5c41f5) SHA1(c9b7de0e73141833e5f8d23f0cb641b1c6094178), "Barcrest","Viz (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4viz__m, m4viz, "vi_05a__.1_1", 0x0000, 0x010000, CRC(56e0ea7a) SHA1(cbe979cdfceb2c1c7be5adaf8163b96bebbc4bb6), "Barcrest","Viz (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4viz__n, m4viz, "vi_05s__.1_1", 0x0000, 0x010000, CRC(c6896e33) SHA1(7db1a5e08f1a307aac0818424fab274cd8141474), "Barcrest","Viz (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4viz__o, m4viz, "vi_05sb_.1_1", 0x0000, 0x010000, CRC(12fecbdf) SHA1(c0137aac536ec17c3b2ffa405f8400308f759590), "Barcrest","Viz (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4viz__p, m4viz, "vi_05sd_.1_1", 0x0000, 0x010000, CRC(9241fd92) SHA1(f3e58273089ee9b828e431a043802d4ec3948a64), "Barcrest","Viz (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4viz__q, m4viz, "vi_10a__.1_1", 0x0000, 0x010000, CRC(e7c4e4d9) SHA1(9ac3bd60e6000e36cd2229284c48e009ea22cfdb), "Barcrest","Viz (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4viz__r, m4viz, "vi_10s__.1_1", 0x0000, 0x010000, CRC(039a4620) SHA1(097335ba8846c8c8b28bf85f836ba76d22bc763d), "Barcrest","Viz (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4viz__s, m4viz, "vi_10sb_.1_1", 0x0000, 0x010000, CRC(4b7e6686) SHA1(97985f1ecd3a8e77f07a91c5171810e6aff13f4c), "Barcrest","Viz (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4viz__t, m4viz, "vi_10sd_.1_1", 0x0000, 0x010000, CRC(84da6fca) SHA1(8a42855b161619a56435da52dd24e8e60fb56bd8), "Barcrest","Viz (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4viz__u, m4viz, "vii05___.1_1", 0x0000, 0x010000, CRC(22a10f78) SHA1(83411b77e5de441b0f5fa02f2b1dbc40755f41cb), "Barcrest","Viz (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4viz__v, m4viz, "vii10___.1_1", 0x0000, 0x010000, CRC(92e11e00) SHA1(2ebae74a39434269333ea0067163e9607926646d), "Barcrest","Viz (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4viz__w, m4viz, "viz_20_.8", 0x0000, 0x010000, CRC(b4fbc43b) SHA1(4cce5e3a0c32a402b81dfd16e66d12e98704c4d2), "Barcrest","Viz (Barcrest) (MPU4) (set 24)" ) - +// "(C)1991 BARCREST" and "VIZ 0.3" +GAME_CUSTOM( 199?, m4viz__l, m4viz, "vizzzvkn", 0x0000, 0x010000, CRC(cf5c41f5) SHA1(c9b7de0e73141833e5f8d23f0cb641b1c6094178), "Barcrest","Viz (Barcrest) (MPU4) (VIZ 0.3Y)" ) +// "(C)1991 BARCREST" and "VIZ 0.2" +GAME_CUSTOM( 199?, m4viz__b, m4viz, "viz20pv2", 0x0000, 0x010000, CRC(7e56ff95) SHA1(83679b64881adbe547b43255374de061859e17ef), "Barcrest","Viz (Barcrest) (MPU4) (VIZ 0.2T)" ) +// Bwb sets +GAME_CUSTOM( 199?, m4viz__m, m4viz, "vi_05a__.1_1", 0x0000, 0x010000, CRC(56e0ea7a) SHA1(cbe979cdfceb2c1c7be5adaf8163b96bebbc4bb6), "Bwb","Viz (Barcrest) (MPU4) (set 14)" ) +GAME_CUSTOM( 199?, m4viz__n, m4viz, "vi_05s__.1_1", 0x0000, 0x010000, CRC(c6896e33) SHA1(7db1a5e08f1a307aac0818424fab274cd8141474), "Bwb","Viz (Barcrest) (MPU4) (set 15)" ) +GAME_CUSTOM( 199?, m4viz__o, m4viz, "vi_05sb_.1_1", 0x0000, 0x010000, CRC(12fecbdf) SHA1(c0137aac536ec17c3b2ffa405f8400308f759590), "Bwb","Viz (Barcrest) (MPU4) (set 16)" ) +GAME_CUSTOM( 199?, m4viz__p, m4viz, "vi_05sd_.1_1", 0x0000, 0x010000, CRC(9241fd92) SHA1(f3e58273089ee9b828e431a043802d4ec3948a64), "Bwb","Viz (Barcrest) (MPU4) (set 17)" ) +GAME_CUSTOM( 199?, m4viz__q, m4viz, "vi_10a__.1_1", 0x0000, 0x010000, CRC(e7c4e4d9) SHA1(9ac3bd60e6000e36cd2229284c48e009ea22cfdb), "Bwb","Viz (Barcrest) (MPU4) (set 18)" ) +GAME_CUSTOM( 199?, m4viz__r, m4viz, "vi_10s__.1_1", 0x0000, 0x010000, CRC(039a4620) SHA1(097335ba8846c8c8b28bf85f836ba76d22bc763d), "Bwb","Viz (Barcrest) (MPU4) (set 19)" ) +GAME_CUSTOM( 199?, m4viz__s, m4viz, "vi_10sb_.1_1", 0x0000, 0x010000, CRC(4b7e6686) SHA1(97985f1ecd3a8e77f07a91c5171810e6aff13f4c), "Bwb","Viz (Barcrest) (MPU4) (set 20)" ) +GAME_CUSTOM( 199?, m4viz__t, m4viz, "vi_10sd_.1_1", 0x0000, 0x010000, CRC(84da6fca) SHA1(8a42855b161619a56435da52dd24e8e60fb56bd8), "Bwb","Viz (Barcrest) (MPU4) (set 21)" ) +GAME_CUSTOM( 199?, m4viz__u, m4viz, "vii05___.1_1", 0x0000, 0x010000, CRC(22a10f78) SHA1(83411b77e5de441b0f5fa02f2b1dbc40755f41cb), "Bwb","Viz (Barcrest) (MPU4) (set 22)" ) +GAME_CUSTOM( 199?, m4viz__v, m4viz, "vii10___.1_1", 0x0000, 0x010000, CRC(92e11e00) SHA1(2ebae74a39434269333ea0067163e9607926646d), "Bwb","Viz (Barcrest) (MPU4) (set 23)" ) +// no copyright string and "8V1 0.6" +GAME_CUSTOM( 199?, m4viz__j, m4viz, "viz208c", 0x0000, 0x010000, CRC(00a65029) SHA1(8dfb68d1a9f4cd00f239ed87a1d330ccb655c35b), "hack","Viz (Barcrest) (MPU4) (8V1 0.6, hack, set 1)" ) +GAME_CUSTOM( 199?, m4viz__a, m4viz, "viz20_101", 0x0000, 0x010000, CRC(0847b812) SHA1(6de9e9dad272932a22ebe457ac50da1126d931ea), "hack","Viz (Barcrest) (MPU4) (8V1 0.6, hack, set 2)" ) +GAME_CUSTOM( 199?, m4viz__w, m4viz, "viz_20_.8", 0x0000, 0x010000, CRC(b4fbc43b) SHA1(4cce5e3a0c32a402b81dfd16e66d12e98704c4d2), "hack","Viz (Barcrest) (MPU4) (8V1 0.6, hack, set 3)" ) +// "RICK LUVS BRIAN" and "8V1 1.0" +GAME_CUSTOM( 199?, m4viz__c, m4viz, "viz58c", 0x0000, 0x010000, CRC(95b8918b) SHA1(4ad4ff9098e98c2076e7058493c181da705acb52), "hack","Viz (Barcrest) (MPU4) (8V1 1.0, hack)" ) #define M4TAKEPK_EXTRA_ROMS \ @@ -2673,7 +2881,9 @@ GAME_CUSTOM( 199?, m4viz__w, m4viz, "viz_20_.8", 0x0000, 0x010000, CRC(b4fb ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4takepk, 0, "tapy.p1", 0x0000, 0x020000, CRC(f21f6dc8) SHA1(d421bee2564d3aaa389c35601adc23ad3fda5aa0), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 1)" ) +// "(C)1993 BARCREST" and "TAP 0.6" +GAME_CUSTOM( 199?, m4takepk, 0, "taps.p1", 0x0000, 0x020000, CRC(01956f25) SHA1(895cd30023b689b61d5ced0cf477f555faf786af), "Barcrest","Take Your Pick (Barcrest) (MPU4) (TAP 0.6)" ) +GAME_CUSTOM( 199?, m4takepk__j, m4takepk, "tapy.p1", 0x0000, 0x020000, CRC(f21f6dc8) SHA1(d421bee2564d3aaa389c35601adc23ad3fda5aa0), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 1)" ) GAME_CUSTOM( 199?, m4takepk__a, m4takepk, "tapad.p1", 0x0000, 0x020000, CRC(162448c4) SHA1(1f77d053fb5dfddeba1248e9e2a05536ab1bc66a), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4takepk__b, m4takepk, "tapb.p1", 0x0000, 0x020000, CRC(3f3be560) SHA1(a60d66c5de33747d19ae43bbc15da104cc3e7390), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4takepk__c, m4takepk, "tapbd.p1", 0x0000, 0x020000, CRC(9b3ee601) SHA1(95f11641d9e3ca0bcfa11a17fb0971b1e2598c7b), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 4)" ) @@ -2683,7 +2893,8 @@ GAME_CUSTOM( 199?, m4takepk__f, m4takepk, "tapdk.p1", 0x0000, 0x020000, GAME_CUSTOM( 199?, m4takepk__g, m4takepk, "tapdy.p1", 0x0000, 0x020000, CRC(561a6ea9) SHA1(736af1fed00a4df540b8f83da677583dee950b50), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 8)" ) GAME_CUSTOM( 199?, m4takepk__h, m4takepk, "tapk.p1", 0x0000, 0x020000, CRC(75fc4d36) SHA1(18a0e33af69c32a69416612f639a7c8601010177), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4takepk__i, m4takepk, "tapr.p1", 0x0000, 0x020000, CRC(c6f3f607) SHA1(cee0b59a45ebb50d51bc26b2b5c37fe7ed299bc7), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4takepk__j, m4takepk, "taps.p1", 0x0000, 0x020000, CRC(01956f25) SHA1(895cd30023b689b61d5ced0cf477f555faf786af), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 11)" ) +// "(C)1993 BARCREST" and "TPH 0.7" +GAME_CUSTOM( 199?, m4takepk__r, m4takepk, "tphs.p1", 0x0000, 0x020000, CRC(e9231738) SHA1(066b1ffd02238783931452b7a1dff05c293a6abe), "Barcrest","Take Your Pick (Barcrest) (MPU4) (TPH 0.7)" ) GAME_CUSTOM( 199?, m4takepk__k, m4takepk, "tphad.p1", 0x0000, 0x020000, CRC(51a2f147) SHA1(442d4adc92c6a9215c7655c2c4b955f974420a26), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 12)" ) GAME_CUSTOM( 199?, m4takepk__l, m4takepk, "tphb.p1", 0x0000, 0x020000, CRC(391214a6) SHA1(21f6f29ff1a60b7a646d49bef2c29008f2dc501c), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 13)" ) GAME_CUSTOM( 199?, m4takepk__m, m4takepk, "tphbd.p1", 0x0000, 0x020000, CRC(dcb85f82) SHA1(eb83c8d829d88e940c11f6d0d1c4607a4aa9cba2), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 14)" ) @@ -2691,17 +2902,23 @@ GAME_CUSTOM( 199?, m4takepk__n, m4takepk, "tphd.p1", 0x0000, 0x020000, GAME_CUSTOM( 199?, m4takepk__o, m4takepk, "tphdk.p1", 0x0000, 0x020000, CRC(967ff7d4) SHA1(403865583aabc9983b8c6fa4f0c06ba53696df3b), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 16)" ) GAME_CUSTOM( 199?, m4takepk__p, m4takepk, "tphdy.p1", 0x0000, 0x020000, CRC(119cd72a) SHA1(326f5a548234ec5cd780f22c96b9151222684ed0), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 17)" ) GAME_CUSTOM( 199?, m4takepk__q, m4takepk, "tphk.p1", 0x0000, 0x020000, CRC(73d5bcf0) SHA1(22c620c7d6fc8bc51bda4dd3ae5ec3e38056ce82), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4takepk__r, m4takepk, "tphs.p1", 0x0000, 0x020000, CRC(e9231738) SHA1(066b1ffd02238783931452b7a1dff05c293a6abe), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 19)" ) GAME_CUSTOM( 199?, m4takepk__s, m4takepk, "tphy.p1", 0x0000, 0x020000, CRC(f4369c0e) SHA1(d8c1fc2ede48673a1e8efaf004e3d76b62594de1), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4takepk__t, m4takepk, "typ15f", 0x0000, 0x020000, CRC(65c44b06) SHA1(629e7ac4149c66fc1dc33a103e1a4ff5aaecdcfd), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4takepk__u, m4takepk, "typ15r", 0x0000, 0x020000, CRC(8138c70b) SHA1(aafc805a8a56cf1722ebe0f3eba0a47f15c9049a), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4takepk__v, m4takepk, "typ510", 0x0000, 0x010000, CRC(ebf0c71c) SHA1(6c759144aecce83f82ded8aae7c61ecec2d92fb3), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4takepk__w, m4takepk, "typ510s", 0x0000, 0x010000, CRC(4cc6032d) SHA1(e6eaff56e39555393156aa2e56bf1c17e548bdc9), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4takepk__x, m4takepk, "typ55", 0x0000, 0x010000, CRC(6837344f) SHA1(4d5c6ea005d0916f27a7f445b37ce9252549c61f), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4takepk__y, m4takepk, "typ55s", 0x0000, 0x010000, CRC(05dc9b07) SHA1(9fc2c7575a704ca1252bb5c6a638e28b0324f2a6), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4takepk__z, m4takepk, "typ58s", 0x0000, 0x010000, CRC(56e26a42) SHA1(7add260212d3fbc8b356b58e85df8cafbef151e3), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4takepk__0, m4takepk, "typ58t", 0x0000, 0x010000, CRC(3fbbbbc8) SHA1(9f097cbce3710a51c19ef7961f91ee6e77fc843f), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4takepk__1, m4takepk, "typ5p10p.bin", 0x0000, 0x010000, CRC(45ddeaf4) SHA1(6db822aac402cb6772718015420c14875e74b13d), "Barcrest","Take Your Pick (Barcrest) (MPU4) (set 29)" ) +// below sets are all smaller (Bwb sets / hacks of them?) +// "(C)1997 B.W.B." and "TAC 2.3" +GAME_CUSTOM( 199?, m4takepk__1, m4takepk, "typ5p10p.bin", 0x0000, 0x010000, CRC(45ddeaf4) SHA1(6db822aac402cb6772718015420c14875e74b13d), "Bwb","Take Your Pick (Barcrest) (MPU4) (TAC 2.3)" ) +// no copyright string and "TAC 2.3" +GAME_CUSTOM( 199?, m4takepk__v, m4takepk, "typ510", 0x0000, 0x010000, CRC(ebf0c71c) SHA1(6c759144aecce83f82ded8aae7c61ecec2d92fb3), "hack","Take Your Pick (Barcrest) (MPU4) (TAC 2.3, hack, set 1)" ) +GAME_CUSTOM( 199?, m4takepk__w, m4takepk, "typ510s", 0x0000, 0x010000, CRC(4cc6032d) SHA1(e6eaff56e39555393156aa2e56bf1c17e548bdc9), "hack","Take Your Pick (Barcrest) (MPU4) (TAC 2.3, hack, set 2)" ) +// no copyright string and "TPH 0.7" +GAME_CUSTOM( 199?, m4takepk__t, m4takepk, "typ15f", 0x0000, 0x020000, CRC(65c44b06) SHA1(629e7ac4149c66fc1dc33a103e1a4ff5aaecdcfd), "hack","Take Your Pick (Barcrest) (MPU4) (TPH 0.7, hack)" ) +// no copyright string and "MAM 0.3" +GAME_CUSTOM( 199?, m4takepk__u, m4takepk, "typ15r", 0x0000, 0x020000, CRC(8138c70b) SHA1(aafc805a8a56cf1722ebe0f3eba0a47f15c9049a), "hack","Take Your Pick (Barcrest) (MPU4) (MAM 0.3, hack)" ) +// no copyright string and "TA4 2.1" +GAME_CUSTOM( 199?, m4takepk__x, m4takepk, "typ55", 0x0000, 0x010000, CRC(6837344f) SHA1(4d5c6ea005d0916f27a7f445b37ce9252549c61f), "hack","Take Your Pick (Barcrest) (MPU4) (TA4 2.1, hack, set 1)" ) +GAME_CUSTOM( 199?, m4takepk__y, m4takepk, "typ55s", 0x0000, 0x010000, CRC(05dc9b07) SHA1(9fc2c7575a704ca1252bb5c6a638e28b0324f2a6), "hack","Take Your Pick (Barcrest) (MPU4) (TA4 2.1, hack, set 2)" ) +// no copyright string and "TA8 2.2" +GAME_CUSTOM( 199?, m4takepk__z, m4takepk, "typ58s", 0x0000, 0x010000, CRC(56e26a42) SHA1(7add260212d3fbc8b356b58e85df8cafbef151e3), "hack","Take Your Pick (Barcrest) (MPU4) (TA8 2.2, hack, set 1)" ) +GAME_CUSTOM( 199?, m4takepk__0, m4takepk, "typ58t", 0x0000, 0x010000, CRC(3fbbbbc8) SHA1(9f097cbce3710a51c19ef7961f91ee6e77fc843f), "hack","Take Your Pick (Barcrest) (MPU4) (TA8 2.2, hack, set 2)" ) #define M4OVERMN_EXTRA_ROMS \ @@ -2718,21 +2935,8 @@ GAME_CUSTOM( 199?, m4takepk__1, m4takepk, "typ5p10p.bin", 0x0000, 0x010000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4overmn, 0, "otts.p1", 0x0000, 0x010000, CRC(6daf58a4) SHA1(e505a18b67dec54446e6d94a5d1c3bba13099619), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4overmn__a, m4overmn, "ot8b.p1", 0x0000, 0x010000, CRC(243c7f7c) SHA1(24b9d2cce1af75811d1e625ac8df5b58356776dc), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4overmn__b, m4overmn, "ot8c.p1", 0x0000, 0x010000, CRC(af5bb77b) SHA1(6a9eeb803fdaa03970b3a3a0738e804027aedd20), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4overmn__c, m4overmn, "ot8dk.p1", 0x0000, 0x010000, CRC(0798d12c) SHA1(068a676d4ccaf2964a3f6f6673199f8d62c45452), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4overmn__d, m4overmn, "ot8dy.p1", 0x0000, 0x010000, CRC(0904a38d) SHA1(0a0668ae384fe371abf2597ab66a56dd79a90c03), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4overmn__e, m4overmn, "ot8k.p1", 0x0000, 0x010000, CRC(8d83f697) SHA1(2fff475d44f1535c85988b195c3610201ece21ae), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4overmn__f, m4overmn, "ot8s.p1", 0x0000, 0x010000, CRC(db1bacdb) SHA1(fc2257eedec532094f3c229bcf215a0fde430d2b), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4overmn__g, m4overmn, "ot8y.p1", 0x0000, 0x010000, CRC(6e1508fb) SHA1(6a45a394e48f758456dc6cf17a5b134ca6887421), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4overmn__h, m4overmn, "otnb.p1", 0x0000, 0x010000, CRC(047aae70) SHA1(bf620b60f1107fff07a28944dec66fd71aab65c0), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4overmn__i, m4overmn, "otnc.p1", 0x0000, 0x010000, CRC(536e7640) SHA1(3a079bed9217c857efb8d435c7efacca69cfcabc), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4overmn__j, m4overmn, "otnd.p1", 0x0000, 0x010000, CRC(c6c15fc2) SHA1(99cb3fd2eaea636313085e0a6a9aff9c027cb187), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4overmn__k, m4overmn, "otndy.p1", 0x0000, 0x010000, CRC(6b22206e) SHA1(0714ddc445d530e1ff2055cd5e5d8b31704733d9), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4overmn__l, m4overmn, "otnk.p1", 0x0000, 0x010000, CRC(992cc40d) SHA1(6059ecaf91390e2a2ea80d3da5e44156273892ad), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4overmn__m, m4overmn, "otns.p1", 0x0000, 0x010000, CRC(7e03f295) SHA1(f874ddf8de8037aa251a8c3fb7c183e6dfb93dfa), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4overmn__n, m4overmn, "otny.p1", 0x0000, 0x010000, CRC(67cba8fa) SHA1(234cc5b4a0b60d33b2f4c00d082beee59236a126), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 15)" ) +// "(C)1991 BARCREST" and "OTT 0.2" +GAME_CUSTOM( 199?, m4overmn, 0, "otts.p1", 0x0000, 0x010000, CRC(6daf58a4) SHA1(e505a18b67dec54446e6d94a5d1c3bba13099619), "Barcrest","Over The Moon (Barcrest) (MPU4) (OTT 0.2)" ) GAME_CUSTOM( 199?, m4overmn__o, m4overmn, "ottad.p1", 0x0000, 0x010000, CRC(682b01a3) SHA1(cb71fd56ad6d4fc67894bf86c54c49a7e45aae15), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 16)" ) GAME_CUSTOM( 199?, m4overmn__p, m4overmn, "ottb.p1", 0x0000, 0x010000, CRC(541c2d54) SHA1(3b42e9dcb468cb9bbf2092a4e7eabeb172dc90d0), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 17)" ) GAME_CUSTOM( 199?, m4overmn__q, m4overmn, "ottbd.p1", 0x0000, 0x010000, CRC(5e376ce9) SHA1(0628461395ebd233ca7b0513ea272ddd83c5accd), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 18)" ) @@ -2743,6 +2947,24 @@ GAME_CUSTOM( 199?, m4overmn__u, m4overmn, "ottdy.p1", 0x0000, 0x010000, CRC GAME_CUSTOM( 199?, m4overmn__v, m4overmn, "ottk.p1", 0x0000, 0x010000, CRC(68c984d3) SHA1(b1cf87630ab093629eaa8d199dfcfd6343d9c31d), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 23)" ) GAME_CUSTOM( 199?, m4overmn__w, m4overmn, "ottr.p1", 0x0000, 0x010000, CRC(ceb322d1) SHA1(a62bd1f947fc15f1d42dae8e933d2fcb672bcce4), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 24)" ) GAME_CUSTOM( 199?, m4overmn__x, m4overmn, "otty.p1", 0x0000, 0x010000, CRC(974af7ff) SHA1(e0aecb91c1fc476a9258d6d57ba5ca8f249141b0), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 25)" ) +// "(C)1991 BARCREST" and "OT8 0.1" +GAME_CUSTOM( 199?, m4overmn__f, m4overmn, "ot8s.p1", 0x0000, 0x010000, CRC(db1bacdb) SHA1(fc2257eedec532094f3c229bcf215a0fde430d2b), "Barcrest","Over The Moon (Barcrest) (MPU4) (OT8 0.1)" ) +GAME_CUSTOM( 199?, m4overmn__a, m4overmn, "ot8b.p1", 0x0000, 0x010000, CRC(243c7f7c) SHA1(24b9d2cce1af75811d1e625ac8df5b58356776dc), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 2)" ) +GAME_CUSTOM( 199?, m4overmn__b, m4overmn, "ot8c.p1", 0x0000, 0x010000, CRC(af5bb77b) SHA1(6a9eeb803fdaa03970b3a3a0738e804027aedd20), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4overmn__c, m4overmn, "ot8dk.p1", 0x0000, 0x010000, CRC(0798d12c) SHA1(068a676d4ccaf2964a3f6f6673199f8d62c45452), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4overmn__d, m4overmn, "ot8dy.p1", 0x0000, 0x010000, CRC(0904a38d) SHA1(0a0668ae384fe371abf2597ab66a56dd79a90c03), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4overmn__e, m4overmn, "ot8k.p1", 0x0000, 0x010000, CRC(8d83f697) SHA1(2fff475d44f1535c85988b195c3610201ece21ae), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4overmn__g, m4overmn, "ot8y.p1", 0x0000, 0x010000, CRC(6e1508fb) SHA1(6a45a394e48f758456dc6cf17a5b134ca6887421), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 8)" ) +// "(C)1991 BARCREST" and "OTN 0.5" +GAME_CUSTOM( 199?, m4overmn__m, m4overmn, "otns.p1", 0x0000, 0x010000, CRC(7e03f295) SHA1(f874ddf8de8037aa251a8c3fb7c183e6dfb93dfa), "Barcrest","Over The Moon (Barcrest) (MPU4) (OTN 0.5)" ) +GAME_CUSTOM( 199?, m4overmn__h, m4overmn, "otnb.p1", 0x0000, 0x010000, CRC(047aae70) SHA1(bf620b60f1107fff07a28944dec66fd71aab65c0), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 9)" ) +GAME_CUSTOM( 199?, m4overmn__i, m4overmn, "otnc.p1", 0x0000, 0x010000, CRC(536e7640) SHA1(3a079bed9217c857efb8d435c7efacca69cfcabc), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 10)" ) +GAME_CUSTOM( 199?, m4overmn__j, m4overmn, "otnd.p1", 0x0000, 0x010000, CRC(c6c15fc2) SHA1(99cb3fd2eaea636313085e0a6a9aff9c027cb187), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 11)" ) +GAME_CUSTOM( 199?, m4overmn__k, m4overmn, "otndy.p1", 0x0000, 0x010000, CRC(6b22206e) SHA1(0714ddc445d530e1ff2055cd5e5d8b31704733d9), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 12)" ) +GAME_CUSTOM( 199?, m4overmn__l, m4overmn, "otnk.p1", 0x0000, 0x010000, CRC(992cc40d) SHA1(6059ecaf91390e2a2ea80d3da5e44156273892ad), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 13)" ) +GAME_CUSTOM( 199?, m4overmn__n, m4overmn, "otny.p1", 0x0000, 0x010000, CRC(67cba8fa) SHA1(234cc5b4a0b60d33b2f4c00d082beee59236a126), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 15)" ) +// "(C)1991 BARCREST" and "OTU 0.1" +GAME_CUSTOM( 199?, m4overmn__7, m4overmn, "otus.p1", 0x0000, 0x010000, CRC(5f2b8d0b) SHA1(1e3ac59fa0b108549c265eeba027591bce5122f3), "Barcrest","Over The Moon (Barcrest) (MPU4) (OTU 0.1)" ) GAME_CUSTOM( 199?, m4overmn__y, m4overmn, "otuad.p1", 0x0000, 0x010000, CRC(2576654b) SHA1(7fae2bd057d96af4c50fd84a5261ae750ba34033), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 26)" ) GAME_CUSTOM( 199?, m4overmn__z, m4overmn, "otub.p1", 0x0000, 0x010000, CRC(1463877d) SHA1(ea41e048aead52aabc1b8a2a224ef87b9011c163), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 27)" ) GAME_CUSTOM( 199?, m4overmn__0, m4overmn, "otubd.p1", 0x0000, 0x010000, CRC(8ac2d17b) SHA1(09f21f1233d82fd02830b6ece6a773402393a447), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 28)" ) @@ -2752,7 +2974,6 @@ GAME_CUSTOM( 199?, m4overmn__3, m4overmn, "otudr.p1", 0x0000, 0x010000, CRC GAME_CUSTOM( 199?, m4overmn__4, m4overmn, "otudy.p1", 0x0000, 0x010000, CRC(562da6fd) SHA1(899f971124969c52a018634b2b2f2dd7cb634195), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 32)" ) GAME_CUSTOM( 199?, m4overmn__5, m4overmn, "otuk.p1", 0x0000, 0x010000, CRC(cbb66497) SHA1(ade033fb3d226bfcb3cdf3e3612fb65cfc22b030), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 33)" ) GAME_CUSTOM( 199?, m4overmn__6, m4overmn, "otur.p1", 0x0000, 0x010000, CRC(d05a8c2f) SHA1(754e2351431aa7bf6dea3a1498581da0c4283c1e), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 34)" ) -GAME_CUSTOM( 199?, m4overmn__7, m4overmn, "otus.p1", 0x0000, 0x010000, CRC(5f2b8d0b) SHA1(1e3ac59fa0b108549c265eeba027591bce5122f3), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 35)" ) GAME_CUSTOM( 199?, m4overmn__8, m4overmn, "otuy.p1", 0x0000, 0x010000, CRC(fc65136d) SHA1(048f81de92a1db4e4e4e9aa7a87228805d57b263), "Barcrest","Over The Moon (Barcrest) (MPU4) (set 36)" ) @@ -2778,33 +2999,39 @@ GAME_CUSTOM( 199?, m4overmn__8, m4overmn, "otuy.p1", 0x0000, 0x010000, CRC GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4luxor, 0, "luxor.rom", 0x0000, 0x010000, CRC(55277510) SHA1(9a866c36a398df52c54b554cd8085078c1f1954b), "Barcrest","Luxor (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4luxor__a, m4luxor, "lux05_101", 0x0000, 0x010000, CRC(8f4dc4f4) SHA1(c9743a1b79b377313504296a060dff3f413a7a9d), "Barcrest","Luxor (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4luxor__b, m4luxor, "lux10_101", 0x0000, 0x010000, CRC(8965c7be) SHA1(ca05803bc7d7a96e25dc0b025c2683b4679789fb), "Barcrest","Luxor (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4luxor__c, m4luxor, "lux208c", 0x0000, 0x010000, CRC(f57bae67) SHA1(3a2523a2121948480381f49e26e870b10d541304), "Barcrest","Luxor (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4luxor__d, m4luxor, "lux55", 0x0000, 0x010000, CRC(997419ab) SHA1(c616a5d6cb347963e7e5c5b88912c248bae184ca), "Barcrest","Luxor (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4luxor__e, m4luxor, "lux58c", 0x0000, 0x010000, CRC(da408721) SHA1(971413620d1f304a026d3adc68f6ac5c1d104e20), "Barcrest","Luxor (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4luxor__f, m4luxor, "luxc.p1", 0x0000, 0x010000, CRC(47d1c4dc) SHA1(0856fac4a7ec14dc1df24446e1355ed05bb5f1c1), "Barcrest","Luxor (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4luxor__g, m4luxor, "luxd.p1", 0x0000, 0x010000, CRC(8f949379) SHA1(4f0a94d06b8e7036acaae5c0c42c91481837d3a1), "Barcrest","Luxor (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4luxor__h, m4luxor, "luxk.p1", 0x0000, 0x010000, CRC(bd5eaf2d) SHA1(f9a3f3139d6b7ff4fcec805e0ca6e8ab1c3c10dd), "Barcrest","Luxor (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4luxor__i, m4luxor, "luxor_std.bin", 0x0000, 0x010000, CRC(2c565bf7) SHA1(61612abbda037b63e2cda7746be8cf64b4563d43), "Barcrest","Luxor (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4luxor__j, m4luxor, "luxs.p1", 0x0000, 0x010000, CRC(78d6f05a) SHA1(53de98b9248c67c83f255d33d5963bebb757d0af), "Barcrest","Luxor (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4luxor__k, m4luxor, "lux_05_4", 0x0000, 0x010000, CRC(335503ec) SHA1(dd03096aa98e4cac9fade6e77f9f8a8ad9a64287), "Barcrest","Luxor (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4luxor__l, m4luxor, "lux_05_8", 0x0000, 0x010000, CRC(43a15814) SHA1(694c8c6ee695bb746391f5269f540c995fc18002), "Barcrest","Luxor (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4luxor__m, m4luxor, "lux_10_4", 0x0000, 0x010000, CRC(122461d9) SHA1(a347c834b27a00abc1864a1e00316a491d04d84b), "Barcrest","Luxor (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4luxor__n, m4luxor, "lux_10_8", 0x0000, 0x010000, CRC(544208e7) SHA1(85e2ff663b7500ee6bb0a900ee5ef48f7bf1934a), "Barcrest","Luxor (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4luxor__o, m4luxor, "lux_20.4", 0x0000, 0x010000, CRC(50b3e5cc) SHA1(ff08095c01d8eeff320b5a04fe9f7e1888690cf8), "Barcrest","Luxor (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4luxor__p, m4luxor, "lux_20_8", 0x0000, 0x010000, CRC(6c9a7152) SHA1(e38e8452e0d3f5b0e8ac51da272ab9f2e57e1d89), "Barcrest","Luxor (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4luxor__q, m4luxor, "lx_05a__.1o1", 0x0000, 0x010000, CRC(7b81f1b9) SHA1(412a8961571f279d70c05ef26c565b4b2a588060), "Barcrest","Luxor (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4luxor__r, m4luxor, "lx_05s__.1o1", 0x0000, 0x010000, CRC(2bf86940) SHA1(cf96a7a12db84fc028766da55ca06d2350f9d08f), "Barcrest","Luxor (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4luxor__s, m4luxor, "lx_05sb_.1o1", 0x0000, 0x010000, CRC(e210c1b6) SHA1(023b1e0b36c4d146af5e958be72575590588b3fd), "Barcrest","Luxor (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4luxor__t, m4luxor, "lx_05sd_.1o1", 0x0000, 0x010000, CRC(8727963a) SHA1(4585c0e3fb14f54684ff199be9010ed7b5cb97c3), "Barcrest","Luxor (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4luxor__u, m4luxor, "lx_10a__.1o1", 0x0000, 0x010000, CRC(ce8e6c05) SHA1(b48bc01d1a069881e9b9db1a4959c7b57e80f28a), "Barcrest","Luxor (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4luxor__v, m4luxor, "lx_10s__.1o1", 0x0000, 0x010000, CRC(9f0f5b6b) SHA1(9f67500d62921dd680bd864856206306adc3f2f6), "Barcrest","Luxor (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4luxor__w, m4luxor, "lx_10sb_.1o1", 0x0000, 0x010000, CRC(bd020920) SHA1(a6b5c11c82344afc1cdd350b9f31d1257be72615), "Barcrest","Luxor (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4luxor__x, m4luxor, "lx_10sd_.1o1", 0x0000, 0x010000, CRC(cc59d370) SHA1(a428d93c005b629e86810c85ea91630a354e170b), "Barcrest","Luxor (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4luxor__y, m4luxor, "lxi05a__.1o1", 0x0000, 0x010000, CRC(7a5fe065) SHA1(c44b41d01175c10051ae4cd1453be3411842825e), "Barcrest","Luxor (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4luxor__z, m4luxor, "lxi10a__.1o1", 0x0000, 0x010000, CRC(17989464) SHA1(67aa9cc01d89ed4caeb33885f53dcaee762ccb6d), "Barcrest","Luxor (Barcrest) (MPU4) (set 27)" ) +// "(C)1993 BARCREST" and "LUX 0.6" +GAME_CUSTOM( 199?, m4luxor, 0, "luxs.p1", 0x0000, 0x010000, CRC(78d6f05a) SHA1(53de98b9248c67c83f255d33d5963bebb757d0af), "Barcrest","Luxor (Barcrest) (MPU4) (LUX 0.6)" ) +GAME_CUSTOM( 199?, m4luxor__f, m4luxor, "luxc.p1", 0x0000, 0x010000, CRC(47d1c4dc) SHA1(0856fac4a7ec14dc1df24446e1355ed05bb5f1c1), "Barcrest","Luxor (Barcrest) (MPU4) (LUX 0.6C)" ) +GAME_CUSTOM( 199?, m4luxor__g, m4luxor, "luxd.p1", 0x0000, 0x010000, CRC(8f949379) SHA1(4f0a94d06b8e7036acaae5c0c42c91481837d3a1), "Barcrest","Luxor (Barcrest) (MPU4) (LUX 0.6D)" ) +GAME_CUSTOM( 199?, m4luxor__h, m4luxor, "luxk.p1", 0x0000, 0x010000, CRC(bd5eaf2d) SHA1(f9a3f3139d6b7ff4fcec805e0ca6e8ab1c3c10dd), "Barcrest","Luxor (Barcrest) (MPU4) (LUX 0.6K)" ) +GAME_CUSTOM( 199?, m4luxor__i, m4luxor, "luxor_std.bin", 0x0000, 0x010000, CRC(2c565bf7) SHA1(61612abbda037b63e2cda7746be8cf64b4563d43), "Barcrest","Luxor (Barcrest) (MPU4) (LUX 0.6Y)" ) +// "(C)1995 B.W.B." and "LX5 1.0" +GAME_CUSTOM( 199?, m4luxor__q, m4luxor, "lx_05a__.1o1", 0x0000, 0x010000, CRC(7b81f1b9) SHA1(412a8961571f279d70c05ef26c565b4b2a588060), "Bwb","Luxor (Barcrest) (MPU4) (LX5 1.0K)" ) +GAME_CUSTOM( 199?, m4luxor__r, m4luxor, "lx_05s__.1o1", 0x0000, 0x010000, CRC(2bf86940) SHA1(cf96a7a12db84fc028766da55ca06d2350f9d08f), "Bwb","Luxor (Barcrest) (MPU4) (LX5 1.0)" ) +GAME_CUSTOM( 199?, m4luxor__s, m4luxor, "lx_05sb_.1o1", 0x0000, 0x010000, CRC(e210c1b6) SHA1(023b1e0b36c4d146af5e958be72575590588b3fd), "Bwb","Luxor (Barcrest) (MPU4) (LX5 1.0YD)" ) +GAME_CUSTOM( 199?, m4luxor__t, m4luxor, "lx_05sd_.1o1", 0x0000, 0x010000, CRC(8727963a) SHA1(4585c0e3fb14f54684ff199be9010ed7b5cb97c3), "Bwb","Luxor (Barcrest) (MPU4) (LX5 1.0D)" ) +GAME_CUSTOM( 199?, m4luxor__y, m4luxor, "lxi05a__.1o1", 0x0000, 0x010000, CRC(7a5fe065) SHA1(c44b41d01175c10051ae4cd1453be3411842825e), "Bwb","Luxor (Barcrest) (MPU4) (LX5 1.0CK)" ) +// "(C)1994 B.W.B." and "LX101.0" +GAME_CUSTOM( 199?, m4luxor__u, m4luxor, "lx_10a__.1o1", 0x0000, 0x010000, CRC(ce8e6c05) SHA1(b48bc01d1a069881e9b9db1a4959c7b57e80f28a), "Bwb","Luxor (Barcrest) (MPU4) (LX101.0K)" ) +GAME_CUSTOM( 199?, m4luxor__v, m4luxor, "lx_10s__.1o1", 0x0000, 0x010000, CRC(9f0f5b6b) SHA1(9f67500d62921dd680bd864856206306adc3f2f6), "Bwb","Luxor (Barcrest) (MPU4) (LX101.0)" ) +GAME_CUSTOM( 199?, m4luxor__w, m4luxor, "lx_10sb_.1o1", 0x0000, 0x010000, CRC(bd020920) SHA1(a6b5c11c82344afc1cdd350b9f31d1257be72615), "Bwb","Luxor (Barcrest) (MPU4) (LX101.0YD)" ) +GAME_CUSTOM( 199?, m4luxor__x, m4luxor, "lx_10sd_.1o1", 0x0000, 0x010000, CRC(cc59d370) SHA1(a428d93c005b629e86810c85ea91630a354e170b), "Bwb","Luxor (Barcrest) (MPU4) (LX101.0D)" ) +GAME_CUSTOM( 199?, m4luxor__z, m4luxor, "lxi10a__.1o1", 0x0000, 0x010000, CRC(17989464) SHA1(67aa9cc01d89ed4caeb33885f53dcaee762ccb6d), "Bwb","Luxor (Barcrest) (MPU4) (LX101.0CK)" ) +// these ones give bad char alarm +GAME_CUSTOM( 199?, m4luxor__b, m4luxor, "lux10_101", 0x0000, 0x010000, CRC(8965c7be) SHA1(ca05803bc7d7a96e25dc0b025c2683b4679789fb), "Bwb / hack?","Luxor (Barcrest) (MPU4) (LX101.0, hack?, set 1)" ) +GAME_CUSTOM( 199?, m4luxor__m, m4luxor, "lux_10_4", 0x0000, 0x010000, CRC(122461d9) SHA1(a347c834b27a00abc1864a1e00316a491d04d84b), "Bwb / hack?","Luxor (Barcrest) (MPU4) (LX101.0, hack?, set 2)" ) +GAME_CUSTOM( 199?, m4luxor__n, m4luxor, "lux_10_8", 0x0000, 0x010000, CRC(544208e7) SHA1(85e2ff663b7500ee6bb0a900ee5ef48f7bf1934a), "Bwb / hack?","Luxor (Barcrest) (MPU4) (LX101.0, hack?, set 3)" ) +// no copyright string and "V1 0.6" +GAME_CUSTOM( 199?, m4luxor__j, m4luxor, "luxor.rom", 0x0000, 0x010000, CRC(55277510) SHA1(9a866c36a398df52c54b554cd8085078c1f1954b), "hack","Luxor (Barcrest) (MPU4) (V1 0.6, hack, set 1)" ) +GAME_CUSTOM( 199?, m4luxor__c, m4luxor, "lux208c", 0x0000, 0x010000, CRC(f57bae67) SHA1(3a2523a2121948480381f49e26e870b10d541304), "hack","Luxor (Barcrest) (MPU4) (V1 0.6, hack, set 2)" ) +GAME_CUSTOM( 199?, m4luxor__o, m4luxor, "lux_20.4", 0x0000, 0x010000, CRC(50b3e5cc) SHA1(ff08095c01d8eeff320b5a04fe9f7e1888690cf8), "hack","Luxor (Barcrest) (MPU4) (V1 0.6, hack, set 3)" ) +GAME_CUSTOM( 199?, m4luxor__p, m4luxor, "lux_20_8", 0x0000, 0x010000, CRC(6c9a7152) SHA1(e38e8452e0d3f5b0e8ac51da272ab9f2e57e1d89), "hack","Luxor (Barcrest) (MPU4) (V1 0.6, hack, set 4)" ) +// "ROBIN HOOD" and "LX5 1.0" +GAME_CUSTOM( 199?, m4luxor__a, m4luxor, "lux05_101", 0x0000, 0x010000, CRC(8f4dc4f4) SHA1(c9743a1b79b377313504296a060dff3f413a7a9d), "hack","Luxor (Barcrest) (MPU4) (LX5 1.0, hack, set 1)" ) +GAME_CUSTOM( 199?, m4luxor__d, m4luxor, "lux55", 0x0000, 0x010000, CRC(997419ab) SHA1(c616a5d6cb347963e7e5c5b88912c248bae184ca), "hack","Luxor (Barcrest) (MPU4) (LX5 1.0, hack, set 2)" ) +GAME_CUSTOM( 199?, m4luxor__e, m4luxor, "lux58c", 0x0000, 0x010000, CRC(da408721) SHA1(971413620d1f304a026d3adc68f6ac5c1d104e20), "hack","Luxor (Barcrest) (MPU4) (LX5 1.0, hack, set 3)" ) +GAME_CUSTOM( 199?, m4luxor__k, m4luxor, "lux_05_4", 0x0000, 0x010000, CRC(335503ec) SHA1(dd03096aa98e4cac9fade6e77f9f8a8ad9a64287), "hack","Luxor (Barcrest) (MPU4) (LX5 1.0, hack, set 4)" ) +GAME_CUSTOM( 199?, m4luxor__l, m4luxor, "lux_05_8", 0x0000, 0x010000, CRC(43a15814) SHA1(694c8c6ee695bb746391f5269f540c995fc18002), "hack","Luxor (Barcrest) (MPU4) (LX5 1.0, hack, set 5)" ) #define M4HIJINX_EXTRA_ROMS \ @@ -2822,9 +3049,15 @@ GAME_CUSTOM( 199?, m4luxor__z, m4luxor, "lxi10a__.1o1", 0x0000, 0x010000 ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4hijinx, 0, "jnx10y.p1", 0x0000, 0x020000, CRC(792b3bae) SHA1(d30aecce42953f1ec49753cc2d1df00ad9bd088f), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4hijinx__a, m4hijinx, "hij15g", 0x0000, 0x020000, CRC(73271cca) SHA1(8177e10e30386464a7e5a33dc3c02adbf4c93101), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4hijinx__b, m4hijinx, "hij15t", 0x0000, 0x020000, CRC(c7d54c64) SHA1(d3537c8412b583f2812f87ab68ac8855e9cdbd2f), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 3)" ) +// "(C)1993 BARCREST" and "JNX 1.0" +GAME_CUSTOM( 199?, m4hijinx, 0, "jnx10s.p1", 0x0000, 0x020000, CRC(a291147e) SHA1(818172bab2fad210a937d91e0be4ddf165f1cf99), "Barcrest","Hi Jinx (Barcrest) (MPU4) (JNX 1.0)" ) +GAME_CUSTOM( 199?, m4hijinx__ab, m4hijinx, "jnx10y.p1", 0x0000, 0x020000, CRC(792b3bae) SHA1(d30aecce42953f1ec49753cc2d1df00ad9bd088f), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 1)" ) +GAME_CUSTOM( 199?, m4hijinx__7, m4hijinx, "jnx10d.p1", 0x0000, 0x020000, CRC(31b243d1) SHA1(029dd8ecbe83b63ca799b6507262193ef56d4b36), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 35)" ) +GAME_CUSTOM( 199?, m4hijinx__8, m4hijinx, "jnx10dh.p1", 0x0000, 0x020000, CRC(ffc421b0) SHA1(28439c5d2ec371edae5e7b84e1da96d468bb8556), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 36)" ) +GAME_CUSTOM( 199?, m4hijinx__9, m4hijinx, "jnx10dy.p1", 0x0000, 0x020000, CRC(dc57d3fb) SHA1(e622485f37f638a69e0c5dbb06faa519b10eafc9), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 37)" ) +GAME_CUSTOM( 199?, m4hijinx__aa, m4hijinx, "jnx10h.p1", 0x0000, 0x020000, CRC(5ab8c9e5) SHA1(f12094bd95369288a76dac9d1e62810fa478cfd6), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 38)" ) +// "(C)1993 BARCREST" and "JNS 0.2" +GAME_CUSTOM( 199?, m4hijinx__n, m4hijinx, "jns02s.p1", 0x0000, 0x020000, CRC(42df2639) SHA1(8ed6addfc85cfeab4c5f03c24a692a9c392a8bc2), "Barcrest","Hi Jinx (Barcrest) (MPU4) (JNS 0.2)" ) GAME_CUSTOM( 199?, m4hijinx__c, m4hijinx, "jns02ad.p1", 0x0000, 0x020000, CRC(436a6632) SHA1(25ab01b8785cf6f9d2316b15d2d2887e898358de), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 4)" ) GAME_CUSTOM( 199?, m4hijinx__d, m4hijinx, "jns02b.p1", 0x0000, 0x020000, CRC(171b8941) SHA1(8383f0ce3c21b187f031302b4d930e13c131f862), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 5)" ) GAME_CUSTOM( 199?, m4hijinx__e, m4hijinx, "jns02bd.p1", 0x0000, 0x020000, CRC(6a8b03ba) SHA1(ecc6826474a96a7d2e5cee851d672b954906bfbe), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 6)" ) @@ -2836,8 +3069,9 @@ GAME_CUSTOM( 199?, m4hijinx__j, m4hijinx, "jns02dy.p1", 0x0000, 0x020000, GAME_CUSTOM( 199?, m4hijinx__k, m4hijinx, "jns02h.p1", 0x0000, 0x020000, CRC(f927ea5a) SHA1(c1af9f2b20421c66d2141b85a61cd51e8cb6a67b), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 12)" ) GAME_CUSTOM( 199?, m4hijinx__l, m4hijinx, "jns02k.p1", 0x0000, 0x020000, CRC(4377f98d) SHA1(0e7b4e655acec07fea221697179045f06d4f3c48), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 13)" ) GAME_CUSTOM( 199?, m4hijinx__m, m4hijinx, "jns02r.p1", 0x0000, 0x020000, CRC(8df557f8) SHA1(899e73b265065f09eac785e45e06fd755a618c21), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4hijinx__n, m4hijinx, "jns02s.p1", 0x0000, 0x020000, CRC(42df2639) SHA1(8ed6addfc85cfeab4c5f03c24a692a9c392a8bc2), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 15)" ) GAME_CUSTOM( 199?, m4hijinx__o, m4hijinx, "jns02y.p1", 0x0000, 0x020000, CRC(743d449f) SHA1(739e41b28ee53465b40138cdccf0fcd1782c8b45), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 16)" ) +// "(C)1993 BARCREST" and "JNS 0.3" +GAME_CUSTOM( 199?, m4hijinx__0, m4hijinx, "jns03s.p1", 0x0000, 0x020000, CRC(ef9f3d18) SHA1(cc2239a4dca1c092025216a16bb39fe9126bd6f8), "Barcrest","Hi Jinx (Barcrest) (MPU4) (JNS 0.3)" ) GAME_CUSTOM( 199?, m4hijinx__p, m4hijinx, "jns03ad.p1", 0x0000, 0x020000, CRC(9d3e4a13) SHA1(5780eaeb148d64f7d2769207f7973c02a5e5a3de), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 17)" ) GAME_CUSTOM( 199?, m4hijinx__q, m4hijinx, "jns03b.p1", 0x0000, 0x020000, CRC(07eddb71) SHA1(05f5bbcf6c7e69407163c9dc76c6c587f0cdf10e), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 18)" ) GAME_CUSTOM( 199?, m4hijinx__r, m4hijinx, "jns03bd.p1", 0x0000, 0x020000, CRC(b4df2f9b) SHA1(1d6025bfb119007c7b17214577cf69f978fa2830), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 19)" ) @@ -2849,19 +3083,17 @@ GAME_CUSTOM( 199?, m4hijinx__w, m4hijinx, "jns03dy.p1", 0x0000, 0x020000, GAME_CUSTOM( 199?, m4hijinx__x, m4hijinx, "jns03h.p1", 0x0000, 0x020000, CRC(e9d1b86a) SHA1(4a982370bfb788ef53ae9479a72dbca6c7f9ec00), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 25)" ) GAME_CUSTOM( 199?, m4hijinx__y, m4hijinx, "jns03k.p1", 0x0000, 0x020000, CRC(5381abbd) SHA1(8967579f31ef9a0ec868af1cb64d9fa049314f94), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 26)" ) GAME_CUSTOM( 199?, m4hijinx__z, m4hijinx, "jns03r.p1", 0x0000, 0x020000, CRC(9d0305c8) SHA1(525b36b43a09c27f807dcbdc8bff89af82bdffc0), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4hijinx__0, m4hijinx, "jns03s.p1", 0x0000, 0x020000, CRC(ef9f3d18) SHA1(cc2239a4dca1c092025216a16bb39fe9126bd6f8), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 28)" ) GAME_CUSTOM( 199?, m4hijinx__1, m4hijinx, "jns03y.p1", 0x0000, 0x020000, CRC(64cb16af) SHA1(f4bc3557f84cd0054c475e0354f0562f63df3146), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 29)" ) +// "(C)1993 BARCREST" and "JNX 0.5" +GAME_CUSTOM( 199?, m4hijinx__6, m4hijinx, "jnx05y.p1", 0x0000, 0x020000, CRC(6f40a357) SHA1(7d019f925d7920df23782b1e6e742bc467e7767b), "Barcrest","Hi Jinx (Barcrest) (MPU4) (JNX 0.5Y)" ) GAME_CUSTOM( 199?, m4hijinx__2, m4hijinx, "jnx05d.p1", 0x0000, 0x020000, CRC(27d9db28) SHA1(df333d884735a94d3c4d460deb05e50fcfce8896), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 30)" ) GAME_CUSTOM( 199?, m4hijinx__3, m4hijinx, "jnx05dh.p1", 0x0000, 0x020000, CRC(d7dc5d8b) SHA1(6b94ae9169b522a80455cbe42378427d2f1019f3), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 31)" ) GAME_CUSTOM( 199?, m4hijinx__4, m4hijinx, "jnx05dy.p1", 0x0000, 0x020000, CRC(f44fafc0) SHA1(996411b41071cc3c5c84f00106f9685b27e95352), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 32)" ) GAME_CUSTOM( 199?, m4hijinx__5, m4hijinx, "jnx05h.p1", 0x0000, 0x020000, CRC(4cd3511c) SHA1(2f283f50d2313eb9da49e4efbdb9a098f90c0afb), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 33)" ) -GAME_CUSTOM( 199?, m4hijinx__6, m4hijinx, "jnx05y.p1", 0x0000, 0x020000, CRC(6f40a357) SHA1(7d019f925d7920df23782b1e6e742bc467e7767b), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 34)" ) -GAME_CUSTOM( 199?, m4hijinx__7, m4hijinx, "jnx10d.p1", 0x0000, 0x020000, CRC(31b243d1) SHA1(029dd8ecbe83b63ca799b6507262193ef56d4b36), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 35)" ) -GAME_CUSTOM( 199?, m4hijinx__8, m4hijinx, "jnx10dh.p1", 0x0000, 0x020000, CRC(ffc421b0) SHA1(28439c5d2ec371edae5e7b84e1da96d468bb8556), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 36)" ) -GAME_CUSTOM( 199?, m4hijinx__9, m4hijinx, "jnx10dy.p1", 0x0000, 0x020000, CRC(dc57d3fb) SHA1(e622485f37f638a69e0c5dbb06faa519b10eafc9), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 37)" ) -GAME_CUSTOM( 199?, m4hijinx__aa, m4hijinx, "jnx10h.p1", 0x0000, 0x020000, CRC(5ab8c9e5) SHA1(f12094bd95369288a76dac9d1e62810fa478cfd6), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 38)" ) -GAME_CUSTOM( 199?, m4hijinx__ab, m4hijinx, "jnx10s.p1", 0x0000, 0x020000, CRC(a291147e) SHA1(818172bab2fad210a937d91e0be4ddf165f1cf99), "Barcrest","Hi Jinx (Barcrest) (MPU4) (set 39)" ) - +// no copyright string and "JNX 0.5" +GAME_CUSTOM( 199?, m4hijinx__a, m4hijinx, "hij15g", 0x0000, 0x020000, CRC(73271cca) SHA1(8177e10e30386464a7e5a33dc3c02adbf4c93101), "hack","Hi Jinx (Barcrest) (MPU4) (JNX 0.5, hack)" ) +// no copyright string and "JNS 0.2" +GAME_CUSTOM( 199?, m4hijinx__b, m4hijinx, "hij15t", 0x0000, 0x020000, CRC(c7d54c64) SHA1(d3537c8412b583f2812f87ab68ac8855e9cdbd2f), "hack","Hi Jinx (Barcrest) (MPU4) (JNS 0.2, hack)" ) @@ -2882,50 +3114,8 @@ GAME_CUSTOM( 199?, m4hijinx__ab, m4hijinx, "jnx10s.p1", 0x0000, 0x020000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4cashln, 0, "cls04s.p1", 0x0000, 0x020000, CRC(c8b7f355) SHA1(437324bf499ba49ecbb3854f5f787da5f575f7f5), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4cashln__a, m4cashln, "cl15g", 0x0000, 0x020000, CRC(fdd5765d) SHA1(fee8ddc9b93934a5582d6730cfa26246191c22ff), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4cashln__b, m4cashln, "cl15t", 0x0000, 0x020000, CRC(56bb9f21) SHA1(2876ac79283ea5cbee45e9ac6d5d140ea7db8e95), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4cashln__c, m4cashln, "cli10s", 0x0000, 0x020000, CRC(9aca737d) SHA1(6669c8b7a192b1c67caad62aad528b08737f7e73), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4cashln__d, m4cashln, "cli11ad.p1", 0x0000, 0x020000, CRC(ab47d9b3) SHA1(e501bb61de76ffe6618be03a59614b36e71e031b), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4cashln__e, m4cashln, "cli11b.p1", 0x0000, 0x020000, CRC(4adcaa58) SHA1(027dda275f32e49e6c0f9ff4e7d42472bdd3174e), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4cashln__f, m4cashln, "cli11bd.p1", 0x0000, 0x020000, CRC(e18071e5) SHA1(e219be249b5992808745a4c668686dfad77e2837), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4cashln__g, m4cashln, "cli11d.p1", 0x0000, 0x020000, CRC(c7c6049d) SHA1(6ad1caed1272ff4e6902843bf2420020ca2d0cb4), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4cashln__h, m4cashln, "cli11dh.p1", 0x0000, 0x020000, CRC(c21383ae) SHA1(01a840f160aacbb2b253ab6ba0a915f7055cc381), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4cashln__i, m4cashln, "cli11dk.p1", 0x0000, 0x020000, CRC(18486282) SHA1(5910a68539f5343661f8e55105c767067633ef1c), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4cashln__j, m4cashln, "cli11dr.p1", 0x0000, 0x020000, CRC(82a6bc3b) SHA1(c12b46234bebe408374a7fc3e18bf79942434d95), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4cashln__k, m4cashln, "cli11dy.p1", 0x0000, 0x020000, CRC(2ca4f94d) SHA1(4d0345e3c819d8dd48c559f01c118430d5ccdea2), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4cashln__l, m4cashln, "cli11h.p1", 0x0000, 0x020000, CRC(694f5813) SHA1(3acf84d6e5060e7054097aa2601c9c2833a2d524), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4cashln__m, m4cashln, "cli11k.p1", 0x0000, 0x020000, CRC(b314b93f) SHA1(e94472e1d1e345be84b277088dc852ed75117344), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4cashln__n, m4cashln, "cli11r.p1", 0x0000, 0x020000, CRC(29fa6786) SHA1(8bd7a7b0cf84615a126ebed494954ed2b7bc0ec4), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4cashln__o, m4cashln, "cli11s.p1", 0x0000, 0x020000, CRC(e5ad1734) SHA1(69fb5c81ae04c98920d84f829be14983168196e5), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4cashln__p, m4cashln, "cli11y.p1", 0x0000, 0x020000, CRC(87f822f0) SHA1(701a8c88be972b8363490e92e98f37acd493ef07), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4cashln__q, m4cashln, "cli12ad.p1", 0x0000, 0x020000, CRC(d6c03a42) SHA1(203ea61def95c2ea0a9ea1f808056122d87993ff), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4cashln__r, m4cashln, "cli12b.p1", 0x0000, 0x020000, CRC(9d4245da) SHA1(604b1e68d271784b982cde81e3675298662df1bc), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4cashln__s, m4cashln, "cli12bd.p1", 0x0000, 0x020000, CRC(9c079214) SHA1(1ee6362d876dd5aaa1699186ee905b48755a80de), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4cashln__t, m4cashln, "cli12d.p1", 0x0000, 0x020000, CRC(1058eb1f) SHA1(2c4305679c829cbf6c34d2627a1e8e366c5be5c1), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4cashln__u, m4cashln, "cli12dh.p1", 0x0000, 0x020000, CRC(bf94605f) SHA1(e2ae87041791ba92d8db69c7a3b40b62c97cf941), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4cashln__v, m4cashln, "cli12dk.p1", 0x0000, 0x020000, CRC(65cf8173) SHA1(f7ed6227b3e57d50e327f3ff72b9aafafa51da63), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4cashln__w, m4cashln, "cli12dr.p1", 0x0000, 0x020000, CRC(ff215fca) SHA1(40cab82f6a7f5229b365236b4758e73b2a3dce1e), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4cashln__x, m4cashln, "cli12dy.p1", 0x0000, 0x020000, CRC(51231abc) SHA1(ae80491fb1496f6fccbd46f424fe1d45640da8e2), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4cashln__y, m4cashln, "cli12h.p1", 0x0000, 0x020000, CRC(bed1b791) SHA1(d017f62a099475786fa15c7a185574301b80dbdd), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4cashln__z, m4cashln, "cli12k.p1", 0x0000, 0x020000, CRC(648a56bd) SHA1(25ad92789b12512b8c65cc912080f62abfe101a6), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4cashln__0, m4cashln, "cli12r.p1", 0x0000, 0x020000, CRC(fe648804) SHA1(27e74aea209b90dc3d8cf46474e271d68d9af7e2), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4cashln__1, m4cashln, "cli12s.p1", 0x0000, 0x020000, CRC(ef5aa578) SHA1(c4c288a297f5f6cd0712c396237aa3bf1363e188), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 29)" ) -GAME_CUSTOM( 199?, m4cashln__2, m4cashln, "cli12y.p1", 0x0000, 0x020000, CRC(5066cd72) SHA1(03cef55b4fff8fb6edd804fdbc4076db6b234614), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 30)" ) -GAME_CUSTOM( 199?, m4cashln__3, m4cashln, "cls03ad.p1", 0x0000, 0x020000, CRC(c68249cf) SHA1(d2d16ce76a5b144827a11f7fa471c7ea558c1ce0), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 31)" ) -GAME_CUSTOM( 199?, m4cashln__4, m4cashln, "cls03b.p1", 0x0000, 0x020000, CRC(db667c56) SHA1(8a8f2374d0d02307206071718376400d5a52dc6c), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 32)" ) -GAME_CUSTOM( 199?, m4cashln__5, m4cashln, "cls03bd.p1", 0x0000, 0x020000, CRC(4b98e70a) SHA1(04e0732dd8c0283dd928da9caafd78f509a4d479), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 33)" ) -GAME_CUSTOM( 199?, m4cashln__6, m4cashln, "cls03c.p1", 0x0000, 0x020000, CRC(ec2cc144) SHA1(bc2879e4487ad5638e2818f4c8c5b23ab660cecc), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 34)" ) -GAME_CUSTOM( 199?, m4cashln__7, m4cashln, "cls03d.p1", 0x0000, 0x020000, CRC(a67d7720) SHA1(556128a8c464a5d1de0ebb0de8ce87a7ea0813d3), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 35)" ) -GAME_CUSTOM( 199?, m4cashln__8, m4cashln, "cls03dh.p1", 0x0000, 0x020000, CRC(22587ac6) SHA1(04cacccfebdc01046e048b2c98a05f3f97fcd6f3), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 36)" ) -GAME_CUSTOM( 199?, m4cashln__9, m4cashln, "cls03dk.p1", 0x0000, 0x020000, CRC(015f4f5c) SHA1(fd0e622217d42f52cfba78989e8cf843cb08a17d), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 37)" ) -GAME_CUSTOM( 199?, m4cashln__aa, m4cashln, "cls03dr.p1", 0x0000, 0x020000, CRC(b250f46d) SHA1(02f04778ce6fb674ba9760b0fa9828b76a58239a), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 38)" ) -GAME_CUSTOM( 199?, m4cashln__ab, m4cashln, "cls03dy.p1", 0x0000, 0x020000, CRC(86bc6fa2) SHA1(40a2bb1148989b5895b0f58417f404f7b035b472), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 39)" ) -GAME_CUSTOM( 199?, m4cashln__ac, m4cashln, "cls03h.p1", 0x0000, 0x020000, CRC(b2a6e19a) SHA1(668527a7939ab70deb03b1db8a4a2629fb332815), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 40)" ) -GAME_CUSTOM( 199?, m4cashln__ad, m4cashln, "cls03k.p1", 0x0000, 0x020000, CRC(91a1d400) SHA1(9e4ccd4f4119471d66a22b14a22312149faf28c0), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 41)" ) -GAME_CUSTOM( 199?, m4cashln__ae, m4cashln, "cls03r.p1", 0x0000, 0x020000, CRC(22ae6f31) SHA1(b08ec5eb5bae377b829a14065b54ec1dbbc55677), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 42)" ) -GAME_CUSTOM( 199?, m4cashln__af, m4cashln, "cls03s.p1", 0x0000, 0x020000, CRC(cb9a86b2) SHA1(2b4aee61c0070d295ba81ffa5739ceb8e05dc0e8), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 43)" ) -GAME_CUSTOM( 199?, m4cashln__ag, m4cashln, "cls03y.p1", 0x0000, 0x020000, CRC(1642f4fe) SHA1(b4e3fa360fdc1908cafe61d833c5097cee965404), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 44)" ) +// "(C)1993 BARCREST" and "CLS 0.4" +GAME_CUSTOM( 199?, m4cashln, 0, "cls04s.p1", 0x0000, 0x020000, CRC(c8b7f355) SHA1(437324bf499ba49ecbb3854f5f787da5f575f7f5), "Barcrest","Cash Lines (Barcrest) (MPU4) (CLS 0.4)" ) GAME_CUSTOM( 199?, m4cashln__ah, m4cashln, "cls04ad.p1", 0x0000, 0x020000, CRC(6eb174ed) SHA1(dcf4e91ca16e3d5644429289470329102bc96f83), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 45)" ) GAME_CUSTOM( 199?, m4cashln__ai, m4cashln, "cls04b.p1", 0x0000, 0x020000, CRC(73554174) SHA1(f74ba0a6212c58306d3e4f2e467e860bd4b2b294), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 46)" ) GAME_CUSTOM( 199?, m4cashln__aj, m4cashln, "cls04bd.p1", 0x0000, 0x020000, CRC(e3abda28) SHA1(65b7883b52a8105f3df12659f4d9467f503ac1c6), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 47)" ) @@ -2939,19 +3129,53 @@ GAME_CUSTOM( 199?, m4cashln__aq, m4cashln, "cls04h.p1", 0x0000, 0x020000, GAME_CUSTOM( 199?, m4cashln__ar, m4cashln, "cls04k.p1", 0x0000, 0x020000, CRC(3992e922) SHA1(9c39d2740ef51004ea59f859ec3e008c6586c00d), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 55)" ) GAME_CUSTOM( 199?, m4cashln__as, m4cashln, "cls04r.p1", 0x0000, 0x020000, CRC(8a9d5213) SHA1(dce36cdf790415bb37735a09226d73e322f7510a), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 56)" ) GAME_CUSTOM( 199?, m4cashln__at, m4cashln, "cls04y.p1", 0x0000, 0x020000, CRC(be71c9dc) SHA1(d2c2374685e953a028726ba48329196aa0a9f098), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 57)" ) -GAME_CUSTOM( 199?, m4cashln__au, m4cashln, "ncc10ad.p1", 0x0000, 0x020000, CRC(d4be9280) SHA1(cbae1aad2dc8d88df9869755063a7a1097995417), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 58)" ) -GAME_CUSTOM( 199?, m4cashln__av, m4cashln, "ncc10b.p1", 0x0000, 0x020000, CRC(42abdedf) SHA1(4c428288ba9bb426ae011127896634f5995f8a6c), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 59)" ) -GAME_CUSTOM( 199?, m4cashln__aw, m4cashln, "ncc10bd.p1", 0x0000, 0x020000, CRC(9e793ad6) SHA1(7c26c6cf2b23e2b73887c2eea1e5f7566127ca95), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 60)" ) -GAME_CUSTOM( 199?, m4cashln__ax, m4cashln, "ncc10d.p1", 0x0000, 0x020000, CRC(cfb1701a) SHA1(20c47f0d30c4e4da37ce38fc097e841fb3ee89ed), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 61)" ) -GAME_CUSTOM( 199?, m4cashln__ay, m4cashln, "ncc10dh.p1", 0x0000, 0x020000, CRC(bdeac89d) SHA1(5ddde5cee5c95714e66e10a061e76603a993f446), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 62)" ) -GAME_CUSTOM( 199?, m4cashln__az, m4cashln, "ncc10dk.p1", 0x0000, 0x020000, CRC(67b129b1) SHA1(d7c0a107295ae3d11abe4138a1c76fd779777bec), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 63)" ) -GAME_CUSTOM( 199?, m4cashln__a0, m4cashln, "ncc10dr.p1", 0x0000, 0x020000, CRC(fd5ff708) SHA1(1bc5b96a46130370fc16b43804721eb392ec585f), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 64)" ) -GAME_CUSTOM( 199?, m4cashln__a1, m4cashln, "ncc10dy.p1", 0x0000, 0x020000, CRC(535db27e) SHA1(16b8d87fc22e040952988823d2c677130c17e137), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 65)" ) -GAME_CUSTOM( 199?, m4cashln__a2, m4cashln, "ncc10h.p1", 0x0000, 0x020000, CRC(61382c94) SHA1(98e4fcfedbe16773be0abbd6691ccd9f19a33684), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 66)" ) -GAME_CUSTOM( 199?, m4cashln__a3, m4cashln, "ncc10k.p1", 0x0000, 0x020000, CRC(bb63cdb8) SHA1(d4737ab4492bcdc0ffa3eb1cb0456f4f32e4482a), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 67)" ) -GAME_CUSTOM( 199?, m4cashln__a4, m4cashln, "ncc10r.p1", 0x0000, 0x020000, CRC(218d1301) SHA1(4bbdb69c2ac6ee13b50b1de8a17b019ce46004ba), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 68)" ) -GAME_CUSTOM( 199?, m4cashln__a5, m4cashln, "ncc10s.p1", 0x0000, 0x020000, CRC(2a18dc72) SHA1(f2434805212719db22ce163f2b338b25ca275c94), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 69)" ) -GAME_CUSTOM( 199?, m4cashln__a6, m4cashln, "ncc10y.p1", 0x0000, 0x020000, CRC(8f8f5677) SHA1(188d5d9c274147367bde644e33e162d0541cdca2), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 70)" ) +// "(C)1993 BARCREST" and "CLS 0.3" +GAME_CUSTOM( 199?, m4cashln__af, m4cashln, "cls03s.p1", 0x0000, 0x020000, CRC(cb9a86b2) SHA1(2b4aee61c0070d295ba81ffa5739ceb8e05dc0e8), "Barcrest","Cash Lines (Barcrest) (MPU4) (CLS 0.3)" ) +GAME_CUSTOM( 199?, m4cashln__3, m4cashln, "cls03ad.p1", 0x0000, 0x020000, CRC(c68249cf) SHA1(d2d16ce76a5b144827a11f7fa471c7ea558c1ce0), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 31)" ) +GAME_CUSTOM( 199?, m4cashln__4, m4cashln, "cls03b.p1", 0x0000, 0x020000, CRC(db667c56) SHA1(8a8f2374d0d02307206071718376400d5a52dc6c), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 32)" ) +GAME_CUSTOM( 199?, m4cashln__5, m4cashln, "cls03bd.p1", 0x0000, 0x020000, CRC(4b98e70a) SHA1(04e0732dd8c0283dd928da9caafd78f509a4d479), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 33)" ) +GAME_CUSTOM( 199?, m4cashln__6, m4cashln, "cls03c.p1", 0x0000, 0x020000, CRC(ec2cc144) SHA1(bc2879e4487ad5638e2818f4c8c5b23ab660cecc), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 34)" ) +GAME_CUSTOM( 199?, m4cashln__7, m4cashln, "cls03d.p1", 0x0000, 0x020000, CRC(a67d7720) SHA1(556128a8c464a5d1de0ebb0de8ce87a7ea0813d3), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 35)" ) +GAME_CUSTOM( 199?, m4cashln__8, m4cashln, "cls03dh.p1", 0x0000, 0x020000, CRC(22587ac6) SHA1(04cacccfebdc01046e048b2c98a05f3f97fcd6f3), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 36)" ) +GAME_CUSTOM( 199?, m4cashln__9, m4cashln, "cls03dk.p1", 0x0000, 0x020000, CRC(015f4f5c) SHA1(fd0e622217d42f52cfba78989e8cf843cb08a17d), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 37)" ) +GAME_CUSTOM( 199?, m4cashln__aa, m4cashln, "cls03dr.p1", 0x0000, 0x020000, CRC(b250f46d) SHA1(02f04778ce6fb674ba9760b0fa9828b76a58239a), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 38)" ) +GAME_CUSTOM( 199?, m4cashln__ab, m4cashln, "cls03dy.p1", 0x0000, 0x020000, CRC(86bc6fa2) SHA1(40a2bb1148989b5895b0f58417f404f7b035b472), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 39)" ) +GAME_CUSTOM( 199?, m4cashln__ac, m4cashln, "cls03h.p1", 0x0000, 0x020000, CRC(b2a6e19a) SHA1(668527a7939ab70deb03b1db8a4a2629fb332815), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 40)" ) +GAME_CUSTOM( 199?, m4cashln__ad, m4cashln, "cls03k.p1", 0x0000, 0x020000, CRC(91a1d400) SHA1(9e4ccd4f4119471d66a22b14a22312149faf28c0), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 41)" ) +GAME_CUSTOM( 199?, m4cashln__ae, m4cashln, "cls03r.p1", 0x0000, 0x020000, CRC(22ae6f31) SHA1(b08ec5eb5bae377b829a14065b54ec1dbbc55677), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 42)" ) +GAME_CUSTOM( 199?, m4cashln__ag, m4cashln, "cls03y.p1", 0x0000, 0x020000, CRC(1642f4fe) SHA1(b4e3fa360fdc1908cafe61d833c5097cee965404), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 44)" ) +// "(C)1993 BARCREST" and "CLI 1.2" +GAME_CUSTOM( 199?, m4cashln__1, m4cashln, "cli12s.p1", 0x0000, 0x020000, CRC(ef5aa578) SHA1(c4c288a297f5f6cd0712c396237aa3bf1363e188), "Barcrest","Cash Lines (Barcrest) (MPU4) (CLI 1.2)" ) +GAME_CUSTOM( 199?, m4cashln__q, m4cashln, "cli12ad.p1", 0x0000, 0x020000, CRC(d6c03a42) SHA1(203ea61def95c2ea0a9ea1f808056122d87993ff), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 18)" ) +GAME_CUSTOM( 199?, m4cashln__r, m4cashln, "cli12b.p1", 0x0000, 0x020000, CRC(9d4245da) SHA1(604b1e68d271784b982cde81e3675298662df1bc), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 19)" ) +GAME_CUSTOM( 199?, m4cashln__s, m4cashln, "cli12bd.p1", 0x0000, 0x020000, CRC(9c079214) SHA1(1ee6362d876dd5aaa1699186ee905b48755a80de), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 20)" ) +GAME_CUSTOM( 199?, m4cashln__t, m4cashln, "cli12d.p1", 0x0000, 0x020000, CRC(1058eb1f) SHA1(2c4305679c829cbf6c34d2627a1e8e366c5be5c1), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 21)" ) +GAME_CUSTOM( 199?, m4cashln__u, m4cashln, "cli12dh.p1", 0x0000, 0x020000, CRC(bf94605f) SHA1(e2ae87041791ba92d8db69c7a3b40b62c97cf941), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 22)" ) +GAME_CUSTOM( 199?, m4cashln__v, m4cashln, "cli12dk.p1", 0x0000, 0x020000, CRC(65cf8173) SHA1(f7ed6227b3e57d50e327f3ff72b9aafafa51da63), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 23)" ) +GAME_CUSTOM( 199?, m4cashln__w, m4cashln, "cli12dr.p1", 0x0000, 0x020000, CRC(ff215fca) SHA1(40cab82f6a7f5229b365236b4758e73b2a3dce1e), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 24)" ) +GAME_CUSTOM( 199?, m4cashln__x, m4cashln, "cli12dy.p1", 0x0000, 0x020000, CRC(51231abc) SHA1(ae80491fb1496f6fccbd46f424fe1d45640da8e2), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 25)" ) +GAME_CUSTOM( 199?, m4cashln__y, m4cashln, "cli12h.p1", 0x0000, 0x020000, CRC(bed1b791) SHA1(d017f62a099475786fa15c7a185574301b80dbdd), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 26)" ) +GAME_CUSTOM( 199?, m4cashln__z, m4cashln, "cli12k.p1", 0x0000, 0x020000, CRC(648a56bd) SHA1(25ad92789b12512b8c65cc912080f62abfe101a6), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 27)" ) +GAME_CUSTOM( 199?, m4cashln__0, m4cashln, "cli12r.p1", 0x0000, 0x020000, CRC(fe648804) SHA1(27e74aea209b90dc3d8cf46474e271d68d9af7e2), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 28)" ) +GAME_CUSTOM( 199?, m4cashln__2, m4cashln, "cli12y.p1", 0x0000, 0x020000, CRC(5066cd72) SHA1(03cef55b4fff8fb6edd804fdbc4076db6b234614), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 30)" ) +// "(C)1993 BARCREST" and "CLI 1.1" +GAME_CUSTOM( 199?, m4cashln__o, m4cashln, "cli11s.p1", 0x0000, 0x020000, CRC(e5ad1734) SHA1(69fb5c81ae04c98920d84f829be14983168196e5), "Barcrest","Cash Lines (Barcrest) (MPU4) (CLI 1.1)" ) +GAME_CUSTOM( 199?, m4cashln__d, m4cashln, "cli11ad.p1", 0x0000, 0x020000, CRC(ab47d9b3) SHA1(e501bb61de76ffe6618be03a59614b36e71e031b), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4cashln__e, m4cashln, "cli11b.p1", 0x0000, 0x020000, CRC(4adcaa58) SHA1(027dda275f32e49e6c0f9ff4e7d42472bdd3174e), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4cashln__f, m4cashln, "cli11bd.p1", 0x0000, 0x020000, CRC(e18071e5) SHA1(e219be249b5992808745a4c668686dfad77e2837), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4cashln__g, m4cashln, "cli11d.p1", 0x0000, 0x020000, CRC(c7c6049d) SHA1(6ad1caed1272ff4e6902843bf2420020ca2d0cb4), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 8)" ) +GAME_CUSTOM( 199?, m4cashln__h, m4cashln, "cli11dh.p1", 0x0000, 0x020000, CRC(c21383ae) SHA1(01a840f160aacbb2b253ab6ba0a915f7055cc381), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 9)" ) +GAME_CUSTOM( 199?, m4cashln__i, m4cashln, "cli11dk.p1", 0x0000, 0x020000, CRC(18486282) SHA1(5910a68539f5343661f8e55105c767067633ef1c), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 10)" ) +GAME_CUSTOM( 199?, m4cashln__j, m4cashln, "cli11dr.p1", 0x0000, 0x020000, CRC(82a6bc3b) SHA1(c12b46234bebe408374a7fc3e18bf79942434d95), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 11)" ) +GAME_CUSTOM( 199?, m4cashln__k, m4cashln, "cli11dy.p1", 0x0000, 0x020000, CRC(2ca4f94d) SHA1(4d0345e3c819d8dd48c559f01c118430d5ccdea2), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 12)" ) +GAME_CUSTOM( 199?, m4cashln__l, m4cashln, "cli11h.p1", 0x0000, 0x020000, CRC(694f5813) SHA1(3acf84d6e5060e7054097aa2601c9c2833a2d524), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 13)" ) +GAME_CUSTOM( 199?, m4cashln__m, m4cashln, "cli11k.p1", 0x0000, 0x020000, CRC(b314b93f) SHA1(e94472e1d1e345be84b277088dc852ed75117344), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 14)" ) +GAME_CUSTOM( 199?, m4cashln__n, m4cashln, "cli11r.p1", 0x0000, 0x020000, CRC(29fa6786) SHA1(8bd7a7b0cf84615a126ebed494954ed2b7bc0ec4), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 15)" ) +GAME_CUSTOM( 199?, m4cashln__p, m4cashln, "cli11y.p1", 0x0000, 0x020000, CRC(87f822f0) SHA1(701a8c88be972b8363490e92e98f37acd493ef07), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 17)" ) +// "(C)1993 BARCREST" and "CLI 1.0" +GAME_CUSTOM( 199?, m4cashln__c, m4cashln, "cli10s", 0x0000, 0x020000, CRC(9aca737d) SHA1(6669c8b7a192b1c67caad62aad528b08737f7e73), "Barcrest","Cash Lines (Barcrest) (MPU4) (CLI 1.0)" ) +// "(C)1993 BARCREST" and "NCL 1.1" +GAME_CUSTOM( 199?, m4cashln__bi, m4cashln, "ncl11s.p1", 0x0000, 0x020000, CRC(06ae30c0) SHA1(eb7fde45e0a0aa08f3c788f581b48adc8ee86a79), "Barcrest","Cash Lines (Barcrest) (MPU4) (NCL 1.1)" ) GAME_CUSTOM( 199?, m4cashln__a7, m4cashln, "ncl11ad.p1", 0x0000, 0x020000, CRC(73ba0558) SHA1(d86b2469d7cbe5f9271f8e8f3c6ee1659d72b3c6), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 71)" ) GAME_CUSTOM( 199?, m4cashln__a8, m4cashln, "ncl11b.p1", 0x0000, 0x020000, CRC(f6e8ee46) SHA1(6d0da96b6cba4482c254fef6ba44a4e80fc0fda4), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 72)" ) GAME_CUSTOM( 199?, m4cashln__a9, m4cashln, "ncl11bd.p1", 0x0000, 0x020000, CRC(397dad0e) SHA1(ad764f376b34f01578fc2ce78351f89642601252), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 73)" ) @@ -2963,10 +3187,25 @@ GAME_CUSTOM( 199?, m4cashln__be, m4cashln, "ncl11dy.p1", 0x0000, 0x020000, GAME_CUSTOM( 199?, m4cashln__bf, m4cashln, "ncl11h.p1", 0x0000, 0x020000, CRC(d57b1c0d) SHA1(cfb0e78ecba28a5ebe6e272190c473023544452b), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 79)" ) GAME_CUSTOM( 199?, m4cashln__bg, m4cashln, "ncl11k.p1", 0x0000, 0x020000, CRC(0f20fd21) SHA1(25c3a7fe77819613de7bf4218759b096a05e5605), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 80)" ) GAME_CUSTOM( 199?, m4cashln__bh, m4cashln, "ncl11r.p1", 0x0000, 0x020000, CRC(95ce2398) SHA1(72aa7ec767a81c568b442f63c3cf916925b22a4a), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 81)" ) -GAME_CUSTOM( 199?, m4cashln__bi, m4cashln, "ncl11s.p1", 0x0000, 0x020000, CRC(06ae30c0) SHA1(eb7fde45e0a0aa08f3c788f581b48adc8ee86a79), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 82)" ) GAME_CUSTOM( 199?, m4cashln__bj, m4cashln, "ncl11y.p1", 0x0000, 0x020000, CRC(3bcc66ee) SHA1(795ecf1e34ae44d7aea70512124b66b0bed3e875), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 83)" ) - - +// "(C)1993 BARCREST" and "NCC 1.0" +GAME_CUSTOM( 199?, m4cashln__a5, m4cashln, "ncc10s.p1", 0x0000, 0x020000, CRC(2a18dc72) SHA1(f2434805212719db22ce163f2b338b25ca275c94), "Barcrest","Cash Lines (Barcrest) (MPU4) (NCC 1.0)" ) +GAME_CUSTOM( 199?, m4cashln__au, m4cashln, "ncc10ad.p1", 0x0000, 0x020000, CRC(d4be9280) SHA1(cbae1aad2dc8d88df9869755063a7a1097995417), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 58)" ) +GAME_CUSTOM( 199?, m4cashln__av, m4cashln, "ncc10b.p1", 0x0000, 0x020000, CRC(42abdedf) SHA1(4c428288ba9bb426ae011127896634f5995f8a6c), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 59)" ) +GAME_CUSTOM( 199?, m4cashln__aw, m4cashln, "ncc10bd.p1", 0x0000, 0x020000, CRC(9e793ad6) SHA1(7c26c6cf2b23e2b73887c2eea1e5f7566127ca95), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 60)" ) +GAME_CUSTOM( 199?, m4cashln__ax, m4cashln, "ncc10d.p1", 0x0000, 0x020000, CRC(cfb1701a) SHA1(20c47f0d30c4e4da37ce38fc097e841fb3ee89ed), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 61)" ) +GAME_CUSTOM( 199?, m4cashln__ay, m4cashln, "ncc10dh.p1", 0x0000, 0x020000, CRC(bdeac89d) SHA1(5ddde5cee5c95714e66e10a061e76603a993f446), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 62)" ) +GAME_CUSTOM( 199?, m4cashln__az, m4cashln, "ncc10dk.p1", 0x0000, 0x020000, CRC(67b129b1) SHA1(d7c0a107295ae3d11abe4138a1c76fd779777bec), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 63)" ) +GAME_CUSTOM( 199?, m4cashln__a0, m4cashln, "ncc10dr.p1", 0x0000, 0x020000, CRC(fd5ff708) SHA1(1bc5b96a46130370fc16b43804721eb392ec585f), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 64)" ) +GAME_CUSTOM( 199?, m4cashln__a1, m4cashln, "ncc10dy.p1", 0x0000, 0x020000, CRC(535db27e) SHA1(16b8d87fc22e040952988823d2c677130c17e137), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 65)" ) +GAME_CUSTOM( 199?, m4cashln__a2, m4cashln, "ncc10h.p1", 0x0000, 0x020000, CRC(61382c94) SHA1(98e4fcfedbe16773be0abbd6691ccd9f19a33684), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 66)" ) +GAME_CUSTOM( 199?, m4cashln__a3, m4cashln, "ncc10k.p1", 0x0000, 0x020000, CRC(bb63cdb8) SHA1(d4737ab4492bcdc0ffa3eb1cb0456f4f32e4482a), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 67)" ) +GAME_CUSTOM( 199?, m4cashln__a4, m4cashln, "ncc10r.p1", 0x0000, 0x020000, CRC(218d1301) SHA1(4bbdb69c2ac6ee13b50b1de8a17b019ce46004ba), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 68)" ) +GAME_CUSTOM( 199?, m4cashln__a6, m4cashln, "ncc10y.p1", 0x0000, 0x020000, CRC(8f8f5677) SHA1(188d5d9c274147367bde644e33e162d0541cdca2), "Barcrest","Cash Lines (Barcrest) (MPU4) (set 70)" ) +// no copyright string and "CLI 1.1" +GAME_CUSTOM( 199?, m4cashln__a, m4cashln, "cl15g", 0x0000, 0x020000, CRC(fdd5765d) SHA1(fee8ddc9b93934a5582d6730cfa26246191c22ff), "hack","Cash Lines (Barcrest) (MPU4) (CLI 1.1, hack)" ) +// no copyright string and "CLS 0.3" +GAME_CUSTOM( 199?, m4cashln__b, m4cashln, "cl15t", 0x0000, 0x020000, CRC(56bb9f21) SHA1(2876ac79283ea5cbee45e9ac6d5d140ea7db8e95), "hack","Cash Lines (Barcrest) (MPU4) (CLS 0.3, hack)" ) #define M4LUCKLV_EXTRA_ROMS \ ROM_REGION( 0x100000, "msm6376", 0 ) \ @@ -2981,7 +3220,14 @@ GAME_CUSTOM( 199?, m4cashln__bj, m4cashln, "ncl11y.p1", 0x0000, 0x020000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4lucklv, 0, "llvs.p1", 0x0000, 0x010000, CRC(30727bc9) SHA1(c32112d0181f629540b31ce9959834111dbf7e0e), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 1)" ) +// "(C)1991 BARCREST" and "LLV 0.2" +GAME_CUSTOM( 199?, m4lucklv, 0, "llvs.p1", 0x0000, 0x010000, CRC(30727bc9) SHA1(c32112d0181f629540b31ce9959834111dbf7e0e), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (LLV 0.2)" ) +GAME_CUSTOM( 199?, m4lucklv__af, m4lucklv, "llvb.p1", 0x0000, 0x010000, CRC(72e27d9b) SHA1(2355c48c4ac8bc94dcea74b04e68be8a461f09a3), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 43)" ) +GAME_CUSTOM( 199?, m4lucklv__ag, m4lucklv, "llvc.p1", 0x0000, 0x010000, CRC(00ac2db0) SHA1(a8ec3a2862abf4eb56734d15cd9b7db0333c98f2), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 44)" ) +GAME_CUSTOM( 199?, m4lucklv__ah, m4lucklv, "llvd.p1", 0x0000, 0x010000, CRC(fdb4dcc5) SHA1(77fa51dcf1895b83182e7ee4137ed68c06d2593b), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 45)" ) +GAME_CUSTOM( 199?, m4lucklv__ai, m4lucklv, "llvr.p1", 0x0000, 0x010000, CRC(a806c43f) SHA1(8c36d50c911f956a0458f942cc8e313104f00005), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 46)" ) +// "(C)1991 BARCREST" and "LL3 0.1" +GAME_CUSTOM( 199?, m4lucklv__h, m4lucklv, "ll3s.p1", 0x0000, 0x010000, CRC(fdda2e78) SHA1(f68b274b6af7b44347b8f684f6e8a9342d222590), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (LL3 0.1)" ) GAME_CUSTOM( 199?, m4lucklv__a, m4lucklv, "ll3ad.p1", 0x0000, 0x010000, CRC(e79e7f98) SHA1(7b3a22978f2f5a0b6062f0330fef15ce0e91c010), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4lucklv__b, m4lucklv, "ll3b.p1", 0x0000, 0x010000, CRC(bcbbe728) SHA1(4930419e0e524a91687386e8a2fce2150cd8a172), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4lucklv__c, m4lucklv, "ll3bd.p1", 0x0000, 0x010000, CRC(aa4e9e1e) SHA1(ebacd42049916a32d1738813d544e34507dd650a), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 4)" ) @@ -2989,8 +3235,9 @@ GAME_CUSTOM( 199?, m4lucklv__d, m4lucklv, "ll3d.p1", 0x0000, 0x010000, CRC GAME_CUSTOM( 199?, m4lucklv__e, m4lucklv, "ll3dk.p1", 0x0000, 0x010000, CRC(c03baaef) SHA1(f3c4394d0c9929d439551aa61784a51f67e2dc3a), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 6)" ) GAME_CUSTOM( 199?, m4lucklv__f, m4lucklv, "ll3dy.p1", 0x0000, 0x010000, CRC(e73fa943) SHA1(3b2a372028ffa5200510e976cd4e8eba8e6c0612), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 7)" ) GAME_CUSTOM( 199?, m4lucklv__g, m4lucklv, "ll3k.p1", 0x0000, 0x010000, CRC(2519ede2) SHA1(d9e4b57824cddc04d1166cee16c309a77ff510d6), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4lucklv__h, m4lucklv, "ll3s.p1", 0x0000, 0x010000, CRC(fdda2e78) SHA1(f68b274b6af7b44347b8f684f6e8a9342d222590), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4lucklv__i, m4lucklv, "ll3y.p1", 0x0000, 0x010000, CRC(195023d4) SHA1(a4fabaa44fa76c4e77fb40bb89c65dadeab5927c), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 10)" ) +// "(C)1991 BARCREST" and "LL8 0.1" +GAME_CUSTOM( 199?, m4lucklv__r, m4lucklv, "ll8s.p1", 0x0000, 0x010000, CRC(1448c6fe) SHA1(211627a0f397658a8241c5e4e138a1a609beaabe), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (LL8 0.1)" ) GAME_CUSTOM( 199?, m4lucklv__j, m4lucklv, "ll8ad.p1", 0x0000, 0x010000, CRC(08f307ef) SHA1(1a613d8d2cbadffe1a97a7e2c3eafc709e6895c7), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4lucklv__k, m4lucklv, "ll8b.p1", 0x0000, 0x010000, CRC(7dd12d38) SHA1(4466bca407500741e74dfec07361d030c1736c18), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 12)" ) GAME_CUSTOM( 199?, m4lucklv__l, m4lucklv, "ll8bd.p1", 0x0000, 0x010000, CRC(3eef6aa5) SHA1(e01b95ca085a326207ef2ada1d5f31745b9c15c9), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 13)" ) @@ -2999,8 +3246,9 @@ GAME_CUSTOM( 199?, m4lucklv__n, m4lucklv, "ll8d.p1", 0x0000, 0x010000, CRC GAME_CUSTOM( 199?, m4lucklv__o, m4lucklv, "ll8dk.p1", 0x0000, 0x010000, CRC(f325c2af) SHA1(25a0818776c0cf4edcd2678fe457e21bf10dfe61), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 16)" ) GAME_CUSTOM( 199?, m4lucklv__p, m4lucklv, "ll8dy.p1", 0x0000, 0x010000, CRC(10b33cc3) SHA1(fe0a41b98b1f3dde82365c30236586737c5fdb9d), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 17)" ) GAME_CUSTOM( 199?, m4lucklv__q, m4lucklv, "ll8k.p1", 0x0000, 0x010000, CRC(d7c284be) SHA1(c33dbfa15ead02a581b4a874a6981e6094537fb4), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4lucklv__r, m4lucklv, "ll8s.p1", 0x0000, 0x010000, CRC(1448c6fe) SHA1(211627a0f397658a8241c5e4e138a1a609beaabe), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 19)" ) GAME_CUSTOM( 199?, m4lucklv__s, m4lucklv, "ll8y.p1", 0x0000, 0x010000, CRC(eb8b4a88) SHA1(f0de0d50de848e7fea35ebe754f20eaa1c02f295), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 20)" ) +// "(C)1991 BARCREST" and "LLT 0.3" +GAME_CUSTOM( 199?, m4lucklv__2, m4lucklv, "llts.p1", 0x0000, 0x010000, CRC(3ccc9e2f) SHA1(15c90bbc135ddaa05768bde6970bda15f1b69d44), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (LLT 0.3)" ) GAME_CUSTOM( 199?, m4lucklv__t, m4lucklv, "lltad.p1", 0x0000, 0x010000, CRC(35e43f52) SHA1(4ca2c43c59f5c5c3f53527bbf8128f0e92a3ca5c), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 21)" ) GAME_CUSTOM( 199?, m4lucklv__u, m4lucklv, "lltb.p1", 0x0000, 0x010000, CRC(ddc19b4e) SHA1(b44a56e5d543d895e37986d19649d7afa8d3d238), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 22)" ) GAME_CUSTOM( 199?, m4lucklv__v, m4lucklv, "lltbd.p1", 0x0000, 0x010000, CRC(fe25aa83) SHA1(68ccae76938af64e0c5df0e56333fd6814734779), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 23)" ) @@ -3010,8 +3258,9 @@ GAME_CUSTOM( 199?, m4lucklv__y, m4lucklv, "lltdr.p1", 0x0000, 0x010000, CRC GAME_CUSTOM( 199?, m4lucklv__z, m4lucklv, "lltdy.p1", 0x0000, 0x010000, CRC(55c4a8df) SHA1(a7cc7fa2aa893a3f134d6d1c04a16ecbcad99a40), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 27)" ) GAME_CUSTOM( 199?, m4lucklv__0, m4lucklv, "lltk.p1", 0x0000, 0x010000, CRC(88c7f5e5) SHA1(c30651c6daa6c82157879e72a74ee5e03f9ea64f), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 28)" ) GAME_CUSTOM( 199?, m4lucklv__1, m4lucklv, "lltr.p1", 0x0000, 0x010000, CRC(189c8fc7) SHA1(c06bedd4477ead2c071374d17fc0ef617ef6e924), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 29)" ) -GAME_CUSTOM( 199?, m4lucklv__2, m4lucklv, "llts.p1", 0x0000, 0x010000, CRC(3ccc9e2f) SHA1(15c90bbc135ddaa05768bde6970bda15f1b69d44), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 30)" ) GAME_CUSTOM( 199?, m4lucklv__3, m4lucklv, "llty.p1", 0x0000, 0x010000, CRC(85f7a729) SHA1(b3a58071bb6dae36354280a8f0de1faaa190899f), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 31)" ) +// "(C)1991 BARCREST" and "LLU 0.1" +GAME_CUSTOM( 199?, m4lucklv__ad, m4lucklv, "llus.p1", 0x0000, 0x010000, CRC(07745135) SHA1(ec602d01910ac52d20ff9c54914a5261f538233b), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (LLU 0.1)" ) GAME_CUSTOM( 199?, m4lucklv__4, m4lucklv, "lluad.p1", 0x0000, 0x010000, CRC(7a2acea9) SHA1(dfb5763664143dec4927e2a8f4088f04ca85c458), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 32)" ) GAME_CUSTOM( 199?, m4lucklv__5, m4lucklv, "llub.p1", 0x0000, 0x010000, CRC(d3683b6b) SHA1(e67e996f5f2ed55fbc47b7f1a0e225125baf2a99), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 33)" ) GAME_CUSTOM( 199?, m4lucklv__6, m4lucklv, "llubd.p1", 0x0000, 0x010000, CRC(4c36a3e3) SHA1(afbe3c4d60dd92e7bc34915f3d15cadd46da6738), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 34)" ) @@ -3021,12 +3270,7 @@ GAME_CUSTOM( 199?, m4lucklv__9, m4lucklv, "lludr.p1", 0x0000, 0x010000, CRC GAME_CUSTOM( 199?, m4lucklv__aa, m4lucklv, "lludy.p1", 0x0000, 0x010000, CRC(6d042cfe) SHA1(3812f99d45cff5f147a7965f3cb8c96eda9a2e8d), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 38)" ) GAME_CUSTOM( 199?, m4lucklv__ab, m4lucklv, "lluk.p1", 0x0000, 0x010000, CRC(476cd76c) SHA1(1a122bfbe3d95b2ce9ecf18bc6d4f85d1ea09bc7), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 39)" ) GAME_CUSTOM( 199?, m4lucklv__ac, m4lucklv, "llur.p1", 0x0000, 0x010000, CRC(89a1a999) SHA1(e21007e2db0f69f0753becbf499c54cb29f46a39), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 40)" ) -GAME_CUSTOM( 199?, m4lucklv__ad, m4lucklv, "llus.p1", 0x0000, 0x010000, CRC(07745135) SHA1(ec602d01910ac52d20ff9c54914a5261f538233b), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 41)" ) GAME_CUSTOM( 199?, m4lucklv__ae, m4lucklv, "lluy.p1", 0x0000, 0x010000, CRC(1cfc18d6) SHA1(eb34e5a43cee1d4b64443f1fe2b1d12ccf35b847), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 42)" ) -GAME_CUSTOM( 199?, m4lucklv__af, m4lucklv, "llvb.p1", 0x0000, 0x010000, CRC(72e27d9b) SHA1(2355c48c4ac8bc94dcea74b04e68be8a461f09a3), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 43)" ) -GAME_CUSTOM( 199?, m4lucklv__ag, m4lucklv, "llvc.p1", 0x0000, 0x010000, CRC(00ac2db0) SHA1(a8ec3a2862abf4eb56734d15cd9b7db0333c98f2), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 44)" ) -GAME_CUSTOM( 199?, m4lucklv__ah, m4lucklv, "llvd.p1", 0x0000, 0x010000, CRC(fdb4dcc5) SHA1(77fa51dcf1895b83182e7ee4137ed68c06d2593b), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 45)" ) -GAME_CUSTOM( 199?, m4lucklv__ai, m4lucklv, "llvr.p1", 0x0000, 0x010000, CRC(a806c43f) SHA1(8c36d50c911f956a0458f942cc8e313104f00005), "Barcrest","Lucky Las Vegas (Barcrest) (MPU4) (set 46)" ) @@ -3044,9 +3288,8 @@ GAME_CUSTOM( 199?, m4lucklv__ai, m4lucklv, "llvr.p1", 0x0000, 0x010000, CRC ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4luckst, 0, "lss06s.p1", 0x0000, 0x020000, CRC(b6a69478) SHA1(6b05b7f9af94a83adfdff328d4132f72a1dfb19f), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4luckst__a, m4luckst, "ls15g", 0x0000, 0x020000, CRC(b942ac91) SHA1(e77b2acd07cac9b747731f9e0637112fc6bf94c7), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4luckst__b, m4luckst, "ls15t", 0x0000, 0x020000, CRC(20447a20) SHA1(ca2ba566317ca87afcc2501e551c1326b9712526), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 3)" ) +// "(C)1993 BARCREST" and "LSS 0.6" +GAME_CUSTOM( 199?, m4luckst, 0, "lss06s.p1", 0x0000, 0x020000, CRC(b6a69478) SHA1(6b05b7f9af94a83adfdff328d4132f72a1dfb19f), "Barcrest","Lucky Strike (Barcrest) (MPU4) (LSS 0.6)" ) GAME_CUSTOM( 199?, m4luckst__c, m4luckst, "lss06ad.p1", 0x0000, 0x020000, CRC(9a512ec1) SHA1(c1eb4d0f5c915f392411d0ff2c931eb22a41b3a8), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 4)" ) GAME_CUSTOM( 199?, m4luckst__d, m4luckst, "lss06b.p1", 0x0000, 0x020000, CRC(f2e1cb20) SHA1(7867085e0d1166419360bf1b6f39e3ec31bf2c7f), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 5)" ) GAME_CUSTOM( 199?, m4luckst__e, m4luckst, "lss06bd.p1", 0x0000, 0x020000, CRC(174b8004) SHA1(9cce3124797b80886ab744885444f7a69711f6f1), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 6)" ) @@ -3060,6 +3303,8 @@ GAME_CUSTOM( 199?, m4luckst__l, m4luckst, "lss06h.p1", 0x0000, 0 GAME_CUSTOM( 199?, m4luckst__m, m4luckst, "lss06k.p1", 0x0000, 0x020000, CRC(b8266376) SHA1(7d84dce05224c8882ed103796a054b50e2390234), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 14)" ) GAME_CUSTOM( 199?, m4luckst__n, m4luckst, "lss06r.p1", 0x0000, 0x020000, CRC(0b29d847) SHA1(3412bff6f38ab12b9d5e30f1ed3e327ad58dc470), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 15)" ) GAME_CUSTOM( 199?, m4luckst__p, m4luckst, "lss06y.p1", 0x0000, 0x020000, CRC(3fc54388) SHA1(f57667cc0263efe05d0f0538fae2f4f8adc0c405), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 17)" ) +// "(C)1993 BARCREST" and "LSS 0.7" +GAME_CUSTOM( 199?, m4luckst__2, m4luckst, "lss07s.p1", 0x0000, 0x020000, CRC(f4546d1a) SHA1(fed65704693e11087825b1dfda4df28ee6d2d3be), "Barcrest","Lucky Strike (Barcrest) (MPU4) (LSS 0.7)" ) GAME_CUSTOM( 199?, m4luckst__q, m4luckst, "lss07ad.p1", 0x0000, 0x020000, CRC(c4e113c0) SHA1(e5e81c08c2487ee8802ff4374b3affdff3e70003), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 18)" ) GAME_CUSTOM( 199?, m4luckst__r, m4luckst, "lss07b.p1", 0x0000, 0x020000, CRC(eec5db67) SHA1(c7b76b50524b256ec42adc33c99f933790d9d578), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 19)" ) GAME_CUSTOM( 199?, m4luckst__s, m4luckst, "lss07bd.p1", 0x0000, 0x020000, CRC(49fbbd05) SHA1(4edebdf607ae996e0f4a2df02f181e75b784e1ac), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 20)" ) @@ -3072,8 +3317,9 @@ GAME_CUSTOM( 199?, m4luckst__y, m4luckst, "lss07dy.p1", 0x0000, 0 GAME_CUSTOM( 199?, m4luckst__z, m4luckst, "lss07h.p1", 0x0000, 0x020000, CRC(20298b24) SHA1(004d6d04d9e8223e7b97dbd39abc66e80d6ea0eb), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 27)" ) GAME_CUSTOM( 199?, m4luckst__0, m4luckst, "lss07k.p1", 0x0000, 0x020000, CRC(a4027331) SHA1(64320519f22ebac3fbb7d93e2e70e999e8e7cd29), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 28)" ) GAME_CUSTOM( 199?, m4luckst__1, m4luckst, "lss07r.p1", 0x0000, 0x020000, CRC(170dc800) SHA1(bebd8b41b756c7ca5ddc60647e6031ac4cf874db), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 29)" ) -GAME_CUSTOM( 199?, m4luckst__2, m4luckst, "lss07s.p1", 0x0000, 0x020000, CRC(f4546d1a) SHA1(fed65704693e11087825b1dfda4df28ee6d2d3be), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 30)" ) GAME_CUSTOM( 199?, m4luckst__3, m4luckst, "lss07y.p1", 0x0000, 0x020000, CRC(23e153cf) SHA1(75c5c13ad735aba1bf62d26eb37f9aaa5804fdd2), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 31)" ) +// "(C)1993 BARCREST" and "LST 0.9" +GAME_CUSTOM( 199?, m4luckst__af, m4luckst, "lst09s.p1", 0x0000, 0x020000, CRC(285d0255) SHA1(89f74ad19525b636d6e1ea36308b659389f68245), "Barcrest","Lucky Strike (Barcrest) (MPU4) (LST 0.9)" ) GAME_CUSTOM( 199?, m4luckst__4, m4luckst, "lst09ad.p1", 0x0000, 0x020000, CRC(2fc94fb9) SHA1(cda6ce0a9d9e124326e29b57bc553b517408f1c6), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 32)" ) GAME_CUSTOM( 199?, m4luckst__5, m4luckst, "lst09b.p1", 0x0000, 0x020000, CRC(c5b8927f) SHA1(15d227be23404b9393cb3d3625fd054eaf0da3a4), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 33)" ) GAME_CUSTOM( 199?, m4luckst__6, m4luckst, "lst09bd.p1", 0x0000, 0x020000, CRC(650ee7ef) SHA1(2422e4f9857376a029f6b4df46b5b81c73b2640a), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 34)" ) @@ -3085,8 +3331,9 @@ GAME_CUSTOM( 199?, m4luckst__ab, m4luckst, "lst09dy.p1", 0x0000, 0 GAME_CUSTOM( 199?, m4luckst__ac, m4luckst, "lst09h.p1", 0x0000, 0x020000, CRC(e62b6034) SHA1(37ae4b6250795087475ea8e51b49e225572118b4), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 40)" ) GAME_CUSTOM( 199?, m4luckst__ad, m4luckst, "lst09k.p1", 0x0000, 0x020000, CRC(3c708118) SHA1(61ab1751dec08f7407fd3360cf129736d7d5ec16), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 41)" ) GAME_CUSTOM( 199?, m4luckst__ae, m4luckst, "lst09r.p1", 0x0000, 0x020000, CRC(a69e5fa1) SHA1(10ca0a2135c4d6832693bf97812f4eb5f1380efd), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 42)" ) -GAME_CUSTOM( 199?, m4luckst__af, m4luckst, "lst09s.p1", 0x0000, 0x020000, CRC(285d0255) SHA1(89f74ad19525b636d6e1ea36308b659389f68245), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 43)" ) GAME_CUSTOM( 199?, m4luckst__ag, m4luckst, "lst09y.p1", 0x0000, 0x020000, CRC(089c1ad7) SHA1(bcfacbeaf1845d91f18c6f57bf166c82469cb460), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 44)" ) +// "(C)1993 BARCREST" and "LST 1.0" +GAME_CUSTOM( 199?, m4luckst__as, m4luckst, "lst10s.p1", 0x0000, 0x020000, CRC(0e1ad810) SHA1(bd439f2857ebbde2b7941c411ac7edf7c66af7eb), "Barcrest","Lucky Strike (Barcrest) (MPU4) (LST 1.0)" ) GAME_CUSTOM( 199?, m4luckst__ah, m4luckst, "lst10ad.p1", 0x0000, 0x020000, CRC(41e8dd7d) SHA1(2b794554f57dfb5b6fe9f64b9d3e6b73ec306056), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 45)" ) GAME_CUSTOM( 199?, m4luckst__ai, m4luckst, "lst10b.p1", 0x0000, 0x020000, CRC(afd0d023) SHA1(7ee5c004d9d0cacf2d55457f9846fd638b584482), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 46)" ) GAME_CUSTOM( 199?, m4luckst__aj, m4luckst, "lst10bd.p1", 0x0000, 0x020000, CRC(0b2f752b) SHA1(655f50bbe163fca4386b356e7db0b019eba5d94f), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 47)" ) @@ -3098,11 +3345,15 @@ GAME_CUSTOM( 199?, m4luckst__ao, m4luckst, "lst10dy.p1", 0x0000, 0 GAME_CUSTOM( 199?, m4luckst__ap, m4luckst, "lst10h.p1", 0x0000, 0x020000, CRC(8c432268) SHA1(c8707c587ab2cc1450bd47069206767d2d930b29), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 53)" ) GAME_CUSTOM( 199?, m4luckst__aq, m4luckst, "lst10k.p1", 0x0000, 0x020000, CRC(5618c344) SHA1(61565a9814fd1b4e77944e73d8f18f8545685928), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 54)" ) GAME_CUSTOM( 199?, m4luckst__ar, m4luckst, "lst10r.p1", 0x0000, 0x020000, CRC(ccf61dfd) SHA1(01772dd0b252b41b5cba024a717d5898e74971f8), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 55)" ) -GAME_CUSTOM( 199?, m4luckst__as, m4luckst, "lst10s.p1", 0x0000, 0x020000, CRC(0e1ad810) SHA1(bd439f2857ebbde2b7941c411ac7edf7c66af7eb), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 56)" ) GAME_CUSTOM( 199?, m4luckst__at, m4luckst, "lst10y.p1", 0x0000, 0x020000, CRC(62f4588b) SHA1(ee7c06e2cc79f7d18d45b0a1793e5279a46ffcc0), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 57)" ) -GAME_CUSTOM( 199?, m4luckst__au, m4luckst, "lstrikegame10-8t.bin", 0x0000, 0x020000, CRC(709c2dbf) SHA1(bba8d7af9502911ffa1c086b993484ab78ad38ac), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 58)" ) -GAME_CUSTOM( 199?, m4luckst__av, m4luckst, "ls55", 0x0000, 0x020000, CRC(823e805b) SHA1(17f09fd53188950a8d98ac04cd94785947b52b01), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 59)" ) -GAME_CUSTOM( 199?, m4luckst__aw, m4luckst, "ls__xa_x.1_1", 0x0000, 0x020000, CRC(a9642503) SHA1(2765c4d8943678446c516918035d7a888a812aae), "Barcrest","Lucky Strike (Barcrest) (MPU4) (set 60)" ) +// "(C)1998 BWB" and "LSS 1.0" (one of these is probably a hack) +GAME_CUSTOM( 199?, m4luckst__av, m4luckst, "ls55", 0x0000, 0x020000, CRC(823e805b) SHA1(17f09fd53188950a8d98ac04cd94785947b52b01), "Bwb","Lucky Strike (Barcrest) (MPU4) (LSS 1.0, set 1)" ) // bad chr alarm +GAME_CUSTOM( 199?, m4luckst__aw, m4luckst, "ls__xa_x.1_1", 0x0000, 0x020000, CRC(a9642503) SHA1(2765c4d8943678446c516918035d7a888a812aae), "Bwb","Lucky Strike (Barcrest) (MPU4) (LSS 1.0, set 2)" ) +// no copyright string and "LST 0.9" +GAME_CUSTOM( 199?, m4luckst__a, m4luckst, "ls15g", 0x0000, 0x020000, CRC(b942ac91) SHA1(e77b2acd07cac9b747731f9e0637112fc6bf94c7), "hack","Lucky Strike (Barcrest) (MPU4) (LST 0.9, hack)" ) +// no copyright string and "LSS 0.6" +GAME_CUSTOM( 199?, m4luckst__au, m4luckst, "lstrikegame10-8t.bin", 0x0000, 0x020000, CRC(709c2dbf) SHA1(bba8d7af9502911ffa1c086b993484ab78ad38ac), "hack","Lucky Strike (Barcrest) (MPU4) (LSS 0.6, hack, set 1)" ) +GAME_CUSTOM( 199?, m4luckst__b, m4luckst, "ls15t", 0x0000, 0x020000, CRC(20447a20) SHA1(ca2ba566317ca87afcc2501e551c1326b9712526), "hack","Lucky Strike (Barcrest) (MPU4) (LSS 0.6, hack, set 2)" ) #define M4TENTEN_EXTRA_ROMS \ @@ -3117,18 +3368,8 @@ GAME_CUSTOM( 199?, m4luckst__aw, m4luckst, "ls__xa_x.1_1", 0x0000, 0 ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4tenten, 0, "t2002s.p1", 0x0000, 0x010000, CRC(6cd9fa10) SHA1(8efe36e3fc5b709fa4363194634686d62b5d6609), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4tenten__a, m4tenten, "n2503ad.p1", 0x0000, 0x010000, CRC(c84150e6) SHA1(8f143c26c6026a413bdd65ca148d78dead1d2474), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4tenten__b, m4tenten, "n2503b.p1", 0x0000, 0x010000, CRC(dd74fb57) SHA1(402f632f48cf1153cb8c22879a7482c82c8fecfe), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4tenten__c, m4tenten, "n2503bd.p1", 0x0000, 0x010000, CRC(62542d80) SHA1(90ebfb92891a7aaa4814b733c0e0df06bb292a4f), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4tenten__d, m4tenten, "n2503d.p1", 0x0000, 0x010000, CRC(b8c64fa4) SHA1(f53d9bdf97cc021399c8598a051ad5bcb7a611b5), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4tenten__e, m4tenten, "n2503dk.p1", 0x0000, 0x010000, CRC(28715d57) SHA1(1ab648a7f5dde5575e5ab5653823e4b88580677f), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4tenten__f, m4tenten, "n2503dr.p1", 0x0000, 0x010000, CRC(59932d11) SHA1(9895392ce48569e23816646124933192b6f720e3), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4tenten__g, m4tenten, "n2503dy.p1", 0x0000, 0x010000, CRC(287b8ee7) SHA1(10e428c73911e01ba53dd4321eb2c5a58e35441e), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4tenten__h, m4tenten, "n2503k.p1", 0x0000, 0x010000, CRC(f240b5ba) SHA1(fca353213447e50e29f1cd2c0d3895c437ae9336), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4tenten__i, m4tenten, "n2503r.p1", 0x0000, 0x010000, CRC(afaacb9d) SHA1(1bf3d648b82a8160ff1a38d92d2bb3ce1b41125e), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4tenten__j, m4tenten, "n2503s.p1", 0x0000, 0x010000, CRC(0d9e912c) SHA1(67d888fde242e81a1808f36e1e81c0c5724e99a7), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4tenten__k, m4tenten, "n2503y.p1", 0x0000, 0x010000, CRC(b365cff0) SHA1(65ab9d624bec1efc0590cec739541887ca20fc6f), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 12)" ) +// "(C)1991 BARCREST" and "T20 0.2" +GAME_CUSTOM( 199?, m4tenten, 0, "t2002s.p1", 0x0000, 0x010000, CRC(6cd9fa10) SHA1(8efe36e3fc5b709fa4363194634686d62b5d6609), "Barcrest","10 X 10 (Barcrest) (MPU4) (T20 0.2)" ) GAME_CUSTOM( 199?, m4tenten__l, m4tenten, "t2002ad.p1", 0x0000, 0x010000, CRC(f7903f0d) SHA1(8a10ff31ddaad817a31d39ea9a66d4453d8767bb), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 13)" ) GAME_CUSTOM( 199?, m4tenten__m, m4tenten, "t2002b.p1", 0x0000, 0x010000, CRC(90e150ea) SHA1(abc8456de42cef605e1f0e80a97b25cd51d90707), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 14)" ) GAME_CUSTOM( 199?, m4tenten__n, m4tenten, "t2002bd.p1", 0x0000, 0x010000, CRC(110c0d5c) SHA1(a263c678ebd58c95f33b198be544b726ac506449), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 15)" ) @@ -3139,6 +3380,20 @@ GAME_CUSTOM( 199?, m4tenten__r, m4tenten, "t2002dy.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4tenten__s, m4tenten, "t2002k.p1", 0x0000, 0x010000, CRC(34628c9d) SHA1(3547dac8fd73abcba0f088c3f2db02ef8a40cf4e), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 20)" ) GAME_CUSTOM( 199?, m4tenten__t, m4tenten, "t2002r.p1", 0x0000, 0x010000, CRC(9c639380) SHA1(c044b7fc53daa01d93c701a3d3c786ab6a883e76), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 21)" ) GAME_CUSTOM( 199?, m4tenten__u, m4tenten, "t2002y.p1", 0x0000, 0x010000, CRC(dcf2ac8c) SHA1(e745534f45148ff33e6b1e503108a39e27d8bdae), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 22)" ) +// "(C)1991 BARCREST" and "N25 0.3" +GAME_CUSTOM( 199?, m4tenten__j, m4tenten, "n2503s.p1", 0x0000, 0x010000, CRC(0d9e912c) SHA1(67d888fde242e81a1808f36e1e81c0c5724e99a7), "Barcrest","10 X 10 (Barcrest) (MPU4) (N25 0.3)" ) +GAME_CUSTOM( 199?, m4tenten__a, m4tenten, "n2503ad.p1", 0x0000, 0x010000, CRC(c84150e6) SHA1(8f143c26c6026a413bdd65ca148d78dead1d2474), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 2)" ) +GAME_CUSTOM( 199?, m4tenten__b, m4tenten, "n2503b.p1", 0x0000, 0x010000, CRC(dd74fb57) SHA1(402f632f48cf1153cb8c22879a7482c82c8fecfe), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4tenten__c, m4tenten, "n2503bd.p1", 0x0000, 0x010000, CRC(62542d80) SHA1(90ebfb92891a7aaa4814b733c0e0df06bb292a4f), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4tenten__d, m4tenten, "n2503d.p1", 0x0000, 0x010000, CRC(b8c64fa4) SHA1(f53d9bdf97cc021399c8598a051ad5bcb7a611b5), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4tenten__e, m4tenten, "n2503dk.p1", 0x0000, 0x010000, CRC(28715d57) SHA1(1ab648a7f5dde5575e5ab5653823e4b88580677f), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4tenten__f, m4tenten, "n2503dr.p1", 0x0000, 0x010000, CRC(59932d11) SHA1(9895392ce48569e23816646124933192b6f720e3), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4tenten__g, m4tenten, "n2503dy.p1", 0x0000, 0x010000, CRC(287b8ee7) SHA1(10e428c73911e01ba53dd4321eb2c5a58e35441e), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 8)" ) +GAME_CUSTOM( 199?, m4tenten__h, m4tenten, "n2503k.p1", 0x0000, 0x010000, CRC(f240b5ba) SHA1(fca353213447e50e29f1cd2c0d3895c437ae9336), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 9)" ) +GAME_CUSTOM( 199?, m4tenten__i, m4tenten, "n2503r.p1", 0x0000, 0x010000, CRC(afaacb9d) SHA1(1bf3d648b82a8160ff1a38d92d2bb3ce1b41125e), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 10)" ) +GAME_CUSTOM( 199?, m4tenten__k, m4tenten, "n2503y.p1", 0x0000, 0x010000, CRC(b365cff0) SHA1(65ab9d624bec1efc0590cec739541887ca20fc6f), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 12)" ) +// "(C)1991 BARCREST" and "T25 0.4" +GAME_CUSTOM( 199?, m4tenten__4, m4tenten, "t2504s.p1", 0x0000, 0x010000, CRC(a7618248) SHA1(e28d34a7a4b2eb3f6192a04cc8849475f021d392), "Barcrest","10 X 10 (Barcrest) (MPU4) (T25 0.4)" ) GAME_CUSTOM( 199?, m4tenten__v, m4tenten, "t2504ad.p1", 0x0000, 0x010000, CRC(f964cf74) SHA1(a72bd32f3785506e8f57107f2b8e42d64cbe267b), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 23)" ) GAME_CUSTOM( 199?, m4tenten__w, m4tenten, "t2504b.p1", 0x0000, 0x010000, CRC(f6cc485b) SHA1(6a95bf4c0cf35ccb79cb2a9e6bef208d6b61f4c7), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 24)" ) GAME_CUSTOM( 199?, m4tenten__x, m4tenten, "t2504bd.p1", 0x0000, 0x010000, CRC(f4ce2ee9) SHA1(8d0dc72f288810118702d00dc08f4e748c4da9e6), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 25)" ) @@ -3148,8 +3403,9 @@ GAME_CUSTOM( 199?, m4tenten__0, m4tenten, "t2504dr.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4tenten__1, m4tenten, "t2504dy.p1", 0x0000, 0x010000, CRC(af52e603) SHA1(8c234f0964018eb21efff7a9e820c355d4465401), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 29)" ) GAME_CUSTOM( 199?, m4tenten__2, m4tenten, "t2504k.p1", 0x0000, 0x010000, CRC(c489942d) SHA1(047509ede2cb5a155274698423a1caa32ac0baeb), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 30)" ) GAME_CUSTOM( 199?, m4tenten__3, m4tenten, "t2504r.p1", 0x0000, 0x010000, CRC(da847c46) SHA1(b5897fe0266ee3eb5f364570f29ffca3de8c4c7f), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 31)" ) -GAME_CUSTOM( 199?, m4tenten__4, m4tenten, "t2504s.p1", 0x0000, 0x010000, CRC(a7618248) SHA1(e28d34a7a4b2eb3f6192a04cc8849475f021d392), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 32)" ) GAME_CUSTOM( 199?, m4tenten__5, m4tenten, "t2504y.p1", 0x0000, 0x010000, CRC(e311f030) SHA1(ce21932013f1fdab1b9bbe8eb61d4fe067ccc62f), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 33)" ) +// "(C)1991 BARCREST" and "T2T 0.1" +GAME_CUSTOM( 199?, m4tenten__af, m4tenten, "t2t01s.p1", 0x0000, 0x010000, CRC(75b421e3) SHA1(d5de7485180baf9d8458a895edbfd65310fed2cc), "Barcrest","10 X 10 (Barcrest) (MPU4) (T2T 0.1)" ) GAME_CUSTOM( 199?, m4tenten__6, m4tenten, "t2t01ad.p1", 0x0000, 0x010000, CRC(debb50d9) SHA1(18b099111d81cf847155b81faba8be06cdfb3d54), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 34)" ) GAME_CUSTOM( 199?, m4tenten__7, m4tenten, "t2t01b.p1", 0x0000, 0x010000, CRC(4d8b3369) SHA1(e2221c712e8b031f39531fed61895af2214c23bc), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 35)" ) GAME_CUSTOM( 199?, m4tenten__8, m4tenten, "t2t01bd.p1", 0x0000, 0x010000, CRC(e7f852d2) SHA1(7aff9dc05e8a5db91abea61860f85793a73ad8db), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 36)" ) @@ -3159,8 +3415,9 @@ GAME_CUSTOM( 199?, m4tenten__ab, m4tenten, "t2t01dr.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4tenten__ac, m4tenten, "t2t01dy.p1", 0x0000, 0x010000, CRC(205c3c2e) SHA1(53d6829ac650fc7637f8743ac6cdb3b02dd0cc86), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 40)" ) GAME_CUSTOM( 199?, m4tenten__ad, m4tenten, "t2t01k.p1", 0x0000, 0x010000, CRC(488b2ce4) SHA1(3b47ea15f318b49744e869d0485e00fbd2cd74b2), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 41)" ) GAME_CUSTOM( 199?, m4tenten__ae, m4tenten, "t2t01r.p1", 0x0000, 0x010000, CRC(a8f71c79) SHA1(0b9d468819bfd2f7e2ec7b5f11f052531a13d703), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 42)" ) -GAME_CUSTOM( 199?, m4tenten__af, m4tenten, "t2t01s.p1", 0x0000, 0x010000, CRC(75b421e3) SHA1(d5de7485180baf9d8458a895edbfd65310fed2cc), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 43)" ) GAME_CUSTOM( 199?, m4tenten__ag, m4tenten, "t2t01y.p1", 0x0000, 0x010000, CRC(0c3e29c2) SHA1(a0163587193145a0a173d1571ad9076c9f03d3ad), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 44)" ) +// "(C)1991 BARCREST" and "T3T 0.1" +GAME_CUSTOM( 199?, m4tenten__aq, m4tenten, "t3t01s.p1", 0x0000, 0x010000, CRC(eae20667) SHA1(3ea054516e36ac5ca521a68bba16e299a1926c90), "Barcrest","10 X 10 (Barcrest) (MPU4) (T3T 0.1)" ) GAME_CUSTOM( 199?, m4tenten__ah, m4tenten, "t3t01ad.p1", 0x0000, 0x010000, CRC(7075b69b) SHA1(3ac28d0542c287de9c2cabfed2da0ac0cc4a24cb), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 45)" ) GAME_CUSTOM( 199?, m4tenten__ai, m4tenten, "t3t01b.p1", 0x0000, 0x010000, CRC(7f7d4170) SHA1(3925a0e1f620777356ed6d6c67d6d432daeb9ade), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 46)" ) GAME_CUSTOM( 199?, m4tenten__aj, m4tenten, "t3t01bd.p1", 0x0000, 0x010000, CRC(90d5dbcb) SHA1(2c348f81fe070d0825c1824f05bc4c640da9ce24), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 47)" ) @@ -3170,8 +3427,9 @@ GAME_CUSTOM( 199?, m4tenten__am, m4tenten, "t3t01dr.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4tenten__an, m4tenten, "t3t01dy.p1", 0x0000, 0x010000, CRC(94bb082d) SHA1(236b81d7e10afd4dc3facfad30d9ab0a72ea21e3), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 51)" ) GAME_CUSTOM( 199?, m4tenten__ao, m4tenten, "t3t01k.p1", 0x0000, 0x010000, CRC(b7bd2547) SHA1(6154b30a587d52dadd1fa137e805762e096f02cb), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 52)" ) GAME_CUSTOM( 199?, m4tenten__ap, m4tenten, "t3t01r.p1", 0x0000, 0x010000, CRC(d4401ee1) SHA1(c270a0f191870136278ff8e47d529458bbc049d0), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 53)" ) -GAME_CUSTOM( 199?, m4tenten__aq, m4tenten, "t3t01s.p1", 0x0000, 0x010000, CRC(eae20667) SHA1(3ea054516e36ac5ca521a68bba16e299a1926c90), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 54)" ) GAME_CUSTOM( 199?, m4tenten__ar, m4tenten, "t3t01y.p1", 0x0000, 0x010000, CRC(d2a6c8cd) SHA1(b30064145cebc2a39ae63009529cd8422dc98373), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 55)" ) +// "(C)1991 BARCREST" and "TST 0.1" +GAME_CUSTOM( 199?, m4tenten__a1, m4tenten, "tst01s.p1", 0x0000, 0x010000, CRC(c4bb2a12) SHA1(1d8c134facfa72d8438676c96e530f93c41f1266), "Barcrest","10 X 10 (Barcrest) (MPU4) (TST 0.1)" ) GAME_CUSTOM( 199?, m4tenten__as, m4tenten, "tst01ad.p1", 0x0000, 0x010000, CRC(ca4be612) SHA1(70673e29a99ea0c70ff386c6c5fed49eabeea0e4), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 56)" ) GAME_CUSTOM( 199?, m4tenten__at, m4tenten, "tst01b.p1", 0x0000, 0x010000, CRC(7dd06165) SHA1(6853436a1b0c60283707932961bbf5cce7e185c0), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 57)" ) GAME_CUSTOM( 199?, m4tenten__au, m4tenten, "tst01bd.p1", 0x0000, 0x010000, CRC(38f4c0a2) SHA1(2cc62837c37618198dae7195e848c06ad1b96b06), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 58)" ) @@ -3181,7 +3439,6 @@ GAME_CUSTOM( 199?, m4tenten__ax, m4tenten, "tst01dr.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4tenten__ay, m4tenten, "tst01dy.p1", 0x0000, 0x010000, CRC(ef87da08) SHA1(9358e4a02def10c98fddbb21d81b62f83500aa69), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 62)" ) GAME_CUSTOM( 199?, m4tenten__az, m4tenten, "tst01k.p1", 0x0000, 0x010000, CRC(1f097f64) SHA1(d752b688b4e0520393bc4bef0c618a7c68c2e323), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 63)" ) GAME_CUSTOM( 199?, m4tenten__a0, m4tenten, "tst01r.p1", 0x0000, 0x010000, CRC(ccc4ecb5) SHA1(0629c7951b56f44b8cb48d9aa66fb7c71ae275ec), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 64)" ) -GAME_CUSTOM( 199?, m4tenten__a1, m4tenten, "tst01s.p1", 0x0000, 0x010000, CRC(c4bb2a12) SHA1(1d8c134facfa72d8438676c96e530f93c41f1266), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 65)" ) GAME_CUSTOM( 199?, m4tenten__a2, m4tenten, "tst01y.p1", 0x0000, 0x010000, CRC(e3ba4b94) SHA1(a7b13c172e5177711ddb81ef1ea77e27e14bf470), "Barcrest","10 X 10 (Barcrest) (MPU4) (set 66)" ) @@ -3199,8 +3456,14 @@ GAME_CUSTOM( 199?, m4tenten__a2, m4tenten, "tst01y.p1", 0x0000, 0x010000, GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4andyfh, 0, "afhs.p1", 0x0000, 0x010000, CRC(722660ef) SHA1(e1700f4dc6d14da8e8d8402466057cfd126e067b), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 1)" ) +// "(C)1991 BARCREST" and "AFH 0.1" +GAME_CUSTOM( 199?, m4andyfh, 0, "afhs.p1", 0x0000, 0x010000, CRC(722660ef) SHA1(e1700f4dc6d14da8e8d8402466057cfd126e067b), "Barcrest","Andy's Full House (Barcrest) (MPU4) (AFH 0.1)" ) +GAME_CUSTOM( 199?, m4andyfh__o, m4andyfh, "afhb.p1", 0x0000, 0x010000, CRC(899945a4) SHA1(ed4a8c9b35e3aa08ea762740a713352560490443), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 16)" ) +GAME_CUSTOM( 199?, m4andyfh__p, m4andyfh, "afhc.p1", 0x0000, 0x010000, CRC(eff4016e) SHA1(4497ae5033aa4c3b3af8e2f6821dadb3f0683c82), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 17)" ) +GAME_CUSTOM( 199?, m4andyfh__q, m4andyfh, "afhd.p1", 0x0000, 0x010000, CRC(9f673d80) SHA1(ae2658d817d4d07f2d9f7948f0660f51626d07ac), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 18)" ) +GAME_CUSTOM( 199?, m4andyfh__r, m4andyfh, "afhr.p1", 0x0000, 0x010000, CRC(232bc900) SHA1(831368184be51b13db30468d519e395a9af7570e), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 19)" ) +// "(C)1991 BARCREST" and "AF3 0.1" +GAME_CUSTOM( 199?, m4andyfh__h, m4andyfh, "af3s.p1", 0x0000, 0x010000, CRC(e9860d9a) SHA1(f1d1323e2329613748602559b6458a19963c091a), "Barcrest","Andy's Full House (Barcrest) (MPU4) (AF3 0.1)" ) GAME_CUSTOM( 199?, m4andyfh__a, m4andyfh, "af3ad.p1", 0x0000, 0x010000, CRC(ef141eca) SHA1(1ba03db9c05f5d60c5e1e0729eb124f6c5c3acf5), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4andyfh__b, m4andyfh, "af3b.p1", 0x0000, 0x010000, CRC(78889d06) SHA1(5ea4c8010b7fd3e2e41d378b69a7cfda27aba99f), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4andyfh__c, m4andyfh, "af3bd.p1", 0x0000, 0x010000, CRC(d9087380) SHA1(1a7f203b722583927eb6f99a493e564100321fe6), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 4)" ) @@ -3208,17 +3471,15 @@ GAME_CUSTOM( 199?, m4andyfh__d, m4andyfh, "af3d.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4andyfh__e, m4andyfh, "af3dk.p1", 0x0000, 0x010000, CRC(4fc4a031) SHA1(c5c68027231988a88610931f395ae08d8e60f962), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 6)" ) GAME_CUSTOM( 199?, m4andyfh__f, m4andyfh, "af3dy.p1", 0x0000, 0x010000, CRC(f59c1a50) SHA1(55054a49b7bbf4a27ec808727cfbf3ce9bdfce40), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 7)" ) GAME_CUSTOM( 199?, m4andyfh__g, m4andyfh, "af3k.p1", 0x0000, 0x010000, CRC(ddf5edfb) SHA1(ce69c70b1cdcebfa29e1613cb619617a961a649b), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4andyfh__h, m4andyfh, "af3s.p1", 0x0000, 0x010000, CRC(e9860d9a) SHA1(f1d1323e2329613748602559b6458a19963c091a), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4andyfh__i, m4andyfh, "af3y.p1", 0x0000, 0x010000, CRC(1895bbe1) SHA1(c084f77004c9086bd75add665b25b0b3e114a91f), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 10)" ) +// "(C)1991 BARCREST" and "AF8 0.1" +GAME_CUSTOM( 199?, m4andyfh__n, m4andyfh, "af8s.p1", 0x0000, 0x010000, CRC(1b06be8e) SHA1(c1b67b23c6e2abca68fb242e24b61333bde688fa), "Barcrest","Andy's Full House (Barcrest) (MPU4) (AF8 0.1)" ) GAME_CUSTOM( 199?, m4andyfh__j, m4andyfh, "af8b.p1", 0x0000, 0x010000, CRC(fa8d002e) SHA1(cad754268706a1c942ce3751aa5a51720a104899), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4andyfh__k, m4andyfh, "af8bd.p1", 0x0000, 0x010000, CRC(f64ce609) SHA1(d36a868647a954fd7974613510aabc6fc18035ee), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 12)" ) GAME_CUSTOM( 199?, m4andyfh__l, m4andyfh, "af8c.p1", 0x0000, 0x010000, CRC(6dff4569) SHA1(10809f81924a72b21129158043c023ad6809cced), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 13)" ) GAME_CUSTOM( 199?, m4andyfh__m, m4andyfh, "af8k.p1", 0x0000, 0x010000, CRC(0f6cb2a4) SHA1(320954e216e48ef2882f6d4feb7e29c106d49b79), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4andyfh__n, m4andyfh, "af8s.p1", 0x0000, 0x010000, CRC(1b06be8e) SHA1(c1b67b23c6e2abca68fb242e24b61333bde688fa), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4andyfh__o, m4andyfh, "afhb.p1", 0x0000, 0x010000, CRC(899945a4) SHA1(ed4a8c9b35e3aa08ea762740a713352560490443), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4andyfh__p, m4andyfh, "afhc.p1", 0x0000, 0x010000, CRC(eff4016e) SHA1(4497ae5033aa4c3b3af8e2f6821dadb3f0683c82), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4andyfh__q, m4andyfh, "afhd.p1", 0x0000, 0x010000, CRC(9f673d80) SHA1(ae2658d817d4d07f2d9f7948f0660f51626d07ac), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4andyfh__r, m4andyfh, "afhr.p1", 0x0000, 0x010000, CRC(232bc900) SHA1(831368184be51b13db30468d519e395a9af7570e), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 19)" ) +// "(C)1991 BARCREST" and "AFT 0.3" +GAME_CUSTOM( 199?, m4andyfh__1, m4andyfh, "afts.p1", 0x0000, 0x010000, CRC(7f059eec) SHA1(06de497bbae7391bbb09241204dfdd59ecc36569), "Barcrest","Andy's Full House (Barcrest) (MPU4) (AFT 0.3)" ) GAME_CUSTOM( 199?, m4andyfh__s, m4andyfh, "aftad.p1", 0x0000, 0x010000, CRC(72b75e4a) SHA1(fb25a4a455589c51ec7bf1e77faee7f9809eea2c), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 20)" ) GAME_CUSTOM( 199?, m4andyfh__t, m4andyfh, "aftb.p1", 0x0000, 0x010000, CRC(be3cd9ec) SHA1(135f5b575ff1921d08985251b6cd326db4de4f3e), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 21)" ) GAME_CUSTOM( 199?, m4andyfh__u, m4andyfh, "aftbd.p1", 0x0000, 0x010000, CRC(d7fd4c6d) SHA1(3eea5f025f25194fd1d4b4cf0643445b11694c7b), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 22)" ) @@ -3228,8 +3489,9 @@ GAME_CUSTOM( 199?, m4andyfh__x, m4andyfh, "aftdr.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4andyfh__y, m4andyfh, "aftdy.p1", 0x0000, 0x010000, CRC(3e9fc7a6) SHA1(65d181398b3e574b26b060001e9477d5ee40bcc0), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 26)" ) GAME_CUSTOM( 199?, m4andyfh__z, m4andyfh, "aftk.p1", 0x0000, 0x010000, CRC(8d87a910) SHA1(a315210a5c9d880621937412ff6d8d42ac658db2), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 27)" ) GAME_CUSTOM( 199?, m4andyfh__0, m4andyfh, "aftr.p1", 0x0000, 0x010000, CRC(1be08c33) SHA1(21cd201cae159a1a3ee17f9661bc6db5e5a0ad48), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4andyfh__1, m4andyfh, "afts.p1", 0x0000, 0x010000, CRC(7f059eec) SHA1(06de497bbae7391bbb09241204dfdd59ecc36569), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 29)" ) GAME_CUSTOM( 199?, m4andyfh__2, m4andyfh, "afty.p1", 0x0000, 0x010000, CRC(d14f2670) SHA1(a6d21e855fbb90e80c8b8c4af02280343edcb3e8), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 30)" ) +// "(C)1991 BARCREST" and "AFU 0.2" +GAME_CUSTOM( 199?, m4andyfh__ac, m4andyfh, "afus.p1", 0x0000, 0x010000, CRC(efbde76c) SHA1(abad98f2affb46e449a50f5a43729160b275294b), "Barcrest","Andy's Full House (Barcrest) (MPU4) (AFU 0.2)" ) GAME_CUSTOM( 199?, m4andyfh__3, m4andyfh, "afuad.p1", 0x0000, 0x010000, CRC(0f14e261) SHA1(080a5667127e14b6959ff1508f028fd849c27c24), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 31)" ) GAME_CUSTOM( 199?, m4andyfh__4, m4andyfh, "afub.p1", 0x0000, 0x010000, CRC(99c6a4cc) SHA1(36fe83a32aeab413c19bc253edeadf4bc0f73615), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 32)" ) GAME_CUSTOM( 199?, m4andyfh__5, m4andyfh, "afubd.p1", 0x0000, 0x010000, CRC(c38d376a) SHA1(843d0dcc0909ea7cd93f6ba707e784b160cb4984), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 33)" ) @@ -3239,8 +3501,9 @@ GAME_CUSTOM( 199?, m4andyfh__8, m4andyfh, "afudr.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4andyfh__9, m4andyfh, "afudy.p1", 0x0000, 0x010000, CRC(c2754f00) SHA1(4012231cb4a2eb0e0010f90d173295aa3c1fd6a5), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 37)" ) GAME_CUSTOM( 199?, m4andyfh__aa, m4andyfh, "afuk.p1", 0x0000, 0x010000, CRC(f58fcf3c) SHA1(3731eab62e447a833b7decde842eda6a36cfadef), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 38)" ) GAME_CUSTOM( 199?, m4andyfh__ab, m4andyfh, "afur.p1", 0x0000, 0x010000, CRC(0369ab49) SHA1(53acb382fada789c976b1dd124014778cfe518bc), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 39)" ) -GAME_CUSTOM( 199?, m4andyfh__ac, m4andyfh, "afus.p1", 0x0000, 0x010000, CRC(efbde76c) SHA1(abad98f2affb46e449a50f5a43729160b275294b), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 40)" ) GAME_CUSTOM( 199?, m4andyfh__ad, m4andyfh, "afuy.p1", 0x0000, 0x010000, CRC(9e0283a7) SHA1(63c0e3f26132a6bd6d8d3a8a3d0ab46e52fb2c09), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 41)" ) +// "(C)1991 BARCREST" and "CA4 0.8" +GAME_CUSTOM( 199?, m4andyfh__al, m4andyfh, "ca4s.p1", 0x0000, 0x010000, CRC(ece1bca7) SHA1(84a168e0d36f7c4f56fc3a7579fe335cc1e5a5ba), "Barcrest","Andy's Full House (Barcrest) (MPU4) (CA4 0.8)" ) GAME_CUSTOM( 199?, m4andyfh__ae, m4andyfh, "ca4ad.p1", 0x0000, 0x010000, CRC(bb311861) SHA1(9606b536c2775997935049caddb79170a98211b4), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 42)" ) GAME_CUSTOM( 199?, m4andyfh__af, m4andyfh, "ca4b.p1", 0x0000, 0x010000, CRC(71e8f0f9) SHA1(663f536f4b3de20c2dcae52d22f3be9be19b0a4d), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 43)" ) GAME_CUSTOM( 199?, m4andyfh__ag, m4andyfh, "ca4bd.p1", 0x0000, 0x010000, CRC(808b93e6) SHA1(08667db3f43f8550d7b96b53b92a53029a8d5d29), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 44)" ) @@ -3248,8 +3511,9 @@ GAME_CUSTOM( 199?, m4andyfh__ah, m4andyfh, "ca4d.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4andyfh__ai, m4andyfh, "ca4dk.p1", 0x0000, 0x010000, CRC(23cabc1a) SHA1(a72e14d7616da0b7cc394e466fe6df4c85eea986), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 46)" ) GAME_CUSTOM( 199?, m4andyfh__aj, m4andyfh, "ca4dy.p1", 0x0000, 0x010000, CRC(caa2e461) SHA1(5dd3c609d1cc4bc43a6d00e98a71e927287c41fd), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 47)" ) GAME_CUSTOM( 199?, m4andyfh__ak, m4andyfh, "ca4k.p1", 0x0000, 0x010000, CRC(78b0a533) SHA1(fa0fc59562be59d0aadba923281086a9de8e8934), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 48)" ) -GAME_CUSTOM( 199?, m4andyfh__al, m4andyfh, "ca4s.p1", 0x0000, 0x010000, CRC(ece1bca7) SHA1(84a168e0d36f7c4f56fc3a7579fe335cc1e5a5ba), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 49)" ) GAME_CUSTOM( 199?, m4andyfh__am, m4andyfh, "ca4y.p1", 0x0000, 0x010000, CRC(5c1886f2) SHA1(4d6131989a04db993b7ade74d1950077d52cbc23), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 50)" ) +// "(C)1991 BARCREST" and "CAT 0.2" +GAME_CUSTOM( 199?, m4andyfh__au, m4andyfh, "cats.p1", 0x0000, 0x010000, CRC(e4cb7300) SHA1(fe9daaa587f1796227ad9ccb49869f2288b6d708), "Barcrest","Andy's Full House (Barcrest) (MPU4) (CAT 0.2)" ) GAME_CUSTOM( 199?, m4andyfh__an, m4andyfh, "catad.p1", 0x0000, 0x010000, CRC(b2c5a227) SHA1(0c4253dddef07476778adf10b7afc8415ac2b170), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 51)" ) GAME_CUSTOM( 199?, m4andyfh__ao, m4andyfh, "catb.p1", 0x0000, 0x010000, CRC(34007275) SHA1(102a30e4a83eec9ed144158cc4896c91f4eadd1b), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 52)" ) GAME_CUSTOM( 199?, m4andyfh__ap, m4andyfh, "catbd.p1", 0x0000, 0x010000, CRC(9c38229a) SHA1(1c24eff59e22d354e07f9a0655b35029a89a60ef), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 53)" ) @@ -3257,8 +3521,9 @@ GAME_CUSTOM( 199?, m4andyfh__aq, m4andyfh, "catd.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4andyfh__ar, m4andyfh, "catdk.p1", 0x0000, 0x010000, CRC(c85a53ea) SHA1(1b7245b08bc0ad7ddd7ed4498ba4ac910f1df1d1), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 55)" ) GAME_CUSTOM( 199?, m4andyfh__as, m4andyfh, "catdy.p1", 0x0000, 0x010000, CRC(08aa7a9c) SHA1(b8552ad4d9f1ea3c536ba7313ded56f9d47930d3), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 56)" ) GAME_CUSTOM( 199?, m4andyfh__at, m4andyfh, "catk.p1", 0x0000, 0x010000, CRC(843a09b2) SHA1(56e845bcf940d80277b53df8fe847e5e862a05c9), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 57)" ) -GAME_CUSTOM( 199?, m4andyfh__au, m4andyfh, "cats.p1", 0x0000, 0x010000, CRC(e4cb7300) SHA1(fe9daaa587f1796227ad9ccb49869f2288b6d708), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 58)" ) GAME_CUSTOM( 199?, m4andyfh__av, m4andyfh, "caty.p1", 0x0000, 0x010000, CRC(1a5c2413) SHA1(096695d99cc5dcf9d677b7821af5018751e21a89), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 59)" ) +// "(C)1991 BARCREST" and "CA4 0.1" (CAU 0.1 on startup) +GAME_CUSTOM( 199?, m4andyfh__a3, m4andyfh, "caus.p1", 0x0000, 0x010000, CRC(88e263a4) SHA1(2b8bc3d9aab344ca756b4829c4593db74200779e), "Barcrest","Andy's Full House (Barcrest) (MPU4) (CAU 0.1 / CA4 0.1)" ) GAME_CUSTOM( 199?, m4andyfh__aw, m4andyfh, "cauad.p1", 0x0000, 0x010000, CRC(a530d8ce) SHA1(9c919dfe85d947545e35c52b070dcb19ad3660ea), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 60)" ) GAME_CUSTOM( 199?, m4andyfh__ax, m4andyfh, "caub.p1", 0x0000, 0x010000, CRC(4c6f35b7) SHA1(3300d3a8cdeda7183d066ff8fec2bdfbcd816f9b), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 61)" ) GAME_CUSTOM( 199?, m4andyfh__ay, m4andyfh, "caubd.p1", 0x0000, 0x010000, CRC(932cb584) SHA1(28dc617a242f01030d3bfdd855b2237b99dfb080), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 62)" ) @@ -3266,7 +3531,6 @@ GAME_CUSTOM( 199?, m4andyfh__az, m4andyfh, "caud.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4andyfh__a0, m4andyfh, "caudk.p1", 0x0000, 0x010000, CRC(9d2ca094) SHA1(343304a09ae0aa36039b4b90f90ac7206f6b020b), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 64)" ) GAME_CUSTOM( 199?, m4andyfh__a1, m4andyfh, "caudy.p1", 0x0000, 0x010000, CRC(b8e09c8e) SHA1(b9fc39f754dadfaf359f7df6e51a18e948eda574), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 65)" ) GAME_CUSTOM( 199?, m4andyfh__a2, m4andyfh, "cauk.p1", 0x0000, 0x010000, CRC(38c7b3b0) SHA1(d5ee172e37e65911a4010abe7baae3e32131208d), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 66)" ) -GAME_CUSTOM( 199?, m4andyfh__a3, m4andyfh, "caus.p1", 0x0000, 0x010000, CRC(88e263a4) SHA1(2b8bc3d9aab344ca756b4829c4593db74200779e), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 67)" ) GAME_CUSTOM( 199?, m4andyfh__a4, m4andyfh, "cauy.p1", 0x0000, 0x010000, CRC(b04ab546) SHA1(5f9d3a24fb0091406e45cdad7f22fad4bda27bff), "Barcrest","Andy's Full House (Barcrest) (MPU4) (set 68)" ) @@ -3285,38 +3549,8 @@ GAME_CUSTOM( 199?, m4andyfh__a4, m4andyfh, "cauy.p1", 0x0000, 0x010000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4bdash, 0, "bls01s.p1", 0x0000, 0x020000, CRC(4e4f403b) SHA1(f040568af530cf0ff060199f98b00e476191da22), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4bdash__a, m4bdash, "bdvarg.bin", 0x0000, 0x020000, CRC(99d579e7) SHA1(afc47144e0a8d464d8547b1ad14b0a3a1c15c027), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4bdash__b, m4bdash, "bld06s", 0x0000, 0x020000, CRC(0bc580b8) SHA1(432ac5aec08bd9d36cc4a0b257c17d6e22015bae), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4bdash__c, m4bdash, "bld07ad.p1", 0x0000, 0x020000, CRC(56438185) SHA1(f78789042a1ac61b7dd333120b9fef76a2805cc7), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4bdash__d, m4bdash, "bld07b.p1", 0x0000, 0x020000, CRC(4b24ec01) SHA1(80763e2832d9ef9c49f8729fbc93843865422d47), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4bdash__e, m4bdash, "bld07bd.p1", 0x0000, 0x020000, CRC(db592f40) SHA1(bca6b78ea13ccab1f49d6b6078071739cb418778), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4bdash__f, m4bdash, "bld07c.p1", 0x0000, 0x020000, CRC(7c6e5113) SHA1(814fb61aa64eecfa8b6d8e9c39a7b3b3287247dd), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4bdash__g, m4bdash, "bld07d.p1", 0x0000, 0x020000, CRC(363fe777) SHA1(181b10e828b1308725cbe185c655c7deb7899cbe), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4bdash__h, m4bdash, "bld07dh.p1", 0x0000, 0x020000, CRC(b299b28c) SHA1(3784cc7e33cd31c6ef5fd7fbc336b1b024a13993), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4bdash__i, m4bdash, "bld07dk.p1", 0x0000, 0x020000, CRC(919e8716) SHA1(4be8b30a3db436fab8dfc9a131f2ca2b16ba6f7d), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4bdash__j, m4bdash, "bld07dr.p1", 0x0000, 0x020000, CRC(22913c27) SHA1(33ed5a70b30d16fd607ec56a5ab085b55778c483), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4bdash__k, m4bdash, "bld07dy.p1", 0x0000, 0x020000, CRC(167da7e8) SHA1(1cb81ad595ad5c7b70aed4f48ce9f6ae34d92089), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4bdash__l, m4bdash, "bld07h.p1", 0x0000, 0x020000, CRC(22e471cd) SHA1(3e6e0a052761e1ed108475687dead185eef10119), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4bdash__m, m4bdash, "bld07k.p1", 0x0000, 0x020000, CRC(01e34457) SHA1(5e9d8cb558222340df42904365ad90288ca5cdf2), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4bdash__n, m4bdash, "bld07r.p1", 0x0000, 0x020000, CRC(b2ecff66) SHA1(9d8bca3e137a654d786b9257ce1206c7118ac6e0), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4bdash__o, m4bdash, "bld07s.p1", 0x0000, 0x020000, CRC(b9c61540) SHA1(d6752d90a431cde17c7915746f645ef3157eeffe), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4bdash__p, m4bdash, "bld07y.p1", 0x0000, 0x020000, CRC(860064a9) SHA1(8e13df769bde73bc5af3fa8010b39502e269f63f), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4bdash__q, m4bdash, "bld10ad.p1", 0x0000, 0x020000, CRC(04b2781e) SHA1(828426d6191974050e3ccbfbc826d5474dc18312), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4bdash__r, m4bdash, "bld10b.p1", 0x0000, 0x020000, CRC(160a6c83) SHA1(e2421fbc166b9e64a2b10afbfd12ebc724077248), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4bdash__s, m4bdash, "bld10bd.p1", 0x0000, 0x020000, CRC(89a8d6db) SHA1(c93b8d7c57a970649204078f3428fc766ada32f7), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4bdash__t, m4bdash, "bld10c.p1", 0x0000, 0x020000, CRC(2140d191) SHA1(151aba51cf0909f8bc3d252ef49a2ae2e96adf32), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4bdash__u, m4bdash, "bld10d.p1", 0x0000, 0x020000, CRC(6b1167f5) SHA1(2aeb0fa0964867d90412bfd895da664d9be8a339), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4bdash__v, m4bdash, "bld10dh.p1", 0x0000, 0x020000, CRC(e0684b17) SHA1(eb2832a3344aa9dfdc10c845faf3ae67171c40e9), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4bdash__w, m4bdash, "bld10dk.p1", 0x0000, 0x020000, CRC(c36f7e8d) SHA1(1ee7bcca0cfdd27cd23328f60aa5230325db6366), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4bdash__x, m4bdash, "bld10dr.p1", 0x0000, 0x020000, CRC(7060c5bc) SHA1(e409684b5f2494c1e580e4c9db001e89ef63ea1a), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4bdash__y, m4bdash, "bld10dy.p1", 0x0000, 0x020000, CRC(448c5e73) SHA1(38193dbe23266d29344439d75e020b8236d34037), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4bdash__z, m4bdash, "bld10h.p1", 0x0000, 0x020000, CRC(7fcaf14f) SHA1(e093bbaea83f7b2683b968b70d821ec42addab92), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4bdash__0, m4bdash, "bld10k.p1", 0x0000, 0x020000, CRC(5ccdc4d5) SHA1(b7be6f027092106ef5e33ff988a153050f48943b), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4bdash__1, m4bdash, "bld10r.p1", 0x0000, 0x020000, CRC(efc27fe4) SHA1(1ed3c5c92505b7fdf4993a9c8b119eff5e9a6f94), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 29)" ) -GAME_CUSTOM( 199?, m4bdash__2, m4bdash, "bld10s.p1", 0x0000, 0x020000, CRC(c59c186b) SHA1(83f16e15a215fe1cf3c07fac7268b00c55e0ff5b), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 30)" ) -GAME_CUSTOM( 199?, m4bdash__3, m4bdash, "bld10y.p1", 0x0000, 0x020000, CRC(db2ee42b) SHA1(b6a4bb4f78c14428a7bd2286b8fda51acb0c9e10), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 31)" ) +// "(C)1993 BARCREST" and "BLS 0.1" +GAME_CUSTOM( 199?, m4bdash, 0, "bls01s.p1", 0x0000, 0x020000, CRC(4e4f403b) SHA1(f040568af530cf0ff060199f98b00e476191da22), "Barcrest","Boulder Dash (Barcrest) (MPU4) (BLS 0.1)" ) GAME_CUSTOM( 199?, m4bdash__4, m4bdash, "bls01ad.p1", 0x0000, 0x020000, CRC(2425cab4) SHA1(9df08f9dffc0ac5fe5994ad086e6b8eb8d03baa9), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 32)" ) GAME_CUSTOM( 199?, m4bdash__5, m4bdash, "bls01b.p1", 0x0000, 0x020000, CRC(64d1e31d) SHA1(e30d199bd1d60ceabef27cfa81605eb3b307f68e), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 33)" ) GAME_CUSTOM( 199?, m4bdash__6, m4bdash, "bls01bd.p1", 0x0000, 0x020000, CRC(a93f6471) SHA1(d895c7825c713626be57dd9eef2dbfc5f591825b), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 34)" ) @@ -3330,6 +3564,40 @@ GAME_CUSTOM( 199?, m4bdash__ad, m4bdash, "bls01h.p1", 0x0000, 0x020000, CR GAME_CUSTOM( 199?, m4bdash__ae, m4bdash, "bls01k.p1", 0x0000, 0x020000, CRC(2e164b4b) SHA1(37d1c45db0002c7e8f16ede87cfe62cfbdbf39e8), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 42)" ) GAME_CUSTOM( 199?, m4bdash__af, m4bdash, "bls01r.p1", 0x0000, 0x020000, CRC(9d19f07a) SHA1(bb1e2d8f6e1fd75d6c9a15448fc29b21d8f14bf7), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 43)" ) GAME_CUSTOM( 199?, m4bdash__ag, m4bdash, "bls01y.p1", 0x0000, 0x020000, CRC(a9f56bb5) SHA1(771ea854bdc71af0ce09952be53671629babfa9b), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 44)" ) +// "(C)1993 BARCREST" and "BLD 0.6" +GAME_CUSTOM( 199?, m4bdash__b, m4bdash, "bld06s", 0x0000, 0x020000, CRC(0bc580b8) SHA1(432ac5aec08bd9d36cc4a0b257c17d6e22015bae), "Barcrest","Boulder Dash (Barcrest) (MPU4) (BLD 0.6)" ) +// "(C)1993 BARCREST" and "BLD 0.7" +GAME_CUSTOM( 199?, m4bdash__o, m4bdash, "bld07s.p1", 0x0000, 0x020000, CRC(b9c61540) SHA1(d6752d90a431cde17c7915746f645ef3157eeffe), "Barcrest","Boulder Dash (Barcrest) (MPU4) (BLD 0.7)" ) +GAME_CUSTOM( 199?, m4bdash__c, m4bdash, "bld07ad.p1", 0x0000, 0x020000, CRC(56438185) SHA1(f78789042a1ac61b7dd333120b9fef76a2805cc7), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4bdash__d, m4bdash, "bld07b.p1", 0x0000, 0x020000, CRC(4b24ec01) SHA1(80763e2832d9ef9c49f8729fbc93843865422d47), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4bdash__e, m4bdash, "bld07bd.p1", 0x0000, 0x020000, CRC(db592f40) SHA1(bca6b78ea13ccab1f49d6b6078071739cb418778), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4bdash__f, m4bdash, "bld07c.p1", 0x0000, 0x020000, CRC(7c6e5113) SHA1(814fb61aa64eecfa8b6d8e9c39a7b3b3287247dd), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4bdash__g, m4bdash, "bld07d.p1", 0x0000, 0x020000, CRC(363fe777) SHA1(181b10e828b1308725cbe185c655c7deb7899cbe), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 8)" ) +GAME_CUSTOM( 199?, m4bdash__h, m4bdash, "bld07dh.p1", 0x0000, 0x020000, CRC(b299b28c) SHA1(3784cc7e33cd31c6ef5fd7fbc336b1b024a13993), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 9)" ) +GAME_CUSTOM( 199?, m4bdash__i, m4bdash, "bld07dk.p1", 0x0000, 0x020000, CRC(919e8716) SHA1(4be8b30a3db436fab8dfc9a131f2ca2b16ba6f7d), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 10)" ) +GAME_CUSTOM( 199?, m4bdash__j, m4bdash, "bld07dr.p1", 0x0000, 0x020000, CRC(22913c27) SHA1(33ed5a70b30d16fd607ec56a5ab085b55778c483), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 11)" ) +GAME_CUSTOM( 199?, m4bdash__k, m4bdash, "bld07dy.p1", 0x0000, 0x020000, CRC(167da7e8) SHA1(1cb81ad595ad5c7b70aed4f48ce9f6ae34d92089), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 12)" ) +GAME_CUSTOM( 199?, m4bdash__l, m4bdash, "bld07h.p1", 0x0000, 0x020000, CRC(22e471cd) SHA1(3e6e0a052761e1ed108475687dead185eef10119), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 13)" ) +GAME_CUSTOM( 199?, m4bdash__m, m4bdash, "bld07k.p1", 0x0000, 0x020000, CRC(01e34457) SHA1(5e9d8cb558222340df42904365ad90288ca5cdf2), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 14)" ) +GAME_CUSTOM( 199?, m4bdash__n, m4bdash, "bld07r.p1", 0x0000, 0x020000, CRC(b2ecff66) SHA1(9d8bca3e137a654d786b9257ce1206c7118ac6e0), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 15)" ) +GAME_CUSTOM( 199?, m4bdash__p, m4bdash, "bld07y.p1", 0x0000, 0x020000, CRC(860064a9) SHA1(8e13df769bde73bc5af3fa8010b39502e269f63f), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 17)" ) +// "(C)1993 BARCREST" and "BLD 1.0" +GAME_CUSTOM( 199?, m4bdash__2, m4bdash, "bld10s.p1", 0x0000, 0x020000, CRC(c59c186b) SHA1(83f16e15a215fe1cf3c07fac7268b00c55e0ff5b), "Barcrest","Boulder Dash (Barcrest) (MPU4) (BLD 1.0)" ) +GAME_CUSTOM( 199?, m4bdash__q, m4bdash, "bld10ad.p1", 0x0000, 0x020000, CRC(04b2781e) SHA1(828426d6191974050e3ccbfbc826d5474dc18312), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 18)" ) +GAME_CUSTOM( 199?, m4bdash__r, m4bdash, "bld10b.p1", 0x0000, 0x020000, CRC(160a6c83) SHA1(e2421fbc166b9e64a2b10afbfd12ebc724077248), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 19)" ) +GAME_CUSTOM( 199?, m4bdash__s, m4bdash, "bld10bd.p1", 0x0000, 0x020000, CRC(89a8d6db) SHA1(c93b8d7c57a970649204078f3428fc766ada32f7), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 20)" ) +GAME_CUSTOM( 199?, m4bdash__t, m4bdash, "bld10c.p1", 0x0000, 0x020000, CRC(2140d191) SHA1(151aba51cf0909f8bc3d252ef49a2ae2e96adf32), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 21)" ) +GAME_CUSTOM( 199?, m4bdash__u, m4bdash, "bld10d.p1", 0x0000, 0x020000, CRC(6b1167f5) SHA1(2aeb0fa0964867d90412bfd895da664d9be8a339), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 22)" ) +GAME_CUSTOM( 199?, m4bdash__v, m4bdash, "bld10dh.p1", 0x0000, 0x020000, CRC(e0684b17) SHA1(eb2832a3344aa9dfdc10c845faf3ae67171c40e9), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 23)" ) +GAME_CUSTOM( 199?, m4bdash__w, m4bdash, "bld10dk.p1", 0x0000, 0x020000, CRC(c36f7e8d) SHA1(1ee7bcca0cfdd27cd23328f60aa5230325db6366), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 24)" ) +GAME_CUSTOM( 199?, m4bdash__x, m4bdash, "bld10dr.p1", 0x0000, 0x020000, CRC(7060c5bc) SHA1(e409684b5f2494c1e580e4c9db001e89ef63ea1a), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 25)" ) +GAME_CUSTOM( 199?, m4bdash__y, m4bdash, "bld10dy.p1", 0x0000, 0x020000, CRC(448c5e73) SHA1(38193dbe23266d29344439d75e020b8236d34037), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 26)" ) +GAME_CUSTOM( 199?, m4bdash__z, m4bdash, "bld10h.p1", 0x0000, 0x020000, CRC(7fcaf14f) SHA1(e093bbaea83f7b2683b968b70d821ec42addab92), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 27)" ) +GAME_CUSTOM( 199?, m4bdash__0, m4bdash, "bld10k.p1", 0x0000, 0x020000, CRC(5ccdc4d5) SHA1(b7be6f027092106ef5e33ff988a153050f48943b), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 28)" ) +GAME_CUSTOM( 199?, m4bdash__1, m4bdash, "bld10r.p1", 0x0000, 0x020000, CRC(efc27fe4) SHA1(1ed3c5c92505b7fdf4993a9c8b119eff5e9a6f94), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 29)" ) +GAME_CUSTOM( 199?, m4bdash__3, m4bdash, "bld10y.p1", 0x0000, 0x020000, CRC(db2ee42b) SHA1(b6a4bb4f78c14428a7bd2286b8fda51acb0c9e10), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 31)" ) +// "(C)1993 BARCREST" and "BLS 0.2" +GAME_CUSTOM( 199?, m4bdash__at, m4bdash, "bls02s.p1", 0x0000, 0x020000, CRC(b8e435d5) SHA1(500c30d687d3e029f22de2bf132c12349c1575b4), "Barcrest","Boulder Dash (Barcrest) (MPU4) (BLS 0.2)" ) GAME_CUSTOM( 199?, m4bdash__ah, m4bdash, "bls02ad.p1", 0x0000, 0x020000, CRC(f4b6828b) SHA1(8ca39a9dc29b40a097489e34ababaf70eb58c326), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 45)" ) GAME_CUSTOM( 199?, m4bdash__ai, m4bdash, "bls02b.p1", 0x0000, 0x020000, CRC(d75f9bdb) SHA1(2018e1ebe4f00782be649544bc8d56d923d6c198), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 46)" ) GAME_CUSTOM( 199?, m4bdash__aj, m4bdash, "bls02bd.p1", 0x0000, 0x020000, CRC(79ac2c4e) SHA1(83d6828272438ae0d687b40368701cbccac32d9f), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 47)" ) @@ -3342,19 +3610,23 @@ GAME_CUSTOM( 199?, m4bdash__ap, m4bdash, "bls02dy.p1", 0x0000, 0x020000, CR GAME_CUSTOM( 199?, m4bdash__aq, m4bdash, "bls02h.p1", 0x0000, 0x020000, CRC(be9f0617) SHA1(fcc491ae5cb5312f47726c4b9ffda99317171bab), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 54)" ) GAME_CUSTOM( 199?, m4bdash__ar, m4bdash, "bls02k.p1", 0x0000, 0x020000, CRC(9d98338d) SHA1(0e43896ae8361894c9060ec7a74dd23c6e2bed56), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 55)" ) GAME_CUSTOM( 199?, m4bdash__as, m4bdash, "bls02r.p1", 0x0000, 0x020000, CRC(2e9788bc) SHA1(586a30b3485e0ceb8b9b389e103fdbab78115446), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 56)" ) -GAME_CUSTOM( 199?, m4bdash__at, m4bdash, "bls02s.p1", 0x0000, 0x020000, CRC(b8e435d5) SHA1(500c30d687d3e029f22de2bf132c12349c1575b4), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 57)" ) GAME_CUSTOM( 199?, m4bdash__au, m4bdash, "bls02y.p1", 0x0000, 0x020000, CRC(1a7b1373) SHA1(dde4754d92f0fde495ab826294a650ac81fd586e), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 58)" ) -GAME_CUSTOM( 199?, m4bdash__av, m4bdash, "bold15g", 0x0000, 0x020000, CRC(fa400d34) SHA1(2faeb9b880fb4980aa0d96b4b962c879498445f2), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 59)" ) -GAME_CUSTOM( 199?, m4bdash__aw, m4bdash, "bold15t", 0x0000, 0x020000, CRC(f3f331ae) SHA1(d999c8571549d8d26b7b861299d77c7282aef700), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 60)" ) -GAME_CUSTOM( 199?, m4bdash__ax, m4bdash, "bo__x__x.2_0", 0x0000, 0x020000, CRC(7e54982f) SHA1(c5187d2f6a5b202af5fd6326d52451d3b3f48f33), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 61)" ) -GAME_CUSTOM( 199?, m4bdash__ay, m4bdash, "bo__x__x.2_1", 0x0000, 0x020000, CRC(3e48d8ad) SHA1(73d69712993819d012c2ab2a8a36b7ebad419144), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 62)" ) -GAME_CUSTOM( 199?, m4bdash__az, m4bdash, "bo__x_dx.2_0", 0x0000, 0x020000, CRC(d0d9e7b1) SHA1(31e858991fc1dfe9c1a8bd7955096617ebe0a4ce), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 63)" ) -GAME_CUSTOM( 199?, m4bdash__a0, m4bdash, "bo__x_dx.2_1", 0x0000, 0x020000, CRC(b6e146c4) SHA1(8bda363f16bd258d5c6ba1b20cecc0a76e0965f7), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 64)" ) -GAME_CUSTOM( 199?, m4bdash__a1, m4bdash, "bo__xa_x.2_0", 0x0000, 0x020000, CRC(e7054491) SHA1(7d102b1071d90ff29ea4a9418478b17b93c08059), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 65)" ) -GAME_CUSTOM( 199?, m4bdash__a2, m4bdash, "bo__xa_x.2_1", 0x0000, 0x020000, CRC(813de5e4) SHA1(498923261e49b20666a930593fcf25ccfc9a9d79), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 66)" ) -GAME_CUSTOM( 199?, m4bdash__a3, m4bdash, "bo__xb_x.2_0", 0x0000, 0x020000, CRC(adc2ecc7) SHA1(75e4216ff022c1ae0642913c9aaa7e241b806fcd), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 67)" ) -GAME_CUSTOM( 199?, m4bdash__a4, m4bdash, "bo__xb_x.2_1", 0x0000, 0x020000, CRC(cbfa4db2) SHA1(d1ed60f876b4f056f478cfc23b08a7789379e143), "Barcrest","Boulder Dash (Barcrest) (MPU4) (set 68)" ) - +// "(C)1999 BWB" and "BO_ 2.0" +GAME_CUSTOM( 199?, m4bdash__ax, m4bdash, "bo__x__x.2_0", 0x0000, 0x020000, CRC(7e54982f) SHA1(c5187d2f6a5b202af5fd6326d52451d3b3f48f33), "Bwb","Boulder Dash (Barcrest) (MPU4) (BO_ 2.0, set 1)" ) +GAME_CUSTOM( 199?, m4bdash__az, m4bdash, "bo__x_dx.2_0", 0x0000, 0x020000, CRC(d0d9e7b1) SHA1(31e858991fc1dfe9c1a8bd7955096617ebe0a4ce), "Bwb","Boulder Dash (Barcrest) (MPU4) (BO_ 2.0, set 2)" ) +GAME_CUSTOM( 199?, m4bdash__a1, m4bdash, "bo__xa_x.2_0", 0x0000, 0x020000, CRC(e7054491) SHA1(7d102b1071d90ff29ea4a9418478b17b93c08059), "Bwb","Boulder Dash (Barcrest) (MPU4) (BO_ 2.0, set 3)" ) +GAME_CUSTOM( 199?, m4bdash__a3, m4bdash, "bo__xb_x.2_0", 0x0000, 0x020000, CRC(adc2ecc7) SHA1(75e4216ff022c1ae0642913c9aaa7e241b806fcd), "Bwb","Boulder Dash (Barcrest) (MPU4) (BO_ 2.0, set 4)" ) +// "(C)1999 BWB" and "BO_ 2.1" +GAME_CUSTOM( 199?, m4bdash__ay, m4bdash, "bo__x__x.2_1", 0x0000, 0x020000, CRC(3e48d8ad) SHA1(73d69712993819d012c2ab2a8a36b7ebad419144), "Bwb","Boulder Dash (Barcrest) (MPU4) (BO_ 2.1, set 1)" ) +GAME_CUSTOM( 199?, m4bdash__a0, m4bdash, "bo__x_dx.2_1", 0x0000, 0x020000, CRC(b6e146c4) SHA1(8bda363f16bd258d5c6ba1b20cecc0a76e0965f7), "Bwb","Boulder Dash (Barcrest) (MPU4) (BO_ 2.1, set 2)" ) +GAME_CUSTOM( 199?, m4bdash__a2, m4bdash, "bo__xa_x.2_1", 0x0000, 0x020000, CRC(813de5e4) SHA1(498923261e49b20666a930593fcf25ccfc9a9d79), "Bwb","Boulder Dash (Barcrest) (MPU4) (BO_ 2.1, set 3)" ) +GAME_CUSTOM( 199?, m4bdash__a4, m4bdash, "bo__xb_x.2_1", 0x0000, 0x020000, CRC(cbfa4db2) SHA1(d1ed60f876b4f056f478cfc23b08a7789379e143), "Bwb","Boulder Dash (Barcrest) (MPU4) (BO_ 2.1, set 4)" ) +// no copyright string and "BLD 1.0" +GAME_CUSTOM( 199?, m4bdash__a, m4bdash, "bdvarg.bin", 0x0000, 0x020000, CRC(99d579e7) SHA1(afc47144e0a8d464d8547b1ad14b0a3a1c15c027), "hack","Boulder Dash (Barcrest) (MPU4) (BLD 1.0, hack)" ) +// no copyright string and "BLD 0.7" +GAME_CUSTOM( 199?, m4bdash__av, m4bdash, "bold15g", 0x0000, 0x020000, CRC(fa400d34) SHA1(2faeb9b880fb4980aa0d96b4b962c879498445f2), "hack","Boulder Dash (Barcrest) (MPU4) (BLD 0.7, hack)" ) +// no copyright string and "BLS 0.1" +GAME_CUSTOM( 199?, m4bdash__aw, m4bdash, "bold15t", 0x0000, 0x020000, CRC(f3f331ae) SHA1(d999c8571549d8d26b7b861299d77c7282aef700), "hack","Boulder Dash (Barcrest) (MPU4) (BLS 0.1, hack)" ) #define M4PRZDTY_EXTRA_ROMS \ @@ -3370,7 +3642,15 @@ GAME_CUSTOM( 199?, m4bdash__a4, m4bdash, "bo__xb_x.2_1", 0x0000, 0x020000, CR ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4przdty, 0, "pdus.p1", 0x0000, 0x010000, CRC(eaa2ae08) SHA1(a4cef3ee8c005fb717625699260d24ef6a368824), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (set 1)" ) +// "(C)1993 BARCREST" and "PDU 0.2" +GAME_CUSTOM( 199?, m4przdty, 0, "pdus.p1", 0x0000, 0x010000, CRC(eaa2ae08) SHA1(a4cef3ee8c005fb717625699260d24ef6a368824), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (PDU 0.2)" ) +GAME_CUSTOM( 199?, m4przdty__l, m4przdty, "pdub.p1", 0x0000, 0x010000, CRC(e50a571b) SHA1(b8412ae7211bfbf8098ae3ae70dfc2a99cd8558d), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (set 13)" ) +GAME_CUSTOM( 199?, m4przdty__m, m4przdty, "pdud.p1", 0x0000, 0x010000, CRC(24cddc59) SHA1(c4fa0530387c5cd172d51b766315d3874cc61618), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (set 14)" ) +GAME_CUSTOM( 199?, m4przdty__n, m4przdty, "pdudy.p1", 0x0000, 0x010000, CRC(b852ea1f) SHA1(375f0baaf64b1ea1e118f6d93417877174e094bb), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (set 15)" ) +GAME_CUSTOM( 199?, m4przdty__o, m4przdty, "pduk.p1", 0x0000, 0x010000, CRC(7d1c1897) SHA1(aa7753bef9b580f0a134960d74115cb43b91494f), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (set 16)" ) +GAME_CUSTOM( 199?, m4przdty__p, m4przdty, "pduy.p1", 0x0000, 0x010000, CRC(460d967b) SHA1(ea55c87674d62ee6f525ae1ff08267e8b4b126aa), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (set 17)" ) +// "(C)1993 BARCREST" and "PD8 0.2" +GAME_CUSTOM( 199?, m4przdty__j, m4przdty, "pd8s.p1", 0x0000, 0x010000, CRC(65816bdb) SHA1(52717f789676ad66e4b8c5c023e23262408ef0b3), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (PD8 0.2)" ) GAME_CUSTOM( 199?, m4przdty__a, m4przdty, "pd8ad.p1", 0x0000, 0x010000, CRC(ff2bde9d) SHA1(6f75d1c4f8b136ad9dbfd6c0182dbe0f54f856a9), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4przdty__b, m4przdty, "pd8b.p1", 0x0000, 0x010000, CRC(123f8081) SHA1(1619e23f563f9c70e64dccf36743c60ee597cad4), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4przdty__c, m4przdty, "pd8bd.p1", 0x0000, 0x010000, CRC(6136acca) SHA1(616cfc419beef50b642714df9b257ef0322bdfd4), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (set 4)" ) @@ -3380,13 +3660,7 @@ GAME_CUSTOM( 199?, m4przdty__f, m4przdty, "pd8dk.p1", 0x0000, 0x010000, CRC GAME_CUSTOM( 199?, m4przdty__g, m4przdty, "pd8dy.p1", 0x0000, 0x010000, CRC(8446848a) SHA1(23840190a3543c7fee0334bd1e9c0000eb2b7908), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (set 8)" ) GAME_CUSTOM( 199?, m4przdty__h, m4przdty, "pd8j.p1", 0x0000, 0x010000, CRC(8d74c338) SHA1(482fc028a04bd257a36b46ba3e6949f95cacd271), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4przdty__i, m4przdty, "pd8k.p1", 0x0000, 0x010000, CRC(f4753cad) SHA1(4d41a2c40f56267ea31375046058ab2b22700414), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4przdty__j, m4przdty, "pd8s.p1", 0x0000, 0x010000, CRC(65816bdb) SHA1(52717f789676ad66e4b8c5c023e23262408ef0b3), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4przdty__k, m4przdty, "pd8y.p1", 0x0000, 0x010000, CRC(c958ed40) SHA1(35c1905656d12c788e8766424dd400669189e2c7), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4przdty__l, m4przdty, "pdub.p1", 0x0000, 0x010000, CRC(e50a571b) SHA1(b8412ae7211bfbf8098ae3ae70dfc2a99cd8558d), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4przdty__m, m4przdty, "pdud.p1", 0x0000, 0x010000, CRC(24cddc59) SHA1(c4fa0530387c5cd172d51b766315d3874cc61618), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4przdty__n, m4przdty, "pdudy.p1", 0x0000, 0x010000, CRC(b852ea1f) SHA1(375f0baaf64b1ea1e118f6d93417877174e094bb), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4przdty__o, m4przdty, "pduk.p1", 0x0000, 0x010000, CRC(7d1c1897) SHA1(aa7753bef9b580f0a134960d74115cb43b91494f), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4przdty__p, m4przdty, "pduy.p1", 0x0000, 0x010000, CRC(460d967b) SHA1(ea55c87674d62ee6f525ae1ff08267e8b4b126aa), "Barcrest","Prize Duty Free (Barcrest) (MPU4) (set 17)" ) #define M4PRZMON_EXTRA_ROMS \ @@ -3401,8 +3675,9 @@ GAME_CUSTOM( 199?, m4przdty__p, m4przdty, "pduy.p1", 0x0000, 0x010000, CRC ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4przmon, 0, "fp8ad.p1", 0x0000, 0x010000, CRC(9c1c443a) SHA1(58e45501c33d0fd8ecca7e7bc40fef60ebb519e9), "Barcrest","Prize Money (Barcrest) (MPU4) (set 1)" ) +// "(C)1991 BARCREST" and "FP8 0.1" +GAME_CUSTOM( 199?, m4przmon, 0, "fp8s.p1", 0x0000, 0x010000, CRC(b43eef89) SHA1(15991ad9223ddce77277f5451b5557ff59e2647c), "Barcrest","Prize Money (Barcrest) (MPU4) (FP8 0.1)" ) +GAME_CUSTOM( 199?, m4przmon__i, m4przmon, "fp8ad.p1", 0x0000, 0x010000, CRC(9c1c443a) SHA1(58e45501c33d0fd8ecca7e7bc40fef60ebb519e9), "Barcrest","Prize Money (Barcrest) (MPU4) (set 1)" ) GAME_CUSTOM( 199?, m4przmon__a, m4przmon, "fp8b.p1", 0x0000, 0x010000, CRC(2a8cd9da) SHA1(2364853f3c78ca4f47aac8609649f06bf3a98ba1), "Barcrest","Prize Money (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4przmon__b, m4przmon, "fp8bd.p1", 0x0000, 0x010000, CRC(bbb342fd) SHA1(5117304284a25ce43798a0a1c8c1c45d25f707ab), "Barcrest","Prize Money (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4przmon__c, m4przmon, "fp8d.p1", 0x0000, 0x010000, CRC(2e6dea1e) SHA1(8b0877277c414693b0d6c9d22ef86cbb487b4d2e), "Barcrest","Prize Money (Barcrest) (MPU4) (set 4)" ) @@ -3411,26 +3686,30 @@ GAME_CUSTOM( 199?, m4przmon__e, m4przmon, "fp8dk.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4przmon__f, m4przmon, "fp8dy.p1", 0x0000, 0x010000, CRC(2c8d3a96) SHA1(413e619c76209f948885ea0ff2388a2fcb0134d6), "Barcrest","Prize Money (Barcrest) (MPU4) (set 7)" ) GAME_CUSTOM( 199?, m4przmon__g, m4przmon, "fp8j.p1", 0x0000, 0x010000, CRC(2a834685) SHA1(184a5e157dc2994823f4a1077b3bc0e3b69fda34), "Barcrest","Prize Money (Barcrest) (MPU4) (set 8)" ) GAME_CUSTOM( 199?, m4przmon__h, m4przmon, "fp8k.p1", 0x0000, 0x010000, CRC(48cf748a) SHA1(2116f6cc00822ac9d4d3b090443d0f84fe3b5194), "Barcrest","Prize Money (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4przmon__i, m4przmon, "fp8s.p1", 0x0000, 0x010000, CRC(b43eef89) SHA1(15991ad9223ddce77277f5451b5557ff59e2647c), "Barcrest","Prize Money (Barcrest) (MPU4) (set 10)" ) GAME_CUSTOM( 199?, m4przmon__j, m4przmon, "fp8y.p1", 0x0000, 0x010000, CRC(c3ee5211) SHA1(02c51f28bdeb7b7fdc7bb95cdc79117eb733789c), "Barcrest","Prize Money (Barcrest) (MPU4) (set 11)" ) +// "(C)1991 BARCREST" and "FPM 0.3" +GAME_CUSTOM( 199?, m4przmon__o, m4przmon, "fpms.p1", 0x0000, 0x010000, CRC(2d71e7f5) SHA1(16040a042cb0824b44869e618f38edcabd9d47d6), "Barcrest","Prize Money (Barcrest) (MPU4) (FPM 0.3)" ) GAME_CUSTOM( 199?, m4przmon__k, m4przmon, "fpmb.p1", 0x0000, 0x010000, CRC(e3265d54) SHA1(e283d1675e529c600454f12f87fce370d517e11c), "Barcrest","Prize Money (Barcrest) (MPU4) (set 12)" ) GAME_CUSTOM( 199?, m4przmon__l, m4przmon, "fpmd.p1", 0x0000, 0x010000, CRC(60b2051c) SHA1(9543997fe8fa168bcc66edc3aef6f7e69b4fb326), "Barcrest","Prize Money (Barcrest) (MPU4) (set 13)" ) GAME_CUSTOM( 199?, m4przmon__m, m4przmon, "fpmdy.p1", 0x0000, 0x010000, CRC(422b8f68) SHA1(d18926c7228dbd8f5228b6bd03d265318b5296fe), "Barcrest","Prize Money (Barcrest) (MPU4) (set 14)" ) GAME_CUSTOM( 199?, m4przmon__n, m4przmon, "fpmk.p1", 0x0000, 0x010000, CRC(84f58f68) SHA1(e2297d53c8a7ee3c5058fc734b1f4ec533e93734), "Barcrest","Prize Money (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4przmon__o, m4przmon, "fpms.p1", 0x0000, 0x010000, CRC(2d71e7f5) SHA1(16040a042cb0824b44869e618f38edcabd9d47d6), "Barcrest","Prize Money (Barcrest) (MPU4) (set 16)" ) GAME_CUSTOM( 199?, m4przmon__p, m4przmon, "fpmy.p1", 0x0000, 0x010000, CRC(2728c725) SHA1(d36f8129731f9479ed526f9abfab8647cf43fdce), "Barcrest","Prize Money (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4przmon__q, m4przmon, "mt_05a__.3o3", 0x0000, 0x010000, CRC(4175f4a9) SHA1(b0e172e4862aa3b7be7accefc90e98d07d449b65), "Barcrest","Prize Money (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4przmon__r, m4przmon, "mt_05a__.4o1", 0x0000, 0x010000, CRC(637fecee) SHA1(8c970bdf703177c71dde5c774c75929ac42b6eb0), "Barcrest","Prize Money (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4przmon__s, m4przmon, "mt_05s__.3o3", 0x0000, 0x010000, CRC(92d674b7) SHA1(a828a9b0d870122bc09d865de90b8efa428f3fd0), "Barcrest","Prize Money (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4przmon__t, m4przmon, "mt_05sb_.3o3", 0x0000, 0x010000, CRC(1158e506) SHA1(8c91bfe29545bbbc0d136a8c9abef785cadc3c64), "Barcrest","Prize Money (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4przmon__u, m4przmon, "mt_05sd_.3o3", 0x0000, 0x010000, CRC(5ed3d947) SHA1(4b9bc9be6e79014ad6ca95293eb464af39e40dc1), "Barcrest","Prize Money (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4przmon__v, m4przmon, "mt_10a__.3o3", 0x0000, 0x010000, CRC(6a8172a4) SHA1(92c081535258677e90d9f9748a168926c7a0cbed), "Barcrest","Prize Money (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4przmon__w, m4przmon, "mt_10a__.4o1", 0x0000, 0x010000, CRC(36eeac30) SHA1(daa662392874806d18d4a161d39caed7e0abca73), "Barcrest","Prize Money (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4przmon__x, m4przmon, "mt_10s__.3o3", 0x0000, 0x010000, CRC(1b66f0f8) SHA1(308227b0144f0568df8190810e0de627b413a742), "Barcrest","Prize Money (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4przmon__y, m4przmon, "mt_10sb_.3o3", 0x0000, 0x010000, CRC(06a33d34) SHA1(5fa1269a7cf42ef14e2a19143a07bf28b38ad920), "Barcrest","Prize Money (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4przmon__z, m4przmon, "mt_10sd_.3o3", 0x0000, 0x010000, CRC(42629cb1) SHA1(12f695e1f70bf93100c1af8052dcee9131711510), "Barcrest","Prize Money (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4przmon__0, m4przmon, "mti05___.4o1", 0x0000, 0x010000, CRC(0e82c258) SHA1(c4aa7d32bcd9418e2919be8be8a2f9e60d46f316), "Barcrest","Prize Money (Barcrest) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4przmon__1, m4przmon, "mti10___.4o1", 0x0000, 0x010000, CRC(a35e0571) SHA1(9a22946047e76392f0c4534f892ee9ae9e700503), "Barcrest","Prize Money (Barcrest) (MPU4) (set 29)" ) +// "(C)1995 B.W.B." and "MC 53.0" +GAME_CUSTOM( 199?, m4przmon__q, m4przmon, "mt_05a__.3o3", 0x0000, 0x010000, CRC(4175f4a9) SHA1(b0e172e4862aa3b7be7accefc90e98d07d449b65), "Bwb","Prize Money (Barcrest) (MPU4) (MC 53.0 K)" ) +GAME_CUSTOM( 199?, m4przmon__s, m4przmon, "mt_05s__.3o3", 0x0000, 0x010000, CRC(92d674b7) SHA1(a828a9b0d870122bc09d865de90b8efa428f3fd0), "Bwb","Prize Money (Barcrest) (MPU4) (MC 53.0 )" ) +GAME_CUSTOM( 199?, m4przmon__t, m4przmon, "mt_05sb_.3o3", 0x0000, 0x010000, CRC(1158e506) SHA1(8c91bfe29545bbbc0d136a8c9abef785cadc3c64), "Bwb","Prize Money (Barcrest) (MPU4) (MC 53.0 YD)" ) +GAME_CUSTOM( 199?, m4przmon__u, m4przmon, "mt_05sd_.3o3", 0x0000, 0x010000, CRC(5ed3d947) SHA1(4b9bc9be6e79014ad6ca95293eb464af39e40dc1), "Bwb","Prize Money (Barcrest) (MPU4) (MC 53.0 D)" ) +// "(C)1995 B.W.B." and "MT054.0" +GAME_CUSTOM( 199?, m4przmon__r, m4przmon, "mt_05a__.4o1", 0x0000, 0x010000, CRC(637fecee) SHA1(8c970bdf703177c71dde5c774c75929ac42b6eb0), "Bwb","Prize Money (Barcrest) (MPU4) (MT054.0 K)" ) +GAME_CUSTOM( 199?, m4przmon__0, m4przmon, "mti05___.4o1", 0x0000, 0x010000, CRC(0e82c258) SHA1(c4aa7d32bcd9418e2919be8be8a2f9e60d46f316), "Bwb","Prize Money (Barcrest) (MPU4) (MT054.0 C)" ) +// "(C)1995 B.W.B." and "MC103.0" +GAME_CUSTOM( 199?, m4przmon__v, m4przmon, "mt_10a__.3o3", 0x0000, 0x010000, CRC(6a8172a4) SHA1(92c081535258677e90d9f9748a168926c7a0cbed), "Bwb","Prize Money (Barcrest) (MPU4) (MC103.0 K)" ) +GAME_CUSTOM( 199?, m4przmon__x, m4przmon, "mt_10s__.3o3", 0x0000, 0x010000, CRC(1b66f0f8) SHA1(308227b0144f0568df8190810e0de627b413a742), "Bwb","Prize Money (Barcrest) (MPU4) (MC103.0)" ) +GAME_CUSTOM( 199?, m4przmon__y, m4przmon, "mt_10sb_.3o3", 0x0000, 0x010000, CRC(06a33d34) SHA1(5fa1269a7cf42ef14e2a19143a07bf28b38ad920), "Bwb","Prize Money (Barcrest) (MPU4) (MC103.0 YD)" ) +GAME_CUSTOM( 199?, m4przmon__z, m4przmon, "mt_10sd_.3o3", 0x0000, 0x010000, CRC(42629cb1) SHA1(12f695e1f70bf93100c1af8052dcee9131711510), "Bwb","Prize Money (Barcrest) (MPU4) (MC103.0D)" ) +// "(C)1995 B.W.B." and "MT104.0" +GAME_CUSTOM( 199?, m4przmon__w, m4przmon, "mt_10a__.4o1", 0x0000, 0x010000, CRC(36eeac30) SHA1(daa662392874806d18d4a161d39caed7e0abca73), "Bwb","Prize Money (Barcrest) (MPU4) (MT104.0 K)" ) +GAME_CUSTOM( 199?, m4przmon__1, m4przmon, "mti10___.4o1", 0x0000, 0x010000, CRC(a35e0571) SHA1(9a22946047e76392f0c4534f892ee9ae9e700503), "Bwb","Prize Money (Barcrest) (MPU4) (MT104.0 C)" ) #define M4PRZHR_EXTRA_ROMS \ ROM_REGION( 0x100000, "msm6376", 0 ) \ @@ -3445,7 +3724,17 @@ GAME_CUSTOM( 199?, m4przmon__1, m4przmon, "mti10___.4o1", 0x0000, 0x010000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4przhr, 0, "prly.p1", 0x0000, 0x010000, CRC(feeac121) SHA1(e01f32fb4cdfbe61fdcd89749a33185ac0410720), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 1)" ) +// "(C)1991 BARCREST" and "PRL 0.3" +GAME_CUSTOM( 199?, m4przhr, 0, "prls.p1", 0x0000, 0x010000, CRC(8cc08272) SHA1(8b25b99291a288f198573272d705c3592c7c60e6), "Barcrest","Prize High Roller (Barcrest) (MPU4) (PRL 0.3)" ) +GAME_CUSTOM( 199?, m4przhr__p, m4przhr, "prly.p1", 0x0000, 0x010000, CRC(feeac121) SHA1(e01f32fb4cdfbe61fdcd89749a33185ac0410720), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 1)" ) +GAME_CUSTOM( 199?, m4przhr__j, m4przhr, "prlb.p1", 0x0000, 0x010000, CRC(b76f96cb) SHA1(2b0196542a99e60215ced488c7f5b2ae47b66ada), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 11)" ) +GAME_CUSTOM( 199?, m4przhr__k, m4przhr, "prlbd.p1", 0x0000, 0x010000, CRC(efad3703) SHA1(2a2dd6e913936a3232aa51972bfd1d2f6f4e9857), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 12)" ) +GAME_CUSTOM( 199?, m4przhr__l, m4przhr, "prld.p1", 0x0000, 0x010000, CRC(aeff3794) SHA1(84bdd743ec49ff8f1d4f34a2c9e14f427bc38b83), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 13)" ) +GAME_CUSTOM( 199?, m4przhr__m, m4przhr, "prldk.p1", 0x0000, 0x010000, CRC(c003cabf) SHA1(1f031d362591d675d2cffec041a0762e431e64f5), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 14)" ) +GAME_CUSTOM( 199?, m4przhr__n, m4przhr, "prldy.p1", 0x0000, 0x010000, CRC(15b4e8f3) SHA1(92c3be901f038a18906db674129e153ea61d70f4), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 15)" ) +GAME_CUSTOM( 199?, m4przhr__o, m4przhr, "prlk.p1", 0x0000, 0x010000, CRC(f2be8c36) SHA1(411a5e1614a4f7963ebbb87e1a3a63209801f6da), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 16)" ) +// "(C)1991 BARCREST" and "PR3 0.1" +GAME_CUSTOM( 199?, m4przhr__h, m4przhr, "pr3s.p1", 0x0000, 0x010000, CRC(e4968894) SHA1(92b4b930f3bf370b213a72ad8328f19d5ebbd471), "Barcrest","Prize High Roller (Barcrest) (MPU4) (PR3 0.1)" ) GAME_CUSTOM( 199?, m4przhr__a, m4przhr, "pr3ad.p1", 0x0000, 0x010000, CRC(8b047599) SHA1(fd2f21c2ed3e5cb4e4ace7ffa620131a1897cf92), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4przhr__b, m4przhr, "pr3b.p1", 0x0000, 0x010000, CRC(11d42c71) SHA1(ede99d2bbe597e4057a28c843b4b1b089e3427d2), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4przhr__c, m4przhr, "pr3bd.p1", 0x0000, 0x010000, CRC(b682a11f) SHA1(a5cb9d016e0ff877f506c890aa6733551aef5507), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 4)" ) @@ -3453,15 +3742,7 @@ GAME_CUSTOM( 199?, m4przhr__d, m4przhr, "pr3d.p1", 0x0000, 0x010000, CRC(7d GAME_CUSTOM( 199?, m4przhr__e, m4przhr, "pr3dk.p1", 0x0000, 0x010000, CRC(6f6b1df4) SHA1(c4db1a793e79a47d614154fb0091be2253012489), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 6)" ) GAME_CUSTOM( 199?, m4przhr__f, m4przhr, "pr3dy.p1", 0x0000, 0x010000, CRC(1ecf832e) SHA1(6b72bc6b25e8019b1867f17cfd74913e2850eacb), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 7)" ) GAME_CUSTOM( 199?, m4przhr__g, m4przhr, "pr3k.p1", 0x0000, 0x010000, CRC(41423db6) SHA1(928b7c91fe12b4cef2c6b9828f0dd0f51e223d75), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4przhr__h, m4przhr, "pr3s.p1", 0x0000, 0x010000, CRC(e4968894) SHA1(92b4b930f3bf370b213a72ad8328f19d5ebbd471), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4przhr__i, m4przhr, "pr3y.p1", 0x0000, 0x010000, CRC(81b214c0) SHA1(792db44df880ac58e0da8ed47fe25881a24891b0), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4przhr__j, m4przhr, "prlb.p1", 0x0000, 0x010000, CRC(b76f96cb) SHA1(2b0196542a99e60215ced488c7f5b2ae47b66ada), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4przhr__k, m4przhr, "prlbd.p1", 0x0000, 0x010000, CRC(efad3703) SHA1(2a2dd6e913936a3232aa51972bfd1d2f6f4e9857), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4przhr__l, m4przhr, "prld.p1", 0x0000, 0x010000, CRC(aeff3794) SHA1(84bdd743ec49ff8f1d4f34a2c9e14f427bc38b83), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4przhr__m, m4przhr, "prldk.p1", 0x0000, 0x010000, CRC(c003cabf) SHA1(1f031d362591d675d2cffec041a0762e431e64f5), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4przhr__n, m4przhr, "prldy.p1", 0x0000, 0x010000, CRC(15b4e8f3) SHA1(92c3be901f038a18906db674129e153ea61d70f4), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4przhr__o, m4przhr, "prlk.p1", 0x0000, 0x010000, CRC(f2be8c36) SHA1(411a5e1614a4f7963ebbb87e1a3a63209801f6da), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4przhr__p, m4przhr, "prls.p1", 0x0000, 0x010000, CRC(8cc08272) SHA1(8b25b99291a288f198573272d705c3592c7c60e6), "Barcrest","Prize High Roller (Barcrest) (MPU4) (set 17)" ) #define M4GCLUE_EXTRA_ROMS \ @@ -3479,7 +3760,9 @@ GAME_CUSTOM( 199?, m4przhr__p, m4przhr, "prls.p1", 0x0000, 0x010000, CRC(8c ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4gclue, 0, "c2002ad.p1", 0x0000, 0x010000, CRC(39507216) SHA1(dc49d9cea63cd5e88e4076bfca3aae88521056be), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (set 1)" ) +// "(C)1991 BARCREST" and "C20 0.2" +GAME_CUSTOM( 199?, m4gclue, 0, "c2002s.p1", 0x0000, 0x010000, CRC(fe640d18) SHA1(598e5a92bd26457cbd0cbd1f73cddb56054ff826), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (C20 0.2)" ) +GAME_CUSTOM( 199?, m4gclue__j, m4gclue, "c2002ad.p1", 0x0000, 0x010000, CRC(39507216) SHA1(dc49d9cea63cd5e88e4076bfca3aae88521056be), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (set 1)" ) GAME_CUSTOM( 199?, m4gclue__a, m4gclue, "c2002b.p1", 0x0000, 0x010000, CRC(1a552423) SHA1(3025c7a8f98817a8b0233c7682452d5d6df081c5), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4gclue__b, m4gclue, "c2002bd.p1", 0x0000, 0x010000, CRC(1eff74d1) SHA1(7cfba92237b3de1ea54c0d8b8619dd09a68c3b51), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4gclue__c, m4gclue, "c2002c.p1", 0x0000, 0x010000, CRC(3c73d6c8) SHA1(63bb5df7063bf33e2b9f88db53ad64666967ecca), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (set 4)" ) @@ -3489,8 +3772,9 @@ GAME_CUSTOM( 199?, m4gclue__f, m4gclue, "c2002dr.p1", 0x0000, 0x010000, CR GAME_CUSTOM( 199?, m4gclue__g, m4gclue, "c2002dy.p1", 0x0000, 0x010000, CRC(1bf36c0c) SHA1(584fa498821129cfe9fb5c64cbf29c10abef0c57), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (set 8)" ) GAME_CUSTOM( 199?, m4gclue__h, m4gclue, "c2002k.p1", 0x0000, 0x010000, CRC(05e65abe) SHA1(560c2a7ac5af90ce5d0f1b34ec097bf5f733ec90), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4gclue__i, m4gclue, "c2002r.p1", 0x0000, 0x010000, CRC(49ce30ab) SHA1(501f509aae61059349107657516b559106d06f49), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4gclue__j, m4gclue, "c2002s.p1", 0x0000, 0x010000, CRC(fe640d18) SHA1(598e5a92bd26457cbd0cbd1f73cddb56054ff826), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4gclue__k, m4gclue, "c2002y.p1", 0x0000, 0x010000, CRC(d4a51845) SHA1(7808ff2d62eeadbb894379857266770fe9954384), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (set 12)" ) +// "(C)1991 BARCREST" and "C25 0.4" +GAME_CUSTOM( 199?, m4gclue__v, m4gclue, "c2504s.p1", 0x0000, 0x010000, CRC(47d6791f) SHA1(e232586605b096849480002ddb7b77a8b113a388), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (C25 0.4)" ) GAME_CUSTOM( 199?, m4gclue__l, m4gclue, "c2504ad.p1", 0x0000, 0x010000, CRC(f721de72) SHA1(8e64360f5b0de9d9b2afda6361e2b6d4ec3b1baf), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (set 13)" ) GAME_CUSTOM( 199?, m4gclue__m, m4gclue, "c2504b.p1", 0x0000, 0x010000, CRC(4cd01058) SHA1(705b3979c8728e98810cb3cd4d4b4e926e52d78b), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (set 14)" ) GAME_CUSTOM( 199?, m4gclue__n, m4gclue, "c2504bd.p1", 0x0000, 0x010000, CRC(34d6d202) SHA1(1c596abdbcce801f5363871f9959d07ba9568083), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (set 15)" ) @@ -3501,7 +3785,6 @@ GAME_CUSTOM( 199?, m4gclue__r, m4gclue, "c2504dr.p1", 0x0000, 0x010000, CR GAME_CUSTOM( 199?, m4gclue__s, m4gclue, "c2504dy.p1", 0x0000, 0x010000, CRC(a71ccade) SHA1(65cd823aa4136fcf8d93058e4ef708e4b01caa3a), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (set 20)" ) GAME_CUSTOM( 199?, m4gclue__t, m4gclue, "c2504k.p1", 0x0000, 0x010000, CRC(aa4af6e9) SHA1(18654cf751e157d11010e991e74127aa15cb3cfc), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (set 21)" ) GAME_CUSTOM( 199?, m4gclue__u, m4gclue, "c2504r.p1", 0x0000, 0x010000, CRC(62bbd71d) SHA1(0b7f97a213a8f5b457aa54f760e19ebd00b1d334), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4gclue__v, m4gclue, "c2504s.p1", 0x0000, 0x010000, CRC(47d6791f) SHA1(e232586605b096849480002ddb7b77a8b113a388), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (set 23)" ) GAME_CUSTOM( 199?, m4gclue__w, m4gclue, "c2504y.p1", 0x0000, 0x010000, CRC(ffd0fff3) SHA1(5f30353e73331315be99281c7ed435d05a9bfc5b), "Barcrest","Give Us A Clue (Barcrest) (MPU4) (set 24)" ) #define M4VEGAST_EXTRA_ROMS \ @@ -3519,7 +3802,9 @@ GAME_CUSTOM( 199?, m4gclue__w, m4gclue, "c2504y.p1", 0x0000, 0x010000, CR ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4vegast, 0, "uvsad.p1", 0x0000, 0x020000, CRC(f26d7fa8) SHA1(bb37be4a189bd38bd71afd836e94a55f9ef84ad4), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 1)" ) +// "(C)1993 BARCREST" and "UVS 0.3" +GAME_CUSTOM( 199?, m4vegast, 0, "uvss.p1", 0x0000, 0x020000, CRC(8b5b120f) SHA1(90749c4f986a248252661b8e4157871330673ecd), "Barcrest","Vegas Strip (Barcrest) (MPU4) (UVS 0.3)" ) +GAME_CUSTOM( 199?, m4vegast__h, m4vegast, "uvsad.p1", 0x0000, 0x020000, CRC(f26d7fa8) SHA1(bb37be4a189bd38bd71afd836e94a55f9ef84ad4), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 1)" ) GAME_CUSTOM( 199?, m4vegast__a, m4vegast, "uvsb.p1", 0x0000, 0x020000, CRC(32e017ff) SHA1(3e8aa863b85164ee9d535244bafb82b14ee19528), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4vegast__b, m4vegast, "uvsbd.p1", 0x0000, 0x020000, CRC(7f77d16d) SHA1(7f34a687877ca1d9257ee1c39ca5b3c44a42782e), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4vegast__c, m4vegast, "uvsc.p1", 0x0000, 0x020000, CRC(05aaaaed) SHA1(7eee93204467b9ecdff4b742a6e16306b83778ba), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 4)" ) @@ -3527,8 +3812,9 @@ GAME_CUSTOM( 199?, m4vegast__d, m4vegast, "uvsd.p1", 0x0000, 0x020000, GAME_CUSTOM( 199?, m4vegast__e, m4vegast, "uvsdk.p1", 0x0000, 0x020000, CRC(35b0793b) SHA1(90ef897fcd9cfb48007e5788a4df02053e38430c), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 6)" ) GAME_CUSTOM( 199?, m4vegast__f, m4vegast, "uvsdy.p1", 0x0000, 0x020000, CRC(b25359c5) SHA1(da4aa9b5069db222e22f24cd78f641c70a015166), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 7)" ) GAME_CUSTOM( 199?, m4vegast__g, m4vegast, "uvsk.p1", 0x0000, 0x020000, CRC(7827bfa9) SHA1(720d9793e97f2e11c1c9b18e3b4fa6ec7e29250a), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4vegast__h, m4vegast, "uvss.p1", 0x0000, 0x020000, CRC(8b5b120f) SHA1(90749c4f986a248252661b8e4157871330673ecd), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4vegast__i, m4vegast, "uvsy.p1", 0x0000, 0x020000, CRC(ffc49f57) SHA1(fb64afa2fefb3ff1c0f9b71aa3d00e1a17903e84), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 10)" ) +// "(C)1993 BARCREST" and "VSG 0.4" +GAME_CUSTOM( 199?, m4vegast__t, m4vegast, "vsg04s.p1", 0x0000, 0x020000, CRC(aff47295) SHA1(d249f280b721c96b7c36329e2c2bb955fa91aa59), "Barcrest","Vegas Strip (Barcrest) (MPU4) (VSG 0.4)" ) GAME_CUSTOM( 199?, m4vegast__j, m4vegast, "vsg04ad.p1", 0x0000, 0x020000, CRC(d63f8f24) SHA1(f3dcd908bceb5a508927a83d23e82577e8684240), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4vegast__k, m4vegast, "vsg04b.p1", 0x0000, 0x020000, CRC(4211e2bf) SHA1(5f634d074d0f95673f734c5600ac990fb7510bdc), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 12)" ) GAME_CUSTOM( 199?, m4vegast__l, m4vegast, "vsg04bd.p1", 0x0000, 0x020000, CRC(5b2521e1) SHA1(67d2496e7a52f9aa984d57a5b76f995506051a8c), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 13)" ) @@ -3539,11 +3825,11 @@ GAME_CUSTOM( 199?, m4vegast__p, m4vegast, "vsg04dr.p1", 0x0000, 0x020000, GAME_CUSTOM( 199?, m4vegast__q, m4vegast, "vsg04dy.p1", 0x0000, 0x020000, CRC(9601a949) SHA1(39a06f671b8f817039b9861887dd9521e7f3acdd), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 18)" ) GAME_CUSTOM( 199?, m4vegast__r, m4vegast, "vsg04k.p1", 0x0000, 0x020000, CRC(08d64ae9) SHA1(5cfe1b2fe0933d06618a2c88e1a63224686e972f), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 19)" ) GAME_CUSTOM( 199?, m4vegast__s, m4vegast, "vsg04r.p1", 0x0000, 0x020000, CRC(bbd9f1d8) SHA1(22312ff72d5b2fbe6416a7e84435e1df456a3547), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4vegast__t, m4vegast, "vsg04s.p1", 0x0000, 0x020000, CRC(aff47295) SHA1(d249f280b721c96b7c36329e2c2bb955fa91aa59), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 21)" ) GAME_CUSTOM( 199?, m4vegast__u, m4vegast, "vsg04y.p1", 0x0000, 0x020000, CRC(8f356a17) SHA1(33ac5e8a455175471466f7c7f35c66f795067bf2), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4vegast__v, m4vegast, "lvs", 0x0000, 0x020000, CRC(dcb0dc80) SHA1(6045b332eb4af09f6e0a669ea0b78ef4ac389ac2), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4vegast__w, m4vegast, "vspa20st", 0x0000, 0x010000, CRC(267388eb) SHA1(2621724ebdd5031fc513692ff90989bf3b6115d1), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4vegast__x, m4vegast, "vstr2010", 0x0000, 0x020000, CRC(126365e3) SHA1(1e648b7a8cb1ff49e43e2fdc30f482b2b73ed6d7), "Barcrest","Vegas Strip (Barcrest) (MPU4) (set 25)" ) +// "(C)1993 BARCREST" and "VSG 0.3" (most of the sets with 2010 in the filenames are hacks tho) +GAME_CUSTOM( 199?, m4vegast__x, m4vegast, "vstr2010", 0x0000, 0x020000, CRC(126365e3) SHA1(1e648b7a8cb1ff49e43e2fdc30f482b2b73ed6d7), "Barcrest","Vegas Strip (Barcrest) (MPU4) (VSG 0.3)" ) +// "(C)1993 BARCREST" and "VSG 0.3" (but doesn't boot?) +GAME_CUSTOM( 199?, m4vegast__v, m4vegast, "lvs", 0x0000, 0x020000, CRC(dcb0dc80) SHA1(6045b332eb4af09f6e0a669ea0b78ef4ac389ac2), "hack?","Vegas Strip (Barcrest) (MPU4) (VSG 0.3, hack?)" ) #define M4HOTROD_EXTRA_ROMS \ @@ -3561,29 +3847,36 @@ GAME_CUSTOM( 199?, m4vegast__x, m4vegast, "vstr2010", 0x0000, 0x020000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4hotrod, 0, "rodk.p1", 0x0000, 0x010000, CRC(298d85ff) SHA1(3c9374be1f6b5e58a1b9004f74f3a33d0fff4214), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4hotrod__a, m4hotrod, "hot rod 5p 4 p1 (27512)", 0x0000, 0x010000, CRC(b6212af8) SHA1(9453c4424244895b3ad15d5fba45fe8822e7ff2b), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4hotrod__b, m4hotrod, "hr056c", 0x0000, 0x010000, CRC(c062f285) SHA1(917e82cadf242aa815c525ff435cd4b04ea87e39), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4hotrod__c, m4hotrod, "hrod05_11", 0x0000, 0x010000, CRC(61f35723) SHA1(743b71ecde4923c359a1202eaad7e4d74b0d1611), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4hotrod__d, m4hotrod, "hrod10_11", 0x0000, 0x010000, CRC(5b924a86) SHA1(6b86dce6ba3789750de05dca996202c000ecfbae), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4hotrod__e, m4hotrod, "hrod20_11", 0x0000, 0x010000, CRC(b81a57b6) SHA1(442c119b9ed70d4da2f9082ec01e410cfee76102), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4hotrod__f, m4hotrod, "hrod55", 0x0000, 0x010000, CRC(dd6d3153) SHA1(27f3324b43c026abf2ae4c584afeb6971a3fe57a), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4hotrod__g, m4hotrod, "hrod58c", 0x0000, 0x010000, CRC(079474db) SHA1(257b1086277cd0b8398b80a4b95cf1212c10c4c3), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4hotrod__h, m4hotrod, "rodc.p1", 0x0000, 0x010000, CRC(2f6b53d3) SHA1(fa4df1e6a2f6158cbc099d7e2d5ec96355079f36), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4hotrod__i, m4hotrod, "roddy.p1", 0x0000, 0x010000, CRC(53e508ac) SHA1(24df8b949211e7bc5c7b8d704562b36e52cb8d5c), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4hotrod__j, m4hotrod, "rods.p1", 0x0000, 0x010000, CRC(93d73857) SHA1(dcfd1dbf368f68ba3e7aa163eedd89c68aaccec8), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4hotrod__k, m4hotrod, "hr_05___.1o1", 0x0000, 0x010000, CRC(abdb0a16) SHA1(5db2721326a22b9d8653773ec8de8a845d147eee), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4hotrod__l, m4hotrod, "hr_05_d_.1o1", 0x0000, 0x010000, CRC(8a14fa8d) SHA1(8d64a75514d0a58fcdc2d5a81c0b85a49ab8322b), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4hotrod__m, m4hotrod, "hr_10___.1o1", 0x0000, 0x010000, CRC(5e09202f) SHA1(06991f5fd451fff77ef7ab0b866543613c3dcc02), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4hotrod__n, m4hotrod, "hr_10_d_.1o1", 0x0000, 0x010000, CRC(329409c5) SHA1(e9ba0f36048f46a381c8a408b9c1e10acea0bde3), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4hotrod__o, m4hotrod, "hri05___.101", 0x0000, 0x010000, CRC(43e5e86e) SHA1(8bf00b1af1f86f1a361537a1117d857fa8fa7af4), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4hotrod__p, m4hotrod, "hri10___.1o1", 0x0000, 0x010000, CRC(a855f93c) SHA1(2b63aa7c632f14457c2ae0312cef7b22bbf1df22), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4hotrod__q, m4hotrod, "hrod_05_.4", 0x0000, 0x010000, CRC(c58aa0e8) SHA1(8a2b5a9bd4e93a7a12cae4e92e0faf35e2ebbe4c), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4hotrod__r, m4hotrod, "hrod_05_.8", 0x0000, 0x010000, CRC(b3c9e0c9) SHA1(4a549876121dd7fc5c11d3b03322d1e5f90eaa86), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4hotrod__s, m4hotrod, "hrod_10_.4", 0x0000, 0x010000, CRC(b9e84451) SHA1(7566aef1604992376010758cb079fe9da67ad454), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4hotrod__t, m4hotrod, "hrod_10_.8", 0x0000, 0x010000, CRC(62ac8057) SHA1(d2085ec0f29ff85251ef2c576e828f502420839d), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4hotrod__u, m4hotrod, "hrod_20_.4", 0x0000, 0x010000, CRC(c58bb470) SHA1(7bb831d7b647d17eff896ccce0ab7c8cfa8179b8), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4hotrod__v, m4hotrod, "hrod_20_.8", 0x0000, 0x010000, CRC(a2d20781) SHA1(3f1b33374ae0a61815b38ad0e57856ae16047adc), "Barcrest","Hot Rod (Barcrest) (MPU4) (set 23)" ) + +// "(C)1991 BARCREST" and "ROD 0.4" +GAME_CUSTOM( 199?, m4hotrod, 0, "rodk.p1", 0x0000, 0x010000, CRC(298d85ff) SHA1(3c9374be1f6b5e58a1b9004f74f3a33d0fff4214), "Barcrest","Hot Rod (Barcrest) (MPU4) (ROD 0.4K)" ) +GAME_CUSTOM( 199?, m4hotrod__h, m4hotrod, "rodc.p1", 0x0000, 0x010000, CRC(2f6b53d3) SHA1(fa4df1e6a2f6158cbc099d7e2d5ec96355079f36), "Barcrest","Hot Rod (Barcrest) (MPU4) (ROD 0.4C)" ) +GAME_CUSTOM( 199?, m4hotrod__i, m4hotrod, "roddy.p1", 0x0000, 0x010000, CRC(53e508ac) SHA1(24df8b949211e7bc5c7b8d704562b36e52cb8d5c), "Barcrest","Hot Rod (Barcrest) (MPU4) (ROD 0.4YD)" ) +GAME_CUSTOM( 199?, m4hotrod__j, m4hotrod, "rods.p1", 0x0000, 0x010000, CRC(93d73857) SHA1(dcfd1dbf368f68ba3e7aa163eedd89c68aaccec8), "Barcrest","Hot Rod (Barcrest) (MPU4) (ROD 0.4)" ) +GAME_CUSTOM( 199?, m4hotrod__e, m4hotrod, "hrod20_11", 0x0000, 0x010000, CRC(b81a57b6) SHA1(442c119b9ed70d4da2f9082ec01e410cfee76102), "hack", "Hot Rod (Barcrest) (MPU4) (ROD 0.4, hack?, set 1)" ) // bad chr +GAME_CUSTOM( 199?, m4hotrod__u, m4hotrod, "hrod_20_.4", 0x0000, 0x010000, CRC(c58bb470) SHA1(7bb831d7b647d17eff896ccce0ab7c8cfa8179b8), "hack", "Hot Rod (Barcrest) (MPU4) (ROD 0.4, hack?, set 2)" ) // ^ +GAME_CUSTOM( 199?, m4hotrod__v, m4hotrod, "hrod_20_.8", 0x0000, 0x010000, CRC(a2d20781) SHA1(3f1b33374ae0a61815b38ad0e57856ae16047adc), "hack", "Hot Rod (Barcrest) (MPU4) (ROD 0.4, hack?, set 3)" ) /// ^ +// "(C)1994 B.W.B." and "HR__1.0" +GAME_CUSTOM( 199?, m4hotrod__k, m4hotrod, "hr_05___.1o1", 0x0000, 0x010000, CRC(abdb0a16) SHA1(5db2721326a22b9d8653773ec8de8a845d147eee), "Bwb","Hot Rod (Barcrest) (MPU4) (HR__1.0, set 1)" ) +GAME_CUSTOM( 199?, m4hotrod__l, m4hotrod, "hr_05_d_.1o1", 0x0000, 0x010000, CRC(8a14fa8d) SHA1(8d64a75514d0a58fcdc2d5a81c0b85a49ab8322b), "Bwb","Hot Rod (Barcrest) (MPU4) (HR__1.0D, set 1)" ) +GAME_CUSTOM( 199?, m4hotrod__o, m4hotrod, "hri05___.101", 0x0000, 0x010000, CRC(43e5e86e) SHA1(8bf00b1af1f86f1a361537a1117d857fa8fa7af4), "Bwb","Hot Rod (Barcrest) (MPU4) (HR__1.0C, set 1)" ) +GAME_CUSTOM( 199?, m4hotrod__m, m4hotrod, "hr_10___.1o1", 0x0000, 0x010000, CRC(5e09202f) SHA1(06991f5fd451fff77ef7ab0b866543613c3dcc02), "Bwb","Hot Rod (Barcrest) (MPU4) (HR__1.0, set 2)" ) +GAME_CUSTOM( 199?, m4hotrod__n, m4hotrod, "hr_10_d_.1o1", 0x0000, 0x010000, CRC(329409c5) SHA1(e9ba0f36048f46a381c8a408b9c1e10acea0bde3), "Bwb","Hot Rod (Barcrest) (MPU4) (HR__1.0D, set 2)" ) +GAME_CUSTOM( 199?, m4hotrod__p, m4hotrod, "hri10___.1o1", 0x0000, 0x010000, CRC(a855f93c) SHA1(2b63aa7c632f14457c2ae0312cef7b22bbf1df22), "Bwb","Hot Rod (Barcrest) (MPU4) (HR__1.0C, set 2)" ) +// "(C)1995 B.W.B." and "HRC_1.0" +GAME_CUSTOM( 199?, m4hotrod__a, m4hotrod, "hot rod 5p 4 p1 (27512)", 0x0000, 0x010000, CRC(b6212af8) SHA1(9453c4424244895b3ad15d5fba45fe8822e7ff2b), "Bwb","Hot Rod (Barcrest) (MPU4) (HRC_1.0C)" ) +// no copyright string and "HR__1.0" +GAME_CUSTOM( 199?, m4hotrod__b, m4hotrod, "hr056c", 0x0000, 0x010000, CRC(c062f285) SHA1(917e82cadf242aa815c525ff435cd4b04ea87e39), "hack","Hot Rod (Barcrest) (MPU4) (HR__1.0, hack, set 1)" ) +GAME_CUSTOM( 199?, m4hotrod__c, m4hotrod, "hrod05_11", 0x0000, 0x010000, CRC(61f35723) SHA1(743b71ecde4923c359a1202eaad7e4d74b0d1611), "hack","Hot Rod (Barcrest) (MPU4) (HR__1.0, hack, set 2)" ) +GAME_CUSTOM( 199?, m4hotrod__d, m4hotrod, "hrod10_11", 0x0000, 0x010000, CRC(5b924a86) SHA1(6b86dce6ba3789750de05dca996202c000ecfbae), "hack","Hot Rod (Barcrest) (MPU4) (HR__1.0, hack, set 3)" ) +GAME_CUSTOM( 199?, m4hotrod__f, m4hotrod, "hrod55", 0x0000, 0x010000, CRC(dd6d3153) SHA1(27f3324b43c026abf2ae4c584afeb6971a3fe57a), "hack","Hot Rod (Barcrest) (MPU4) (HR__1.0, hack, set 4)" ) +GAME_CUSTOM( 199?, m4hotrod__g, m4hotrod, "hrod58c", 0x0000, 0x010000, CRC(079474db) SHA1(257b1086277cd0b8398b80a4b95cf1212c10c4c3), "hack","Hot Rod (Barcrest) (MPU4) (HR__1.0, hack, set 5)" ) +GAME_CUSTOM( 199?, m4hotrod__q, m4hotrod, "hrod_05_.4", 0x0000, 0x010000, CRC(c58aa0e8) SHA1(8a2b5a9bd4e93a7a12cae4e92e0faf35e2ebbe4c), "hack","Hot Rod (Barcrest) (MPU4) (HR__1.0, hack, set 6)" ) +GAME_CUSTOM( 199?, m4hotrod__r, m4hotrod, "hrod_05_.8", 0x0000, 0x010000, CRC(b3c9e0c9) SHA1(4a549876121dd7fc5c11d3b03322d1e5f90eaa86), "hack","Hot Rod (Barcrest) (MPU4) (HR__1.0, hack, set 7)" ) +GAME_CUSTOM( 199?, m4hotrod__s, m4hotrod, "hrod_10_.4", 0x0000, 0x010000, CRC(b9e84451) SHA1(7566aef1604992376010758cb079fe9da67ad454), "hack","Hot Rod (Barcrest) (MPU4) (HR__1.0, hack, set 8)" ) +GAME_CUSTOM( 199?, m4hotrod__t, m4hotrod, "hrod_10_.8", 0x0000, 0x010000, CRC(62ac8057) SHA1(d2085ec0f29ff85251ef2c576e828f502420839d), "hack","Hot Rod (Barcrest) (MPU4) (HR__1.0, hack, set 9)" ) + + #define M4BUC_EXTRA_ROMS \ @@ -3599,10 +3892,8 @@ GAME_CUSTOM( 199?, m4hotrod__v, m4hotrod, "hrod_20_.8", 0x000 ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4buc, 0, "buccaneer5-15sw.bin", 0x000000, 0x020000, CRC(9b92d1f6) SHA1(d374fe966a1b039c971f278ab1113640e7629233), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4buc__a, m4buc, "bucc15g", 0x000000, 0x020000, CRC(63dd1180) SHA1(a557af6927744b4ce2773c70db5ce1a7708ceb2c), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4buc__b, m4buc, "bucc15t", 0x000000, 0x020000, CRC(66104749) SHA1(4b5a9a3f1409e207cad42ea29a205a18facf57ab), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 3)" ) +// "(C)1993 BARCREST" and "BUG 0.4" +GAME_CUSTOM( 199?, m4buc, 0, "bug04s.p1", 0x000000, 0x020000, CRC(0f76cf1d) SHA1(e0081f88e23958564a87346082629c4fdc0cc147), "Barcrest","Buccaneer (Barcrest) (MPU4) (BUG 0.4)" ) GAME_CUSTOM( 199?, m4buc__c, m4buc, "bug04ad.p1", 0x000000, 0x020000, CRC(c6171b29) SHA1(a66aa4b05f974aa9cea9e05e95d14a0e746374be), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 4)" ) GAME_CUSTOM( 199?, m4buc__d, m4buc, "bug04b.p1", 0x000000, 0x020000, CRC(4358fe51) SHA1(6e61397f71018d3f9d369a0ac8fefacafbada2d5), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 5)" ) GAME_CUSTOM( 199?, m4buc__e, m4buc, "bug04bd.p1", 0x000000, 0x020000, CRC(282b7832) SHA1(1ae3e45606bb875dd178beab231bdaa472687d46), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 6)" ) @@ -3614,8 +3905,9 @@ GAME_CUSTOM( 199?, m4buc__j, m4buc, "bug04dy.p1", 0x000000, 0x020000 GAME_CUSTOM( 199?, m4buc__k, m4buc, "bug04h.p1", 0x000000, 0x020000, CRC(03edc1c4) SHA1(52a3040ec602008dc9143900d149251235282dca), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 12)" ) GAME_CUSTOM( 199?, m4buc__l, m4buc, "bug04k.p1", 0x000000, 0x020000, CRC(6ab99bd9) SHA1(d199e88dd22f6c2d31c23413c4c3f262834f5751), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 13)" ) GAME_CUSTOM( 199?, m4buc__m, m4buc, "bug04r.p1", 0x000000, 0x020000, CRC(d9b620e8) SHA1(01e7232f62dc33d3a9a26ee5456c2bb47dd4fce4), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4buc__n, m4buc, "bug04s.p1", 0x000000, 0x020000, CRC(0f76cf1d) SHA1(e0081f88e23958564a87346082629c4fdc0cc147), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 15)" ) GAME_CUSTOM( 199?, m4buc__o, m4buc, "bug04y.p1", 0x000000, 0x020000, CRC(207e338f) SHA1(3a95d0029e3e3a8f839f335ed1a981e8d6124dcc), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 16)" ) +// "(C)1993 BARCREST" and "BUG 0.5" +GAME_CUSTOM( 199?, m4buc__0, m4buc, "bug05s.p1", 0x000000, 0x020000, CRC(99ce7ada) SHA1(6cdb17d8dfd759ceb2d7acd5f6b15952106f3178), "Barcrest","Buccaneer (Barcrest) (MPU4) (BUG 0.5)" ) GAME_CUSTOM( 199?, m4buc__p, m4buc, "bug05ad.p1", 0x000000, 0x020000, CRC(515539dd) SHA1(6f8eb199f4738edb6f405f3d5df1ba0256dfa0bf), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 17)" ) GAME_CUSTOM( 199?, m4buc__q, m4buc, "bug05b.p1", 0x000000, 0x020000, CRC(a4e57b87) SHA1(64a76762b028349da9fb14141d27423785bdb9c8), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 18)" ) GAME_CUSTOM( 199?, m4buc__r, m4buc, "bug05bd.p1", 0x000000, 0x020000, CRC(bf695ac6) SHA1(24f5c4f46ed5d269426357ef578774ac456be1d0), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 19)" ) @@ -3627,8 +3919,9 @@ GAME_CUSTOM( 199?, m4buc__w, m4buc, "bug05dy.p1", 0x000000, 0x020000 GAME_CUSTOM( 199?, m4buc__x, m4buc, "bug05h.p1", 0x000000, 0x020000, CRC(e4504412) SHA1(84596d14c1474f7965956ed707261dbe272d9c14), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 25)" ) GAME_CUSTOM( 199?, m4buc__y, m4buc, "bug05k.p1", 0x000000, 0x020000, CRC(8d041e0f) SHA1(94c4fa84f6c978c725593c6086c61521cd791c74), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 26)" ) GAME_CUSTOM( 199?, m4buc__z, m4buc, "bug05r.p1", 0x000000, 0x020000, CRC(3e0ba53e) SHA1(041dbf7f086dce0182f855249d832b68942e2c33), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4buc__0, m4buc, "bug05s.p1", 0x000000, 0x020000, CRC(99ce7ada) SHA1(6cdb17d8dfd759ceb2d7acd5f6b15952106f3178), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 28)" ) GAME_CUSTOM( 199?, m4buc__1, m4buc, "bug05y.p1", 0x000000, 0x020000, CRC(c7c3b659) SHA1(66aa9481b69ee282ecfa8f7614b7d476919e35b3), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 29)" ) +// "(C)1993 BARCREST" and "BUS 0.1" +GAME_CUSTOM( 199?, m4buc__ad, m4buc, "bus01s.p1", 0x000000, 0x020000, CRC(d5a35734) SHA1(7b905ac16eb50d462e9edc5bb50fe660b6f7c81b), "Barcrest","Buccaneer (Barcrest) (MPU4) (BUS 0.1)" ) GAME_CUSTOM( 199?, m4buc__2, m4buc, "bus01ad.p1", 0x000000, 0x020000, CRC(0f5920ee) SHA1(5152c24fd3e3642a5324e68465403a6ce199db5a), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 30)" ) GAME_CUSTOM( 199?, m4buc__3, m4buc, "bus01b.p1", 0x000000, 0x020000, CRC(656d2609) SHA1(525fc8e2dc1d6bfe17c24e28ccde0f0a580e4330), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 31)" ) GAME_CUSTOM( 199?, m4buc__4, m4buc, "bus01bd.p1", 0x000000, 0x020000, CRC(e16543f5) SHA1(98dc6a098ad13c1f7c3e0e1079eed92931ce279c), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 32)" ) @@ -3640,8 +3933,9 @@ GAME_CUSTOM( 199?, m4buc__9, m4buc, "bus01dy.p1", 0x000000, 0x020000 GAME_CUSTOM( 199?, m4buc__aa, m4buc, "bus01h.p1", 0x000000, 0x020000, CRC(25d8199c) SHA1(84be66148fe14d85bd69fb4c9b5263b7c208e690), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 38)" ) GAME_CUSTOM( 199?, m4buc__ab, m4buc, "bus01k.p1", 0x000000, 0x020000, CRC(4c8c4381) SHA1(0e6204e6f937ca8b9dc31927d31ec11db18068c0), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 39)" ) GAME_CUSTOM( 199?, m4buc__ac, m4buc, "bus01r.p1", 0x000000, 0x020000, CRC(ff83f8b0) SHA1(bbd56730eccb4df1815b98921522beec5c74a9bd), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 40)" ) -GAME_CUSTOM( 199?, m4buc__ad, m4buc, "bus01s.p1", 0x000000, 0x020000, CRC(d5a35734) SHA1(7b905ac16eb50d462e9edc5bb50fe660b6f7c81b), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 41)" ) GAME_CUSTOM( 199?, m4buc__ae, m4buc, "bus01y.p1", 0x000000, 0x020000, CRC(064bebd7) SHA1(8b19edae49c919ddf20d2ebff43ffec79809d90c), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 42)" ) +// "(C)1993 BARCREST" and "BUS 0.2" +GAME_CUSTOM( 199?, m4buc__aq, m4buc, "bus02s.p1", 0x000000, 0x020000, CRC(c43f9f09) SHA1(83501473bf8fc17748fa42ab446d4bc54eeb2a80), "Barcrest","Buccaneer (Barcrest) (MPU4) (BUS 0.2)" ) GAME_CUSTOM( 199?, m4buc__af, m4buc, "bus02ad.p1", 0x000000, 0x020000, CRC(a1ad9f3d) SHA1(bfb61b1f2a449293d23d6c385a0aab67ccdcc8fe), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 43)" ) GAME_CUSTOM( 199?, m4buc__ag, m4buc, "bus02b.p1", 0x000000, 0x020000, CRC(f6d1181b) SHA1(f4606b4f9522293ad73936f9dd80e54b9ee58f33), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 44)" ) GAME_CUSTOM( 199?, m4buc__ah, m4buc, "bus02bd.p1", 0x000000, 0x020000, CRC(4f91fc26) SHA1(66e2aec28ec474a8d9c11dd7375de0c2050db963), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 45)" ) @@ -3653,17 +3947,25 @@ GAME_CUSTOM( 199?, m4buc__am, m4buc, "bus02dy.p1", 0x000000, 0x020000 GAME_CUSTOM( 199?, m4buc__an, m4buc, "bus02h.p1", 0x000000, 0x020000, CRC(b664278e) SHA1(ab009d09f1e3a8aa3c425db689553c3ac63f17ce), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 51)" ) GAME_CUSTOM( 199?, m4buc__ao, m4buc, "bus02k.p1", 0x000000, 0x020000, CRC(df307d93) SHA1(1dda940868273f81c501dcee27c9d6bc91f411e1), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 52)" ) GAME_CUSTOM( 199?, m4buc__ap, m4buc, "bus02r.p1", 0x000000, 0x020000, CRC(6c3fc6a2) SHA1(f65cab3fcc5a7176dded8ebf3de8ff90479686c6), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 53)" ) -GAME_CUSTOM( 199?, m4buc__aq, m4buc, "bus02s.p1", 0x000000, 0x020000, CRC(c43f9f09) SHA1(83501473bf8fc17748fa42ab446d4bc54eeb2a80), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 54)" ) GAME_CUSTOM( 199?, m4buc__ar, m4buc, "bus02y.p1", 0x000000, 0x020000, CRC(95f7d5c5) SHA1(301949ad27963041a3cef000ed9ffd16c119b18d), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 55)" ) -GAME_CUSTOM( 199?, m4buc__as, m4buc, "br_sj___.1_1", 0x000000, 0x020000, CRC(02c30d48) SHA1(8e5d09d721bf6e1876d672b6c84f46666cf42b90), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 56)" ) -GAME_CUSTOM( 199?, m4buc__at, m4buc, "br_sj_b_.1_1", 0x000000, 0x020000, CRC(490ec8a7) SHA1(faf9f450d48382aeb7b8e01750fc226c30e761d3), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 57)" ) -GAME_CUSTOM( 199?, m4buc__au, m4buc, "br_sj_d_.1_1", 0x000000, 0x020000, CRC(ac4e72d6) SHA1(303f77e536b8da79a926dc5b30441ae9071f683b), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 58)" ) -GAME_CUSTOM( 199?, m4buc__av, m4buc, "br_sj_k_.1_1", 0x000000, 0x020000, CRC(1c71f108) SHA1(10f4e99b0af4a102ed23098123d82da2a8f1c5be), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 59)" ) -GAME_CUSTOM( 199?, m4buc__aw, m4buc, "br_sjb__.1_1", 0x000000, 0x020000, CRC(d15579a0) SHA1(577c7cd11da15083327dba385a6769b346be2b71), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 60)" ) -GAME_CUSTOM( 199?, m4buc__ax, m4buc, "br_sjbg_.1_1", 0x000000, 0x020000, CRC(5f8ec0ae) SHA1(8eacfd43e3f875af862b77f044b7a9f1487af4a1), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 61)" ) -GAME_CUSTOM( 199?, m4buc__ay, m4buc, "br_sjbt_.1_1", 0x000000, 0x020000, CRC(00f9581e) SHA1(1461539f501250a08bf66e4a94e4b84113dc0dc5), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 62)" ) -GAME_CUSTOM( 199?, m4buc__az, m4buc, "br_sjwb_.1_1", 0x000000, 0x020000, CRC(d15cb680) SHA1(4ab485eb2d1d57c690926e430e0c8b2af045381d), "Barcrest","Buccaneer (Barcrest) (MPU4) (set 63)" ) +// "(C)1999 BWB" and "BR_ 1.0" +GAME_CUSTOM( 199?, m4buc__as, m4buc, "br_sj___.1_1", 0x000000, 0x020000, CRC(02c30d48) SHA1(8e5d09d721bf6e1876d672b6c84f46666cf42b90), "Bwb","Buccaneer (Barcrest) (MPU4) (BR_ 1.0, set 1)" ) +GAME_CUSTOM( 199?, m4buc__at, m4buc, "br_sj_b_.1_1", 0x000000, 0x020000, CRC(490ec8a7) SHA1(faf9f450d48382aeb7b8e01750fc226c30e761d3), "Bwb","Buccaneer (Barcrest) (MPU4) (BR_ 1.0, set 2)" ) +GAME_CUSTOM( 199?, m4buc__au, m4buc, "br_sj_d_.1_1", 0x000000, 0x020000, CRC(ac4e72d6) SHA1(303f77e536b8da79a926dc5b30441ae9071f683b), "Bwb","Buccaneer (Barcrest) (MPU4) (BR_ 1.0, set 3)" ) +GAME_CUSTOM( 199?, m4buc__av, m4buc, "br_sj_k_.1_1", 0x000000, 0x020000, CRC(1c71f108) SHA1(10f4e99b0af4a102ed23098123d82da2a8f1c5be), "Bwb","Buccaneer (Barcrest) (MPU4) (BR_ 1.0, set 4)" ) +GAME_CUSTOM( 199?, m4buc__aw, m4buc, "br_sjb__.1_1", 0x000000, 0x020000, CRC(d15579a0) SHA1(577c7cd11da15083327dba385a6769b346be2b71), "Bwb","Buccaneer (Barcrest) (MPU4) (BR_ 1.0, set 5)" ) +GAME_CUSTOM( 199?, m4buc__ax, m4buc, "br_sjbg_.1_1", 0x000000, 0x020000, CRC(5f8ec0ae) SHA1(8eacfd43e3f875af862b77f044b7a9f1487af4a1), "Bwb","Buccaneer (Barcrest) (MPU4) (BR_ 1.0, set 6)" ) +GAME_CUSTOM( 199?, m4buc__ay, m4buc, "br_sjbt_.1_1", 0x000000, 0x020000, CRC(00f9581e) SHA1(1461539f501250a08bf66e4a94e4b84113dc0dc5), "Bwb","Buccaneer (Barcrest) (MPU4) (BR_ 1.0, set 7)" ) +GAME_CUSTOM( 199?, m4buc__az, m4buc, "br_sjwb_.1_1", 0x000000, 0x020000, CRC(d15cb680) SHA1(4ab485eb2d1d57c690926e430e0c8b2af045381d), "Bwb","Buccaneer (Barcrest) (MPU4) (BR_ 1.0, set 8)" ) +GAME_CUSTOM( 199?, m4buc__n, m4buc, "buccaneer5-15sw.bin", 0x000000, 0x020000, CRC(9b92d1f6) SHA1(d374fe966a1b039c971f278ab1113640e7629233), "Bwb","Buccaneer (Barcrest) (MPU4) (BR_ 1.0, set 9)" ) +// no copyright string and "BUG 0.4" +GAME_CUSTOM( 199?, m4buc__a, m4buc, "bucc15g", 0x000000, 0x020000, CRC(63dd1180) SHA1(a557af6927744b4ce2773c70db5ce1a7708ceb2c), "hack","Buccaneer (Barcrest) (MPU4) (BUG 0.4, hack)" ) +// no copyright string and "BUS 0.1" +GAME_CUSTOM( 199?, m4buc__b, m4buc, "bucc15t", 0x000000, 0x020000, CRC(66104749) SHA1(4b5a9a3f1409e207cad42ea29a205a18facf57ab), "hack","Buccaneer (Barcrest) (MPU4) (BUS 0.1, hack)" ) + + +// These were mixed in Hyper Viper and Super Hyper Viper sets, not sure if the software is actually different, maybe the Bwb rebuilds were 'Super' ? #undef GAME_CUSTOM #define GAME_CUSTOM(year, setname,parent,name,offset,length,hash,company,title) \ @@ -3673,29 +3975,58 @@ GAME_CUSTOM( 199?, m4buc__az, m4buc, "br_sjwb_.1_1", 0x000000, 0x020000 ROM_END \ GAME(year, setname, parent ,mod2 ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4hypvip, 0, "5p4hypervyper.bin", 0x0000, 0x010000, CRC(51ac9288) SHA1(1580079b6e710506ab03e1d8a89af65cd06cedd2), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4hypvip__a, m4hypvip, "h.viper10p610m.bin", 0x0000, 0x010000, CRC(104b0c48) SHA1(ab4cdb596a0cfb877ed1b6bf801e4a759b53971f), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4hypvip__b, m4hypvip, "h6yc.p1", 0x0000, 0x010000, CRC(8faca3bc) SHA1(9d666371f1118ccb1a94bfc4e6c79b540a84842b), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 3)" ) +// "(C)1991 BARCREST" and "H6Y 0.3" +GAME_CUSTOM( 199?, m4hypvip, 0, "h6ys.p1", 0x0000, 0x010000, CRC(4af914ff) SHA1(3d9b7c65ec1129ee64e3f4e14e43e4c39c76166b), "Barcrest","Hyper Viper (Barcrest) (MPU4) (H6Y 0.3, set 1)" ) +GAME_CUSTOM( 199?, m4hypvip__e, m4hypvip, "h6yc.p1", 0x0000, 0x010000, CRC(8faca3bc) SHA1(9d666371f1118ccb1a94bfc4e6c79b540a84842b), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4hypvip__c, m4hypvip, "h6yd.p1", 0x0000, 0x010000, CRC(862e7f5b) SHA1(2f5bbc31978fb9fd0ba17f0de220152da87cf06f), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 4)" ) GAME_CUSTOM( 199?, m4hypvip__d, m4hypvip, "h6yk.p1", 0x0000, 0x010000, CRC(51f43c88) SHA1(d6ee4f537d09b33e9b13c972e1bda01a28f54f8e), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4hypvip__e, m4hypvip, "h6ys.p1", 0x0000, 0x010000, CRC(4af914ff) SHA1(3d9b7c65ec1129ee64e3f4e14e43e4c39c76166b), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 6)" ) GAME_CUSTOM( 199?, m4hypvip__f, m4hypvip, "h6yy.p1", 0x0000, 0x010000, CRC(bed4b3bb) SHA1(7c592fbc6541c03777ff0498db90c575b3193222), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4hypvip__g, m4hypvip, "hv056c", 0x0000, 0x010000, CRC(91dcef99) SHA1(8fb6245fa8731b58799c0d2edc0e6c6942984a6f), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4hypvip__h, m4hypvip, "hv05_101", 0x0000, 0x010000, CRC(e1fa633d) SHA1(3f446c3396142631141cf85db507f3ae288847e3), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4hypvip__i, m4hypvip, "hv108c", 0x0000, 0x010000, CRC(4d40ebfe) SHA1(0e355fe5b185ba595c5040335956037b8ed21599), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4hypvip__j, m4hypvip, "hv10_101", 0x0000, 0x010000, CRC(57714454) SHA1(de99f5a66081191a7280c54e875fd17cc94e111b), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4hypvip__k, m4hypvip, "hv20_101", 0x0000, 0x010000, CRC(b2ab79c9) SHA1(fd097b5b062d725fa0607117d6b52be6cbf7e597), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4hypvip__l, m4hypvip, "hvyp10p", 0x0000, 0x010000, CRC(b4af635a) SHA1(420cdf3a6899e432d74e3b10a57414cbedc0913e), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4hypvip__m, m4hypvip, "hvyp56c", 0x0000, 0x010000, CRC(297d3cf8) SHA1(78f4de2ed69fb38b944a54d4d5927ff791e7876c), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4hypvip__n, m4hypvip, "hvypr206", 0x0000, 0x010000, CRC(e1d96b8c) SHA1(e21b1bdbca1bae41f0e7274e3521f99eb984759e), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4hypvip__o, m4hypvip, "hyp55", 0x0000, 0x010000, CRC(07bd7455) SHA1(0d0a017c90e8d28500594f55c9a60dfc08aff5c3), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4hypvip__p, m4hypvip, "hypr58c", 0x0000, 0x010000, CRC(d6028f8f) SHA1(54a3188ddb5196808a1161a0e1e6a8c1fe8bfde3), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4hypvip__q, m4hypvip, "hvip_05_.8", 0x0000, 0x010000, CRC(625f1b9d) SHA1(f8dc0cde774f3fc4fb3d66d014ad47e9576c0f44), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4hypvip__r, m4hypvip, "hvip_10_.8", 0x0000, 0x010000, CRC(f91d7fec) SHA1(4c8130f9ce0ee3b14744e2b3cab79d4a65767e78), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4hypvip__s, m4hypvip, "hvip_20_.8", 0x0000, 0x010000, CRC(61a608c7) SHA1(1ed98c8bd90a3a789ba00b6b39f49e3aa0fcb1ca), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4hypvip__t, m4hypvip, "hypv_05_.4", 0x0000, 0x010000, CRC(246f171c) SHA1(7bbefb0cae57cf8097aa6d033df1a428e8bfe744), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4hypvip__u, m4hypvip, "hypv_10_.4", 0x0000, 0x010000, CRC(f85d21a1) SHA1(55ed92147335a1471b7b443f68dd700f579d21f3), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4hypvip__v, m4hypvip, "hypv_20_.4", 0x0000, 0x010000, CRC(27a0162b) SHA1(2d1342edbfa29c4f2ee1f1a825f3eeb0489fbaf5), "Barcrest","Hyper Viper (Barcrest) (MPU4) (set 23)" ) +GAME_CUSTOM( 199?, m4suphv, m4hypvip, "hyperviper.bin", 0x0000, 0x010000, CRC(8373f6a3) SHA1(79bff20ab80ffe11447595c6fe8e5ab90d432e17), "Barcrest","Hyper Viper (Barcrest) (MPU4) (H6Y 0.3, set 2)" ) // hack? +// "(C)1991 BARCREST" and "H6Y 0.3" (but hack, doesn't want usual characterizer) +GAME_CUSTOM( 199?, m4hypvip__k, m4hypvip, "hv20_101", 0x0000, 0x010000, CRC(b2ab79c9) SHA1(fd097b5b062d725fa0607117d6b52be6cbf7e597), "hack","Hyper Viper (Barcrest) (MPU4) (H6Y 0.3, hack, set 1)" ) +GAME_CUSTOM( 199?, m4hypvip__s, m4hypvip, "hvip_20_.8", 0x0000, 0x010000, CRC(61a608c7) SHA1(1ed98c8bd90a3a789ba00b6b39f49e3aa0fcb1ca), "hack","Hyper Viper (Barcrest) (MPU4) (H6Y 0.3, hack, set 2)" ) +GAME_CUSTOM( 199?, m4hypvip__v, m4hypvip, "hypv_20_.4", 0x0000, 0x010000, CRC(27a0162b) SHA1(2d1342edbfa29c4f2ee1f1a825f3eeb0489fbaf5), "hack","Hyper Viper (Barcrest) (MPU4) (H6Y 0.3, hack, set 3)" ) +// "(C)1991 BARCREST" and "H6Y 0.2" +GAME_CUSTOM( 199?, m4hypvip__n, m4hypvip, "hvypr206", 0x0000, 0x010000, CRC(e1d96b8c) SHA1(e21b1bdbca1bae41f0e7274e3521f99eb984759e), "Barcrest","Hyper Viper (Barcrest) (MPU4) (H6Y 0.2 Y)" ) +// "(C)1993 B.W.B." and "HVP 3.0" +GAME_CUSTOM( 199?, m4hypvip__l, m4hypvip, "hvyp10p", 0x0000, 0x010000, CRC(b4af635a) SHA1(420cdf3a6899e432d74e3b10a57414cbedc0913e), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVP 3.0, set 1)" ) +GAME_CUSTOM( 199?, m4suphv__a, m4hypvip, "hv_05___.3h3", 0x0000, 0x010000, CRC(13bfa891) SHA1(ffddd14a019d52029bf8d4f680d8d05413a9f0b7), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVP 3.0, set 2)" ) +GAME_CUSTOM( 199?, m4suphv__d, m4hypvip, "hv_05_d_.3h3", 0x0000, 0x010000, CRC(50c66ce8) SHA1(ef12525fc3ac82caf80326edaac81bb9fbc3245c), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVP 3.0, set 3)" ) +GAME_CUSTOM( 199?, m4suphv__g, m4hypvip, "hv_10___.3h3", 0x0000, 0x010000, CRC(627caac7) SHA1(4851ce2441850743ea68ecbf89bde3f4cd6c2b4c), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVP 3.0, set 4)" ) +GAME_CUSTOM( 199?, m4suphv__i, m4hypvip, "hv_10_d_.3h3", 0x0000, 0x010000, CRC(15cfa26e) SHA1(6bc3feaba65d1797b9945f23a89e983f56b13f79), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVP 3.0, set 5)" ) +GAME_CUSTOM( 199?, m4suphv__j, m4hypvip, "hv_10_d_.3n3", 0x0000, 0x010000, CRC(b81f1d0a) SHA1(5fd293be2b75393069c9f5e099b4700ff930f081), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVP 3.0, set 6)" ) +GAME_CUSTOM( 199?, m4suphv__l, m4hypvip, "hvi05___.3h3", 0x0000, 0x010000, CRC(6959332e) SHA1(edaa5f86ad4389b0a3bc2e6679fe8f62520be3ae), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVP 3.0, set 7)" ) +GAME_CUSTOM( 199?, m4suphv__o, m4hypvip, "hvi10___.3h3", 0x0000, 0x010000, CRC(6c1b4b89) SHA1(e8eb4e689d43c5b9e8354aa7375ca3ba12ed1160), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVP 3.0, set 8)" ) +GAME_CUSTOM( 199?, m4suphv__p, m4hypvip, "hvi10___.3n3", 0x0000, 0x010000, CRC(9d95cf8c) SHA1(26daf3975e1e3a605bc4392700c5470b52450d6e), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVP 3.0, set 9)" ) +// "(C)1993 B.W.B." and "HVP 4.0" +GAME_CUSTOM( 199?, m4suphv__c, m4hypvip, "hv_05___.4n3", 0x0000, 0x010000, CRC(f607f351) SHA1(d7b779b80fa964a27b106bd9d5ca3be16a11d5e9), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVP 4.0, set 1)" ) +GAME_CUSTOM( 199?, m4suphv__f, m4hypvip, "hv_05_d_.4n3", 0x0000, 0x010000, CRC(f4d702d7) SHA1(268c7f6443c7ae587caf5b227fcd438530a06bcc), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVP 4.0, set 2)" ) +GAME_CUSTOM( 199?, m4suphv__n, m4hypvip, "hvi05___.4n3", 0x0000, 0x010000, CRC(38a33c2b) SHA1(21004092b81e08146291fd3a025652f0edbe47dc), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVP 4.0, set 3)" ) +// "(C)1994 B.W.B." and "HVP 3.0" +GAME_CUSTOM( 199?, m4hypvip__a, m4hypvip, "h.viper10p610m.bin", 0x0000, 0x010000, CRC(104b0c48) SHA1(ab4cdb596a0cfb877ed1b6bf801e4a759b53971f), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVP 3.0, 1994, C)" ) +GAME_CUSTOM( 199?, m4hypvip__m, m4hypvip, "hvyp56c", 0x0000, 0x010000, CRC(297d3cf8) SHA1(78f4de2ed69fb38b944a54d4d5927ff791e7876c), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVP 3.0, 1994, C, bad?)" ) // bad rom? checksum alarm +GAME_CUSTOM( 199?, m4suphv__b, m4hypvip, "hv_05___.3o3", 0x0000, 0x010000, CRC(9ae86366) SHA1(614ae0ab184645c9f568796783f29a177eda3208), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVP 3.0, 1994, set 1)" ) +GAME_CUSTOM( 199?, m4suphv__e, m4hypvip, "hv_05_d_.3o3", 0x0000, 0x010000, CRC(87dfca0e) SHA1(3ab4105680acc46d3633a722f40ff1af0a520a7f), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVP 3.0, 1994, set 2)" ) +GAME_CUSTOM( 199?, m4suphv__h, m4hypvip, "hv_10___.3o3", 0x0000, 0x010000, CRC(02e4d86a) SHA1(47aa83e8bcd85e8ba7fb972cdd1ead7fe21e0418), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVP 3.0, 1994, set 3)" ) +GAME_CUSTOM( 199?, m4suphv__k, m4hypvip, "hv_10_d_.3o3", 0x0000, 0x010000, CRC(85f176b9) SHA1(30380d58bf2834829764cbdbdc7d950632e61e6d), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVP 3.0, 1994, set 4)" ) +GAME_CUSTOM( 199?, m4suphv__m, m4hypvip, "hvi05___.3o3", 0x0000, 0x010000, CRC(cdba80a5) SHA1(6c9fac7e5ee324b18922cc7a053495f1977bcb6d), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVP 3.0, 1994, set 5)" ) + // "(C)1995 B.W.B." and "HVC 1.0" +GAME_CUSTOM( 199?, m4hypvip__b, m4hypvip, "5p4hypervyper.bin", 0x0000, 0x010000, CRC(51ac9288) SHA1(1580079b6e710506ab03e1d8a89af65cd06cedd2), "Bwb","Hyper Viper (Barcrest) (MPU4) (HVC 1.0 C)" ) +// no copyright string and "HVP 3.0" +GAME_CUSTOM( 199?, m4hypvip__g, m4hypvip, "hv056c", 0x0000, 0x010000, CRC(91dcef99) SHA1(8fb6245fa8731b58799c0d2edc0e6c6942984a6f), "hack","Hyper Viper (Barcrest) (MPU4) (HVP 3.0 C, hack, set 1)" ) +GAME_CUSTOM( 199?, m4hypvip__h, m4hypvip, "hv05_101", 0x0000, 0x010000, CRC(e1fa633d) SHA1(3f446c3396142631141cf85db507f3ae288847e3), "hack","Hyper Viper (Barcrest) (MPU4) (HVP 3.0 C, hack, set 2)" ) +GAME_CUSTOM( 199?, m4hypvip__o, m4hypvip, "hyp55", 0x0000, 0x010000, CRC(07bd7455) SHA1(0d0a017c90e8d28500594f55c9a60dfc08aff5c3), "hack","Hyper Viper (Barcrest) (MPU4) (HVP 3.0 C, hack, set 3)" ) +GAME_CUSTOM( 199?, m4hypvip__p, m4hypvip, "hypr58c", 0x0000, 0x010000, CRC(d6028f8f) SHA1(54a3188ddb5196808a1161a0e1e6a8c1fe8bfde3), "hack","Hyper Viper (Barcrest) (MPU4) (HVP 3.0 C, hack, set 4)" ) +GAME_CUSTOM( 199?, m4hypvip__t, m4hypvip, "hypv_05_.4", 0x0000, 0x010000, CRC(246f171c) SHA1(7bbefb0cae57cf8097aa6d033df1a428e8bfe744), "hack","Hyper Viper (Barcrest) (MPU4) (HVP 3.0 C, hack, set 5)" ) +GAME_CUSTOM( 199?, m4hypvip__q, m4hypvip, "hvip_05_.8", 0x0000, 0x010000, CRC(625f1b9d) SHA1(f8dc0cde774f3fc4fb3d66d014ad47e9576c0f44), "hack","Hyper Viper (Barcrest) (MPU4) (HVP 3.0, hack, set 1)" ) +// "DICK WAS ERE" and "HVP 3.0" +GAME_CUSTOM( 199?, m4hypvip__i, m4hypvip, "hv108c", 0x0000, 0x010000, CRC(4d40ebfe) SHA1(0e355fe5b185ba595c5040335956037b8ed21599), "hack","Hyper Viper (Barcrest) (MPU4) (HVP 3.0 C, hack, set 6)" ) +GAME_CUSTOM( 199?, m4hypvip__j, m4hypvip, "hv10_101", 0x0000, 0x010000, CRC(57714454) SHA1(de99f5a66081191a7280c54e875fd17cc94e111b), "hack","Hyper Viper (Barcrest) (MPU4) (HVP 3.0 C, hack, set 7)" ) +GAME_CUSTOM( 199?, m4hypvip__u, m4hypvip, "hypv_10_.4", 0x0000, 0x010000, CRC(f85d21a1) SHA1(55ed92147335a1471b7b443f68dd700f579d21f3), "hack","Hyper Viper (Barcrest) (MPU4) (HVP 3.0 C, hack, set 8)" ) +GAME_CUSTOM( 199?, m4hypvip__r, m4hypvip, "hvip_10_.8", 0x0000, 0x010000, CRC(f91d7fec) SHA1(4c8130f9ce0ee3b14744e2b3cab79d4a65767e78), "hack","Hyper Viper (Barcrest) (MPU4) (HVP 3.0, hack, set 2)" ) + + + #define M4JWLCWN_EXTRA_ROMS \ @@ -3715,7 +4046,8 @@ GAME_CUSTOM( 199?, m4hypvip__v, m4hypvip, "hypv_20_.4", 0x0000, 0 GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4jwlcwn, 0, "cje0.8", 0x0000, 0x020000, CRC(2074bf61) SHA1(d84201fb7d2590b16816e0369e89789d02088a6d), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 1)" ) +// "(C)1993 BARCREST" and "CJE 1.0" +GAME_CUSTOM( 199?, m4jwlcwn, 0, "cje10s.p1", 0x0000, 0x020000, CRC(5f3b72b7) SHA1(8faf0de0282a67c88170c13856b8816c38396e19), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (CJE 1.0)" ) GAME_CUSTOM( 199?, m4jwlcwn__a, m4jwlcwn, "cje10ad.p1", 0x0000, 0x020000, CRC(b245d706) SHA1(704cc3bcae099c71dcc2bd96095cb4b48857a23a), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4jwlcwn__b, m4jwlcwn, "cje10b.p1", 0x0000, 0x020000, CRC(0ef3387b) SHA1(852bdac93fb448089633133a546bdb8da4d6887b), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4jwlcwn__c, m4jwlcwn, "cje10bd.p1", 0x0000, 0x020000, CRC(3f5f79c3) SHA1(a89502dae9843fddd471fd5eb1d39e84d7124c7e), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 4)" ) @@ -3726,8 +4058,11 @@ GAME_CUSTOM( 199?, m4jwlcwn__g, m4jwlcwn, "cje10dr.p1", 0x0000, 0x020000, GAME_CUSTOM( 199?, m4jwlcwn__h, m4jwlcwn, "cje10dy.p1", 0x0000, 0x020000, CRC(f27bf16b) SHA1(f6c6986ed96c9fca90f94921fb984e58425179b9), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4jwlcwn__i, m4jwlcwn, "cje10k.p1", 0x0000, 0x020000, CRC(4434902d) SHA1(31c7be1235cdfd00099d1e09644a0f76fc7a26f7), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 10)" ) GAME_CUSTOM( 199?, m4jwlcwn__j, m4jwlcwn, "cje10r.p1", 0x0000, 0x020000, CRC(f73b2b1c) SHA1(bd9ee8047b4b0cc30b92d5460d34fa2628a72dde), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4jwlcwn__k, m4jwlcwn, "cje10s.p1", 0x0000, 0x020000, CRC(5f3b72b7) SHA1(8faf0de0282a67c88170c13856b8816c38396e19), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 12)" ) GAME_CUSTOM( 199?, m4jwlcwn__l, m4jwlcwn, "cje10y.p1", 0x0000, 0x020000, CRC(c3d7b0d3) SHA1(5c314fcaab08e7a551e6ad7a2e0fa08a03d4c80d), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 13)" ) +// "(C)1993 BARCREST" and "CJE 0.8" +GAME_CUSTOM( 199?, m4jwlcwn__k, m4jwlcwn, "cje0.8", 0x0000, 0x020000, CRC(2074bf61) SHA1(d84201fb7d2590b16816e0369e89789d02088a6d), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (CJE 0.8 Y)" ) +// "(C)1993 BARCREST" and "CJH 1.0" +GAME_CUSTOM( 199?, m4jwlcwn__w, m4jwlcwn, "cjh10s.p1", 0x0000, 0x020000, CRC(eb22d1bb) SHA1(4a8c19a8c71ef018f1fae146ba60632a94d895fc), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (CJH 1.0)" ) GAME_CUSTOM( 199?, m4jwlcwn__m, m4jwlcwn, "cjh10ad.p1", 0x0000, 0x020000, CRC(db6a3f77) SHA1(9986150dd84839ea726405dec1b731b0477d1d29), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 14)" ) GAME_CUSTOM( 199?, m4jwlcwn__n, m4jwlcwn, "cjh10b.p1", 0x0000, 0x020000, CRC(67009ea4) SHA1(84e97bcb23ba876e33976a6081f24561e0b3faac), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 15)" ) GAME_CUSTOM( 199?, m4jwlcwn__o, m4jwlcwn, "cjh10bd.p1", 0x0000, 0x020000, CRC(567091b2) SHA1(8b7f33802e03d7e4ede06d345afedf8631f69412), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 16)" ) @@ -3738,17 +4073,25 @@ GAME_CUSTOM( 199?, m4jwlcwn__s, m4jwlcwn, "cjh10dr.p1", 0x0000, 0x020000, GAME_CUSTOM( 199?, m4jwlcwn__t, m4jwlcwn, "cjh10dy.p1", 0x0000, 0x020000, CRC(9b54191a) SHA1(ae01b3842ab83572abc4966e94956623103b2bda), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 21)" ) GAME_CUSTOM( 199?, m4jwlcwn__u, m4jwlcwn, "cjh10k.p1", 0x0000, 0x020000, CRC(2dc736f2) SHA1(eae27aad3faca98c3dc0873cd00f3babe4d67302), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 22)" ) GAME_CUSTOM( 199?, m4jwlcwn__v, m4jwlcwn, "cjh10r.p1", 0x0000, 0x020000, CRC(9ec88dc3) SHA1(01016ca0785a11e800fbddb7a7cc7e4be6ffdb09), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4jwlcwn__w, m4jwlcwn, "cjh10s.p1", 0x0000, 0x020000, CRC(eb22d1bb) SHA1(4a8c19a8c71ef018f1fae146ba60632a94d895fc), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 24)" ) GAME_CUSTOM( 199?, m4jwlcwn__x, m4jwlcwn, "cjh10y.p1", 0x0000, 0x020000, CRC(aa24160c) SHA1(2014420ce92297dbe1ef286d801c25aa67976b2e), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4jwlcwn__y, m4jwlcwn, "jewel15g", 0x0000, 0x020000, CRC(bf3b8b63) SHA1(1ee91745438b9458ffbd43380bf9c6fd784fd054), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4jwlcwn__z, m4jwlcwn, "jewel15t", 0x0000, 0x020000, CRC(5828fd3b) SHA1(be95d5c3c9729547dcb0815c868e8d654826e34e), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4jwlcwn__0, m4jwlcwn, "jitc2010", 0x0000, 0x020000, CRC(1c946895) SHA1(43215c4099197a67bf0a6100e3dc3b81759cfc76), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4jwlcwn__1, m4jwlcwn, "jc__x___.4_1", 0x0000, 0x020000, CRC(5bf060ca) SHA1(a13795b145ff230437764f5414ec443e8fe4d783), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 29)" ) -GAME_CUSTOM( 199?, m4jwlcwn__2, m4jwlcwn, "jc__x__c.3_1", 0x0000, 0x020000, CRC(b5e11e92) SHA1(87d7febf350ff7e4175bb6b8544181de66415e12), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 30)" ) -GAME_CUSTOM( 199?, m4jwlcwn__3, m4jwlcwn, "jc__xa_4.3_1", 0x0000, 0x020000, CRC(e6abb23e) SHA1(05b9286c4c1ec6364fd57d412336192ca61325a9), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 31)" ) -GAME_CUSTOM( 199?, m4jwlcwn__4, m4jwlcwn, "jc__xa_5.1_1", 0x0000, 0x020000, CRC(09f897c7) SHA1(5f6ad23f92b9fa4fdde57dd80317e1e998de9d54), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 32)" ) -GAME_CUSTOM( 199?, m4jwlcwn__5, m4jwlcwn, "jc__xa_8.4_1", 0x0000, 0x020000, CRC(27346ae8) SHA1(0fa13205e45e8dab0e1a25e6492ff2987633eb0f), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 33)" ) -GAME_CUSTOM( 199?, m4jwlcwn__6, m4jwlcwn, "jc_xx__c.3_1", 0x0000, 0x020000, CRC(0787fd51) SHA1(90fc71e0ea9b79d3296611c1e6f720150e17d51b), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (set 34)" ) +// "(C)1993 BARCREST" and "CJH 0.8" +GAME_CUSTOM( 199?, m4jwlcwn__0, m4jwlcwn, "jitc2010", 0x0000, 0x020000, CRC(1c946895) SHA1(43215c4099197a67bf0a6100e3dc3b81759cfc76), "Barcrest","Jewel In the Crown (Barcrest) (MPU4) (CJH 0.8)" ) +// "(C)1997 B.W.B." and "JC8 4.4" +GAME_CUSTOM( 199?, m4jwlcwn__1, m4jwlcwn, "jc__x___.4_1", 0x0000, 0x020000, CRC(5bf060ca) SHA1(a13795b145ff230437764f5414ec443e8fe4d783), "Bwb","Jewel In the Crown (Barcrest) (MPU4) (JC8 4.4)" ) +// "(C)1997 B.W.B." and "JCC 3.3" +GAME_CUSTOM( 199?, m4jwlcwn__2, m4jwlcwn, "jc__x__c.3_1", 0x0000, 0x020000, CRC(b5e11e92) SHA1(87d7febf350ff7e4175bb6b8544181de66415e12), "Bwb","Jewel In the Crown (Barcrest) (MPU4) (JCC 3.3)" ) +// "(C)1997 B.W.B." and "JC4 3.1" +GAME_CUSTOM( 199?, m4jwlcwn__3, m4jwlcwn, "jc__xa_4.3_1", 0x0000, 0x020000, CRC(e6abb23e) SHA1(05b9286c4c1ec6364fd57d412336192ca61325a9), "Bwb","Jewel In the Crown (Barcrest) (MPU4) (JC4 3.1)" ) +// "(C)1997 B.W.B." and "JC5 1.9" +GAME_CUSTOM( 199?, m4jwlcwn__4, m4jwlcwn, "jc__xa_5.1_1", 0x0000, 0x020000, CRC(09f897c7) SHA1(5f6ad23f92b9fa4fdde57dd80317e1e998de9d54), "Bwb","Jewel In the Crown (Barcrest) (MPU4) (JC5 1.9)" ) +// "(C)1997 B.W.B." and "JC8 4.2" +GAME_CUSTOM( 199?, m4jwlcwn__5, m4jwlcwn, "jc__xa_8.4_1", 0x0000, 0x020000, CRC(27346ae8) SHA1(0fa13205e45e8dab0e1a25e6492ff2987633eb0f), "Bwb","Jewel In the Crown (Barcrest) (MPU4) (JC8 4.2)" ) +// "(C)1997 B.W.B." and "JCC 3.7" +GAME_CUSTOM( 199?, m4jwlcwn__6, m4jwlcwn, "jc_xx__c.3_1", 0x0000, 0x020000, CRC(0787fd51) SHA1(90fc71e0ea9b79d3296611c1e6f720150e17d51b), "Bwb","Jewel In the Crown (Barcrest) (MPU4) (JCC 3.7)" ) +// no copyright string and "CJH 1.0" +GAME_CUSTOM( 199?, m4jwlcwn__y, m4jwlcwn, "jewel15g", 0x0000, 0x020000, CRC(bf3b8b63) SHA1(1ee91745438b9458ffbd43380bf9c6fd784fd054), "hack","Jewel In the Crown (Barcrest) (MPU4) (CJH 1.0, hack)" ) +// no copyright string and "CJE 1.0" +GAME_CUSTOM( 199?, m4jwlcwn__z, m4jwlcwn, "jewel15t", 0x0000, 0x020000, CRC(5828fd3b) SHA1(be95d5c3c9729547dcb0815c868e8d654826e34e), "hack","Jewel In the Crown (Barcrest) (MPU4) (CJE 1.0, hack)" ) #define M4BAGTEL_EXTRA_ROMS \ @@ -3764,14 +4107,18 @@ GAME_CUSTOM( 199?, m4jwlcwn__6, m4jwlcwn, "jc_xx__c.3_1", 0x0000, 0x020000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4bagtel, 0, "bgt05s.p1", 0x0000, 0x010000, CRC(ddf1c7dc) SHA1(a786e5e04538ce498493795fc4054bb5de57ffd2), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4bagtel__a, m4bagtel, "bg201c.p1", 0x0000, 0x010000, CRC(ee9bf501) SHA1(5c6ee55cfac5bb92695b412fe56f4c843dcae424), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4bagtel__b, m4bagtel, "bg201dy.p1", 0x0000, 0x010000, CRC(c4916bc0) SHA1(7600a5be6ff235d19f7c99b44b86054555b43638), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4bagtel__c, m4bagtel, "bg201s.p1", 0x0000, 0x010000, CRC(639b078b) SHA1(0c5d270457b2ae88c3885838f96ce29824996e77), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 4)" ) +// "(C)1991 BARCREST" and "BGT 0.5" +GAME_CUSTOM( 199?, m4bagtel, 0, "bgt05s.p1", 0x0000, 0x010000, CRC(ddf1c7dc) SHA1(a786e5e04538ce498493795fc4054bb5de57ffd2), "Barcrest","Bagatelle (Barcrest) (MPU4) (BGT 0.5)" ) GAME_CUSTOM( 199?, m4bagtel__d, m4bagtel, "bgt05dk.p1", 0x0000, 0x010000, CRC(4acaf68d) SHA1(fb7e04c8201829c252add05599218fb2b32c8533), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 5)" ) GAME_CUSTOM( 199?, m4bagtel__e, m4bagtel, "bgt05k.p1", 0x0000, 0x010000, CRC(72eb14ad) SHA1(18f9dbc5fd85e14d507b4c69d03d01f24aabb325), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 6)" ) GAME_CUSTOM( 199?, m4bagtel__f, m4bagtel, "bgt05r.p1", 0x0000, 0x010000, CRC(e92ad743) SHA1(649496429572a339dea50e262b7eb2ef22273bea), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 7)" ) GAME_CUSTOM( 199?, m4bagtel__g, m4bagtel, "bgt05y.p1", 0x0000, 0x010000, CRC(f2508bfa) SHA1(936fb79d5d953d1e2138a55754cbd364d3c307ed), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 8)" ) +// "(C)1991 BARCREST" and "BG2 0.1" +GAME_CUSTOM( 199?, m4bagtel__c, m4bagtel, "bg201s.p1", 0x0000, 0x010000, CRC(639b078b) SHA1(0c5d270457b2ae88c3885838f96ce29824996e77), "Barcrest","Bagatelle (Barcrest) (MPU4) (BG2 0.1)" ) +GAME_CUSTOM( 199?, m4bagtel__a, m4bagtel, "bg201c.p1", 0x0000, 0x010000, CRC(ee9bf501) SHA1(5c6ee55cfac5bb92695b412fe56f4c843dcae424), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 2)" ) +GAME_CUSTOM( 199?, m4bagtel__b, m4bagtel, "bg201dy.p1", 0x0000, 0x010000, CRC(c4916bc0) SHA1(7600a5be6ff235d19f7c99b44b86054555b43638), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 3)" ) +// "(C)1991 BARCREST" and "EL1 0.1" +GAME_CUSTOM( 199?, m4bagtel__r, m4bagtel, "el101s.p1", 0x0000, 0x010000, CRC(2035faf2) SHA1(1b640fee2f0ace25dfaa702ab2602cdec5ab6018), "Barcrest","Bagatelle (Barcrest) (MPU4) (EL1 0.1)" ) GAME_CUSTOM( 199?, m4bagtel__h, m4bagtel, "el101ad.p1", 0x0000, 0x010000, CRC(fcb39192) SHA1(a604122e40c313ed240f722a48f56d1478754ed3), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4bagtel__i, m4bagtel, "el101b.p1", 0x0000, 0x010000, CRC(947548b4) SHA1(dc74fa15843ec4c34f5bd7269b041ed4406832c2), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 10)" ) GAME_CUSTOM( 199?, m4bagtel__j, m4bagtel, "el101bd.p1", 0x0000, 0x010000, CRC(338664f4) SHA1(074261acbf0611d7d54f2718eed04ef6eda81b50), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 11)" ) @@ -3782,8 +4129,9 @@ GAME_CUSTOM( 199?, m4bagtel__n, m4bagtel, "el101dr.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4bagtel__o, m4bagtel, "el101dy.p1", 0x0000, 0x010000, CRC(81e29484) SHA1(3ac48cef176df5d4ab3b00dc9366f7c9192c8c77), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 16)" ) GAME_CUSTOM( 199?, m4bagtel__p, m4bagtel, "el101k.p1", 0x0000, 0x010000, CRC(0dd7427e) SHA1(83373dca6ec50a03506bda2c220949b2d2f0a7db), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 17)" ) GAME_CUSTOM( 199?, m4bagtel__q, m4bagtel, "el101r.p1", 0x0000, 0x010000, CRC(6299ff71) SHA1(137842a886fb4790571b94d94199b362cd86bc3c), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4bagtel__r, m4bagtel, "el101s.p1", 0x0000, 0x010000, CRC(2035faf2) SHA1(1b640fee2f0ace25dfaa702ab2602cdec5ab6018), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 19)" ) GAME_CUSTOM( 199?, m4bagtel__s, m4bagtel, "el101y.p1", 0x0000, 0x010000, CRC(fff2d79f) SHA1(5d1142d8d96803c8b4ddba43283e21bab3a0b598), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 20)" ) +// "(C)1991 BARCREST" and "EL2 0.1" +GAME_CUSTOM( 199?, m4bagtel__3, m4bagtel, "el201s.p1", 0x0000, 0x010000, CRC(87280546) SHA1(f7af53fc1c5e98897c36eaec013f13b1da283c53), "Barcrest","Bagatelle (Barcrest) (MPU4) (EL2 0.1)" ) GAME_CUSTOM( 199?, m4bagtel__t, m4bagtel, "el201ad.p1", 0x0000, 0x010000, CRC(7ebf37ba) SHA1(d6d09d707458aa8a17507e3a1a396569b1eaef4d), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 21)" ) GAME_CUSTOM( 199?, m4bagtel__u, m4bagtel, "el201b.p1", 0x0000, 0x010000, CRC(ed9c0546) SHA1(8884420caa7bd9347d882f79f05288c2581026b1), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 22)" ) GAME_CUSTOM( 199?, m4bagtel__v, m4bagtel, "el201bd.p1", 0x0000, 0x010000, CRC(48a35af0) SHA1(17a8f4c178a744dd4b7ab16388a9622f335e3a79), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 23)" ) @@ -3794,8 +4142,9 @@ GAME_CUSTOM( 199?, m4bagtel__z, m4bagtel, "el201dr.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4bagtel__0, m4bagtel, "el201dy.p1", 0x0000, 0x010000, CRC(16a93996) SHA1(b151e4f16d0d78cd6651976d7108d3e8e8a17696), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 28)" ) GAME_CUSTOM( 199?, m4bagtel__1, m4bagtel, "el201k.p1", 0x0000, 0x010000, CRC(4fb93561) SHA1(ec4575ff6243a6402db7286826197262821d52e4), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 29)" ) GAME_CUSTOM( 199?, m4bagtel__2, m4bagtel, "el201r.p1", 0x0000, 0x010000, CRC(118e1494) SHA1(dc5d4a06d99c2855fd737178e0df19a5b6eb422b), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 30)" ) -GAME_CUSTOM( 199?, m4bagtel__3, m4bagtel, "el201s.p1", 0x0000, 0x010000, CRC(87280546) SHA1(f7af53fc1c5e98897c36eaec013f13b1da283c53), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 31)" ) GAME_CUSTOM( 199?, m4bagtel__4, m4bagtel, "el201y.p1", 0x0000, 0x010000, CRC(8ce53c7a) SHA1(cf6f863be222eec894da34a414c0a6dd0c8601d7), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 32)" ) +// "(C)1991 BARCREST" and "EL3 1.0" +GAME_CUSTOM( 199?, m4bagtel__af, m4bagtel, "el310s.p1", 0x0000, 0x010000, CRC(5e1cace4) SHA1(b78d8021ef91127f8a60cdcb458723de8925fba5), "Barcrest","Bagatelle (Barcrest) (MPU4) (EL3 1.0)" ) GAME_CUSTOM( 199?, m4bagtel__5, m4bagtel, "el310ad.p1", 0x0000, 0x010000, CRC(7029e664) SHA1(a4e0996710dc6c5cd2b6a79f83e08406a153a01d), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 33)" ) GAME_CUSTOM( 199?, m4bagtel__6, m4bagtel, "el310b.p1", 0x0000, 0x010000, CRC(aa10ed40) SHA1(0722be3c2c582b1179f3dafd4ed6c38f503ee17a), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 34)" ) GAME_CUSTOM( 199?, m4bagtel__7, m4bagtel, "el310bd.p1", 0x0000, 0x010000, CRC(b9204c03) SHA1(ecd3fcc301f5a7ce63b06dc4153b18602c405289), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 35)" ) @@ -3806,7 +4155,6 @@ GAME_CUSTOM( 199?, m4bagtel__ab, m4bagtel, "el310dr.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4bagtel__ac, m4bagtel, "el310dy.p1", 0x0000, 0x010000, CRC(41f1ac45) SHA1(b3fe09704de422ecc0f7632ec8b8bad646498cd3), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 40)" ) GAME_CUSTOM( 199?, m4bagtel__ad, m4bagtel, "el310k.p1", 0x0000, 0x010000, CRC(8bb4d65c) SHA1(f05b448e7ba9808fb3a1c1f25f4e50fc27549031), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 41)" ) GAME_CUSTOM( 199?, m4bagtel__ae, m4bagtel, "el310r.p1", 0x0000, 0x010000, CRC(0ea8a744) SHA1(2839dd86b54ed073765d97a82b056e20eb05f32f), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 42)" ) -GAME_CUSTOM( 199?, m4bagtel__af, m4bagtel, "el310s.p1", 0x0000, 0x010000, CRC(5e1cace4) SHA1(b78d8021ef91127f8a60cdcb458723de8925fba5), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 43)" ) GAME_CUSTOM( 199?, m4bagtel__ag, m4bagtel, "el310y.p1", 0x0000, 0x010000, CRC(9653f0c6) SHA1(188056b8b704f9b06f93144ce358ec47cc026902), "Barcrest","Bagatelle (Barcrest) (MPU4) (set 45)" ) @@ -3825,7 +4173,15 @@ GAME_CUSTOM( 199?, m4bagtel__ag, m4bagtel, "el310y.p1", 0x0000, 0x010000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4przwta, 0, "pwnr.p1", 0x0000, 0x020000, CRC(cf619ad2) SHA1(3eeccccb304afd5faf2563e0e65f8123e463d363), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (set 1)" ) +// "(C)1993 BARCREST" and "PWN 0.4" +GAME_CUSTOM( 199?, m4przwta, 0, "pwns.p1", 0x0000, 0x020000, CRC(b3b87954) SHA1(f998ebf8047930f006213040ed5e6a9f90844143), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (PWN 0.4)" ) +GAME_CUSTOM( 199?, m4przwta__p, m4przwta, "pwnr.p1", 0x0000, 0x020000, CRC(cf619ad2) SHA1(3eeccccb304afd5faf2563e0e65f8123e463d363), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (set 1)" ) +GAME_CUSTOM( 199?, m4przwta__l, m4przwta, "pwna.p1", 0x0000, 0x020000, CRC(bbb32770) SHA1(36815dca6550a1a417b3e809b041a7b4670f5b75), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (set 13)" ) +GAME_CUSTOM( 199?, m4przwta__m, m4przwta, "pwnb.p1", 0x0000, 0x020000, CRC(36a989b5) SHA1(631399c65b697417ed9a95961463b8349a97b142), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (set 14)" ) +GAME_CUSTOM( 199?, m4przwta__n, m4przwta, "pwndy.p1", 0x0000, 0x020000, CRC(6b739a41) SHA1(64f4b380c725f6159c6201147ab4062d6375d98b), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (set 15)" ) +GAME_CUSTOM( 199?, m4przwta__o, m4przwta, "pwnk.p1", 0x0000, 0x020000, CRC(7c6e21e3) SHA1(d6aeb5948e0800050193575a3b5c06c11f46eed8), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (set 16)" ) +// "(C)1993 BARCREST" and "PW8 0.2" +GAME_CUSTOM( 199?, m4przwta__j, m4przwta, "pw8s.p1", 0x0000, 0x020000, CRC(3d77c91d) SHA1(3ab79073f5d9c13f751892aa33c2668521887bf8), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (PW8 0.2)" ) GAME_CUSTOM( 199?, m4przwta__a, m4przwta, "pw8ad.p1", 0x0000, 0x020000, CRC(71257e43) SHA1(1db17aa1fc684873511a46e5e7421b459040d0cc), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4przwta__b, m4przwta, "pw8b.p1", 0x0000, 0x020000, CRC(52b2af18) SHA1(1ce00b94a2d16b5140a110e604b97af6860fd577), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4przwta__c, m4przwta, "pw8bd.p1", 0x0000, 0x020000, CRC(fc3fd086) SHA1(8fa8b75faf2196e87acbafc3a48a2ba628f6cc66), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (set 4)" ) @@ -3835,13 +4191,7 @@ GAME_CUSTOM( 199?, m4przwta__f, m4przwta, "pw8dk.p1", 0x0000, 0x020000, CRC GAME_CUSTOM( 199?, m4przwta__g, m4przwta, "pw8dy.p1", 0x0000, 0x020000, CRC(311b582e) SHA1(f53254b8c6f65087f67d60f0d0441228e1024cc8), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (set 8)" ) GAME_CUSTOM( 199?, m4przwta__h, m4przwta, "pw8j.p1", 0x0000, 0x020000, CRC(766739cb) SHA1(8b7cd7f02fb25f5e50febdb90c8f39f3a6840a35), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4przwta__i, m4przwta, "pw8k.p1", 0x0000, 0x020000, CRC(1875074e) SHA1(fb25c4ed4ba9d6aa5fb45a8ba9c73b18062173f0), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4przwta__j, m4przwta, "pw8s.p1", 0x0000, 0x020000, CRC(3d77c91d) SHA1(3ab79073f5d9c13f751892aa33c2668521887bf8), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4przwta__k, m4przwta, "pw8y.p1", 0x0000, 0x020000, CRC(9f9627b0) SHA1(19c9dc7033b1e85676222a8b3a866392a4afdd1e), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4przwta__l, m4przwta, "pwna.p1", 0x0000, 0x020000, CRC(bbb32770) SHA1(36815dca6550a1a417b3e809b041a7b4670f5b75), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4przwta__m, m4przwta, "pwnb.p1", 0x0000, 0x020000, CRC(36a989b5) SHA1(631399c65b697417ed9a95961463b8349a97b142), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4przwta__n, m4przwta, "pwndy.p1", 0x0000, 0x020000, CRC(6b739a41) SHA1(64f4b380c725f6159c6201147ab4062d6375d98b), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4przwta__o, m4przwta, "pwnk.p1", 0x0000, 0x020000, CRC(7c6e21e3) SHA1(d6aeb5948e0800050193575a3b5c06c11f46eed8), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4przwta__p, m4przwta, "pwns.p1", 0x0000, 0x020000, CRC(b3b87954) SHA1(f998ebf8047930f006213040ed5e6a9f90844143), "Barcrest","Prize Winner Takes All (Barcrest) (MPU4) (set 17)" ) #define M4BERSER_EXTRA_ROMS \ @@ -3856,8 +4206,17 @@ GAME_CUSTOM( 199?, m4przwta__p, m4przwta, "pwns.p1", 0x0000, 0x020000, CRC ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4berser, 0, "bess.p1", 0x0000, 0x010000, CRC(b95bafbe) SHA1(034c80ef5fd0a12fad918c9b01bafb9a99c2e991), "Barcrest","Berserk (Barcrest) (MPU4) (set 1)" ) +// "(C)1991 BARCREST" and "BES 0.6" +GAME_CUSTOM( 199?, m4berser, 0, "bess.p1", 0x0000, 0x010000, CRC(b95bafbe) SHA1(034c80ef5fd0a12fad918c9b01bafb9a99c2e991), "Barcrest","Berserk (Barcrest) (MPU4) (BES 0.6)" ) +GAME_CUSTOM( 199?, m4berser__u, m4berser, "besb.p1", 0x0000, 0x010000, CRC(a0aa05f9) SHA1(3831c07e9e33c83b2f7148a34037023433b49cd0), "Barcrest","Berserk (Barcrest) (MPU4) (set 22)" ) +GAME_CUSTOM( 199?, m4berser__v, m4berser, "besc.p1", 0x0000, 0x010000, CRC(3a7ea673) SHA1(469e104ca1008c274f2a58c3ec6e96b40e1b4fb6), "Barcrest","Berserk (Barcrest) (MPU4) (set 23)" ) +GAME_CUSTOM( 199?, m4berser__w, m4berser, "besd.p1", 0x0000, 0x010000, CRC(ac7daf9c) SHA1(9951cf3194bc5acc17044dfb4b854edb0cc2c090), "Barcrest","Berserk (Barcrest) (MPU4) (set 24)" ) +GAME_CUSTOM( 199?, m4berser__x, m4berser, "besdk.p1", 0x0000, 0x010000, CRC(f9d20012) SHA1(d3942406af0573a58e49a24f98b4e3c0a9ff508e), "Barcrest","Berserk (Barcrest) (MPU4) (set 25)" ) +GAME_CUSTOM( 199?, m4berser__y, m4berser, "besdy.p1", 0x0000, 0x010000, CRC(461ac51f) SHA1(217f169bd2bc4108145231e9b974d2f890a4f25e), "Barcrest","Berserk (Barcrest) (MPU4) (set 26)" ) +GAME_CUSTOM( 199?, m4berser__z, m4berser, "besk.p1", 0x0000, 0x010000, CRC(03eb2a05) SHA1(375f47bd1d0f21fde5ea0fcf7b79c02db9f8c9c6), "Barcrest","Berserk (Barcrest) (MPU4) (set 27)" ) +GAME_CUSTOM( 199?, m4berser__0, m4berser, "besy.p1", 0x0000, 0x010000, CRC(64a49f88) SHA1(6bd1275e9172e311ead36566432729530c1b6c21), "Barcrest","Berserk (Barcrest) (MPU4) (set 28)" ) +// "(C)1991 BARCREST" and "BE3 0.1" +GAME_CUSTOM( 199?, m4berser__h, m4berser, "be3s.p1", 0x0000, 0x010000, CRC(1a66772e) SHA1(e604315cea3db5f3859f1756e84b37b805f1f995), "Barcrest","Berserk (Barcrest) (MPU4) (BE3 0.1)" ) GAME_CUSTOM( 199?, m4berser__a, m4berser, "be3ad.p1", 0x0000, 0x010000, CRC(db4d77e9) SHA1(80e9ecf0a5d213e23fe8d328fbe8af52d49e2897), "Barcrest","Berserk (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4berser__b, m4berser, "be3b.p1", 0x0000, 0x010000, CRC(b25e9adb) SHA1(cc72c7a02868d56371f6d1bbaf78a017147b1a5a), "Barcrest","Berserk (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4berser__c, m4berser, "be3bd.p1", 0x0000, 0x010000, CRC(ed511aa3) SHA1(e6efe14490fa62ec9e5565e92216e371ab98b78a), "Barcrest","Berserk (Barcrest) (MPU4) (set 4)" ) @@ -3865,8 +4224,9 @@ GAME_CUSTOM( 199?, m4berser__d, m4berser, "be3d.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4berser__e, m4berser, "be3dk.p1", 0x0000, 0x010000, CRC(82b4513e) SHA1(a36eebef35dbc2fbc25d39fde811e180a3682b67), "Barcrest","Berserk (Barcrest) (MPU4) (set 6)" ) GAME_CUSTOM( 199?, m4berser__f, m4berser, "be3dy.p1", 0x0000, 0x010000, CRC(6f2869f2) SHA1(b006f467463038b5987764f9eedec1d7357ade65), "Barcrest","Berserk (Barcrest) (MPU4) (set 7)" ) GAME_CUSTOM( 199?, m4berser__g, m4berser, "be3k.p1", 0x0000, 0x010000, CRC(12b3954a) SHA1(cce68a720a0bb1ce64cbf6ab2902a712403516cd), "Barcrest","Berserk (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4berser__h, m4berser, "be3s.p1", 0x0000, 0x010000, CRC(1a66772e) SHA1(e604315cea3db5f3859f1756e84b37b805f1f995), "Barcrest","Berserk (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4berser__i, m4berser, "be3y.p1", 0x0000, 0x010000, CRC(5c6451ca) SHA1(b63b9289fdef3be6add1e1ee22f9e316f296cc97), "Barcrest","Berserk (Barcrest) (MPU4) (set 10)" ) +// "(C)1991 BARCREST" and "BE8 0.1" +GAME_CUSTOM( 199?, m4berser__s, m4berser, "be8s.p1", 0x0000, 0x010000, CRC(12d0fb4f) SHA1(103a468a0712dfc44b140cad01cd49b6f159b621), "Barcrest","Berserk (Barcrest) (MPU4) (BE8 0.1)" ) GAME_CUSTOM( 199?, m4berser__j, m4berser, "be8ad.p1", 0x0000, 0x010000, CRC(0c196fd2) SHA1(830917f4c9bb7df35ac7d1e4fdcbb3eaac65ec5f), "Barcrest","Berserk (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4berser__k, m4berser, "be8b.p1", 0x0000, 0x010000, CRC(8f25875d) SHA1(e53ca0322838891274e0c5c61882a6690df3f1a0), "Barcrest","Berserk (Barcrest) (MPU4) (set 12)" ) GAME_CUSTOM( 199?, m4berser__l, m4berser, "be8bcd.p1", 0x0000, 0x010000, CRC(40d40ecd) SHA1(a728a2ea63dc7d520e2f189e18b4884fb5f292bc), "Barcrest","Berserk (Barcrest) (MPU4) (set 13)" ) @@ -3876,16 +4236,9 @@ GAME_CUSTOM( 199?, m4berser__o, m4berser, "be8d.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4berser__p, m4berser, "be8dk.p1", 0x0000, 0x010000, CRC(39a3f145) SHA1(00242636e7519e37ed4f5e65ecf41c315c2607ad), "Barcrest","Berserk (Barcrest) (MPU4) (set 17)" ) GAME_CUSTOM( 199?, m4berser__q, m4berser, "be8dy.p1", 0x0000, 0x010000, CRC(5f885b13) SHA1(c398bb40fbac39530ba7b96bf4a4fde575c9fa87), "Barcrest","Berserk (Barcrest) (MPU4) (set 18)" ) GAME_CUSTOM( 199?, m4berser__r, m4berser, "be8k.p1", 0x0000, 0x010000, CRC(b66051b6) SHA1(910bd0a4112a81df0160efd86bed1a8a59b2acb8), "Barcrest","Berserk (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4berser__s, m4berser, "be8s.p1", 0x0000, 0x010000, CRC(12d0fb4f) SHA1(103a468a0712dfc44b140cad01cd49b6f159b621), "Barcrest","Berserk (Barcrest) (MPU4) (set 20)" ) GAME_CUSTOM( 199?, m4berser__t, m4berser, "be8y.p1", 0x0000, 0x010000, CRC(80d73997) SHA1(99e76616e9a73f111bdd560f2691b99905e4e454), "Barcrest","Berserk (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4berser__u, m4berser, "besb.p1", 0x0000, 0x010000, CRC(a0aa05f9) SHA1(3831c07e9e33c83b2f7148a34037023433b49cd0), "Barcrest","Berserk (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4berser__v, m4berser, "besc.p1", 0x0000, 0x010000, CRC(3a7ea673) SHA1(469e104ca1008c274f2a58c3ec6e96b40e1b4fb6), "Barcrest","Berserk (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4berser__w, m4berser, "besd.p1", 0x0000, 0x010000, CRC(ac7daf9c) SHA1(9951cf3194bc5acc17044dfb4b854edb0cc2c090), "Barcrest","Berserk (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4berser__x, m4berser, "besdk.p1", 0x0000, 0x010000, CRC(f9d20012) SHA1(d3942406af0573a58e49a24f98b4e3c0a9ff508e), "Barcrest","Berserk (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4berser__y, m4berser, "besdy.p1", 0x0000, 0x010000, CRC(461ac51f) SHA1(217f169bd2bc4108145231e9b974d2f890a4f25e), "Barcrest","Berserk (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4berser__z, m4berser, "besk.p1", 0x0000, 0x010000, CRC(03eb2a05) SHA1(375f47bd1d0f21fde5ea0fcf7b79c02db9f8c9c6), "Barcrest","Berserk (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4berser__0, m4berser, "besy.p1", 0x0000, 0x010000, CRC(64a49f88) SHA1(6bd1275e9172e311ead36566432729530c1b6c21), "Barcrest","Berserk (Barcrest) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4berser__1, m4berser, "be_05a_4.1_1", 0x0000, 0x010000, CRC(e4ec1624) SHA1(e6241edb729796dd248abca6bf67281379c39af2), "Barcrest","Berserk (Barcrest) (MPU4) (set 29)" ) +// "(C)1996 B.W.B." and "BE4 1.1" +GAME_CUSTOM( 199?, m4berser__1, m4berser, "be_05a_4.1_1", 0x0000, 0x010000, CRC(e4ec1624) SHA1(e6241edb729796dd248abca6bf67281379c39af2), "Bwb","Berserk (Barcrest) (MPU4) (BE4 1.1 KS)" ) @@ -3901,7 +4254,8 @@ GAME_CUSTOM( 199?, m4berser__1, m4berser, "be_05a_4.1_1", 0x0000, 0x010000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4vivess, 0, "se8s.p1", 0x0000, 0x010000, CRC(d5c261de) SHA1(5f70944ffe03109ad16f162370fd3653d131034d), "Barcrest","Viva Espana Showcase (Barcrest) (MPU4) (set 1)" ) +// "(C)1993 BARCREST" and "SE8 0.1" +GAME_CUSTOM( 199?, m4vivess, 0, "se8s.p1", 0x0000, 0x010000, CRC(d5c261de) SHA1(5f70944ffe03109ad16f162370fd3653d131034d), "Barcrest","Viva Espana Showcase (Barcrest) (MPU4) (SE8 0.1)" ) GAME_CUSTOM( 199?, m4vivess__a, m4vivess, "se8ad.p1", 0x0000, 0x010000, CRC(4f799dfe) SHA1(e85108ab0aad92a64eabf5c7562068caf22f8d5b), "Barcrest","Viva Espana Showcase (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4vivess__b, m4vivess, "se8b.p1", 0x0000, 0x010000, CRC(876efabb) SHA1(6ca1d37416b5401ba10977dad6a5881bdc7246ed), "Barcrest","Viva Espana Showcase (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4vivess__c, m4vivess, "se8bd.p1", 0x0000, 0x010000, CRC(39fe1c08) SHA1(99a04561555c819fc2954897e7831cf2c38db702), "Barcrest","Viva Espana Showcase (Barcrest) (MPU4) (set 4)" ) @@ -3910,11 +4264,12 @@ GAME_CUSTOM( 199?, m4vivess__f, m4vivess, "se8dk.p1", 0x0000, 0x010000, CRC GAME_CUSTOM( 199?, m4vivess__g, m4vivess, "se8dy.p1", 0x0000, 0x010000, CRC(36dcf85f) SHA1(e635501e6ba7dc4e56f1e00b472b32c030aa6592), "Barcrest","Viva Espana Showcase (Barcrest) (MPU4) (set 7)" ) GAME_CUSTOM( 199?, m4vivess__i, m4vivess, "se8k.p1", 0x0000, 0x010000, CRC(befb76cd) SHA1(f60e17538acd6f5b20e786f8a51a0471ee3246c8), "Barcrest","Viva Espana Showcase (Barcrest) (MPU4) (set 8)" ) GAME_CUSTOM( 199?, m4vivess__j, m4vivess, "se8y.p1", 0x0000, 0x010000, CRC(8be03e81) SHA1(f51024036f56b2009905e9c08bb292f2a280c0f6), "Barcrest","Viva Espana Showcase (Barcrest) (MPU4) (set 9)" ) +// "(C)1993 BARCREST" and "SES 0.2" +GAME_CUSTOM( 199?, m4vivess__o, m4vivess, "sess.p1", 0x0000, 0x010000, CRC(0e8d5c05) SHA1(bf05e4e83d6d4fb7c471e8ca22df21b357d8ed9b), "Barcrest","Viva Espana Showcase (Barcrest) (MPU4) (SES 0.2)" ) GAME_CUSTOM( 199?, m4vivess__k, m4vivess, "sesb.p1", 0x0000, 0x010000, CRC(0e3dc285) SHA1(53cf28228192b6e83d0ff95c8de2fb978720d363), "Barcrest","Viva Espana Showcase (Barcrest) (MPU4) (set 10)" ) GAME_CUSTOM( 199?, m4vivess__l, m4vivess, "sesd.p1", 0x0000, 0x010000, CRC(549aaf0b) SHA1(084aca4429e27ce2642991aae8738d85c0157e54), "Barcrest","Viva Espana Showcase (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4vivess__m, m4vivess, "sesdy.p1", 0x0000, 0x010000, CRC(1869edd8) SHA1(b76dfa439eef641817a9bdf9c737cb06ac54efea), "Barcrest","Viva Espana Showcase (Barcrest) (MPU4) (set 12)" ) GAME_CUSTOM( 199?, m4vivess__n, m4vivess, "sesk.p1", 0x0000, 0x010000, CRC(ebdb5ec4) SHA1(f7ec6e8c0142a0885fda066f379e7bd22f5844e5), "Barcrest","Viva Espana Showcase (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4vivess__o, m4vivess, "sess.p1", 0x0000, 0x010000, CRC(0e8d5c05) SHA1(bf05e4e83d6d4fb7c471e8ca22df21b357d8ed9b), "Barcrest","Viva Espana Showcase (Barcrest) (MPU4) (set 14)" ) GAME_CUSTOM( 199?, m4vivess__p, m4vivess, "sesy.p1", 0x0000, 0x010000, CRC(126472e9) SHA1(3bebd273debbc9b71fce83cdc1031927698f7775), "Barcrest","Viva Espana Showcase (Barcrest) (MPU4) (set 15)" ) @@ -3931,8 +4286,8 @@ GAME_CUSTOM( 199?, m4vivess__p, m4vivess, "sesy.p1", 0x0000, 0x010000, CRC ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4ttdia, 0, "tda04s.p1", 0x0000, 0x020000, CRC(1240642e) SHA1(7eaf02d5c00707a0a6d98d247c293cad1ca87108), "Barcrest","Ten Ten Do It Again (Barcrest) (MPU4) (set 1)" ) +// "(C)1993 BARCREST" and "TDA 0.4" +GAME_CUSTOM( 199?, m4ttdia, 0, "tda04s.p1", 0x0000, 0x020000, CRC(1240642e) SHA1(7eaf02d5c00707a0a6d98d247c293cad1ca87108), "Barcrest","Ten Ten Do It Again (Barcrest) (MPU4) (TDA 0.4)" ) GAME_CUSTOM( 199?, m4ttdia__a, m4ttdia, "tda04ad.p1", 0x0000, 0x020000, CRC(79d804ba) SHA1(0616a2718aea85692ce5c5086f18e54a531efb19), "Barcrest","Ten Ten Do It Again (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4ttdia__b, m4ttdia, "tda04b.p1", 0x0000, 0x020000, CRC(dc755e6a) SHA1(386a1baf7d86d73dff1d6034f60094a55255d6bc), "Barcrest","Ten Ten Do It Again (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4ttdia__c, m4ttdia, "tda04bd.p1", 0x0000, 0x020000, CRC(f4c2aa7f) SHA1(aae114e9ab813809a8f8e2e12773a9f6379f535d), "Barcrest","Ten Ten Do It Again (Barcrest) (MPU4) (set 4)" ) @@ -3962,7 +4317,15 @@ GAME_CUSTOM( 199?, m4ttdia__m, m4ttdia, "tda04y.p1", 0x0000, 0x020000, CR ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4przve, 0, "pess.p1", 0x0000, 0x010000, CRC(d8e79833) SHA1(f68fd1bd057a353832c7de3e2818906ab2b844b7), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (set 1)" ) +// "(C)1993 BARCREST" and "PES 0.4" +GAME_CUSTOM( 199?, m4przve, 0, "pess.p1", 0x0000, 0x010000, CRC(d8e79833) SHA1(f68fd1bd057a353832c7de3e2818906ab2b844b7), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (PES 0.4)" ) +GAME_CUSTOM( 199?, m4przve__l, m4przve, "pesb.p1", 0x0000, 0x010000, CRC(bf0ffed9) SHA1(ab8cd98ae7dfb3582aad7ae8c669a6d97f144f88), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (set 13)" ) +GAME_CUSTOM( 199?, m4przve__m, m4przve, "pesd.p1", 0x0000, 0x010000, CRC(6f7b1e16) SHA1(412a22ebb61b77541da067ba74621c8e54364471), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (set 14)" ) +GAME_CUSTOM( 199?, m4przve__n, m4przve, "pesdy.p1", 0x0000, 0x010000, CRC(94db27b4) SHA1(fe745a991a5e78fc9054480d3ce5bf6b7f5f9fe4), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (set 15)" ) +GAME_CUSTOM( 199?, m4przve__o, m4przve, "pesk.p1", 0x0000, 0x010000, CRC(9e7b9f58) SHA1(86c2a83964f925448dda189546d9909b10e52673), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (set 16)" ) +GAME_CUSTOM( 199?, m4przve__p, m4przve, "pesy.p1", 0x0000, 0x010000, CRC(fbfc1563) SHA1(870239cab39eff33303fe06dfd1dd3db708f0f2d), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (set 17)" ) +// "(C)1993 BARCREST" and "PE8 0.1" +GAME_CUSTOM( 199?, m4przve__j, m4przve, "pe8s.p1", 0x0000, 0x010000, CRC(e8463e69) SHA1(923d6c79470a65cf66b089ef09898acea928aa9b), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (PE8 0.1)" ) GAME_CUSTOM( 199?, m4przve__a, m4przve, "pe8ad.p1", 0x0000, 0x010000, CRC(3a81422e) SHA1(bb77365ed7bc7c2cd9e1cfe6e266c6edfd3562a3), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4przve__b, m4przve, "pe8b.p1", 0x0000, 0x010000, CRC(9f36b112) SHA1(265451557afcfdc1aa8e77616f4b871698b20c5f), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4przve__c, m4przve, "pe8bd.p1", 0x0000, 0x010000, CRC(af0689b5) SHA1(0e3cf464c855b0dcfeac403bda80818287707abe), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (set 4)" ) @@ -3972,13 +4335,7 @@ GAME_CUSTOM( 199?, m4przve__f, m4przve, "pe8dk.p1", 0x0000, 0x010000, CRC(fc GAME_CUSTOM( 199?, m4przve__g, m4przve, "pe8dy.p1", 0x0000, 0x010000, CRC(6abc5682) SHA1(ae8754f0e214738adae4bc856cd72b0920aaa67a), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (set 8)" ) GAME_CUSTOM( 199?, m4przve__h, m4przve, "pe8j.p1", 0x0000, 0x010000, CRC(d3bf07f1) SHA1(3e539f24ef25c8d6fbfbdcd469fa8a2908dd2ec2), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4przve__i, m4przve, "pe8k.p1", 0x0000, 0x010000, CRC(efba0d3f) SHA1(2205b94f5a6ed23e834cfeb0d3ebe5ed66d942a1), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4przve__j, m4przve, "pe8s.p1", 0x0000, 0x010000, CRC(e8463e69) SHA1(923d6c79470a65cf66b089ef09898acea928aa9b), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4przve__k, m4przve, "pe8y.p1", 0x0000, 0x010000, CRC(c324b75f) SHA1(bf3409a193539e1e032c856a5316bec674043d57), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4przve__l, m4przve, "pesb.p1", 0x0000, 0x010000, CRC(bf0ffed9) SHA1(ab8cd98ae7dfb3582aad7ae8c669a6d97f144f88), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4przve__m, m4przve, "pesd.p1", 0x0000, 0x010000, CRC(6f7b1e16) SHA1(412a22ebb61b77541da067ba74621c8e54364471), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4przve__n, m4przve, "pesdy.p1", 0x0000, 0x010000, CRC(94db27b4) SHA1(fe745a991a5e78fc9054480d3ce5bf6b7f5f9fe4), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4przve__o, m4przve, "pesk.p1", 0x0000, 0x010000, CRC(9e7b9f58) SHA1(86c2a83964f925448dda189546d9909b10e52673), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4przve__p, m4przve, "pesy.p1", 0x0000, 0x010000, CRC(fbfc1563) SHA1(870239cab39eff33303fe06dfd1dd3db708f0f2d), "Barcrest","Prize Viva Esapana (Barcrest) (MPU4) (set 17)" ) #define M4SHOCM_EXTRA_ROMS \ @@ -3993,7 +4350,8 @@ GAME_CUSTOM( 199?, m4przve__p, m4przve, "pesy.p1", 0x0000, 0x010000, CRC(fb ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4shocm, 0, "scms.p1", 0x0000, 0x020000, CRC(8cb17f49) SHA1(6c67d5d65567ba3677f51f9c636e1f8e253111de), "Barcrest","Showcase Crystal Maze (Barcrest) (MPU4) (set 1)" ) +// "(C)1993 BARCREST" and "SCM 0.1" +GAME_CUSTOM( 199?, m4shocm, 0, "scms.p1", 0x0000, 0x020000, CRC(8cb17f49) SHA1(6c67d5d65567ba3677f51f9c636e1f8e253111de), "Barcrest","Showcase Crystal Maze (Barcrest) (MPU4) (SCM 0.1)" ) GAME_CUSTOM( 199?, m4shocm__a, m4shocm, "scmad.p1", 0x0000, 0x020000, CRC(0960b887) SHA1(02b029760d141664a7c5860a29b158d8c2dec4e7), "Barcrest","Showcase Crystal Maze (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4shocm__b, m4shocm, "scmb.p1", 0x0000, 0x020000, CRC(c96e88cd) SHA1(61abff544c979efabf5e53d2c53d7cbe90c1f265), "Barcrest","Showcase Crystal Maze (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4shocm__c, m4shocm, "scmbd.p1", 0x0000, 0x020000, CRC(847a1642) SHA1(0bb6d2494888c5e45bf4bfd0f6ba123283346361), "Barcrest","Showcase Crystal Maze (Barcrest) (MPU4) (set 4)" ) @@ -4019,7 +4377,9 @@ GAME_CUSTOM( 199?, m4shocm__j, m4shocm, "scmk.p1", 0x0000, 0x020000, CRC(83 ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4actbnk, 0, "acts.p1", 0x0000, 0x010000, CRC(49a9007c) SHA1(b205270e53264c3d8cb009a5780cacba1ce2e2a8), "Barcrest","Action Bank (Barcrest) (MPU4) (set 1)" ) +// these require a jackpot key to be inserted +// "(C)1993 BARCREST" and "ACT 0.7" +GAME_CUSTOM( 199?, m4actbnk, 0, "acts.p1", 0x0000, 0x010000, CRC(49a9007c) SHA1(b205270e53264c3d8cb009a5780cacba1ce2e2a8), "Barcrest","Action Bank (Barcrest) (MPU4) (ACT 0.7)" ) GAME_CUSTOM( 199?, m4actbnk__a, m4actbnk, "actb.p1", 0x0000, 0x010000, CRC(1429708e) SHA1(8b3ecb443e5920ccec80695a142cb1eb9596b1c1), "Barcrest","Action Bank (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4actbnk__b, m4actbnk, "actbd.p1", 0x0000, 0x010000, CRC(727d7bb6) SHA1(765a9944ee27b175ba1f45bf82dcf7ef0defd076), "Barcrest","Action Bank (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4actbnk__c, m4actbnk, "actc.p1", 0x0000, 0x010000, CRC(0a2498e5) SHA1(97f1e35426156c8eece6f76f3ecffa85714ade5b), "Barcrest","Action Bank (Barcrest) (MPU4) (set 4)" ) @@ -4031,49 +4391,6 @@ GAME_CUSTOM( 199?, m4actbnk__h, m4actbnk, "acty.p1", 0x0000, 0x010000, CRC GAME_CUSTOM( 199?, m4actbnk__i, m4actbnk, "actad.p1", 0x0000, 0x010000, CRC(a8dfdf77) SHA1(92e9f0f3837e466c0c6d98b890234d80318ef236), "Barcrest","Action Bank (Barcrest) (MPU4) (set 10)" ) -#undef GAME_CUSTOM -#define GAME_CUSTOM(year, setname,parent,name,offset,length,hash,company,title) \ - ROM_START( setname ) \ - ROM_REGION( length, "maincpu", 0 ) \ - ROM_LOAD( name, offset, length, hash ) \ - ROM_END \ - GAME(year, setname, parent ,mod2 ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4addrc, 0, "add05_101", 0x0000, 0x010000, CRC(4b3fb104) SHA1(9dba619019a476ce317122a3553965b279c684ba), "Barcrest","Adders & Ladders Classic (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4addrc__a, m4addrc, "add10_101", 0x0000, 0x010000, CRC(af8f8b4e) SHA1(712c33ed0f425dc10b79780b0cfce0ac5768e2d5), "Barcrest","Adders & Ladders Classic (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4addrc__b, m4addrc, "add20_101", 0x0000, 0x010000, CRC(361b7173) SHA1(dea2b1b0f5910e2fd3f45d220554f0e712dedada), "Barcrest","Adders & Ladders Classic (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4addrc__c, m4addrc, "add55", 0x0000, 0x010000, CRC(48c5bc73) SHA1(18c9f70bad6141cca95b6bbcb4fc621e71f87700), "Barcrest","Adders & Ladders Classic (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4addrc__d, m4addrc, "alddr20", 0x0000, 0x010000, CRC(19cf4437) SHA1(b528823c476bebd1a9a6c720a4144294743693d2), "Barcrest","Adders & Ladders Classic (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4addrc__e, m4addrc, "classic adders & ladders_alt", 0x0000, 0x010000, CRC(ac948903) SHA1(e07023efd7722a661a2bbf93c0a168af70ad6c20), "Barcrest","Adders & Ladders Classic (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4addrc__f, m4addrc, "classic adders & ladders_alt2", 0x0000, 0x010000, CRC(843ed53d) SHA1(b1dff249df37800744e3fc9c32be20a62bd130a1), "Barcrest","Adders & Ladders Classic (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4addrc__h, m4addrc, "adders classic.bin", 0x0000, 0x010000, CRC(6bc1d2aa) SHA1(cf17e697ff0cfba999f6511f24051dbc3d0384ef), "Barcrest","Adders & Ladders Classic (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4addrc__i, m4addrc, "addl_10_.4", 0x0000, 0x010000, CRC(c2d11126) SHA1(0eafe9dc30013ed5817ac303a4eea5ea82d62715), "Barcrest","Adders & Ladders Classic (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4addrc__j, m4addrc, "addl_10_.8", 0x0000, 0x010000, CRC(9fc82c47) SHA1(0f56afc33f09fe22afc5ec74aeb496c32f9e623c), "Barcrest","Adders & Ladders Classic (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4addrc__k, m4addrc, "addl_20_.8", 0x0000, 0x010000, CRC(43c98f46) SHA1(0ca4a093b38fc04639e3f4bb742a8923b90d2ed1), "Barcrest","Adders & Ladders Classic (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4addrc__l, m4addrc, "al10", 0x0000, 0x010000, CRC(3c3c82b6) SHA1(cc5ffdd0837c9af31d5737a70430a01d1989cdcc), "Barcrest","Adders & Ladders Classic (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4addrc__m, m4addrc, "alad58c", 0x0000, 0x010000, CRC(df9c46b8) SHA1(439ea1ce17aa89e19cedb78465b4388b72c8c5ed), "Barcrest","Adders & Ladders Classic (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4addrc__n, m4addrc, "nik56c", 0x0000, 0x010000, CRC(05fa11d1) SHA1(01d3d0c504489f1513a0c3aa26e910c9604f5366), "Barcrest","Adders & Ladders Classic (Barcrest) (MPU4) (set 14)" ) - -#define M4ADDRCC_EXTRA_ROMS \ - ROM_REGION( 0x48, "fakechr", 0 ) \ - ROM_LOAD( "aal.chr", 0x0000, 0x000048, CRC(bb48409f) SHA1(adefde520104b8c3815260ee136460ddf3e9e4b2) ) -#undef GAME_CUSTOM -#define GAME_CUSTOM(year, setname,parent,name,offset,length,hash,company,title) \ - ROM_START( setname ) \ - ROM_REGION( length, "maincpu", 0 ) \ - ROM_LOAD( name, offset, length, hash ) \ - M4ADDRCC_EXTRA_ROMS \ - ROM_END \ - GAME(year, setname, parent ,mod2 ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) - - -GAME_CUSTOM( 199?, m4addrcc, 0, "adcd.p1", 0x0000, 0x010000, CRC(47e41c9a) SHA1(546aaaa5765b3bc91eeb9bf5a979ed68a2e72da8), "Barcrest","Adders & Ladders Classic Club (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4addrcc__a, m4addrcc, "adcf.p1", 0x0000, 0x010000, CRC(1dbbc990) SHA1(fb9439b43089e3135a719ab94b24dd65561d17cf), "Barcrest","Adders & Ladders Classic Club (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4addrcc__b, m4addrcc, "adcl.p1", 0x0000, 0x010000, CRC(89299196) SHA1(9a92b250b47b11536f8708429d69c95111ecdb98), "Barcrest","Adders & Ladders Classic Club (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4addrcc__c, m4addrcc, "adcs.p1", 0x0000, 0x010000, CRC(7247de78) SHA1(e390b4e912d7bc8c1ca5e42bf2e2753d4c2b4d17), "Barcrest","Adders & Ladders Classic Club (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4addrcc__d, m4addrcc, "adrscfm", 0x0000, 0x010000, CRC(6c95881a) SHA1(db658bd722c54fc84734105f1a9b0028b23179fb), "Barcrest","Adders & Ladders Classic Club (Barcrest) (MPU4) (set 5)" ) - - #define M4CRDOME_EXTRA_ROMS \ ROM_REGION( 0x48, "fakechr", 0 ) \ ROM_LOAD( "tri98.chr", 0x0000, 0x000048, CRC(8a4532a8) SHA1(c128fd513bbcba68a1c75a11e09a54ba1d23d6f4) ) \ @@ -4089,7 +4406,9 @@ GAME_CUSTOM( 199?, m4addrcc__d, m4addrcc, "adrscfm", 0x0000, 0x010000, CRC( ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4crdome, 0, "cd212k.p1", 0x0000, 0x020000, CRC(673b10a1) SHA1(996ade8193f448970beea2c5b81d9f27c05f162f), "Barcrest","Crystal Dome (Barcrest) (MPU4) (set 1)" ) +// "(C)1993 BARCREST" and "CD2 1.2" +GAME_CUSTOM( 199?, m4crdome, 0, "cd212s.p1", 0x0000, 0x020000, CRC(f7d9d5e3) SHA1(1378e28c0a2c59a42a440502f20cc011625f43b5), "Barcrest","Crystal Dome (Barcrest) (MPU4) (CD2 1.2)" ) +GAME_CUSTOM( 199?, m4crdome__j, m4crdome, "cd212k.p1", 0x0000, 0x020000, CRC(673b10a1) SHA1(996ade8193f448970beea2c5b81d9f27c05f162f), "Barcrest","Crystal Dome (Barcrest) (MPU4) (set 1)" ) GAME_CUSTOM( 199?, m4crdome__a, m4crdome, "cd212c.p1", 0x0000, 0x020000, CRC(1ab605e5) SHA1(03327b2fac9d3d2891dc5950aa89ac4947c7b444), "Barcrest","Crystal Dome (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4crdome__b, m4crdome, "cd212ad.p1", 0x0000, 0x020000, CRC(c76cab39) SHA1(abbe5d629929ff89b499cd4d0e15e9fa13fc33de), "Barcrest","Crystal Dome (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4crdome__c, m4crdome, "cd212b.p1", 0x0000, 0x020000, CRC(2dfcb8f7) SHA1(ba711fb20556c447f4bb3a11fc1cc6a3599bfd6d), "Barcrest","Crystal Dome (Barcrest) (MPU4) (set 4)" ) @@ -4099,11 +4418,13 @@ GAME_CUSTOM( 199?, m4crdome__f, m4crdome, "cd212dk.p1", 0x0000, 0x020000, GAME_CUSTOM( 199?, m4crdome__g, m4crdome, "cd212dr.p1", 0x0000, 0x020000, CRC(b3be169b) SHA1(eb4699fdce371d94feec410c640bd49bfdccba98), "Barcrest","Crystal Dome (Barcrest) (MPU4) (set 8)" ) GAME_CUSTOM( 199?, m4crdome__h, m4crdome, "cd212dy.p1", 0x0000, 0x020000, CRC(87528d54) SHA1(974fa2c29af43c903add28dca0ea3b04f612d2f7), "Barcrest","Crystal Dome (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4crdome__i, m4crdome, "cd212r.p1", 0x0000, 0x020000, CRC(d434ab90) SHA1(d42258bd965e8a028a418681a1307234c9b1c450), "Barcrest","Crystal Dome (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4crdome__j, m4crdome, "cd212s.p1", 0x0000, 0x020000, CRC(f7d9d5e3) SHA1(1378e28c0a2c59a42a440502f20cc011625f43b5), "Barcrest","Crystal Dome (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4crdome__k, m4crdome, "cd212y.p1", 0x0000, 0x020000, CRC(e0d8305f) SHA1(ddf1125eba0e470f6ae811fe050d4000300cfd0c), "Barcrest","Crystal Dome (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4crdome__l, m4crdome, "cdom15r", 0x0000, 0x020000, CRC(28f9ee8e) SHA1(e3484933dd0b8ddc2eeefc4dc95ce5379565e750), "Barcrest","Crystal Dome (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4crdome__m, m4crdome, "cdome10", 0x0000, 0x020000, CRC(945c9277) SHA1(6afee54b332152f6767781a040799d865999b292), "Barcrest","Crystal Dome (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4crdome__n, m4crdome, "cdome8ac", 0x0000, 0x020000, CRC(0553bfe6) SHA1(77abfa556f04dca1be52fbed357807e6ada10458), "Barcrest","Crystal Dome (Barcrest) (MPU4) (set 15)" ) +// "(C)1993 BARCREST" and "CD2 1.0" +GAME_CUSTOM( 199?, m4crdome__m, m4crdome, "cdome10", 0x0000, 0x020000, CRC(945c9277) SHA1(6afee54b332152f6767781a040799d865999b292), "Barcrest","Crystal Dome (Barcrest) (MPU4) (CD2 1.0 C)" ) +// "(C)1993 BARCREST" and "CD2 0.2" +GAME_CUSTOM( 199?, m4crdome__n, m4crdome, "cdome8ac", 0x0000, 0x020000, CRC(0553bfe6) SHA1(77abfa556f04dca1be52fbed357807e6ada10458), "Barcrest","Crystal Dome (Barcrest) (MPU4) (CD2 0.2 C)" ) +// no copyright string and "CD2 1.2" +GAME_CUSTOM( 199?, m4crdome__l, m4crdome, "cdom15r", 0x0000, 0x020000, CRC(28f9ee8e) SHA1(e3484933dd0b8ddc2eeefc4dc95ce5379565e750), "hack","Crystal Dome (Barcrest) (MPU4) (CD2 1.2, hack)" ) #define M4ROCKMN_EXTRA_ROMS \ @@ -4123,8 +4444,9 @@ GAME_CUSTOM( 199?, m4crdome__n, m4crdome, "cdome8ac", 0x0000, 0x020000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4rockmn, 0, "rok06c.p1", 0x0000, 0x020000, CRC(8e3a628f) SHA1(3bedb095af710f0b6376a5d99c072f7b3d3de0af), "Barcrest","Rocket Money (Barcrest) (MPU4) (set 1)" ) +// "(C)1993 BARCREST" and "ROK 0.6" +GAME_CUSTOM( 199?, m4rockmn, 0, "rok06s.p1", 0x0000, 0x020000, CRC(e8b89551) SHA1(753828fd8631588c7725ee4f013f3c78d23f7038), "Barcrest","Rocket Money (Barcrest) (MPU4) (ROK 0.6)" ) +GAME_CUSTOM( 199?, m4rockmn__j, m4rockmn, "rok06c.p1", 0x0000, 0x020000, CRC(8e3a628f) SHA1(3bedb095af710f0b6376a5d99c072f7b3d3de0af), "Barcrest","Rocket Money (Barcrest) (MPU4) (set 1)" ) GAME_CUSTOM( 199?, m4rockmn__a, m4rockmn, "rok06ad.p1", 0x0000, 0x020000, CRC(9daa1e35) SHA1(11e7a503c289813cc2ea4507bf5255957e92bc12), "Barcrest","Rocket Money (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4rockmn__b, m4rockmn, "rok06b.p1", 0x0000, 0x020000, CRC(b970df9d) SHA1(4230c3130a52502fb0a8aabf60fd33e90a7fa266), "Barcrest","Rocket Money (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4rockmn__c, m4rockmn, "rok06bd.p1", 0x0000, 0x020000, CRC(10b0b0f0) SHA1(a2f485e7578648aadb8ddb04ea885f4315b9ab82), "Barcrest","Rocket Money (Barcrest) (MPU4) (set 4)" ) @@ -4134,7 +4456,6 @@ GAME_CUSTOM( 199?, m4rockmn__f, m4rockmn, "rok06dr.p1", 0x0000, 0x020000, GAME_CUSTOM( 199?, m4rockmn__g, m4rockmn, "rok06dy.p1", 0x0000, 0x020000, CRC(dd943858) SHA1(ac8e53f72f98b217f190a9d3a9822a41b3028adb), "Barcrest","Rocket Money (Barcrest) (MPU4) (set 8)" ) GAME_CUSTOM( 199?, m4rockmn__h, m4rockmn, "rok06k.p1", 0x0000, 0x020000, CRC(f3b777cb) SHA1(2d5b67c69458712c370801702a813f81640ce184), "Barcrest","Rocket Money (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4rockmn__i, m4rockmn, "rok06r.p1", 0x0000, 0x020000, CRC(40b8ccfa) SHA1(8868a0ca622e5331204b2431bf64e723a1a79222), "Barcrest","Rocket Money (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4rockmn__j, m4rockmn, "rok06s.p1", 0x0000, 0x020000, CRC(e8b89551) SHA1(753828fd8631588c7725ee4f013f3c78d23f7038), "Barcrest","Rocket Money (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4rockmn__k, m4rockmn, "rok06y.p1", 0x0000, 0x020000, CRC(74545735) SHA1(79ee259656fb71c24382c6670150e49a5b8bc62f), "Barcrest","Rocket Money (Barcrest) (MPU4) (set 12)" ) @@ -4153,17 +4474,9 @@ GAME_CUSTOM( 199?, m4rockmn__k, m4rockmn, "rok06y.p1", 0x0000, 0x020000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4madhse, 0, "mh502y.p1", 0x0000, 0x010000, CRC(3ec1955a) SHA1(6939e6f5d749249825c41df8e05957450eaf1007), "Barcrest","Mad House (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4madhse__a, m4madhse, "madc.p1", 0x0000, 0x010000, CRC(96da2d58) SHA1(23686a4dc5adaac81ba173f8fa0ea5ff8ac26260), "Barcrest","Mad House (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4madhse__b, m4madhse, "mhty.p1", 0x0000, 0x010000, CRC(e86e4542) SHA1(fb1b1d319c443daa1184eac4f6b0668ff3c6a1c5), "Barcrest","Mad House (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4madhse__c, m4madhse, "mads.p1", 0x0000, 0x010000, CRC(d4ea7f14) SHA1(808c64b65542c6bfd8336feec025e947c8c904ee), "Barcrest","Mad House (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4madhse__d, m4madhse, "md8c.p1", 0x0000, 0x010000, CRC(3d9c9cf7) SHA1(3f663fe9bd61d163d58bb4c51bea59121678aa76), "Barcrest","Mad House (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4madhse__e, m4madhse, "md8d.p1", 0x0000, 0x010000, CRC(6d150df3) SHA1(e93fda497696b06ad854b3b06e2b61737cef3fc1), "Barcrest","Mad House (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4madhse__f, m4madhse, "md8dy.p1", 0x0000, 0x010000, CRC(af01407f) SHA1(46359220e34dede4cc5e8c11699d01460dd9a469), "Barcrest","Mad House (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4madhse__g, m4madhse, "md8k.p1", 0x0000, 0x010000, CRC(c713f706) SHA1(65480171d3d69a670b9ce2c566425998134ad502), "Barcrest","Mad House (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4madhse__h, m4madhse, "md8s.p1", 0x0000, 0x010000, CRC(0d8a1a3e) SHA1(4df8b1c1834bbffb4798d9ed5135b6cb29b08e73), "Barcrest","Mad House (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4madhse__i, m4madhse, "md8y.p1", 0x0000, 0x010000, CRC(15fc9590) SHA1(a01bd5cea5873c8175262f668e330b2975a03eb1), "Barcrest","Mad House (Barcrest) (MPU4) (set 10)" ) +// "(C)1993 BARCREST" and "MH5 0.2" +GAME_CUSTOM( 199?, m4madhse, 0, "mh502s.p1", 0x0000, 0x010000, CRC(063cc07b) SHA1(0b43a5cf6094bd8c99e4395f31ff073389dd56ce), "Barcrest","Mad House (Barcrest) (MPU4) (MH5 0.2)" ) +GAME_CUSTOM( 199?, m4madhse__s, m4madhse, "mh502y.p1", 0x0000, 0x010000, CRC(3ec1955a) SHA1(6939e6f5d749249825c41df8e05957450eaf1007), "Barcrest","Mad House (Barcrest) (MPU4) (set 1)" ) GAME_CUSTOM( 199?, m4madhse__j, m4madhse, "mh502ad.p1", 0x0000, 0x010000, CRC(55714741) SHA1(287ed4c0b070537e3cf9bf3a47bdf205e34b7ea8), "Barcrest","Mad House (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4madhse__k, m4madhse, "mh502b.p1", 0x0000, 0x010000, CRC(7d6a3e3a) SHA1(5ac43616bde8079d430c7a8f78884770396cc9e9), "Barcrest","Mad House (Barcrest) (MPU4) (set 12)" ) GAME_CUSTOM( 199?, m4madhse__l, m4madhse, "mh502bd.p1", 0x0000, 0x010000, CRC(63bd7096) SHA1(ded53d603f7d1ed65914d9483923c74424964b59), "Barcrest","Mad House (Barcrest) (MPU4) (set 13)" ) @@ -4173,7 +4486,18 @@ GAME_CUSTOM( 199?, m4madhse__o, m4madhse, "mh502dr.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4madhse__p, m4madhse, "mh502dy.p1", 0x0000, 0x010000, CRC(de670300) SHA1(32e17baed9c971e879974489ee9da375a0dbf735), "Barcrest","Mad House (Barcrest) (MPU4) (set 17)" ) GAME_CUSTOM( 199?, m4madhse__q, m4madhse, "mh502k.p1", 0x0000, 0x010000, CRC(3aa341ec) SHA1(8012ee1d3f67fbdd5682ee07ac77dbb482b027ca), "Barcrest","Mad House (Barcrest) (MPU4) (set 18)" ) GAME_CUSTOM( 199?, m4madhse__r, m4madhse, "mh502r.p1", 0x0000, 0x010000, CRC(a3aabdb4) SHA1(74e53a315b10264c23b8b00d6a4d5f99d3f204a3), "Barcrest","Mad House (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4madhse__s, m4madhse, "mh502s.p1", 0x0000, 0x010000, CRC(063cc07b) SHA1(0b43a5cf6094bd8c99e4395f31ff073389dd56ce), "Barcrest","Mad House (Barcrest) (MPU4) (set 20)" ) +// "(C)1993 BARCREST" and "MD8 0.1" +GAME_CUSTOM( 199?, m4madhse__h, m4madhse, "md8s.p1", 0x0000, 0x010000, CRC(0d8a1a3e) SHA1(4df8b1c1834bbffb4798d9ed5135b6cb29b08e73), "Barcrest","Mad House (Barcrest) (MPU4) (MD8 0.1)" ) +GAME_CUSTOM( 199?, m4madhse__d, m4madhse, "md8c.p1", 0x0000, 0x010000, CRC(3d9c9cf7) SHA1(3f663fe9bd61d163d58bb4c51bea59121678aa76), "Barcrest","Mad House (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4madhse__e, m4madhse, "md8d.p1", 0x0000, 0x010000, CRC(6d150df3) SHA1(e93fda497696b06ad854b3b06e2b61737cef3fc1), "Barcrest","Mad House (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4madhse__f, m4madhse, "md8dy.p1", 0x0000, 0x010000, CRC(af01407f) SHA1(46359220e34dede4cc5e8c11699d01460dd9a469), "Barcrest","Mad House (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4madhse__g, m4madhse, "md8k.p1", 0x0000, 0x010000, CRC(c713f706) SHA1(65480171d3d69a670b9ce2c566425998134ad502), "Barcrest","Mad House (Barcrest) (MPU4) (set 8)" ) +GAME_CUSTOM( 199?, m4madhse__i, m4madhse, "md8y.p1", 0x0000, 0x010000, CRC(15fc9590) SHA1(a01bd5cea5873c8175262f668e330b2975a03eb1), "Barcrest","Mad House (Barcrest) (MPU4) (set 10)" ) +// "(C)1993 BARCREST" and "MAD 0.5" +GAME_CUSTOM( 199?, m4madhse__c, m4madhse, "mads.p1", 0x0000, 0x010000, CRC(d4ea7f14) SHA1(808c64b65542c6bfd8336feec025e947c8c904ee), "Barcrest","Mad House (Barcrest) (MPU4) (MAD 0.5)" ) +GAME_CUSTOM( 199?, m4madhse__a, m4madhse, "madc.p1", 0x0000, 0x010000, CRC(96da2d58) SHA1(23686a4dc5adaac81ba173f8fa0ea5ff8ac26260), "Barcrest","Mad House (Barcrest) (MPU4) (set 2)" ) +// "(C)1993 BARCREST" and "MHT 0.2" +GAME_CUSTOM( 199?, m4madhse__0, m4madhse, "mhts.p1", 0x0000, 0x010000, CRC(751b4574) SHA1(a04820f48e0df936813ca984c77da08d703e6474), "Barcrest","Mad House (Barcrest) (MPU4) (MHT 0.2)" ) GAME_CUSTOM( 199?, m4madhse__t, m4madhse, "mhtad.p1", 0x0000, 0x010000, CRC(edfe01be) SHA1(5d738acc0a39906f085c1bc55caf683d6b6a4f6c), "Barcrest","Mad House (Barcrest) (MPU4) (set 21)" ) GAME_CUSTOM( 199?, m4madhse__u, m4madhse, "mhtb.p1", 0x0000, 0x010000, CRC(272a3c62) SHA1(c6d71295d11350a0b778382a276b8bdf88faede9), "Barcrest","Mad House (Barcrest) (MPU4) (set 22)" ) GAME_CUSTOM( 199?, m4madhse__v, m4madhse, "mhtbd.p1", 0x0000, 0x010000, CRC(f73a3808) SHA1(5f74eb64a9b12b9c2c1141b30e64325b8a5beece), "Barcrest","Mad House (Barcrest) (MPU4) (set 23)" ) @@ -4181,7 +4505,7 @@ GAME_CUSTOM( 199?, m4madhse__w, m4madhse, "mhtd.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4madhse__x, m4madhse, "mhtdk.p1", 0x0000, 0x010000, CRC(ceafb47e) SHA1(32b7e23229524cc79ca24ee00368a9b4c76a35c7), "Barcrest","Mad House (Barcrest) (MPU4) (set 25)" ) GAME_CUSTOM( 199?, m4madhse__y, m4madhse, "mhtdy.p1", 0x0000, 0x010000, CRC(36748788) SHA1(04a541f1a6b94dca2bff16d50674f968e896bea7), "Barcrest","Mad House (Barcrest) (MPU4) (set 26)" ) GAME_CUSTOM( 199?, m4madhse__z, m4madhse, "mhtk.p1", 0x0000, 0x010000, CRC(1ebfb014) SHA1(493bf3ca37f2e49c5f00d7b8f6122e42f7b71f73), "Barcrest","Mad House (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4madhse__0, m4madhse, "mhts.p1", 0x0000, 0x010000, CRC(751b4574) SHA1(a04820f48e0df936813ca984c77da08d703e6474), "Barcrest","Mad House (Barcrest) (MPU4) (set 28)" ) +GAME_CUSTOM( 199?, m4madhse__b, m4madhse, "mhty.p1", 0x0000, 0x010000, CRC(e86e4542) SHA1(fb1b1d319c443daa1184eac4f6b0668ff3c6a1c5), "Barcrest","Mad House (Barcrest) (MPU4) (set 3)" ) #define M4NHTT_EXTRA_ROMS \ ROM_REGION( 0x100000, "msm6376", 0 ) \ @@ -4195,7 +4519,9 @@ GAME_CUSTOM( 199?, m4madhse__0, m4madhse, "mhts.p1", 0x0000, 0x010000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4nhtt, 0, "nht01b.p1", 0x0000, 0x010000, CRC(8201a051) SHA1(a87550c0cdc0b14a30e8814bfef939eb5cf414f8), "Barcrest","New Hit the Top (Barcrest) (MPU4) (set 1)" ) +// "(C)1991 BARCREST" and "NHT 0.1" +GAME_CUSTOM( 199?, m4nhtt, 0, "nht01s.p1", 0x0000, 0x010000, CRC(a4a44ddf) SHA1(e64953f3cd2559a8ebdacb2b0c12c84fd5c4b836), "Barcrest","New Hit the Top (Barcrest) (MPU4) (NHT 0.1)" ) +GAME_CUSTOM( 199?, m4nhtt__i, m4nhtt, "nht01b.p1", 0x0000, 0x010000, CRC(8201a051) SHA1(a87550c0cdc0b14a30e8814bfef939eb5cf414f8), "Barcrest","New Hit the Top (Barcrest) (MPU4) (set 1)" ) GAME_CUSTOM( 199?, m4nhtt__a, m4nhtt, "nht01ad.p1", 0x0000, 0x010000, CRC(a5c6ce9a) SHA1(f21dcc1a70fa45637f236aede9c6fa2e962af8f5), "Barcrest","New Hit the Top (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4nhtt__b, m4nhtt, "nht01bd.p1", 0x0000, 0x010000, CRC(21c50c56) SHA1(66c7dfa15447a2519cad58daebe0832c4c2f6f5e), "Barcrest","New Hit the Top (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4nhtt__c, m4nhtt, "nht01d.p1", 0x0000, 0x010000, CRC(4d0868a0) SHA1(1f70273928582b87693f046e10e22c19d6bcf87e), "Barcrest","New Hit the Top (Barcrest) (MPU4) (set 4)" ) @@ -4204,7 +4530,6 @@ GAME_CUSTOM( 199?, m4nhtt__e, m4nhtt, "nht01dr.p1", 0x0000, 0x010000, CRC(7 GAME_CUSTOM( 199?, m4nhtt__f, m4nhtt, "nht01dy.p1", 0x0000, 0x010000, CRC(954df9ba) SHA1(61cfb2c68921576549d40ba6776877322e4dd338), "Barcrest","New Hit the Top (Barcrest) (MPU4) (set 7)" ) GAME_CUSTOM( 199?, m4nhtt__g, m4nhtt, "nht01k.p1", 0x0000, 0x010000, CRC(c9ab03b3) SHA1(acc26a54bfe6e26fc2c8ac58268ee9347bc4ddb9), "Barcrest","New Hit the Top (Barcrest) (MPU4) (set 8)" ) GAME_CUSTOM( 199?, m4nhtt__h, m4nhtt, "nht01r.p1", 0x0000, 0x010000, CRC(f5ec653e) SHA1(aed9320ab164dd0f2b3dfaee3aacde5ba62e31ef), "Barcrest","New Hit the Top (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4nhtt__i, m4nhtt, "nht01s.p1", 0x0000, 0x010000, CRC(a4a44ddf) SHA1(e64953f3cd2559a8ebdacb2b0c12c84fd5c4b836), "Barcrest","New Hit the Top (Barcrest) (MPU4) (set 10)" ) GAME_CUSTOM( 199?, m4nhtt__j, m4nhtt, "nht01y.p1", 0x0000, 0x010000, CRC(54c02b5d) SHA1(75b3056d714ee232325f8a1058bef46d902d0b64), "Barcrest","New Hit the Top (Barcrest) (MPU4) (set 11)" ) @@ -4221,8 +4546,8 @@ GAME_CUSTOM( 199?, m4nhtt__j, m4nhtt, "nht01y.p1", 0x0000, 0x010000, CRC(5 GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4przfrt, 0, "pfr03s.p1", 0x0000, 0x010000, CRC(0ea80adb) SHA1(948a23fe8ccf6f423957a478a57bb875cc7b2cc2), "Barcrest","Prize Fruit & Loot (Barcrest) (MPU4) (set 1)" ) +// "(C)1991 BARCREST" and "PFR 0.3" +GAME_CUSTOM( 199?, m4przfrt, 0, "pfr03s.p1", 0x0000, 0x010000, CRC(0ea80adb) SHA1(948a23fe8ccf6f423957a478a57bb875cc7b2cc2), "Barcrest","Prize Fruit & Loot (Barcrest) (MPU4) (PFR 0.3)" ) GAME_CUSTOM( 199?, m4przfrt__a, m4przfrt, "pfr03ad.p1", 0x0000, 0x010000, CRC(860cbd1b) SHA1(a3a3c0c3c5aff9b469ae82cf514937973b752421), "Barcrest","Prize Fruit & Loot (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4przfrt__b, m4przfrt, "pfr03b.p1", 0x0000, 0x010000, CRC(2a7ba02c) SHA1(178fbf0301d263b32f9a8ac00e79731d074576d9), "Barcrest","Prize Fruit & Loot (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4przfrt__c, m4przfrt, "pfr03bd.p1", 0x0000, 0x010000, CRC(dfff487c) SHA1(bf4bbb17241595ceb2c373c2bbd72fcecddedfd2), "Barcrest","Prize Fruit & Loot (Barcrest) (MPU4) (set 4)" ) @@ -4249,7 +4574,9 @@ GAME_CUSTOM( 199?, m4przfrt__l, m4przfrt, "pfr03o.p1", 0x0000, 0x010000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4tutcl, 0, "f2u01ad.p1", 0x0000, 0x010000, CRC(65537552) SHA1(b0a761dcc6e0a9f01cfb934b570356ca67fdd099), "Barcrest","Tutti Fruity Classic (Barcrest) (MPU4) (set 1)" ) +// "(C)1991 BARCREST" and "F2U 0.1" +GAME_CUSTOM( 199?, m4tutcl, 0, "f2u01s.p1", 0x0000, 0x010000, CRC(25b68f22) SHA1(7f484dbc841e1e87d9f5e322cf497b6b68e4a096), "Barcrest","Tutti Fruity Classic (Barcrest) (MPU4) (F2U 0.1)" ) +GAME_CUSTOM( 199?, m4tutcl__j, m4tutcl, "f2u01ad.p1", 0x0000, 0x010000, CRC(65537552) SHA1(b0a761dcc6e0a9f01cfb934b570356ca67fdd099), "Barcrest","Tutti Fruity Classic (Barcrest) (MPU4) (set 1)" ) GAME_CUSTOM( 199?, m4tutcl__a, m4tutcl, "f2u01b.p1", 0x0000, 0x010000, CRC(2cae37df) SHA1(5aed985476b7b747a99a4046b846ee4a359776af), "Barcrest","Tutti Fruity Classic (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4tutcl__b, m4tutcl, "f2u01bd.p1", 0x0000, 0x010000, CRC(0dd91ccf) SHA1(bcdfc39025d02e7a51f69757238dfa44fe9d3655), "Barcrest","Tutti Fruity Classic (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4tutcl__c, m4tutcl, "f2u01c.p1", 0x0000, 0x010000, CRC(6b6d9bb9) SHA1(140e9cbb8b484116e5fb9a7670d41fb0bcb37ec0), "Barcrest","Tutti Fruity Classic (Barcrest) (MPU4) (set 4)" ) @@ -4259,7 +4586,6 @@ GAME_CUSTOM( 199?, m4tutcl__f, m4tutcl, "f2u01dr.p1", 0x0000, 0x010000, CR GAME_CUSTOM( 199?, m4tutcl__g, m4tutcl, "f2u01dy.p1", 0x0000, 0x010000, CRC(24dd0a73) SHA1(a75129e414dd8cbe5f6f44e39b1d3dc3d7dfafb2), "Barcrest","Tutti Fruity Classic (Barcrest) (MPU4) (set 8)" ) GAME_CUSTOM( 199?, m4tutcl__h, m4tutcl, "f2u01k.p1", 0x0000, 0x010000, CRC(b9cec403) SHA1(90a1f49202ea9b79e2ab097cf95cf94088c52926), "Barcrest","Tutti Fruity Classic (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4tutcl__i, m4tutcl, "f2u01r.p1", 0x0000, 0x010000, CRC(471e39d7) SHA1(874db6f2d04ed0b2c6756efba5fa1140d2fbfc58), "Barcrest","Tutti Fruity Classic (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4tutcl__j, m4tutcl, "f2u01s.p1", 0x0000, 0x010000, CRC(25b68f22) SHA1(7f484dbc841e1e87d9f5e322cf497b6b68e4a096), "Barcrest","Tutti Fruity Classic (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4tutcl__k, m4tutcl, "f2u01y.p1", 0x0000, 0x010000, CRC(5a583a6f) SHA1(0421d079de12a7379c13832108e8608c9a01f41d), "Barcrest","Tutti Fruity Classic (Barcrest) (MPU4) (set 12)" ) @@ -4276,8 +4602,15 @@ GAME_CUSTOM( 199?, m4tutcl__k, m4tutcl, "f2u01y.p1", 0x0000, 0x010000, CR ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4przmns, 0, "spmy.p1", 0x0000, 0x010000, CRC(2b27b2a0) SHA1(07950616da39e39d19452859390d3eaad89ea377), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (set 1)" ) +// "(C)1991 BARCREST" and "SPM 0.2" +GAME_CUSTOM( 199?, m4przmns, 0, "spms.p1", 0x0000, 0x010000, CRC(7d684358) SHA1(b07b13d6827e5ea4127eb763f4233a3d35ea99e6), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (SPM 0.2)" ) +GAME_CUSTOM( 199?, m4przmns__n, m4przmns, "spmy.p1", 0x0000, 0x010000, CRC(2b27b2a0) SHA1(07950616da39e39d19452859390d3eaad89ea377), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (set 1)" ) +GAME_CUSTOM( 199?, m4przmns__j, m4przmns, "spmb.p1", 0x0000, 0x010000, CRC(752dd1c6) SHA1(e180c959bc3fb8bce9da22ed6e74fa03e4562a74), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (set 11)" ) +GAME_CUSTOM( 199?, m4przmns__k, m4przmns, "spmd.p1", 0x0000, 0x010000, CRC(34172b4f) SHA1(8594d3863e3de3e6300cd5f4588545bf82c89e00), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (set 12)" ) +GAME_CUSTOM( 199?, m4przmns__l, m4przmns, "spmdy.p1", 0x0000, 0x010000, CRC(1abed85e) SHA1(0b2d7e0127c30f6704a7f64a2955ecf3e8010206), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (set 13)" ) +GAME_CUSTOM( 199?, m4przmns__m, m4przmns, "spmk.p1", 0x0000, 0x010000, CRC(ba2f467a) SHA1(327ebad946b028f387e04e9db9f882320995d175), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (set 14)" ) +// "(C)1991 BARCREST" and "SM8 0.1" +GAME_CUSTOM( 199?, m4przmns__h, m4przmns, "sm8s.p1", 0x0000, 0x010000, CRC(be159855) SHA1(277884b5417857fa661b09d3e41bef2b22b89f6c), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (SM8 0.1)" ) GAME_CUSTOM( 199?, m4przmns__a, m4przmns, "sm8ad.p1", 0x0000, 0x010000, CRC(6272ae09) SHA1(96130f62646424dd9f2f34f2858a2635ec615f03), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4przmns__b, m4przmns, "sm8b.p1", 0x0000, 0x010000, CRC(25d95c1b) SHA1(7aa448d1fb383d1b89e71bbc63a554eaa5e06141), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4przmns__c, m4przmns, "sm8bd.p1", 0x0000, 0x010000, CRC(bf58108f) SHA1(a0dfc2447a014f4a9b1abad3f954ee9c58251289), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (set 4)" ) @@ -4285,13 +4618,7 @@ GAME_CUSTOM( 199?, m4przmns__d, m4przmns, "sm8d.p1", 0x0000, 0x010000, CRC GAME_CUSTOM( 199?, m4przmns__e, m4przmns, "sm8dk.p1", 0x0000, 0x010000, CRC(f077ac65) SHA1(9baa5d2fd9833838d48c202a57aaa98783130dbc), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (set 6)" ) GAME_CUSTOM( 199?, m4przmns__f, m4przmns, "sm8dy.p1", 0x0000, 0x010000, CRC(2df61788) SHA1(003d6e172cee41cf9704dc285c2a0b39ee247ea8), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (set 7)" ) GAME_CUSTOM( 199?, m4przmns__g, m4przmns, "sm8k.p1", 0x0000, 0x010000, CRC(8d02ca2b) SHA1(b5defdc50fee9e9f1379571b638702c0779fd450), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4przmns__h, m4przmns, "sm8s.p1", 0x0000, 0x010000, CRC(be159855) SHA1(277884b5417857fa661b09d3e41bef2b22b89f6c), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4przmns__i, m4przmns, "sm8y.p1", 0x0000, 0x010000, CRC(51e76e1d) SHA1(3045ab447871c7369c5ed53da75326e64d6e57d9), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4przmns__j, m4przmns, "spmb.p1", 0x0000, 0x010000, CRC(752dd1c6) SHA1(e180c959bc3fb8bce9da22ed6e74fa03e4562a74), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4przmns__k, m4przmns, "spmd.p1", 0x0000, 0x010000, CRC(34172b4f) SHA1(8594d3863e3de3e6300cd5f4588545bf82c89e00), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4przmns__l, m4przmns, "spmdy.p1", 0x0000, 0x010000, CRC(1abed85e) SHA1(0b2d7e0127c30f6704a7f64a2955ecf3e8010206), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4przmns__m, m4przmns, "spmk.p1", 0x0000, 0x010000, CRC(ba2f467a) SHA1(327ebad946b028f387e04e9db9f882320995d175), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4przmns__n, m4przmns, "spms.p1", 0x0000, 0x010000, CRC(7d684358) SHA1(b07b13d6827e5ea4127eb763f4233a3d35ea99e6), "Barcrest","Prize Money Showcase (Barcrest) (MPU4) (set 15)" ) #define M4PRZRF_EXTRA_ROMS \ ROM_REGION( 0x100000, "msm6376", ROMREGION_ERASE00 ) \ @@ -4305,7 +4632,9 @@ GAME_CUSTOM( 199?, m4przmns__n, m4przmns, "spms.p1", 0x0000, 0x010000, CRC ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4przrf, 0, "pr8ad.p1", 0x0000, 0x020000, CRC(ebada7c9) SHA1(4a1e2f746116c23f87b53d25bd8b11322962306f), "Barcrest","Prize Rich And Famous (Barcrest) (MPU4) (set 1)" ) +// "(C)1993 BARCREST" and "PR8 0.1" +GAME_CUSTOM( 199?, m4przrf, 0, "pr8s.p1", 0x0000, 0x020000, CRC(bbbdd4f4) SHA1(72c2a8b3404384b524f49fc2d6507e2d8dab85cb), "Barcrest","Prize Rich And Famous (Barcrest) (MPU4) (PR8 0.1)" ) +GAME_CUSTOM( 199?, m4przrf__i, m4przrf, "pr8ad.p1", 0x0000, 0x020000, CRC(ebada7c9) SHA1(4a1e2f746116c23f87b53d25bd8b11322962306f), "Barcrest","Prize Rich And Famous (Barcrest) (MPU4) (set 1)" ) GAME_CUSTOM( 199?, m4przrf__a, m4przrf, "pr8b.p1", 0x0000, 0x020000, CRC(4a6448b6) SHA1(061dbc1603fff0cb60e02acdf21881047b2b7d43), "Barcrest","Prize Rich And Famous (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4przrf__b, m4przrf, "pr8bd.p1", 0x0000, 0x020000, CRC(66b7090c) SHA1(774f5b1403109ccc7ac1bc188f30e8b3a5025aad), "Barcrest","Prize Rich And Famous (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4przrf__c, m4przrf, "pr8d.p1", 0x0000, 0x020000, CRC(377f43c0) SHA1(14e29f1832afc47f06752d7da11cc2cb40fcb368), "Barcrest","Prize Rich And Famous (Barcrest) (MPU4) (set 4)" ) @@ -4314,7 +4643,6 @@ GAME_CUSTOM( 199?, m4przrf__e, m4przrf, "pr8dk.p1", 0x0000, 0x020000, CRC(2c GAME_CUSTOM( 199?, m4przrf__f, m4przrf, "pr8dy.p1", 0x0000, 0x020000, CRC(ab9381a4) SHA1(90c3a048ad5c1e19007b6e089750a9e4b299d2a3), "Barcrest","Prize Rich And Famous (Barcrest) (MPU4) (set 7)" ) GAME_CUSTOM( 199?, m4przrf__g, m4przrf, "pr8j.p1", 0x0000, 0x020000, CRC(6eb1de65) SHA1(b9e13173191e9a45fab29936b303a914e372918f), "Barcrest","Prize Rich And Famous (Barcrest) (MPU4) (set 8)" ) GAME_CUSTOM( 199?, m4przrf__h, m4przrf, "pr8k.p1", 0x0000, 0x020000, CRC(00a3e0e0) SHA1(c0671052de5cdd7f169ca50590b9c4f0f10cb678), "Barcrest","Prize Rich And Famous (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4przrf__i, m4przrf, "pr8s.p1", 0x0000, 0x020000, CRC(bbbdd4f4) SHA1(72c2a8b3404384b524f49fc2d6507e2d8dab85cb), "Barcrest","Prize Rich And Famous (Barcrest) (MPU4) (set 10)" ) GAME_CUSTOM( 199?, m4przrf__j, m4przrf, "pr8y.p1", 0x0000, 0x020000, CRC(8740c01e) SHA1(c75f4ad724e735a2ffabc9f7cce96dcb341eaf4a), "Barcrest","Prize Rich And Famous (Barcrest) (MPU4) (set 11)" ) #define M4PRZRFM_EXTRA_ROMS \ @@ -4329,13 +4657,15 @@ GAME_CUSTOM( 199?, m4przrf__j, m4przrf, "pr8y.p1", 0x0000, 0x020000, CRC(87 ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4przrfm, 0, "prub.p1", 0x0000, 0x010000, CRC(748f220f) SHA1(5d729057d521fa656375610e424cfd4088f6ea02), "Barcrest","Prize Run For Your Money (Barcrest) (MPU4) (set 1)" ) +// "(C)1993 BARCREST" and "PRU 0.2" +GAME_CUSTOM( 199?, m4przrfm, 0, "prus.p1", 0x0000, 0x010000, CRC(d6c22253) SHA1(f9a25dd1c6f16849a6eb1febdc2da16080cc6838), "Barcrest","Prize Run For Your Money (Barcrest) (MPU4) (PRU 0.2)" ) +GAME_CUSTOM( 199?, m4przrfm__d, m4przrfm, "prub.p1", 0x0000, 0x010000, CRC(748f220f) SHA1(5d729057d521fa656375610e424cfd4088f6ea02), "Barcrest","Prize Run For Your Money (Barcrest) (MPU4) (set 1)" ) GAME_CUSTOM( 199?, m4przrfm__a, m4przrfm, "prud.p1", 0x0000, 0x010000, CRC(426bf7c1) SHA1(998b7968d4ed2fb0d1fcaf13929c76670100d9df), "Barcrest","Prize Run For Your Money (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4przrfm__b, m4przrfm, "prudy.p1", 0x0000, 0x010000, CRC(e9f76ebd) SHA1(8f1151e123e73ac40fdb6f071960d1ed3e72692a), "Barcrest","Prize Run For Your Money (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4przrfm__c, m4przrfm, "pruk.p1", 0x0000, 0x010000, CRC(b995d098) SHA1(22107fbbc8c4e026fc34159114cdbfcd130f814e), "Barcrest","Prize Run For Your Money (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4przrfm__d, m4przrfm, "prus.p1", 0x0000, 0x010000, CRC(d6c22253) SHA1(f9a25dd1c6f16849a6eb1febdc2da16080cc6838), "Barcrest","Prize Run For Your Money (Barcrest) (MPU4) (set 5)" ) GAME_CUSTOM( 199?, m4przrfm__e, m4przrfm, "pruy.p1", 0x0000, 0x010000, CRC(fcd8add4) SHA1(14e922daf24d981a3a65463bf64213722d8ba758), "Barcrest","Prize Run For Your Money (Barcrest) (MPU4) (set 6)" ) +// "(C)1993 BARCREST" and "RM8 0.1" +GAME_CUSTOM( 199?, m4przrfm__n, m4przrfm, "rm8s.p1", 0x0000, 0x010000, CRC(9ab83f24) SHA1(bdc72a9d6f22244a2be86b035fac84433705ce78), "Barcrest","Prize Run For Your Money (Barcrest) (MPU4) (RM8 0.1)" ) GAME_CUSTOM( 199?, m4przrfm__f, m4przrfm, "rm8b.p1", 0x0000, 0x010000, CRC(181da11e) SHA1(c06a9626a541a56d707f9b80806714020cefa7b2), "Barcrest","Prize Run For Your Money (Barcrest) (MPU4) (set 7)" ) GAME_CUSTOM( 199?, m4przrfm__g, m4przrfm, "rm8bd.p1", 0x0000, 0x010000, CRC(b3d983b5) SHA1(7881c31617855983981f93190afddb0aa880ce0a), "Barcrest","Prize Run For Your Money (Barcrest) (MPU4) (set 8)" ) GAME_CUSTOM( 199?, m4przrfm__h, m4przrfm, "rm8d.p1", 0x0000, 0x010000, CRC(94377ab0) SHA1(2c43dfd11eeca53faae661d7af4a986fdbb6d7e9), "Barcrest","Prize Run For Your Money (Barcrest) (MPU4) (set 9)" ) @@ -4344,7 +4674,6 @@ GAME_CUSTOM( 199?, m4przrfm__j, m4przrfm, "rm8dk.p1", 0x0000, 0x010000, GAME_CUSTOM( 199?, m4przrfm__k, m4przrfm, "rm8dy.p1", 0x0000, 0x010000, CRC(bac738e3) SHA1(21bd359cfeaf1e33268cecef08d8c7d23d89360c), "Barcrest","Prize Run For Your Money (Barcrest) (MPU4) (set 12)" ) GAME_CUSTOM( 199?, m4przrfm__l, m4przrfm, "rm8j.p1", 0x0000, 0x010000, CRC(b825b8fd) SHA1(6fa58784018fd7be6528e60d8642803cca55c15d), "Barcrest","Prize Run For Your Money (Barcrest) (MPU4) (set 13)" ) GAME_CUSTOM( 199?, m4przrfm__m, m4przrfm, "rm8k.p1", 0x0000, 0x010000, CRC(3f559f9e) SHA1(f70c127490859a3b4c405fd0efd18168dd3b0728), "Barcrest","Prize Run For Your Money (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4przrfm__n, m4przrfm, "rm8s.p1", 0x0000, 0x010000, CRC(9ab83f24) SHA1(bdc72a9d6f22244a2be86b035fac84433705ce78), "Barcrest","Prize Run For Your Money (Barcrest) (MPU4) (set 15)" ) GAME_CUSTOM( 199?, m4przrfm__o, m4przrfm, "rm8y.p1", 0x0000, 0x010000, CRC(47a3873e) SHA1(51baf82a7a4dee10b1a2f7862030f960912d8d7c), "Barcrest","Prize Run For Your Money (Barcrest) (MPU4) (set 16)" ) @@ -4364,12 +4693,13 @@ GAME_CUSTOM( 199?, m4przrfm__o, m4przrfm, "rm8y.p1", 0x0000, 0x010000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4przwo, 0, "pwo206ac", 0x0000, 0x010000, CRC(b9dd88e7) SHA1(4c60e7a28b538ff2483839fc66600037ccd99440), "Barcrest","Prize What's On (Barcrest) (MPU4) (set 1)" ) +// "(C)1991 BARCREST" and "PWO 0.5" +GAME_CUSTOM( 199?, m4przwo, 0, "pwos.p1", 0x0000, 0x010000, CRC(6a87aa68) SHA1(3dc8c006de3adcada43c3581be0ff921081ecff0), "Barcrest","Prize What's On (Barcrest) (MPU4) (PWO 0.5)" ) +GAME_CUSTOM( 199?, m4przwo__e, m4przwo, "pwo206ac", 0x0000, 0x010000, CRC(b9dd88e7) SHA1(4c60e7a28b538ff2483839fc66600037ccd99440), "Barcrest","Prize What's On (Barcrest) (MPU4) (PWO 0.5 C)" ) GAME_CUSTOM( 199?, m4przwo__a, m4przwo, "pwob.p1", 0x0000, 0x010000, CRC(9e9f65d7) SHA1(69d28a1e08d2bde1a9c4d55555478808546ad4f0), "Barcrest","Prize What's On (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4przwo__b, m4przwo, "pwod.p1", 0x0000, 0x010000, CRC(ae97b585) SHA1(d6b90d8b696a21f9fa6b06c63a329b1370edd224), "Barcrest","Prize What's On (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4przwo__c, m4przwo, "pwody.p1", 0x0000, 0x010000, CRC(3abfd1c9) SHA1(131811807396103641d73cd7cef1797a6cecb35b), "Barcrest","Prize What's On (Barcrest) (MPU4) (set 4)" ) GAME_CUSTOM( 199?, m4przwo__d, m4przwo, "pwok.p1", 0x0000, 0x010000, CRC(b8631e11) SHA1(c01aff60dad14945c2b45992f0112c6fc0ae7c5a), "Barcrest","Prize What's On (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4przwo__e, m4przwo, "pwos.p1", 0x0000, 0x010000, CRC(6a87aa68) SHA1(3dc8c006de3adcada43c3581be0ff921081ecff0), "Barcrest","Prize What's On (Barcrest) (MPU4) (set 6)" ) GAME_CUSTOM( 199?, m4przwo__f, m4przwo, "pwoy.p1", 0x0000, 0x010000, CRC(1ada4987) SHA1(05a0480f5a92faaedc8183d948c7e2d657bda2a4), "Barcrest","Prize What's On (Barcrest) (MPU4) (set 7)" ) @@ -4389,8 +4719,9 @@ GAME_CUSTOM( 199?, m4przwo__f, m4przwo, "pwoy.p1", 0x0000, 0x010000, CR ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4rhog2, 0, "2rh06c.p1", 0x0000, 0x020000, CRC(62c312bc) SHA1(6b02345c97b130deabad58a238ba9045161b5a80), "Barcrest","Road Hog 2 - I'm Back (Barcrest) (MPU4) (set 1)" ) +// "(C)1993 BARCREST" and "2RH 0.6" +GAME_CUSTOM( 199?, m4rhog2, 0, "2rh06s.p1", 0x0000, 0x020000, CRC(2ea10eed) SHA1(825bd6a53100b389f7d67ec49e4535c1de0ece74), "Barcrest","Road Hog 2 - I'm Back (Barcrest) (MPU4) (2RH 0.6)" ) +GAME_CUSTOM( 199?, m4rhog2__l, m4rhog2, "2rh06c.p1", 0x0000, 0x020000, CRC(62c312bc) SHA1(6b02345c97b130deabad58a238ba9045161b5a80), "Barcrest","Road Hog 2 - I'm Back (Barcrest) (MPU4) (set 1)" ) GAME_CUSTOM( 199?, m4rhog2__a, m4rhog2, "2rh06ad.p1", 0x0000, 0x020000, CRC(f44040d1) SHA1(685bbfe5f975c7e5b3efee17e1833f6f51b223af), "Barcrest","Road Hog 2 - I'm Back (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4rhog2__b, m4rhog2, "2rh06b.p1", 0x0000, 0x020000, CRC(5589afae) SHA1(15c9c65089cc2754d644dabfd6f5a32a2a788219), "Barcrest","Road Hog 2 - I'm Back (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4rhog2__c, m4rhog2, "2rh06bd.p1", 0x0000, 0x020000, CRC(795aee14) SHA1(7703c8456aaa2e27f71a7edbfa74fb2d7434a762), "Barcrest","Road Hog 2 - I'm Back (Barcrest) (MPU4) (set 4)" ) @@ -4402,39 +4733,9 @@ GAME_CUSTOM( 199?, m4rhog2__h, m4rhog2, "2rh06dy.p1", 0x0000, 0x020000, CR GAME_CUSTOM( 199?, m4rhog2__i, m4rhog2, "2rh06h.p1", 0x0000, 0x020000, CRC(9b65ffed) SHA1(65ab62fe772bd54793c45cc1105a189f21bb5d25), "Barcrest","Road Hog 2 - I'm Back (Barcrest) (MPU4) (set 10)" ) GAME_CUSTOM( 199?, m4rhog2__j, m4rhog2, "2rh06k.p1", 0x0000, 0x020000, CRC(1f4e07f8) SHA1(35459640bc215c465b84df073505e8fd6077a332), "Barcrest","Road Hog 2 - I'm Back (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4rhog2__k, m4rhog2, "2rh06r.p1", 0x0000, 0x020000, CRC(ac41bcc9) SHA1(0de0c0976ef5c58084f02310495b246dc7c23e60), "Barcrest","Road Hog 2 - I'm Back (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4rhog2__l, m4rhog2, "2rh06s.p1", 0x0000, 0x020000, CRC(2ea10eed) SHA1(825bd6a53100b389f7d67ec49e4535c1de0ece74), "Barcrest","Road Hog 2 - I'm Back (Barcrest) (MPU4) (set 13)" ) GAME_CUSTOM( 199?, m4rhog2__m, m4rhog2, "2rh06y.p1", 0x0000, 0x020000, CRC(98ad2706) SHA1(862a725bad97d28580dad102a71750465c7b0f5d), "Barcrest","Road Hog 2 - I'm Back (Barcrest) (MPU4) (set 14)" ) -#undef GAME_CUSTOM -#define GAME_CUSTOM(year, setname,parent,name,offset,length,hash,company,title) \ - ROM_START( setname ) \ - ROM_REGION( length, "maincpu", 0 ) \ - ROM_LOAD( name, offset, length, hash ) \ - ROM_END \ - GAME(year, setname, parent ,mod2 ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) - - - - -GAME_CUSTOM( 199?, m4suphv, 0, "hyperviper.bin", 0x0000, 0x010000, CRC(8373f6a3) SHA1(79bff20ab80ffe11447595c6fe8e5ab90d432e17), "Barcrest","Super Hyper Viper (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4suphv__a, m4suphv, "hv_05___.3h3", 0x0000, 0x010000, CRC(13bfa891) SHA1(ffddd14a019d52029bf8d4f680d8d05413a9f0b7), "Barcrest","Super Hyper Viper (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4suphv__b, m4suphv, "hv_05___.3o3", 0x0000, 0x010000, CRC(9ae86366) SHA1(614ae0ab184645c9f568796783f29a177eda3208), "Barcrest","Super Hyper Viper (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4suphv__c, m4suphv, "hv_05___.4n3", 0x0000, 0x010000, CRC(f607f351) SHA1(d7b779b80fa964a27b106bd9d5ca3be16a11d5e9), "Barcrest","Super Hyper Viper (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4suphv__d, m4suphv, "hv_05_d_.3h3", 0x0000, 0x010000, CRC(50c66ce8) SHA1(ef12525fc3ac82caf80326edaac81bb9fbc3245c), "Barcrest","Super Hyper Viper (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4suphv__e, m4suphv, "hv_05_d_.3o3", 0x0000, 0x010000, CRC(87dfca0e) SHA1(3ab4105680acc46d3633a722f40ff1af0a520a7f), "Barcrest","Super Hyper Viper (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4suphv__f, m4suphv, "hv_05_d_.4n3", 0x0000, 0x010000, CRC(f4d702d7) SHA1(268c7f6443c7ae587caf5b227fcd438530a06bcc), "Barcrest","Super Hyper Viper (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4suphv__g, m4suphv, "hv_10___.3h3", 0x0000, 0x010000, CRC(627caac7) SHA1(4851ce2441850743ea68ecbf89bde3f4cd6c2b4c), "Barcrest","Super Hyper Viper (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4suphv__h, m4suphv, "hv_10___.3o3", 0x0000, 0x010000, CRC(02e4d86a) SHA1(47aa83e8bcd85e8ba7fb972cdd1ead7fe21e0418), "Barcrest","Super Hyper Viper (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4suphv__i, m4suphv, "hv_10_d_.3h3", 0x0000, 0x010000, CRC(15cfa26e) SHA1(6bc3feaba65d1797b9945f23a89e983f56b13f79), "Barcrest","Super Hyper Viper (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4suphv__j, m4suphv, "hv_10_d_.3n3", 0x0000, 0x010000, CRC(b81f1d0a) SHA1(5fd293be2b75393069c9f5e099b4700ff930f081), "Barcrest","Super Hyper Viper (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4suphv__k, m4suphv, "hv_10_d_.3o3", 0x0000, 0x010000, CRC(85f176b9) SHA1(30380d58bf2834829764cbdbdc7d950632e61e6d), "Barcrest","Super Hyper Viper (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4suphv__l, m4suphv, "hvi05___.3h3", 0x0000, 0x010000, CRC(6959332e) SHA1(edaa5f86ad4389b0a3bc2e6679fe8f62520be3ae), "Barcrest","Super Hyper Viper (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4suphv__m, m4suphv, "hvi05___.3o3", 0x0000, 0x010000, CRC(cdba80a5) SHA1(6c9fac7e5ee324b18922cc7a053495f1977bcb6d), "Barcrest","Super Hyper Viper (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4suphv__n, m4suphv, "hvi05___.4n3", 0x0000, 0x010000, CRC(38a33c2b) SHA1(21004092b81e08146291fd3a025652f0edbe47dc), "Barcrest","Super Hyper Viper (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4suphv__o, m4suphv, "hvi10___.3h3", 0x0000, 0x010000, CRC(6c1b4b89) SHA1(e8eb4e689d43c5b9e8354aa7375ca3ba12ed1160), "Barcrest","Super Hyper Viper (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4suphv__p, m4suphv, "hvi10___.3n3", 0x0000, 0x010000, CRC(9d95cf8c) SHA1(26daf3975e1e3a605bc4392700c5470b52450d6e), "Barcrest","Super Hyper Viper (Barcrest) (MPU4) (set 17)" ) - #define M4SHODF_EXTRA_ROMS \ ROM_REGION( 0x100000, "msm6376", 0 ) \ @@ -4451,20 +4752,21 @@ GAME_CUSTOM( 199?, m4suphv__p, m4suphv, "hvi10___.3n3", 0x0000, 0x010000 GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4shodf, 0, "sdfs.p1", 0x0000, 0x010000, CRC(5df9abdb) SHA1(0dce3a7ff4d2f11c370a3a2578c592910a9e7371), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4shodf__a, m4shodf, "sd8b.p1", 0x0000, 0x010000, CRC(79f7fea2) SHA1(5bfa695aef54c9621a91beac2e6c8a09d3b2974b), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4shodf__b, m4shodf, "sd8d.p1", 0x0000, 0x010000, CRC(060a1b37) SHA1(fb4fbc1164f97f13eb10edbd4e8a37502d716340), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4shodf__c, m4shodf, "sd8dk.p1", 0x0000, 0x010000, CRC(20982264) SHA1(178ce24ce21e865608133fe2ae281ba2adbdf1d4), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4shodf__d, m4shodf, "sd8dy.p1", 0x0000, 0x010000, CRC(3fb73b48) SHA1(328f827a92e6fb8ccfb3a82c52401b2d31e974bf), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4shodf__e, m4shodf, "sd8k.p1", 0x0000, 0x010000, CRC(0d8f2238) SHA1(55643a1f9fe136fb724b05efc0362b6295c9caf9), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4shodf__f, m4shodf, "sd8s.p1", 0x0000, 0x010000, CRC(59d696e4) SHA1(e51a9a0bc1348b44e77f85343463154ad680ef89), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4shodf__g, m4shodf, "sd8y.p1", 0x0000, 0x010000, CRC(f79c2e78) SHA1(f6c298b77a9c32378e3f219063daab17e551d083), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (set 8)" ) +// "(C)1993 BARCREST" and "SDF 0.2" +GAME_CUSTOM( 199?, m4shodf, 0, "sdfs.p1", 0x0000, 0x010000, CRC(5df9abdb) SHA1(0dce3a7ff4d2f11c370a3a2578c592910a9e7371), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (SDF 0.2)" ) GAME_CUSTOM( 199?, m4shodf__h, m4shodf, "sdfb.p1", 0x0000, 0x010000, CRC(a15204bb) SHA1(c862822615e82e5f2f9f2f3cb7e31f804fd859be), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (set 9)" ) GAME_CUSTOM( 199?, m4shodf__i, m4shodf, "sdfd.p1", 0x0000, 0x010000, CRC(19913c83) SHA1(894da549e790b9062f36fdce90b8e8d284d513e6), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (set 10)" ) GAME_CUSTOM( 199?, m4shodf__j, m4shodf, "sdfdy.p1", 0x0000, 0x010000, CRC(df1325b1) SHA1(002780fcecf895d20a2a3c0c57fbe4dd675a1e42), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (set 11)" ) GAME_CUSTOM( 199?, m4shodf__k, m4shodf, "sdfk.p1", 0x0000, 0x010000, CRC(32def2fb) SHA1(45064f319cb5268745e8d5210ceed3a84a8e7f20), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (set 12)" ) GAME_CUSTOM( 199?, m4shodf__l, m4shodf, "sdfy.p1", 0x0000, 0x010000, CRC(dbb6aa80) SHA1(976f5811a0a578c7f2497ac654f7c416b6018a34), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (set 13)" ) +// "(C)1993 BARCREST" and "SD8 0.1" +GAME_CUSTOM( 199?, m4shodf__f, m4shodf, "sd8s.p1", 0x0000, 0x010000, CRC(59d696e4) SHA1(e51a9a0bc1348b44e77f85343463154ad680ef89), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (SD8 0.1)" ) +GAME_CUSTOM( 199?, m4shodf__a, m4shodf, "sd8b.p1", 0x0000, 0x010000, CRC(79f7fea2) SHA1(5bfa695aef54c9621a91beac2e6c8a09d3b2974b), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (set 2)" ) +GAME_CUSTOM( 199?, m4shodf__b, m4shodf, "sd8d.p1", 0x0000, 0x010000, CRC(060a1b37) SHA1(fb4fbc1164f97f13eb10edbd4e8a37502d716340), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4shodf__c, m4shodf, "sd8dk.p1", 0x0000, 0x010000, CRC(20982264) SHA1(178ce24ce21e865608133fe2ae281ba2adbdf1d4), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4shodf__d, m4shodf, "sd8dy.p1", 0x0000, 0x010000, CRC(3fb73b48) SHA1(328f827a92e6fb8ccfb3a82c52401b2d31e974bf), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4shodf__e, m4shodf, "sd8k.p1", 0x0000, 0x010000, CRC(0d8f2238) SHA1(55643a1f9fe136fb724b05efc0362b6295c9caf9), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4shodf__g, m4shodf, "sd8y.p1", 0x0000, 0x010000, CRC(f79c2e78) SHA1(f6c298b77a9c32378e3f219063daab17e551d083), "Barcrest","Showcase Duty Free (Barcrest) (MPU4) (set 8)" ) #define M4LUCKSC_EXTRA_ROMS \ @@ -4483,19 +4785,24 @@ GAME_CUSTOM( 199?, m4shodf__l, m4shodf, "sdfy.p1", 0x0000, 0x010000, CRC(db ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4lucksc, 0, "clu14d.p1", 0x0000, 0x020000, CRC(7a64199f) SHA1(62c7c8a4475a8005a1f969550d0717c9cc44bada), "Barcrest","Lucky Strike Club (Barcrest) (MPU4) (set 1)" ) +// "(C)1996 BARCREST" and "CLU 1.4" +GAME_CUSTOM( 199?, m4lucksc, 0, "clu14s.p1", 0x0000, 0x020000, CRC(5f66d7cc) SHA1(bd8a832739d7aef4d04b89a94dd2886e89a6e0c2), "Barcrest","Lucky Strike Club (Barcrest) (MPU4) (CLU 1.4)" ) +GAME_CUSTOM( 199?, m4lucksc__b, m4lucksc, "clu14d.p1", 0x0000, 0x020000, CRC(7a64199f) SHA1(62c7c8a4475a8005a1f969550d0717c9cc44bada), "Barcrest","Lucky Strike Club (Barcrest) (MPU4) (set 1)" ) GAME_CUSTOM( 199?, m4lucksc__a, m4lucksc, "clu14f.p1", 0x0000, 0x020000, CRC(07e90cdb) SHA1(5d4bf7f6f84f2890a0119de898f01e3e99bfbb7f), "Barcrest","Lucky Strike Club (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4lucksc__b, m4lucksc, "clu14s.p1", 0x0000, 0x020000, CRC(5f66d7cc) SHA1(bd8a832739d7aef4d04b89a94dd2886e89a6e0c2), "Barcrest","Lucky Strike Club (Barcrest) (MPU4) (set 3)" ) +// "(C)1996 BARCREST" and "GLS 0.6" +GAME_CUSTOM( 199?, m4lucksc__e, m4lucksc, "gls06s.p1", 0x0000, 0x020000, CRC(975adb8d) SHA1(b92d1ad93e51f55111921060939359471c2e5384), "Barcrest","Lucky Strike Club (Barcrest) (MPU4) (GLS 0.6)" ) GAME_CUSTOM( 199?, m4lucksc__c, m4lucksc, "gls06d.p1", 0x0000, 0x020000, CRC(2f7f8a9a) SHA1(04243f190597e3d3bdd258b8146b71e9c7cd90c7), "Barcrest","Lucky Strike Club (Barcrest) (MPU4) (set 4)" ) GAME_CUSTOM( 199?, m4lucksc__d, m4lucksc, "gls06f.p1", 0x0000, 0x020000, CRC(52f29fde) SHA1(97df15c89540d8bbb15abb86f6a2e9d0e022c9df), "Barcrest","Lucky Strike Club (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4lucksc__e, m4lucksc, "gls06s.p1", 0x0000, 0x020000, CRC(975adb8d) SHA1(b92d1ad93e51f55111921060939359471c2e5384), "Barcrest","Lucky Strike Club (Barcrest) (MPU4) (set 6)" ) +// "(C)1996 BARCREST" and "GS3 0.1" +GAME_CUSTOM( 199?, m4lucksc__h, m4lucksc, "gs301s.p1", 0x0000, 0x020000, CRC(53314dc6) SHA1(28b5d2a03b8f6221b80f10c46985fa906cc9be32), "Barcrest","Lucky Strike Club (Barcrest) (MPU4) (GS3 0.1)" ) GAME_CUSTOM( 199?, m4lucksc__f, m4lucksc, "gs301d.p1", 0x0000, 0x020000, CRC(e0807af7) SHA1(1740d4d56ad71407a4d2bb13b43c9d5f31caf638), "Barcrest","Lucky Strike Club (Barcrest) (MPU4) (set 7)" ) GAME_CUSTOM( 199?, m4lucksc__g, m4lucksc, "gs301f.p1", 0x0000, 0x020000, CRC(9d0d6fb3) SHA1(9206299604190deace09136ca2eebb9ad2792815), "Barcrest","Lucky Strike Club (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4lucksc__h, m4lucksc, "gs301s.p1", 0x0000, 0x020000, CRC(53314dc6) SHA1(28b5d2a03b8f6221b80f10c46985fa906cc9be32), "Barcrest","Lucky Strike Club (Barcrest) (MPU4) (set 9)" ) +// "(C)1996 BARCREST" and "LS3 0.1" +GAME_CUSTOM( 199?, m4lucksc__k, m4lucksc, "ls301s.p1", 0x0000, 0x020000, CRC(7e9e97f1) SHA1(43760792b529db8acb497d38ad3951abdebcf76b), "Barcrest","Lucky Strike Club (Barcrest) (MPU4) (LS3 0.1)" ) GAME_CUSTOM( 199?, m4lucksc__i, m4lucksc, "ls301d.p1", 0x0000, 0x020000, CRC(39fb0ddf) SHA1(3a6934892585bde6a99f1d2e2fd95677cf37fcfe), "Barcrest","Lucky Strike Club (Barcrest) (MPU4) (set 10)" ) GAME_CUSTOM( 199?, m4lucksc__j, m4lucksc, "ls301f.p1", 0x0000, 0x020000, CRC(4476189b) SHA1(b94c6abbbf37ae28869b1f9c882de8fa56b2c676), "Barcrest","Lucky Strike Club (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4lucksc__k, m4lucksc, "ls301s.p1", 0x0000, 0x020000, CRC(7e9e97f1) SHA1(43760792b529db8acb497d38ad3951abdebcf76b), "Barcrest","Lucky Strike Club (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4lucksc__l, m4lucksc, "lsc_.1_1", 0x0000, 0x020000, CRC(79ce3db0) SHA1(409e9d3b08284dee3af696fb7c839c0ca35eddee), "Barcrest","Lucky Strike Club (Barcrest) (MPU4) (set 13)" ) +// "(C)1998 BWB" and "LSC 1.0" +GAME_CUSTOM( 199?, m4lucksc__l, m4lucksc, "lsc_.1_1", 0x0000, 0x020000, CRC(79ce3db0) SHA1(409e9d3b08284dee3af696fb7c839c0ca35eddee), "Bwb","Lucky Strike Club (Barcrest) (MPU4) (LSC 1.0)" ) #define M4PRZLUX_EXTRA_ROMS \ @@ -4512,7 +4819,8 @@ GAME_CUSTOM( 199?, m4lucksc__l, m4lucksc, "lsc_.1_1", 0x0000, 0x020000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4przlux, 0, "plxs.p1", 0x0000, 0x010000, CRC(0aea0339) SHA1(28da52924fe2bf00799ef466143103e08399f5f5), "Barcrest","Prize Luxor (Barcrest) (MPU4) (set 1)" ) +// "(C)1993 BARCREST" and "PLX 0.2" +GAME_CUSTOM( 199?, m4przlux, 0, "plxs.p1", 0x0000, 0x010000, CRC(0aea0339) SHA1(28da52924fe2bf00799ef466143103e08399f5f5), "Barcrest","Prize Luxor (Barcrest) (MPU4) (PLX 0.2)" ) GAME_CUSTOM( 199?, m4przlux__a, m4przlux, "plxad.p1", 0x0000, 0x010000, CRC(e52ddf4f) SHA1(ec3f198fb6658cadd45046ef7586f9178f95d814), "Barcrest","Prize Luxor (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4przlux__b, m4przlux, "plxb.p1", 0x0000, 0x010000, CRC(03b0f7bd) SHA1(0ce1cec1afa0a2efee3bc55a2b9cdf8fec7d3ebc), "Barcrest","Prize Luxor (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4przlux__c, m4przlux, "plxd.p1", 0x0000, 0x010000, CRC(46ae371e) SHA1(a164d0336ed6bf7d25f406e28a01bbec86f4b723), "Barcrest","Prize Luxor (Barcrest) (MPU4) (set 4)" ) @@ -4534,33 +4842,33 @@ GAME_CUSTOM( 199?, m4przlux__f, m4przlux, "plxy.p1", 0x0000, 0x010000, CRC ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4topdog, 0, "td_20_b4.7_1", 0x0000, 0x010000, CRC(fe864f25) SHA1(b9f97aaf0425b4987b5bfa0b793e9226fdffe58f), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4topdog__a, m4topdog, "td_20_bc.7_1", 0x0000, 0x010000, CRC(3af18a9f) SHA1(0db7427d934363d021265fcac811505867f20d47), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4topdog__b, m4topdog, "td_20_d4.7_1", 0x0000, 0x010000, CRC(35da9e2d) SHA1(a2d1efd7c9cbe4bb5ce7574c6bea2edf55f3e08f), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4topdog__c, m4topdog, "td_20_dc.7_1", 0x0000, 0x010000, CRC(b90dfbce) SHA1(b9eb9393fbd33725d372b3b6648c261cf0ae486f), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4topdog__d, m4topdog, "td_20_k4.7_1", 0x0000, 0x010000, CRC(44618034) SHA1(0fce08e279a16d94422155c695b9b5f124b657ea), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4topdog__e, m4topdog, "td_20_kc.7_1", 0x0000, 0x010000, CRC(8ec10cf7) SHA1(cdc479f7f41f2205285a9db6539dce83feef6af4), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4topdog__f, m4topdog, "td_20a_4.7_1", 0x0000, 0x010000, CRC(e7bcc879) SHA1(6c963d059867bdd506af1826fe038daa560a3623), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4topdog__g, m4topdog, "td_20a_c.7_1", 0x0000, 0x010000, CRC(ea229917) SHA1(3e42c1eca1a89b2d536498156beddddcba9899b2), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4topdog__h, m4topdog, "td_20b_4.7_1", 0x0000, 0x010000, CRC(79468269) SHA1(709f34a0ebea816cb268b5dc36c3d02939cd6224), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4topdog__i, m4topdog, "td_20b_c.7_1", 0x0000, 0x010000, CRC(1301d28b) SHA1(b0fc0c73dedd89bbdb5845ec9f91530959fabeb6), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4topdog__j, m4topdog, "td_20bg4.7_1", 0x0000, 0x010000, CRC(4cb61b04) SHA1(6bb56cd06240c1bbb73406fe132e302822dec0df), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4topdog__k, m4topdog, "td_20bgc.7_1", 0x0000, 0x010000, CRC(8ce831d0) SHA1(e58ca3b38e8dc7196c27cf00123a6e7122bd7f58), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4topdog__l, m4topdog, "td_20bt4.7_1", 0x0000, 0x010000, CRC(2cdd5be2) SHA1(bc1afe70268eb7e3cb8fe1a43d262201faec0613), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4topdog__m, m4topdog, "td_20btc.7_1", 0x0000, 0x010000, CRC(67e96c75) SHA1(da9dd06f5d4773fa8e3945cf89cfdde4c465acb9), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4topdog__n, m4topdog, "td_25_bc.8_1", 0x0000, 0x010000, CRC(ac324184) SHA1(d6743c8cbbe719b12f47792a07ec2e898630591b), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4topdog__o, m4topdog, "td_25_dc.8_1", 0x0000, 0x010000, CRC(6ea8077c) SHA1(672976af1fad0257be7a15b839ec261653704be8), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4topdog__p, m4topdog, "td_25_kc.8_1", 0x0000, 0x010000, CRC(e006de48) SHA1(2c09e04d2dc3ec369c4c01eb1ff1af57156d05c1), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4topdog__q, m4topdog, "td_25a_c.8_1", 0x0000, 0x010000, CRC(84e54ba8) SHA1(dd09094854463f4b7033773be77d4a2d7f06b650), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4topdog__r, m4topdog, "td_25b_c.8_1", 0x0000, 0x010000, CRC(314f4f03) SHA1(a7c399ddf453305d0dbe2a63e57427b261c48c2c), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4topdog__s, m4topdog, "td_25bgc.8_1", 0x0000, 0x010000, CRC(efc0899c) SHA1(0d0e5a006d260a1bfcde7966c06360386c949f29), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4topdog__t, m4topdog, "td_25bgp.2_1", 0x0000, 0x010000, CRC(f0894f48) SHA1(63056dd434d18bb9a052db25cc6ce29d0c3f9f82), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4topdog__u, m4topdog, "td_25btc.8_1", 0x0000, 0x010000, CRC(f5dec7d9) SHA1(ffb361745aebb3c7d6bf4925d95904e8ced13a35), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4topdog__v, m4topdog, "td_30a_c.1_1", 0x0000, 0x010000, CRC(f0986895) SHA1(65c24de42a3009959c9bb7f5b42536aa6fd70c2b), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4topdog__w, m4topdog, "td_30b_c.1_1", 0x0000, 0x010000, CRC(7683cf72) SHA1(4319954b833ef6b0d88b8d22c5e700a9df96dc65), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4topdog__x, m4topdog, "td_30bdc.1_1", 0x0000, 0x010000, CRC(f5a4481b) SHA1(75b32b0996315b8ce833fd695377716dbeb0b7e4), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4topdog__y, m4topdog, "td_30bgc.1_1", 0x0000, 0x010000, CRC(1ffe440f) SHA1(adc1909fbbfe7e63bb89b29878bda5a6df776a6a), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4topdog__z, m4topdog, "td_30btc.1_1", 0x0000, 0x010000, CRC(5109516c) SHA1(a4919465286be9e1f0e7970a91a89738f8fcad4e), "Barcrest / Bwb","Top Dog (Barcrest) (MPU4) (set 27)" ) +GAME_CUSTOM( 199?, m4topdog, 0, "td_20_b4.7_1", 0x0000, 0x010000, CRC(fe864f25) SHA1(b9f97aaf0425b4987b5bfa0b793e9226fdffe58f), "Bwb","Top Dog (Barcrest) (MPU4) (set 1)" ) +GAME_CUSTOM( 199?, m4topdog__a, m4topdog, "td_20_bc.7_1", 0x0000, 0x010000, CRC(3af18a9f) SHA1(0db7427d934363d021265fcac811505867f20d47), "Bwb","Top Dog (Barcrest) (MPU4) (set 2)" ) +GAME_CUSTOM( 199?, m4topdog__b, m4topdog, "td_20_d4.7_1", 0x0000, 0x010000, CRC(35da9e2d) SHA1(a2d1efd7c9cbe4bb5ce7574c6bea2edf55f3e08f), "Bwb","Top Dog (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4topdog__c, m4topdog, "td_20_dc.7_1", 0x0000, 0x010000, CRC(b90dfbce) SHA1(b9eb9393fbd33725d372b3b6648c261cf0ae486f), "Bwb","Top Dog (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4topdog__d, m4topdog, "td_20_k4.7_1", 0x0000, 0x010000, CRC(44618034) SHA1(0fce08e279a16d94422155c695b9b5f124b657ea), "Bwb","Top Dog (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4topdog__e, m4topdog, "td_20_kc.7_1", 0x0000, 0x010000, CRC(8ec10cf7) SHA1(cdc479f7f41f2205285a9db6539dce83feef6af4), "Bwb","Top Dog (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4topdog__f, m4topdog, "td_20a_4.7_1", 0x0000, 0x010000, CRC(e7bcc879) SHA1(6c963d059867bdd506af1826fe038daa560a3623), "Bwb","Top Dog (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4topdog__g, m4topdog, "td_20a_c.7_1", 0x0000, 0x010000, CRC(ea229917) SHA1(3e42c1eca1a89b2d536498156beddddcba9899b2), "Bwb","Top Dog (Barcrest) (MPU4) (set 8)" ) +GAME_CUSTOM( 199?, m4topdog__h, m4topdog, "td_20b_4.7_1", 0x0000, 0x010000, CRC(79468269) SHA1(709f34a0ebea816cb268b5dc36c3d02939cd6224), "Bwb","Top Dog (Barcrest) (MPU4) (set 9)" ) +GAME_CUSTOM( 199?, m4topdog__i, m4topdog, "td_20b_c.7_1", 0x0000, 0x010000, CRC(1301d28b) SHA1(b0fc0c73dedd89bbdb5845ec9f91530959fabeb6), "Bwb","Top Dog (Barcrest) (MPU4) (set 10)" ) +GAME_CUSTOM( 199?, m4topdog__j, m4topdog, "td_20bg4.7_1", 0x0000, 0x010000, CRC(4cb61b04) SHA1(6bb56cd06240c1bbb73406fe132e302822dec0df), "Bwb","Top Dog (Barcrest) (MPU4) (set 11)" ) +GAME_CUSTOM( 199?, m4topdog__k, m4topdog, "td_20bgc.7_1", 0x0000, 0x010000, CRC(8ce831d0) SHA1(e58ca3b38e8dc7196c27cf00123a6e7122bd7f58), "Bwb","Top Dog (Barcrest) (MPU4) (set 12)" ) +GAME_CUSTOM( 199?, m4topdog__l, m4topdog, "td_20bt4.7_1", 0x0000, 0x010000, CRC(2cdd5be2) SHA1(bc1afe70268eb7e3cb8fe1a43d262201faec0613), "Bwb","Top Dog (Barcrest) (MPU4) (set 13)" ) +GAME_CUSTOM( 199?, m4topdog__m, m4topdog, "td_20btc.7_1", 0x0000, 0x010000, CRC(67e96c75) SHA1(da9dd06f5d4773fa8e3945cf89cfdde4c465acb9), "Bwb","Top Dog (Barcrest) (MPU4) (set 14)" ) +GAME_CUSTOM( 199?, m4topdog__n, m4topdog, "td_25_bc.8_1", 0x0000, 0x010000, CRC(ac324184) SHA1(d6743c8cbbe719b12f47792a07ec2e898630591b), "Bwb","Top Dog (Barcrest) (MPU4) (set 15)" ) +GAME_CUSTOM( 199?, m4topdog__o, m4topdog, "td_25_dc.8_1", 0x0000, 0x010000, CRC(6ea8077c) SHA1(672976af1fad0257be7a15b839ec261653704be8), "Bwb","Top Dog (Barcrest) (MPU4) (set 16)" ) +GAME_CUSTOM( 199?, m4topdog__p, m4topdog, "td_25_kc.8_1", 0x0000, 0x010000, CRC(e006de48) SHA1(2c09e04d2dc3ec369c4c01eb1ff1af57156d05c1), "Bwb","Top Dog (Barcrest) (MPU4) (set 17)" ) +GAME_CUSTOM( 199?, m4topdog__q, m4topdog, "td_25a_c.8_1", 0x0000, 0x010000, CRC(84e54ba8) SHA1(dd09094854463f4b7033773be77d4a2d7f06b650), "Bwb","Top Dog (Barcrest) (MPU4) (set 18)" ) +GAME_CUSTOM( 199?, m4topdog__r, m4topdog, "td_25b_c.8_1", 0x0000, 0x010000, CRC(314f4f03) SHA1(a7c399ddf453305d0dbe2a63e57427b261c48c2c), "Bwb","Top Dog (Barcrest) (MPU4) (set 19)" ) +GAME_CUSTOM( 199?, m4topdog__s, m4topdog, "td_25bgc.8_1", 0x0000, 0x010000, CRC(efc0899c) SHA1(0d0e5a006d260a1bfcde7966c06360386c949f29), "Bwb","Top Dog (Barcrest) (MPU4) (set 20)" ) +GAME_CUSTOM( 199?, m4topdog__t, m4topdog, "td_25bgp.2_1", 0x0000, 0x010000, CRC(f0894f48) SHA1(63056dd434d18bb9a052db25cc6ce29d0c3f9f82), "Bwb","Top Dog (Barcrest) (MPU4) (set 21)" ) +GAME_CUSTOM( 199?, m4topdog__u, m4topdog, "td_25btc.8_1", 0x0000, 0x010000, CRC(f5dec7d9) SHA1(ffb361745aebb3c7d6bf4925d95904e8ced13a35), "Bwb","Top Dog (Barcrest) (MPU4) (set 22)" ) +GAME_CUSTOM( 199?, m4topdog__v, m4topdog, "td_30a_c.1_1", 0x0000, 0x010000, CRC(f0986895) SHA1(65c24de42a3009959c9bb7f5b42536aa6fd70c2b), "Bwb","Top Dog (Barcrest) (MPU4) (set 23)" ) +GAME_CUSTOM( 199?, m4topdog__w, m4topdog, "td_30b_c.1_1", 0x0000, 0x010000, CRC(7683cf72) SHA1(4319954b833ef6b0d88b8d22c5e700a9df96dc65), "Bwb","Top Dog (Barcrest) (MPU4) (set 24)" ) +GAME_CUSTOM( 199?, m4topdog__x, m4topdog, "td_30bdc.1_1", 0x0000, 0x010000, CRC(f5a4481b) SHA1(75b32b0996315b8ce833fd695377716dbeb0b7e4), "Bwb","Top Dog (Barcrest) (MPU4) (set 25)" ) +GAME_CUSTOM( 199?, m4topdog__y, m4topdog, "td_30bgc.1_1", 0x0000, 0x010000, CRC(1ffe440f) SHA1(adc1909fbbfe7e63bb89b29878bda5a6df776a6a), "Bwb","Top Dog (Barcrest) (MPU4) (set 26)" ) +GAME_CUSTOM( 199?, m4topdog__z, m4topdog, "td_30btc.1_1", 0x0000, 0x010000, CRC(5109516c) SHA1(a4919465286be9e1f0e7970a91a89738f8fcad4e), "Bwb","Top Dog (Barcrest) (MPU4) (set 27)" ) #define M4KINGQ_EXTRA_ROMS \ ROM_REGION( 0x200000, "msm6376", 0 ) \ @@ -4576,26 +4884,26 @@ GAME_CUSTOM( 199?, m4topdog__z, m4topdog, "td_30btc.1_1", 0x0000, 0x010000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4kingq, 0, "ee_05a_4.2_1", 0x0000, 0x010000, CRC(8dd842b6) SHA1(1c1bcaae355ceee4d7b1572b0fa1a8b23a8afdbf), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4kingq__a, m4kingq, "ee_05a__.2_1", 0x0000, 0x010000, CRC(36aa5fb9) SHA1(b4aaf647713e33e79be7927e5eeef240d3beedf7), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4kingq__b, m4kingq, "ee_20a__.2_1", 0x0000, 0x010000, CRC(2c61341f) SHA1(76d68ae2a44087414be8be12b3824c62311721dd), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4kingq__c, m4kingq, "ee_20a_c.1_1", 0x0000, 0x010000, CRC(948140ac) SHA1(d43f1f2903ecd809dee191087fa075c638728a5b), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4kingq__d, m4kingq, "ee_20b__.2_1", 0x0000, 0x010000, CRC(2fc7c7c2) SHA1(3b8736a582009d7b1455769374342ff72026d2fa), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4kingq__e, m4kingq, "ee_20b_c.1_1", 0x0000, 0x010000, CRC(70d399ab) SHA1(ca2c593151f4f852c7cb66859a12e832e53cd31f), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4kingq__f, m4kingq, "ee_20bd_.2_1", 0x0000, 0x010000, CRC(239de2dd) SHA1(c8021ba5bfdc10f59fec27c364035225093328d8), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4kingq__g, m4kingq, "ee_20bdc.1_1", 0x0000, 0x010000, CRC(cbb8c57b) SHA1(ea165199213f95128aec95ae40799faa8c457dd3), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4kingq__h, m4kingq, "ee_20bg_.2_1", 0x0000, 0x010000, CRC(ddc4d832) SHA1(031f987e9fced1df4acc57eb4b60911d52e1dbf6), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4kingq__i, m4kingq, "ee_20bt_.2_1", 0x0000, 0x010000, CRC(6f278771) SHA1(4459c9490be14bcbc139eebe6542325c80937ff3), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4kingq__j, m4kingq, "ee_20s_c.1_1", 0x0000, 0x010000, CRC(a0c1e313) SHA1(8a088a33e51a31ff0abdb554aa4d8ce61eaf4b7d), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4kingq__k, m4kingq, "ee_20sb_.2_1", 0x0000, 0x010000, CRC(307ad157) SHA1(32b6187e907bfbdb87a9ad2d9ca5870b09de5e4a), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4kingq__l, m4kingq, "ee_25a_c.3_1", 0x0000, 0x010000, CRC(4dc25083) SHA1(b754b4003f73bd74d1670a36a70985ce5e48794d), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4kingq__m, m4kingq, "ee_25b_c.3_1", 0x0000, 0x010000, CRC(a6fe50ff) SHA1(011602d9624f232ba8484e57f5f33ff06091809f), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4kingq__n, m4kingq, "ee_25bdc.3_1", 0x0000, 0x010000, CRC(d0088a97) SHA1(aacc1a86bd4b321d0ee21d14147e1d135b3a5bae), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4kingq__o, m4kingq, "ee_25bgc.3_1", 0x0000, 0x010000, CRC(e4dcd86b) SHA1(b8f8ec317bf9f18e3d0ae9a9fd59349fee24530d), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4kingq__p, m4kingq, "ee_25btc.3_1", 0x0000, 0x010000, CRC(8f44347a) SHA1(09815a6e1d3a91cd2e69578bbcfef3203ddb33d6), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4kingq__r, m4kingq, "ee_25sbc.3_1", 0x0000, 0x010000, CRC(0f4bdd7c) SHA1(5c5cb3a9d6a96afc6e29149d2a8adf19aae0bc41), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4kingq__s, m4kingq, "eei20___.2_1", 0x0000, 0x010000, CRC(15f4b869) SHA1(5be6f660321cb47900dda986ef44eb5c1c324013), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4kingq__t, m4kingq, "knq2pprg.bin", 0x0000, 0x010000, CRC(23b22f79) SHA1(3d8b9cbffb9b427897548981ddacf724215336a4), "Barcrest / Bwb","Kings & Queens (Barcrest) (MPU4) (set 20)" ) +GAME_CUSTOM( 199?, m4kingq, 0, "ee_05a_4.2_1", 0x0000, 0x010000, CRC(8dd842b6) SHA1(1c1bcaae355ceee4d7b1572b0fa1a8b23a8afdbf), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 1)" ) +GAME_CUSTOM( 199?, m4kingq__a, m4kingq, "ee_05a__.2_1", 0x0000, 0x010000, CRC(36aa5fb9) SHA1(b4aaf647713e33e79be7927e5eeef240d3beedf7), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 2)" ) +GAME_CUSTOM( 199?, m4kingq__b, m4kingq, "ee_20a__.2_1", 0x0000, 0x010000, CRC(2c61341f) SHA1(76d68ae2a44087414be8be12b3824c62311721dd), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4kingq__c, m4kingq, "ee_20a_c.1_1", 0x0000, 0x010000, CRC(948140ac) SHA1(d43f1f2903ecd809dee191087fa075c638728a5b), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4kingq__d, m4kingq, "ee_20b__.2_1", 0x0000, 0x010000, CRC(2fc7c7c2) SHA1(3b8736a582009d7b1455769374342ff72026d2fa), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4kingq__e, m4kingq, "ee_20b_c.1_1", 0x0000, 0x010000, CRC(70d399ab) SHA1(ca2c593151f4f852c7cb66859a12e832e53cd31f), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4kingq__f, m4kingq, "ee_20bd_.2_1", 0x0000, 0x010000, CRC(239de2dd) SHA1(c8021ba5bfdc10f59fec27c364035225093328d8), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4kingq__g, m4kingq, "ee_20bdc.1_1", 0x0000, 0x010000, CRC(cbb8c57b) SHA1(ea165199213f95128aec95ae40799faa8c457dd3), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 8)" ) +GAME_CUSTOM( 199?, m4kingq__h, m4kingq, "ee_20bg_.2_1", 0x0000, 0x010000, CRC(ddc4d832) SHA1(031f987e9fced1df4acc57eb4b60911d52e1dbf6), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 9)" ) +GAME_CUSTOM( 199?, m4kingq__i, m4kingq, "ee_20bt_.2_1", 0x0000, 0x010000, CRC(6f278771) SHA1(4459c9490be14bcbc139eebe6542325c80937ff3), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 10)" ) +GAME_CUSTOM( 199?, m4kingq__j, m4kingq, "ee_20s_c.1_1", 0x0000, 0x010000, CRC(a0c1e313) SHA1(8a088a33e51a31ff0abdb554aa4d8ce61eaf4b7d), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 11)" ) +GAME_CUSTOM( 199?, m4kingq__k, m4kingq, "ee_20sb_.2_1", 0x0000, 0x010000, CRC(307ad157) SHA1(32b6187e907bfbdb87a9ad2d9ca5870b09de5e4a), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 12)" ) +GAME_CUSTOM( 199?, m4kingq__l, m4kingq, "ee_25a_c.3_1", 0x0000, 0x010000, CRC(4dc25083) SHA1(b754b4003f73bd74d1670a36a70985ce5e48794d), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 13)" ) +GAME_CUSTOM( 199?, m4kingq__m, m4kingq, "ee_25b_c.3_1", 0x0000, 0x010000, CRC(a6fe50ff) SHA1(011602d9624f232ba8484e57f5f33ff06091809f), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 14)" ) +GAME_CUSTOM( 199?, m4kingq__n, m4kingq, "ee_25bdc.3_1", 0x0000, 0x010000, CRC(d0088a97) SHA1(aacc1a86bd4b321d0ee21d14147e1d135b3a5bae), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 15)" ) +GAME_CUSTOM( 199?, m4kingq__o, m4kingq, "ee_25bgc.3_1", 0x0000, 0x010000, CRC(e4dcd86b) SHA1(b8f8ec317bf9f18e3d0ae9a9fd59349fee24530d), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 16)" ) +GAME_CUSTOM( 199?, m4kingq__p, m4kingq, "ee_25btc.3_1", 0x0000, 0x010000, CRC(8f44347a) SHA1(09815a6e1d3a91cd2e69578bbcfef3203ddb33d6), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 17)" ) +GAME_CUSTOM( 199?, m4kingq__r, m4kingq, "ee_25sbc.3_1", 0x0000, 0x010000, CRC(0f4bdd7c) SHA1(5c5cb3a9d6a96afc6e29149d2a8adf19aae0bc41), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 18)" ) +GAME_CUSTOM( 199?, m4kingq__s, m4kingq, "eei20___.2_1", 0x0000, 0x010000, CRC(15f4b869) SHA1(5be6f660321cb47900dda986ef44eb5c1c324013), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 19)" ) +GAME_CUSTOM( 199?, m4kingq__t, m4kingq, "knq2pprg.bin", 0x0000, 0x010000, CRC(23b22f79) SHA1(3d8b9cbffb9b427897548981ddacf724215336a4), "Bwb","Kings & Queens (Barcrest) (MPU4) (set 20)" ) #define M4KINGQC_EXTRA_ROMS \ ROM_REGION( 0x200000, "msm6376", 0 ) \ @@ -4611,37 +4919,37 @@ GAME_CUSTOM( 199?, m4kingq__t, m4kingq, "knq2pprg.bin", 0x0000, 0x010000, CR ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4kingqc, 0, "cn_20_b4.6_1", 0x0000, 0x010000, CRC(22d0b20c) SHA1(a7a4f60017cf62247339c9b23420d29845657895), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4kingqc__a, m4kingqc, "cn_20_bc.3_1", 0x0000, 0x010000, CRC(dfb0eb80) SHA1(ad973125681db0aae8ef1cf57b1c280e7f0e5803), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4kingqc__b, m4kingqc, "cn_20_dc.3_1", 0x0000, 0x010000, CRC(56e919ad) SHA1(c3c6f522574b287f7ed4dc4d1d8a32f68369dd5c), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4kingqc__c, m4kingqc, "cn_20a_c.2_1", 0x0000, 0x010000, CRC(0df15fd9) SHA1(e7c5e2277aac1c71d27710ea71d09d1005c5b8f9), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4kingqc__d, m4kingqc, "cn_20a_c.3_1", 0x0000, 0x010000, CRC(68e1dcef) SHA1(a0b15344b900226052633703e935c0ec0f718936), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4kingqc__e, m4kingqc, "cn_20a_c.5_1", 0x0000, 0x010000, CRC(4975d39e) SHA1(243b8af1a12c3538e826bfd5f6feb6927c1467b0), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4kingqc__f, m4kingqc, "cn_20b_c.2_1", 0x0000, 0x010000, CRC(66e074f3) SHA1(1f5381a41dd1402ee344e228635b35521e9377c8), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4kingqc__g, m4kingqc, "cn_20b_c.3_1", 0x0000, 0x010000, CRC(bcae86c9) SHA1(f03b136d82fe7b93350f0ca5dc36e78e98aecfa9), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4kingqc__h, m4kingqc, "cn_20b_c.5_1", 0x0000, 0x010000, CRC(6a19d734) SHA1(e0d5f5020e7997d3927b42336ab18757bd9f1ed0), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4kingqc__i, m4kingqc, "cn_20bg4.6_1", 0x0000, 0x010000, CRC(6d4158fe) SHA1(9c12264a415601d6f28f23c1e1f6a3d97fadddba), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4kingqc__j, m4kingqc, "cn_20bgc.3_1", 0x0000, 0x010000, CRC(3ecc1bf3) SHA1(fb191749f920aa4ac0d9809c6c59b695afdf6594), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4kingqc__k, m4kingqc, "cn_20bgc.5_1", 0x0000, 0x010000, CRC(24743f7e) SHA1(c90d95df2357bc00aba2bb21c0c77082b8c32463), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4kingqc__l, m4kingqc, "cn_20btc.2_1", 0x0000, 0x010000, CRC(b8f0ade0) SHA1(5b5344f799b27833f6456ae852eb5085afb3dbe5), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4kingqc__m, m4kingqc, "cn_20btc.3_1", 0x0000, 0x010000, CRC(b92f3787) SHA1(7efd815cf1a9a738ffae2c3ce19149f47d465c72), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4kingqc__n, m4kingqc, "cn_20btc.5_1", 0x0000, 0x010000, CRC(e2b8baf0) SHA1(23e966a6cc94c26903bfe943160a327529d7e21b), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4kingqc__q, m4kingqc, "cn_20sbc.5_1", 0x0000, 0x010000, CRC(8b49bf8c) SHA1(2c6835e343e7cdcc197c0105e13cc4f6ddd3f0d3), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4kingqc__r, m4kingqc, "cn_25_bc.2_1", 0x0000, 0x010000, CRC(3e2b2d7b) SHA1(9a68cf4902ca210e8fb52a35b4c507708c7f6d2a), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4kingqc__s, m4kingqc, "cn_25_dc.2_1", 0x0000, 0x010000, CRC(eb384ef6) SHA1(489c59d8e1e6296ec2b05fb0aa307c48f3486aa2), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4kingqc__t, m4kingqc, "cn_25_kc.2_1", 0x0000, 0x010000, CRC(bd11e742) SHA1(0c3b290e3010bc3f904f9087ee89efe63072b8c3), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4kingqc__u, m4kingqc, "cn_25a_c.2_1", 0x0000, 0x010000, CRC(1994efd5) SHA1(d7c3d692737138b30244d2d51eb535b88c87e401), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4kingqc__v, m4kingqc, "cn_25b_c.2_1", 0x0000, 0x010000, CRC(24255989) SHA1(017d0dc811b5c82d5b8785022169929c94f3f18a), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4kingqc__w, m4kingqc, "cn_25bdc.2_1", 0x0000, 0x010000, CRC(503ccd3c) SHA1(936b77b33373624e6bd80d168bcd48dc2ebcb2fe), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4kingqc__x, m4kingqc, "cn_25bgc.2a1", 0x0000, 0x010000, CRC(89e2130d) SHA1(22f97030e6f4cb94f62215a0c653d170ba3e0efd), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4kingqc__y, m4kingqc, "cn_25btc.2_1", 0x0000, 0x010000, CRC(876bc126) SHA1(debe36a082493cdeba26a0808f205a19e9e897d5), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4kingqc__z, m4kingqc, "cn_25s_c.1_1", 0x0000, 0x010000, CRC(84d1a32b) SHA1(f6e76a2bf1bd7b31eb360dea8b453d235c365e64), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4kingqc__0, m4kingqc, "cn_25sbc.1_1", 0x0000, 0x010000, CRC(e53b672c) SHA1(2aea2a243817857df31b6f7b767e380bd003fafa), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4kingqc__1, m4kingqc, "cn_30_dc.1_1", 0x0000, 0x010000, CRC(aeb21904) SHA1(32bd505e738b8826c6ab138f30831b7a53b700cf), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4kingqc__2, m4kingqc, "cn_30a_c.1_1", 0x0000, 0x010000, CRC(be7aed91) SHA1(7dac1281bbc9da8924657b13ec4aa86aa6ff9de4), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4kingqc__3, m4kingqc, "cn_30b_c.1_1", 0x0000, 0x010000, CRC(232c87ec) SHA1(2c2bf1c273ab88c0ab27a672d53cd6184a24a8d1), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 29)" ) -GAME_CUSTOM( 199?, m4kingqc__4, m4kingqc, "cn_30bgc.1_1", 0x0000, 0x010000, CRC(40afaa86) SHA1(edb8f55abf66e3e1cc7e353c520a93fc42073585), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 30)" ) -GAME_CUSTOM( 199?, m4kingqc__5, m4kingqc, "cn_30btc.1_1", 0x0000, 0x010000, CRC(1920cc67) SHA1(55a3ad78d68d635faff98390e2feeea29dd10664), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 31)" ) +GAME_CUSTOM( 199?, m4kingqc, 0, "cn_20_b4.6_1", 0x0000, 0x010000, CRC(22d0b20c) SHA1(a7a4f60017cf62247339c9b23420d29845657895), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 1)" ) +GAME_CUSTOM( 199?, m4kingqc__a, m4kingqc, "cn_20_bc.3_1", 0x0000, 0x010000, CRC(dfb0eb80) SHA1(ad973125681db0aae8ef1cf57b1c280e7f0e5803), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 2)" ) +GAME_CUSTOM( 199?, m4kingqc__b, m4kingqc, "cn_20_dc.3_1", 0x0000, 0x010000, CRC(56e919ad) SHA1(c3c6f522574b287f7ed4dc4d1d8a32f68369dd5c), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4kingqc__c, m4kingqc, "cn_20a_c.2_1", 0x0000, 0x010000, CRC(0df15fd9) SHA1(e7c5e2277aac1c71d27710ea71d09d1005c5b8f9), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4kingqc__d, m4kingqc, "cn_20a_c.3_1", 0x0000, 0x010000, CRC(68e1dcef) SHA1(a0b15344b900226052633703e935c0ec0f718936), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4kingqc__e, m4kingqc, "cn_20a_c.5_1", 0x0000, 0x010000, CRC(4975d39e) SHA1(243b8af1a12c3538e826bfd5f6feb6927c1467b0), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4kingqc__f, m4kingqc, "cn_20b_c.2_1", 0x0000, 0x010000, CRC(66e074f3) SHA1(1f5381a41dd1402ee344e228635b35521e9377c8), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4kingqc__g, m4kingqc, "cn_20b_c.3_1", 0x0000, 0x010000, CRC(bcae86c9) SHA1(f03b136d82fe7b93350f0ca5dc36e78e98aecfa9), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 8)" ) +GAME_CUSTOM( 199?, m4kingqc__h, m4kingqc, "cn_20b_c.5_1", 0x0000, 0x010000, CRC(6a19d734) SHA1(e0d5f5020e7997d3927b42336ab18757bd9f1ed0), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 9)" ) +GAME_CUSTOM( 199?, m4kingqc__i, m4kingqc, "cn_20bg4.6_1", 0x0000, 0x010000, CRC(6d4158fe) SHA1(9c12264a415601d6f28f23c1e1f6a3d97fadddba), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 10)" ) +GAME_CUSTOM( 199?, m4kingqc__j, m4kingqc, "cn_20bgc.3_1", 0x0000, 0x010000, CRC(3ecc1bf3) SHA1(fb191749f920aa4ac0d9809c6c59b695afdf6594), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 11)" ) +GAME_CUSTOM( 199?, m4kingqc__k, m4kingqc, "cn_20bgc.5_1", 0x0000, 0x010000, CRC(24743f7e) SHA1(c90d95df2357bc00aba2bb21c0c77082b8c32463), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 12)" ) +GAME_CUSTOM( 199?, m4kingqc__l, m4kingqc, "cn_20btc.2_1", 0x0000, 0x010000, CRC(b8f0ade0) SHA1(5b5344f799b27833f6456ae852eb5085afb3dbe5), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 13)" ) +GAME_CUSTOM( 199?, m4kingqc__m, m4kingqc, "cn_20btc.3_1", 0x0000, 0x010000, CRC(b92f3787) SHA1(7efd815cf1a9a738ffae2c3ce19149f47d465c72), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 14)" ) +GAME_CUSTOM( 199?, m4kingqc__n, m4kingqc, "cn_20btc.5_1", 0x0000, 0x010000, CRC(e2b8baf0) SHA1(23e966a6cc94c26903bfe943160a327529d7e21b), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 15)" ) +GAME_CUSTOM( 199?, m4kingqc__q, m4kingqc, "cn_20sbc.5_1", 0x0000, 0x010000, CRC(8b49bf8c) SHA1(2c6835e343e7cdcc197c0105e13cc4f6ddd3f0d3), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 16)" ) +GAME_CUSTOM( 199?, m4kingqc__r, m4kingqc, "cn_25_bc.2_1", 0x0000, 0x010000, CRC(3e2b2d7b) SHA1(9a68cf4902ca210e8fb52a35b4c507708c7f6d2a), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 17)" ) +GAME_CUSTOM( 199?, m4kingqc__s, m4kingqc, "cn_25_dc.2_1", 0x0000, 0x010000, CRC(eb384ef6) SHA1(489c59d8e1e6296ec2b05fb0aa307c48f3486aa2), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 18)" ) +GAME_CUSTOM( 199?, m4kingqc__t, m4kingqc, "cn_25_kc.2_1", 0x0000, 0x010000, CRC(bd11e742) SHA1(0c3b290e3010bc3f904f9087ee89efe63072b8c3), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 19)" ) +GAME_CUSTOM( 199?, m4kingqc__u, m4kingqc, "cn_25a_c.2_1", 0x0000, 0x010000, CRC(1994efd5) SHA1(d7c3d692737138b30244d2d51eb535b88c87e401), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 20)" ) +GAME_CUSTOM( 199?, m4kingqc__v, m4kingqc, "cn_25b_c.2_1", 0x0000, 0x010000, CRC(24255989) SHA1(017d0dc811b5c82d5b8785022169929c94f3f18a), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 21)" ) +GAME_CUSTOM( 199?, m4kingqc__w, m4kingqc, "cn_25bdc.2_1", 0x0000, 0x010000, CRC(503ccd3c) SHA1(936b77b33373624e6bd80d168bcd48dc2ebcb2fe), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 22)" ) +GAME_CUSTOM( 199?, m4kingqc__x, m4kingqc, "cn_25bgc.2a1", 0x0000, 0x010000, CRC(89e2130d) SHA1(22f97030e6f4cb94f62215a0c653d170ba3e0efd), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 23)" ) +GAME_CUSTOM( 199?, m4kingqc__y, m4kingqc, "cn_25btc.2_1", 0x0000, 0x010000, CRC(876bc126) SHA1(debe36a082493cdeba26a0808f205a19e9e897d5), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 24)" ) +GAME_CUSTOM( 199?, m4kingqc__z, m4kingqc, "cn_25s_c.1_1", 0x0000, 0x010000, CRC(84d1a32b) SHA1(f6e76a2bf1bd7b31eb360dea8b453d235c365e64), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 25)" ) +GAME_CUSTOM( 199?, m4kingqc__0, m4kingqc, "cn_25sbc.1_1", 0x0000, 0x010000, CRC(e53b672c) SHA1(2aea2a243817857df31b6f7b767e380bd003fafa), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 26)" ) +GAME_CUSTOM( 199?, m4kingqc__1, m4kingqc, "cn_30_dc.1_1", 0x0000, 0x010000, CRC(aeb21904) SHA1(32bd505e738b8826c6ab138f30831b7a53b700cf), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 27)" ) +GAME_CUSTOM( 199?, m4kingqc__2, m4kingqc, "cn_30a_c.1_1", 0x0000, 0x010000, CRC(be7aed91) SHA1(7dac1281bbc9da8924657b13ec4aa86aa6ff9de4), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 28)" ) +GAME_CUSTOM( 199?, m4kingqc__3, m4kingqc, "cn_30b_c.1_1", 0x0000, 0x010000, CRC(232c87ec) SHA1(2c2bf1c273ab88c0ab27a672d53cd6184a24a8d1), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 29)" ) +GAME_CUSTOM( 199?, m4kingqc__4, m4kingqc, "cn_30bgc.1_1", 0x0000, 0x010000, CRC(40afaa86) SHA1(edb8f55abf66e3e1cc7e353c520a93fc42073585), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 30)" ) +GAME_CUSTOM( 199?, m4kingqc__5, m4kingqc, "cn_30btc.1_1", 0x0000, 0x010000, CRC(1920cc67) SHA1(55a3ad78d68d635faff98390e2feeea29dd10664), "Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 31)" ) #define M4TYPCL_EXTRA_ROMS \ ROM_REGION( 0x48, "fakechr", 0 ) \ @@ -4659,11 +4967,13 @@ GAME_CUSTOM( 199?, m4kingqc__5, m4kingqc, "cn_30btc.1_1", 0x0000, 0x010000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4typcl, 0, "ctp12s.p1", 0x0000, 0x020000, CRC(5f0bbd2a) SHA1(ba1fa09ea7b4713a99b2033bdbbf6b15f973dcca), "Barcrest","Take Your Pick Club (Barcrest) (MPU4) (set 1)" ) +// "(C)1996 BARCREST" and "CTP 1.2" +GAME_CUSTOM( 199?, m4typcl, 0, "ctp12s.p1", 0x0000, 0x020000, CRC(5f0bbd2a) SHA1(ba1fa09ea7b4713a99b2033bdbbf6b15f973dcca), "Barcrest","Take Your Pick Club (Barcrest) (MPU4) (CTP 1.2)" ) GAME_CUSTOM( 199?, m4typcl__a, m4typcl, "ctp13d.p1", 0x0000, 0x020000, CRC(a0f081b9) SHA1(794bba6ed86c3f332165c4b3224315256c939926), "Barcrest","Take Your Pick Club (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4typcl__b, m4typcl, "ctp13f.p1", 0x0000, 0x020000, CRC(dd7d94fd) SHA1(127ef8159facf647dff37109bcbb94311a8343f1), "Barcrest","Take Your Pick Club (Barcrest) (MPU4) (set 3)" ) GAME_CUSTOM( 199?, m4typcl__c, m4typcl, "ctp13s.p1", 0x0000, 0x020000, CRC(f0a69f92) SHA1(cd34fb26ecbe6a6e8602a8549c5f331a525567df), "Barcrest","Take Your Pick Club (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4typcl__d, m4typcl, "ntp02.p1", 0x0000, 0x020000, CRC(6063e27d) SHA1(c99599fbc7146d8fcf62432994098dd51250b17b), "Barcrest","Take Your Pick Club (Barcrest) (MPU4) (set 5)" ) +// "(C)1996 BARCREST" and "NTP 0.2" +GAME_CUSTOM( 199?, m4typcl__d, m4typcl, "ntp02.p1", 0x0000, 0x020000, CRC(6063e27d) SHA1(c99599fbc7146d8fcf62432994098dd51250b17b), "Barcrest","Take Your Pick Club (Barcrest) (MPU4) (NTP 0.2)" ) #define M4ANDYBT_EXTRA_ROMS \ @@ -4681,10 +4991,12 @@ GAME_CUSTOM( 199?, m4typcl__d, m4typcl, "ntp02.p1", 0x0000, 0x020000, CR ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4andybt, 0, "abt18d.p1", 0x0000, 0x020000, CRC(77874578) SHA1(455964614b67af14f5baa5883e1076e986de9e9c), "Barcrest","Andy's Big Time Club (Barcrest) (MPU4) (set 1)" ) +// "(C)1991 BARCREST" and "ABT 1.8" +GAME_CUSTOM( 199?, m4andybt, 0, "abt18s.p1", 0x0000, 0x020000, CRC(625263e4) SHA1(23fa0547164cc1f9b7c6cd26e06b0d779bf0329d), "Barcrest","Andy's Big Time Club (Barcrest) (MPU4) (ABT 1.8)" ) +GAME_CUSTOM( 199?, m4andybt__b, m4andybt, "abt18d.p1", 0x0000, 0x020000, CRC(77874578) SHA1(455964614b67af14f5baa5883e1076e986de9e9c), "Barcrest","Andy's Big Time Club (Barcrest) (MPU4) (set 1)" ) GAME_CUSTOM( 199?, m4andybt__a, m4andybt, "abt18f.p1", 0x0000, 0x020000, CRC(cdd756af) SHA1(b1bb851ad2a2ba631e13509a476fe60cb8a24e69), "Barcrest","Andy's Big Time Club (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4andybt__b, m4andybt, "abt18s.p1", 0x0000, 0x020000, CRC(625263e4) SHA1(23fa0547164cc1f9b7c6cd26e06b0d779bf0329d), "Barcrest","Andy's Big Time Club (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4andybt__c, m4andybt, "abt1.5", 0x0000, 0x020000, CRC(05303209) SHA1(6a9eba19e7138ede122ec04c062556763b80f6c0), "Barcrest","Andy's Big Time Club (Barcrest) (MPU4) (set 4)" ) +// "(C)1991 BARCREST" and "ABT 1.5" +GAME_CUSTOM( 199?, m4andybt__c, m4andybt, "abt1.5", 0x0000, 0x020000, CRC(05303209) SHA1(6a9eba19e7138ede122ec04c062556763b80f6c0), "Barcrest","Andy's Big Time Club (Barcrest) (MPU4) (ABT 1.5)" ) #define M4THESTR_EXTRA_ROMS \ @@ -4700,32 +5012,32 @@ GAME_CUSTOM( 199?, m4andybt__c, m4andybt, "abt1.5", 0x0000, 0x020000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4thestr, 0, "thestreakbin", 0x0000, 0x010000, CRC(cb79f9e5) SHA1(6cbdc5327e81b51f1060fd91efa3d061b9748b49), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4thestr__a, m4thestr, "ts_20_b4.3_1", 0x0000, 0x010000, CRC(17726c7c) SHA1(193b572b9f859f1018f1be398b35a5103622faf8), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4thestr__b, m4thestr, "ts_20_bc.3_1", 0x0000, 0x010000, CRC(b03b3f11) SHA1(9116ac608ab5574d5912550b988fc319d0a38444), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4thestr__c, m4thestr, "ts_20_d4.3_1", 0x0000, 0x010000, CRC(7bfae07a) SHA1(9414ad510ca9a183181a30d98858278c375c185d), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4thestr__d, m4thestr, "ts_20_dc.3_1", 0x0000, 0x010000, CRC(7196b317) SHA1(c124ed3d030b77870b7851b3da104f8fc5393a31), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4thestr__e, m4thestr, "ts_20a_4.3_1", 0x0000, 0x010000, CRC(921b8cc3) SHA1(74143888de21aba4374d016cb4c08ae59dfa59ef), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4thestr__f, m4thestr, "ts_20a_c.3_1", 0x0000, 0x010000, CRC(c8eb1dd9) SHA1(7b7520467cd32295e6324d350d1f2bed829555e0), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4thestr__g, m4thestr, "ts_20b_4.3_1", 0x0000, 0x010000, CRC(2221f704) SHA1(8459b658d3ad84bb86250518d0403970f881323d), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4thestr__h, m4thestr, "ts_20b_c.3_1", 0x0000, 0x010000, CRC(ecdf59a9) SHA1(7c2141e336ba3f1865bbf422aaa0b78cb1a27a4c), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4thestr__i, m4thestr, "ts_20bg4.3_1", 0x0000, 0x010000, CRC(b2a419ea) SHA1(bbc565ce8e79d39e1b1a7cd1685fa8c7ce00d7b9), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4thestr__j, m4thestr, "ts_20bgc.3_1", 0x0000, 0x010000, CRC(3b2d7b50) SHA1(a8560b0894783a398aaf0510493583b8cb826947), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4thestr__k, m4thestr, "ts_20bt4.3_1", 0x0000, 0x010000, CRC(d10a6c5a) SHA1(07fdf3797c87e35468ef859bb67753f11c5fbded), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4thestr__l, m4thestr, "ts_20btc.3_1", 0x0000, 0x010000, CRC(58830ee0) SHA1(b2798e0f8e03870c77892a32654263575e9aaafa), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4thestr__m, m4thestr, "ts_25_bc.3_1", 0x0000, 0x010000, CRC(43877de6) SHA1(b006ae97139c9bd66a32884b92fdbdf4f10db58a), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4thestr__n, m4thestr, "ts_25_dc.3_1", 0x0000, 0x010000, CRC(60ab675c) SHA1(763b66d7731489abdec84d2f8e3c186ad95c7349), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4thestr__o, m4thestr, "ts_25_kc.3_1", 0x0000, 0x010000, CRC(418cbb32) SHA1(e19a0c7fd88a82983ec33b99f3819a2a238c68a5), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4thestr__p, m4thestr, "ts_25a_c.3_1", 0x0000, 0x010000, CRC(448a705f) SHA1(35a7cc480c376eaef7439d5c96cec490aec9fc4b), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4thestr__q, m4thestr, "ts_25b_c.3_1", 0x0000, 0x010000, CRC(5b390ec2) SHA1(db7719ab8021e0b75e9419d2a05f3139fbab8e61), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4thestr__r, m4thestr, "ts_25bgc.3_1", 0x0000, 0x010000, CRC(612463fc) SHA1(085d8faf91c8ef6520ca971d249322f336464856), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4thestr__s, m4thestr, "ts_25btc.3_1", 0x0000, 0x010000, CRC(6d658e61) SHA1(619dbacad424e5db82c6ee19d1e3358c18cfe783), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4thestr__t, m4thestr, "ts_30a_c.1_1", 0x0000, 0x010000, CRC(8636e700) SHA1(f11c20da6c3bfe1842ea8f9eac8c831d49f42c32), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4thestr__u, m4thestr, "ts_30b_c.1_1", 0x0000, 0x010000, CRC(2577c8fc) SHA1(6d22bd1a93f423862f5466f99690eeced9090420), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4thestr__v, m4thestr, "ts_30bgc.1_1", 0x0000, 0x010000, CRC(2c582ba6) SHA1(dbcae0ef90105a7f6c720156711f73bb3c237b8a), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4thestr__w, m4thestr, "ts_39_dc.1_1", 0x0000, 0x010000, CRC(84d338b8) SHA1(847e6b7808b6d5d361414a4aaa5d5cf6a5863a70), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4thestr__x, m4thestr, "ts_39a_c.1_1", 0x0000, 0x010000, CRC(9ee56a3a) SHA1(365ec4c90abbe4b352bdd2d6aed5eec4cdaf35ff), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4thestr__y, m4thestr, "ts_39b_c.1_1", 0x0000, 0x010000, CRC(470cd6d1) SHA1(c9c3c9c23c596e79f1b6495d4706b1da6cbd1b2e), "Barcrest / Bwb","The Streak (Barcrest) (MPU4) (set 26)" ) +GAME_CUSTOM( 199?, m4thestr, 0, "thestreakbin", 0x0000, 0x010000, CRC(cb79f9e5) SHA1(6cbdc5327e81b51f1060fd91efa3d061b9748b49), "Bwb","The Streak (Barcrest) (MPU4) (set 1)" ) +GAME_CUSTOM( 199?, m4thestr__a, m4thestr, "ts_20_b4.3_1", 0x0000, 0x010000, CRC(17726c7c) SHA1(193b572b9f859f1018f1be398b35a5103622faf8), "Bwb","The Streak (Barcrest) (MPU4) (set 2)" ) +GAME_CUSTOM( 199?, m4thestr__b, m4thestr, "ts_20_bc.3_1", 0x0000, 0x010000, CRC(b03b3f11) SHA1(9116ac608ab5574d5912550b988fc319d0a38444), "Bwb","The Streak (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4thestr__c, m4thestr, "ts_20_d4.3_1", 0x0000, 0x010000, CRC(7bfae07a) SHA1(9414ad510ca9a183181a30d98858278c375c185d), "Bwb","The Streak (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4thestr__d, m4thestr, "ts_20_dc.3_1", 0x0000, 0x010000, CRC(7196b317) SHA1(c124ed3d030b77870b7851b3da104f8fc5393a31), "Bwb","The Streak (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4thestr__e, m4thestr, "ts_20a_4.3_1", 0x0000, 0x010000, CRC(921b8cc3) SHA1(74143888de21aba4374d016cb4c08ae59dfa59ef), "Bwb","The Streak (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4thestr__f, m4thestr, "ts_20a_c.3_1", 0x0000, 0x010000, CRC(c8eb1dd9) SHA1(7b7520467cd32295e6324d350d1f2bed829555e0), "Bwb","The Streak (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4thestr__g, m4thestr, "ts_20b_4.3_1", 0x0000, 0x010000, CRC(2221f704) SHA1(8459b658d3ad84bb86250518d0403970f881323d), "Bwb","The Streak (Barcrest) (MPU4) (set 8)" ) +GAME_CUSTOM( 199?, m4thestr__h, m4thestr, "ts_20b_c.3_1", 0x0000, 0x010000, CRC(ecdf59a9) SHA1(7c2141e336ba3f1865bbf422aaa0b78cb1a27a4c), "Bwb","The Streak (Barcrest) (MPU4) (set 9)" ) +GAME_CUSTOM( 199?, m4thestr__i, m4thestr, "ts_20bg4.3_1", 0x0000, 0x010000, CRC(b2a419ea) SHA1(bbc565ce8e79d39e1b1a7cd1685fa8c7ce00d7b9), "Bwb","The Streak (Barcrest) (MPU4) (set 10)" ) +GAME_CUSTOM( 199?, m4thestr__j, m4thestr, "ts_20bgc.3_1", 0x0000, 0x010000, CRC(3b2d7b50) SHA1(a8560b0894783a398aaf0510493583b8cb826947), "Bwb","The Streak (Barcrest) (MPU4) (set 11)" ) +GAME_CUSTOM( 199?, m4thestr__k, m4thestr, "ts_20bt4.3_1", 0x0000, 0x010000, CRC(d10a6c5a) SHA1(07fdf3797c87e35468ef859bb67753f11c5fbded), "Bwb","The Streak (Barcrest) (MPU4) (set 12)" ) +GAME_CUSTOM( 199?, m4thestr__l, m4thestr, "ts_20btc.3_1", 0x0000, 0x010000, CRC(58830ee0) SHA1(b2798e0f8e03870c77892a32654263575e9aaafa), "Bwb","The Streak (Barcrest) (MPU4) (set 13)" ) +GAME_CUSTOM( 199?, m4thestr__m, m4thestr, "ts_25_bc.3_1", 0x0000, 0x010000, CRC(43877de6) SHA1(b006ae97139c9bd66a32884b92fdbdf4f10db58a), "Bwb","The Streak (Barcrest) (MPU4) (set 14)" ) +GAME_CUSTOM( 199?, m4thestr__n, m4thestr, "ts_25_dc.3_1", 0x0000, 0x010000, CRC(60ab675c) SHA1(763b66d7731489abdec84d2f8e3c186ad95c7349), "Bwb","The Streak (Barcrest) (MPU4) (set 15)" ) +GAME_CUSTOM( 199?, m4thestr__o, m4thestr, "ts_25_kc.3_1", 0x0000, 0x010000, CRC(418cbb32) SHA1(e19a0c7fd88a82983ec33b99f3819a2a238c68a5), "Bwb","The Streak (Barcrest) (MPU4) (set 16)" ) +GAME_CUSTOM( 199?, m4thestr__p, m4thestr, "ts_25a_c.3_1", 0x0000, 0x010000, CRC(448a705f) SHA1(35a7cc480c376eaef7439d5c96cec490aec9fc4b), "Bwb","The Streak (Barcrest) (MPU4) (set 17)" ) +GAME_CUSTOM( 199?, m4thestr__q, m4thestr, "ts_25b_c.3_1", 0x0000, 0x010000, CRC(5b390ec2) SHA1(db7719ab8021e0b75e9419d2a05f3139fbab8e61), "Bwb","The Streak (Barcrest) (MPU4) (set 18)" ) +GAME_CUSTOM( 199?, m4thestr__r, m4thestr, "ts_25bgc.3_1", 0x0000, 0x010000, CRC(612463fc) SHA1(085d8faf91c8ef6520ca971d249322f336464856), "Bwb","The Streak (Barcrest) (MPU4) (set 19)" ) +GAME_CUSTOM( 199?, m4thestr__s, m4thestr, "ts_25btc.3_1", 0x0000, 0x010000, CRC(6d658e61) SHA1(619dbacad424e5db82c6ee19d1e3358c18cfe783), "Bwb","The Streak (Barcrest) (MPU4) (set 20)" ) +GAME_CUSTOM( 199?, m4thestr__t, m4thestr, "ts_30a_c.1_1", 0x0000, 0x010000, CRC(8636e700) SHA1(f11c20da6c3bfe1842ea8f9eac8c831d49f42c32), "Bwb","The Streak (Barcrest) (MPU4) (set 21)" ) +GAME_CUSTOM( 199?, m4thestr__u, m4thestr, "ts_30b_c.1_1", 0x0000, 0x010000, CRC(2577c8fc) SHA1(6d22bd1a93f423862f5466f99690eeced9090420), "Bwb","The Streak (Barcrest) (MPU4) (set 22)" ) +GAME_CUSTOM( 199?, m4thestr__v, m4thestr, "ts_30bgc.1_1", 0x0000, 0x010000, CRC(2c582ba6) SHA1(dbcae0ef90105a7f6c720156711f73bb3c237b8a), "Bwb","The Streak (Barcrest) (MPU4) (set 23)" ) +GAME_CUSTOM( 199?, m4thestr__w, m4thestr, "ts_39_dc.1_1", 0x0000, 0x010000, CRC(84d338b8) SHA1(847e6b7808b6d5d361414a4aaa5d5cf6a5863a70), "Bwb","The Streak (Barcrest) (MPU4) (set 24)" ) +GAME_CUSTOM( 199?, m4thestr__x, m4thestr, "ts_39a_c.1_1", 0x0000, 0x010000, CRC(9ee56a3a) SHA1(365ec4c90abbe4b352bdd2d6aed5eec4cdaf35ff), "Bwb","The Streak (Barcrest) (MPU4) (set 25)" ) +GAME_CUSTOM( 199?, m4thestr__y, m4thestr, "ts_39b_c.1_1", 0x0000, 0x010000, CRC(470cd6d1) SHA1(c9c3c9c23c596e79f1b6495d4706b1da6cbd1b2e), "Bwb","The Streak (Barcrest) (MPU4) (set 26)" ) #define M4CPYCAT_EXTRA_ROMS \ @@ -4741,42 +5053,42 @@ GAME_CUSTOM( 199?, m4thestr__y, m4thestr, "ts_39b_c.1_1", 0x0000, 0x010000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4cpycat, 0, "co_20_bc.1_1", 0x0000, 0x010000, CRC(c9d3cdc1) SHA1(28265b0f95a8829efc4e346269a7af17a6abe345), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4cpycat__a, m4cpycat, "co_20_dc.1_1", 0x0000, 0x010000, CRC(c6552f9a) SHA1(ae7ad183d2cd89bc9748dcbb3ea26832bed30009), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4cpycat__b, m4cpycat, "co_20_kc.1_1", 0x0000, 0x010000, CRC(b5260e35) SHA1(6cbf4ca426fd47b0db49e188a7a7fe72f6c99aef), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4cpycat__c, m4cpycat, "co_20a_c.1_1", 0x0000, 0x010000, CRC(486d42af) SHA1(327fca9604845ec37c2212413105f48a7b0e2836), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4cpycat__d, m4cpycat, "co_20b_c.1_1", 0x0000, 0x010000, CRC(90e0e19f) SHA1(c7e73faa4c3e853dbaa6b14303ab454a09eb36d7), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4cpycat__e, m4cpycat, "co_20bgc.1_1", 0x0000, 0x010000, CRC(f99d6ae2) SHA1(2106412caa7d3dfc262dc2b1d3e258bb33605912), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4cpycat__f, m4cpycat, "co_20bgp.4_1", 0x0000, 0x010000, CRC(fdc6753a) SHA1(4dd39fa995ee9fa7d153d64dd163d5482aa490d2), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4cpycat__g, m4cpycat, "co_20btc.1_1", 0x0000, 0x010000, CRC(3780d767) SHA1(4fb4354b02eed754ca1caef2b56eccc76524ae1e), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4cpycat__h, m4cpycat, "co_25_bc.1_1", 0x0000, 0x010000, CRC(13c82730) SHA1(992a6d04ed357548bb6cea6505316013048a2e57), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4cpycat__i, m4cpycat, "co_25_bp.2_1", 0x0000, 0x010000, CRC(a5983412) SHA1(7daa3028355fb0e85dce1629477a8efae625f86d), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4cpycat__j, m4cpycat, "co_25_bp.3_1", 0x0000, 0x010000, CRC(4060da30) SHA1(34a93e0550992e7510d1eaf2d5109da3c3fa2f75), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4cpycat__k, m4cpycat, "co_25_dc.1_1", 0x0000, 0x010000, CRC(a3f34f3f) SHA1(4c4842cc668b4c3abd9d2896cc50bbc3d9643b75), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4cpycat__l, m4cpycat, "co_25_dp.2_1", 0x0000, 0x010000, CRC(1f192638) SHA1(16a86242281281ca7b994dee06910d7f107c4743), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4cpycat__m, m4cpycat, "co_25_kc.1_1", 0x0000, 0x010000, CRC(6b2a7f2b) SHA1(5d558431a6b83214cc0dc33d999eeb72f3c53e85), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4cpycat__n, m4cpycat, "co_25_kp.2_1", 0x0000, 0x010000, CRC(73d3aaba) SHA1(5ef9118462bfdf93182ec539d3b80a72c09fa032), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4cpycat__o, m4cpycat, "co_25_kp.3_1", 0x0000, 0x010000, CRC(2e8fa3ee) SHA1(18f4e4eae7d7ac14486ed731bb67cab22d0b287d), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4cpycat__p, m4cpycat, "co_25a_c.1_1", 0x0000, 0x010000, CRC(e753196a) SHA1(79fc9b567dc946f81d40c3b215035cf2adcf94af), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4cpycat__q, m4cpycat, "co_25a_p.2_1", 0x0000, 0x010000, CRC(a058d7f7) SHA1(6e9116ce757503ef5b1822473a310513dd2973e3), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4cpycat__r, m4cpycat, "co_25a_p.3_1", 0x0000, 0x010000, CRC(ba172858) SHA1(d0a025c339f886802b7491448b6b2a4e1f5a3451), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4cpycat__s, m4cpycat, "co_25b_c.1_1", 0x0000, 0x010000, CRC(d82a9080) SHA1(9b9091f867f0b5d75f2bd5f9d62a4419073da357), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4cpycat__t, m4cpycat, "co_25b_p.2_1", 0x0000, 0x010000, CRC(48c8f7e6) SHA1(ff651e4c88b81bb816ab92e7f1d1fbd2c2920db1), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4cpycat__u, m4cpycat, "co_25bgc.1_1", 0x0000, 0x010000, CRC(947a5465) SHA1(c99c0e8ca515fbad8801e07e5936256cca8e7af1), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4cpycat__v, m4cpycat, "co_25bgp.2_1", 0x0000, 0x010000, CRC(84ab9c9d) SHA1(4c1043fb7ff6cd4e681f18e2dd0ddd29d5ce6d09), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4cpycat__w, m4cpycat, "co_25bgp.3_1", 0x0000, 0x010000, CRC(7fa4089e) SHA1(f73aff58c7a627f993e65527bb551c23640b22ed), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4cpycat__x, m4cpycat, "co_25btc.1_1", 0x0000, 0x010000, CRC(dbbae1b6) SHA1(2ee1d53872774d4b80f8c1a4e8a6ceb9e79ed6f5), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4cpycat__y, m4cpycat, "co_25btp.2_1", 0x0000, 0x010000, CRC(cea10ed8) SHA1(2b10193824afb50d561b2307a3189d14e2f5d47a), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4cpycat__z, m4cpycat, "co_30_bc.2_1", 0x0000, 0x010000, CRC(2d39f5fa) SHA1(20075621085765150a57233eccd61f16dbbae9b1), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4cpycat__0, m4cpycat, "co_30_bp.4_1", 0x0000, 0x010000, CRC(0826ffa7) SHA1(05a12d68acf69d8a582fc7fee91a282280380420), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 28)" ) -GAME_CUSTOM( 199?, m4cpycat__1, m4cpycat, "co_30_dc.2_1", 0x0000, 0x010000, CRC(b028d639) SHA1(9393b82d41e7f8a7e2dba33545477ae13a8d6804), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 29)" ) -GAME_CUSTOM( 199?, m4cpycat__2, m4cpycat, "co_30_dp.4_1", 0x0000, 0x010000, CRC(f40f09ca) SHA1(11f7af5bf78768759c3eba50ab1a906e81ce1100), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 30)" ) -GAME_CUSTOM( 199?, m4cpycat__3, m4cpycat, "co_30_kp.4_1", 0x0000, 0x010000, CRC(97ab5c33) SHA1(dc6b9705de4731a5cbc35557ca26c80b20cc6518), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 31)" ) -GAME_CUSTOM( 199?, m4cpycat__4, m4cpycat, "co_30a_c.2_1", 0x0000, 0x010000, CRC(eea1522d) SHA1(fdfe797b8cf2fa10f24e89c3047290ac63acebc7), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 32)" ) -GAME_CUSTOM( 199?, m4cpycat__5, m4cpycat, "co_30b_c.2_1", 0x0000, 0x010000, CRC(61e873b0) SHA1(00037fde263fe9e9cb227ef2945e8b90feee0d6e), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 33)" ) -GAME_CUSTOM( 199?, m4cpycat__6, m4cpycat, "co_30bdc.2_1", 0x0000, 0x010000, CRC(6f261bdc) SHA1(df7ab51c984b20665fdb327d17ca6ec32109ec2d), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 34)" ) -GAME_CUSTOM( 199?, m4cpycat__7, m4cpycat, "co_30bgc.2_1", 0x0000, 0x010000, CRC(85cd1c27) SHA1(e0c250bf2848b6991cf33c07b43c2704ae906e47), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 35)" ) -GAME_CUSTOM( 199?, m4cpycat__8, m4cpycat, "co_30btc.2_1", 0x0000, 0x010000, CRC(3a940326) SHA1(f1a0eca5ceccbf979ac7a2c51bfdc1de6f0aa40e), "Barcrest / Bwb","Copy Cat (Barcrest) (MPU4) (set 36)" ) +GAME_CUSTOM( 199?, m4cpycat, 0, "co_20_bc.1_1", 0x0000, 0x010000, CRC(c9d3cdc1) SHA1(28265b0f95a8829efc4e346269a7af17a6abe345), "Bwb","Copy Cat (Barcrest) (MPU4) (set 1)" ) +GAME_CUSTOM( 199?, m4cpycat__a, m4cpycat, "co_20_dc.1_1", 0x0000, 0x010000, CRC(c6552f9a) SHA1(ae7ad183d2cd89bc9748dcbb3ea26832bed30009), "Bwb","Copy Cat (Barcrest) (MPU4) (set 2)" ) +GAME_CUSTOM( 199?, m4cpycat__b, m4cpycat, "co_20_kc.1_1", 0x0000, 0x010000, CRC(b5260e35) SHA1(6cbf4ca426fd47b0db49e188a7a7fe72f6c99aef), "Bwb","Copy Cat (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4cpycat__c, m4cpycat, "co_20a_c.1_1", 0x0000, 0x010000, CRC(486d42af) SHA1(327fca9604845ec37c2212413105f48a7b0e2836), "Bwb","Copy Cat (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4cpycat__d, m4cpycat, "co_20b_c.1_1", 0x0000, 0x010000, CRC(90e0e19f) SHA1(c7e73faa4c3e853dbaa6b14303ab454a09eb36d7), "Bwb","Copy Cat (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4cpycat__e, m4cpycat, "co_20bgc.1_1", 0x0000, 0x010000, CRC(f99d6ae2) SHA1(2106412caa7d3dfc262dc2b1d3e258bb33605912), "Bwb","Copy Cat (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4cpycat__f, m4cpycat, "co_20bgp.4_1", 0x0000, 0x010000, CRC(fdc6753a) SHA1(4dd39fa995ee9fa7d153d64dd163d5482aa490d2), "Bwb","Copy Cat (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4cpycat__g, m4cpycat, "co_20btc.1_1", 0x0000, 0x010000, CRC(3780d767) SHA1(4fb4354b02eed754ca1caef2b56eccc76524ae1e), "Bwb","Copy Cat (Barcrest) (MPU4) (set 8)" ) +GAME_CUSTOM( 199?, m4cpycat__h, m4cpycat, "co_25_bc.1_1", 0x0000, 0x010000, CRC(13c82730) SHA1(992a6d04ed357548bb6cea6505316013048a2e57), "Bwb","Copy Cat (Barcrest) (MPU4) (set 9)" ) +GAME_CUSTOM( 199?, m4cpycat__i, m4cpycat, "co_25_bp.2_1", 0x0000, 0x010000, CRC(a5983412) SHA1(7daa3028355fb0e85dce1629477a8efae625f86d), "Bwb","Copy Cat (Barcrest) (MPU4) (set 10)" ) +GAME_CUSTOM( 199?, m4cpycat__j, m4cpycat, "co_25_bp.3_1", 0x0000, 0x010000, CRC(4060da30) SHA1(34a93e0550992e7510d1eaf2d5109da3c3fa2f75), "Bwb","Copy Cat (Barcrest) (MPU4) (set 11)" ) +GAME_CUSTOM( 199?, m4cpycat__k, m4cpycat, "co_25_dc.1_1", 0x0000, 0x010000, CRC(a3f34f3f) SHA1(4c4842cc668b4c3abd9d2896cc50bbc3d9643b75), "Bwb","Copy Cat (Barcrest) (MPU4) (set 12)" ) +GAME_CUSTOM( 199?, m4cpycat__l, m4cpycat, "co_25_dp.2_1", 0x0000, 0x010000, CRC(1f192638) SHA1(16a86242281281ca7b994dee06910d7f107c4743), "Bwb","Copy Cat (Barcrest) (MPU4) (set 13)" ) +GAME_CUSTOM( 199?, m4cpycat__m, m4cpycat, "co_25_kc.1_1", 0x0000, 0x010000, CRC(6b2a7f2b) SHA1(5d558431a6b83214cc0dc33d999eeb72f3c53e85), "Bwb","Copy Cat (Barcrest) (MPU4) (set 14)" ) +GAME_CUSTOM( 199?, m4cpycat__n, m4cpycat, "co_25_kp.2_1", 0x0000, 0x010000, CRC(73d3aaba) SHA1(5ef9118462bfdf93182ec539d3b80a72c09fa032), "Bwb","Copy Cat (Barcrest) (MPU4) (set 15)" ) +GAME_CUSTOM( 199?, m4cpycat__o, m4cpycat, "co_25_kp.3_1", 0x0000, 0x010000, CRC(2e8fa3ee) SHA1(18f4e4eae7d7ac14486ed731bb67cab22d0b287d), "Bwb","Copy Cat (Barcrest) (MPU4) (set 16)" ) +GAME_CUSTOM( 199?, m4cpycat__p, m4cpycat, "co_25a_c.1_1", 0x0000, 0x010000, CRC(e753196a) SHA1(79fc9b567dc946f81d40c3b215035cf2adcf94af), "Bwb","Copy Cat (Barcrest) (MPU4) (set 17)" ) +GAME_CUSTOM( 199?, m4cpycat__q, m4cpycat, "co_25a_p.2_1", 0x0000, 0x010000, CRC(a058d7f7) SHA1(6e9116ce757503ef5b1822473a310513dd2973e3), "Bwb","Copy Cat (Barcrest) (MPU4) (set 18)" ) +GAME_CUSTOM( 199?, m4cpycat__r, m4cpycat, "co_25a_p.3_1", 0x0000, 0x010000, CRC(ba172858) SHA1(d0a025c339f886802b7491448b6b2a4e1f5a3451), "Bwb","Copy Cat (Barcrest) (MPU4) (set 19)" ) +GAME_CUSTOM( 199?, m4cpycat__s, m4cpycat, "co_25b_c.1_1", 0x0000, 0x010000, CRC(d82a9080) SHA1(9b9091f867f0b5d75f2bd5f9d62a4419073da357), "Bwb","Copy Cat (Barcrest) (MPU4) (set 20)" ) +GAME_CUSTOM( 199?, m4cpycat__t, m4cpycat, "co_25b_p.2_1", 0x0000, 0x010000, CRC(48c8f7e6) SHA1(ff651e4c88b81bb816ab92e7f1d1fbd2c2920db1), "Bwb","Copy Cat (Barcrest) (MPU4) (set 21)" ) +GAME_CUSTOM( 199?, m4cpycat__u, m4cpycat, "co_25bgc.1_1", 0x0000, 0x010000, CRC(947a5465) SHA1(c99c0e8ca515fbad8801e07e5936256cca8e7af1), "Bwb","Copy Cat (Barcrest) (MPU4) (set 22)" ) +GAME_CUSTOM( 199?, m4cpycat__v, m4cpycat, "co_25bgp.2_1", 0x0000, 0x010000, CRC(84ab9c9d) SHA1(4c1043fb7ff6cd4e681f18e2dd0ddd29d5ce6d09), "Bwb","Copy Cat (Barcrest) (MPU4) (set 23)" ) +GAME_CUSTOM( 199?, m4cpycat__w, m4cpycat, "co_25bgp.3_1", 0x0000, 0x010000, CRC(7fa4089e) SHA1(f73aff58c7a627f993e65527bb551c23640b22ed), "Bwb","Copy Cat (Barcrest) (MPU4) (set 24)" ) +GAME_CUSTOM( 199?, m4cpycat__x, m4cpycat, "co_25btc.1_1", 0x0000, 0x010000, CRC(dbbae1b6) SHA1(2ee1d53872774d4b80f8c1a4e8a6ceb9e79ed6f5), "Bwb","Copy Cat (Barcrest) (MPU4) (set 25)" ) +GAME_CUSTOM( 199?, m4cpycat__y, m4cpycat, "co_25btp.2_1", 0x0000, 0x010000, CRC(cea10ed8) SHA1(2b10193824afb50d561b2307a3189d14e2f5d47a), "Bwb","Copy Cat (Barcrest) (MPU4) (set 26)" ) +GAME_CUSTOM( 199?, m4cpycat__z, m4cpycat, "co_30_bc.2_1", 0x0000, 0x010000, CRC(2d39f5fa) SHA1(20075621085765150a57233eccd61f16dbbae9b1), "Bwb","Copy Cat (Barcrest) (MPU4) (set 27)" ) +GAME_CUSTOM( 199?, m4cpycat__0, m4cpycat, "co_30_bp.4_1", 0x0000, 0x010000, CRC(0826ffa7) SHA1(05a12d68acf69d8a582fc7fee91a282280380420), "Bwb","Copy Cat (Barcrest) (MPU4) (set 28)" ) +GAME_CUSTOM( 199?, m4cpycat__1, m4cpycat, "co_30_dc.2_1", 0x0000, 0x010000, CRC(b028d639) SHA1(9393b82d41e7f8a7e2dba33545477ae13a8d6804), "Bwb","Copy Cat (Barcrest) (MPU4) (set 29)" ) +GAME_CUSTOM( 199?, m4cpycat__2, m4cpycat, "co_30_dp.4_1", 0x0000, 0x010000, CRC(f40f09ca) SHA1(11f7af5bf78768759c3eba50ab1a906e81ce1100), "Bwb","Copy Cat (Barcrest) (MPU4) (set 30)" ) +GAME_CUSTOM( 199?, m4cpycat__3, m4cpycat, "co_30_kp.4_1", 0x0000, 0x010000, CRC(97ab5c33) SHA1(dc6b9705de4731a5cbc35557ca26c80b20cc6518), "Bwb","Copy Cat (Barcrest) (MPU4) (set 31)" ) +GAME_CUSTOM( 199?, m4cpycat__4, m4cpycat, "co_30a_c.2_1", 0x0000, 0x010000, CRC(eea1522d) SHA1(fdfe797b8cf2fa10f24e89c3047290ac63acebc7), "Bwb","Copy Cat (Barcrest) (MPU4) (set 32)" ) +GAME_CUSTOM( 199?, m4cpycat__5, m4cpycat, "co_30b_c.2_1", 0x0000, 0x010000, CRC(61e873b0) SHA1(00037fde263fe9e9cb227ef2945e8b90feee0d6e), "Bwb","Copy Cat (Barcrest) (MPU4) (set 33)" ) +GAME_CUSTOM( 199?, m4cpycat__6, m4cpycat, "co_30bdc.2_1", 0x0000, 0x010000, CRC(6f261bdc) SHA1(df7ab51c984b20665fdb327d17ca6ec32109ec2d), "Bwb","Copy Cat (Barcrest) (MPU4) (set 34)" ) +GAME_CUSTOM( 199?, m4cpycat__7, m4cpycat, "co_30bgc.2_1", 0x0000, 0x010000, CRC(85cd1c27) SHA1(e0c250bf2848b6991cf33c07b43c2704ae906e47), "Bwb","Copy Cat (Barcrest) (MPU4) (set 35)" ) +GAME_CUSTOM( 199?, m4cpycat__8, m4cpycat, "co_30btc.2_1", 0x0000, 0x010000, CRC(3a940326) SHA1(f1a0eca5ceccbf979ac7a2c51bfdc1de6f0aa40e), "Bwb","Copy Cat (Barcrest) (MPU4) (set 36)" ) #undef GAME_CUSTOM #define GAME_CUSTOM(year, setname,parent,name,offset,length,hash,company,title) \ @@ -4786,10 +5098,11 @@ GAME_CUSTOM( 199?, m4cpycat__8, m4cpycat, "co_30btc.2_1", 0x0000, 0x010000, ROM_END \ GAME(year, setname, parent ,mod2 ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4hypclb, 0, "hpcd.p1", 0x0000, 0x010000, CRC(7fac8944) SHA1(32f0f16ef6c4b99fe70464341a1ce226f6221122), "Barcrest","Hyper Viper Club (Barcrest) (MPU4) (set 1)" ) +// "(C)1991 BARCREST" and "HPC 0.5" +GAME_CUSTOM( 199?, m4hypclb, 0, "hpcs.p1", 0x0000, 0x010000, CRC(55601e10) SHA1(78c3f13cd122e86ff8b7750b375c26e56c6b27c6), "Barcrest","Hyper Viper Club (Barcrest) (MPU4) (HPC 0.5)" ) +GAME_CUSTOM( 199?, m4hypclb__c, m4hypclb, "hpcd.p1", 0x0000, 0x010000, CRC(7fac8944) SHA1(32f0f16ef6c4b99fe70464341a1ce226f6221122), "Barcrest","Hyper Viper Club (Barcrest) (MPU4) (set 1)" ) GAME_CUSTOM( 199?, m4hypclb__a, m4hypclb, "hpcf.p1", 0x0000, 0x010000, CRC(2931a558) SHA1(2f7fe541edc502738dd6603435deaef1cb26a1e2), "Barcrest","Hyper Viper Club (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4hypclb__b, m4hypclb, "hpcfd.p1", 0x0000, 0x010000, CRC(b127e577) SHA1(da034086bb92934f73d1a2be776f91462274479d), "Barcrest","Hyper Viper Club (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4hypclb__c, m4hypclb, "hpcs.p1", 0x0000, 0x010000, CRC(55601e10) SHA1(78c3f13cd122e86ff8b7750b375c26e56c6b27c6), "Barcrest","Hyper Viper Club (Barcrest) (MPU4) (set 4)" ) #define M4BNKROL_EXTRA_ROMS \ @@ -4805,13 +5118,14 @@ GAME_CUSTOM( 199?, m4hypclb__c, m4hypclb, "hpcs.p1", 0x0000, 0x010000, CRC ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4bnkrol, 0, "cbr05s.p1", 0x0000, 0x020000, CRC(a8b53a0d) SHA1(661ab61aa8f427b92fdee02539f19e5dd2243da7), "Barcrest","Bank Roller Club (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4bnkrol__a, m4bnkrol, "br301d.p1", 0x0000, 0x020000, CRC(b9334e2d) SHA1(263808eb5ea3f9987eb7579b43329cb27e109921), "Barcrest","Bank Roller Club (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4bnkrol__b, m4bnkrol, "br301f.p1", 0x0000, 0x020000, CRC(c4be5b69) SHA1(9b08d5c0c5aebeef9f0767f5bd456cc6b05ea317), "Barcrest","Bank Roller Club (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4bnkrol__c, m4bnkrol, "br301s.p1", 0x0000, 0x020000, CRC(1e117651) SHA1(c06d3f14e55be83c89c8132cf219d46acc42991c), "Barcrest","Bank Roller Club (Barcrest) (MPU4) (set 4)" ) +// "(C)1996 BARCREST" and "CBR 0.5" +GAME_CUSTOM( 199?, m4bnkrol, 0, "cbr05s.p1", 0x0000, 0x020000, CRC(a8b53a0d) SHA1(661ab61aa8f427b92fdee02539f19e5dd2243da7), "Barcrest","Bank Roller Club (Barcrest) (MPU4) (CBR 0.5)" ) GAME_CUSTOM( 199?, m4bnkrol__d, m4bnkrol, "cbr05d.p1", 0x0000, 0x020000, CRC(44cefec0) SHA1(7034c5acd44ccd3cd985ba4945c004c070a599a4), "Barcrest","Bank Roller Club (Barcrest) (MPU4) (set 5)" ) GAME_CUSTOM( 199?, m4bnkrol__e, m4bnkrol, "cbr05f.p1", 0x0000, 0x020000, CRC(3943eb84) SHA1(76a00db6a0c6655c3a7942550c788822bacd73e5), "Barcrest","Bank Roller Club (Barcrest) (MPU4) (set 6)" ) +// "(C)1996 BARCREST" and "BR3 0.1" +GAME_CUSTOM( 199?, m4bnkrol__c, m4bnkrol, "br301s.p1", 0x0000, 0x020000, CRC(1e117651) SHA1(c06d3f14e55be83c89c8132cf219d46acc42991c), "Barcrest","Bank Roller Club (Barcrest) (MPU4) (BR3 0.1)" ) +GAME_CUSTOM( 199?, m4bnkrol__a, m4bnkrol, "br301d.p1", 0x0000, 0x020000, CRC(b9334e2d) SHA1(263808eb5ea3f9987eb7579b43329cb27e109921), "Barcrest","Bank Roller Club (Barcrest) (MPU4) (set 2)" ) +GAME_CUSTOM( 199?, m4bnkrol__b, m4bnkrol, "br301f.p1", 0x0000, 0x020000, CRC(c4be5b69) SHA1(9b08d5c0c5aebeef9f0767f5bd456cc6b05ea317), "Barcrest","Bank Roller Club (Barcrest) (MPU4) (set 3)" ) #define M4TIC_EXTRA_ROMS \ @@ -4825,25 +5139,27 @@ GAME_CUSTOM( 199?, m4bnkrol__e, m4bnkrol, "cbr05f.p1", 0x0000, 0x020000, CR M4TIC_EXTRA_ROMS \ ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4tic, 0, "tt_20a__.2_1", 0x0000, 0x010000, CRC(b923ac0d) SHA1(1237962af43c2c3f4ed0ad5bed21f24decfeae02), "Barcrest / Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4tic__a, m4tic, "tt_20a_c.1_1", 0x0000, 0x010000, CRC(18a68ea0) SHA1(37783121ff5540e264d89069101d991acb66b982), "Barcrest / Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4tic__b, m4tic, "tt_20b__.2_1", 0x0000, 0x010000, CRC(b5eb86ab) SHA1(99ddb80941c67bd271e22af17405457d32676484), "Barcrest / Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4tic__c, m4tic, "tt_20b_c.1_1", 0x0000, 0x010000, CRC(d35079ab) SHA1(d109af8ef6f4d26b505f63df10d5850ddc0c0b65), "Barcrest / Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4tic__d, m4tic, "tt_20bd_.2_1", 0x0000, 0x010000, CRC(0889a699) SHA1(c96d135b9248e9bab78af438b97e6cb854b2c771), "Barcrest / Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4tic__e, m4tic, "tt_20bdc.1_1", 0x0000, 0x010000, CRC(2a43efd4) SHA1(9f6e568ca95a5f4e1a4e82eda2d15dfa225e65ea), "Barcrest / Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4tic__f, m4tic, "tt_20bg_.2_1", 0x0000, 0x010000, CRC(128896c1) SHA1(af37645b88116cde57fcc42ed58d69bf9c11ff8a), "Barcrest / Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4tic__g, m4tic, "tt_20bt_.2_1", 0x0000, 0x010000, CRC(362046f9) SHA1(6cb5a986517158d63e7403891bb749eaccb63acb), "Barcrest / Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4tic__h, m4tic, "tt_20s__.2_1", 0x0000, 0x010000, CRC(53dfefe9) SHA1(0f9fc1d65ebd7e370de6001f594616b79b2aa57e), "Barcrest / Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4tic__i, m4tic, "tt_20s_c.1_1", 0x0000, 0x010000, CRC(65a38960) SHA1(48ffdda1c5c98742124418429c510de9f5b90270), "Barcrest / Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4tic__j, m4tic, "tt_20sb_.2_1", 0x0000, 0x010000, CRC(c9174384) SHA1(f694a6a7f78b8a062fd26371fa6758ec4252352a), "Barcrest / Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4tic__k, m4tic, "tt_20sk_.2_1", 0x0000, 0x010000, CRC(dca42636) SHA1(c6e9aaf402c2fc7eec6e9b07aa4c33312bc0af0e), "Barcrest / Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4tic__l, m4tic, "tt_25a_c.3_1", 0x0000, 0x010000, CRC(2e44c6db) SHA1(ffc96dafbcfae719c3971882e066971540fafe78), "Barcrest / Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4tic__m, m4tic, "tt_25b_c.3_1", 0x0000, 0x010000, CRC(d393edf0) SHA1(66f17a88018fee71f3e0c7996371c9b6832ef23a), "Barcrest / Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4tic__n, m4tic, "tt_25bdc.3_1", 0x0000, 0x010000, CRC(2ce71772) SHA1(a2f36d0d11826a7be7f8cc04f21a77facb4ce188), "Barcrest / Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4tic__o, m4tic, "tt_25bgc.3_1", 0x0000, 0x010000, CRC(2dbeb9c3) SHA1(8288a9d17932582c7536563e34e2150a85c7a822), "Barcrest / Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4tic__p, m4tic, "tt_25btc.3_1", 0x0000, 0x010000, CRC(d5702abf) SHA1(6115f39d70dfdf1a00bcfc5f0fe257dd1e0ff968), "Barcrest / Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4tic__r, m4tic, "tt_25sbc.3_1", 0x0000, 0x010000, CRC(11c0152f) SHA1(d46b0a6774da35cf9d3a352b9fe7cb574880b210), "Barcrest / Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4tic__s, m4tic, "tti20___.2_1", 0x0000, 0x010000, CRC(91054bf6) SHA1(68cc6c9b47849149a574e3af97bd0e8255fc5c43), "Barcrest / Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 19)" ) + + +GAME_CUSTOM( 199?, m4tic, 0, "tt_20a__.2_1", 0x0000, 0x010000, CRC(b923ac0d) SHA1(1237962af43c2c3f4ed0ad5bed21f24decfeae02), "Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 1)" ) +GAME_CUSTOM( 199?, m4tic__a, m4tic, "tt_20a_c.1_1", 0x0000, 0x010000, CRC(18a68ea0) SHA1(37783121ff5540e264d89069101d991acb66b982), "Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 2)" ) +GAME_CUSTOM( 199?, m4tic__b, m4tic, "tt_20b__.2_1", 0x0000, 0x010000, CRC(b5eb86ab) SHA1(99ddb80941c67bd271e22af17405457d32676484), "Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4tic__c, m4tic, "tt_20b_c.1_1", 0x0000, 0x010000, CRC(d35079ab) SHA1(d109af8ef6f4d26b505f63df10d5850ddc0c0b65), "Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4tic__d, m4tic, "tt_20bd_.2_1", 0x0000, 0x010000, CRC(0889a699) SHA1(c96d135b9248e9bab78af438b97e6cb854b2c771), "Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4tic__e, m4tic, "tt_20bdc.1_1", 0x0000, 0x010000, CRC(2a43efd4) SHA1(9f6e568ca95a5f4e1a4e82eda2d15dfa225e65ea), "Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4tic__f, m4tic, "tt_20bg_.2_1", 0x0000, 0x010000, CRC(128896c1) SHA1(af37645b88116cde57fcc42ed58d69bf9c11ff8a), "Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4tic__g, m4tic, "tt_20bt_.2_1", 0x0000, 0x010000, CRC(362046f9) SHA1(6cb5a986517158d63e7403891bb749eaccb63acb), "Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 8)" ) +GAME_CUSTOM( 199?, m4tic__h, m4tic, "tt_20s__.2_1", 0x0000, 0x010000, CRC(53dfefe9) SHA1(0f9fc1d65ebd7e370de6001f594616b79b2aa57e), "Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 9)" ) +GAME_CUSTOM( 199?, m4tic__i, m4tic, "tt_20s_c.1_1", 0x0000, 0x010000, CRC(65a38960) SHA1(48ffdda1c5c98742124418429c510de9f5b90270), "Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 10)" ) +GAME_CUSTOM( 199?, m4tic__j, m4tic, "tt_20sb_.2_1", 0x0000, 0x010000, CRC(c9174384) SHA1(f694a6a7f78b8a062fd26371fa6758ec4252352a), "Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 11)" ) +GAME_CUSTOM( 199?, m4tic__k, m4tic, "tt_20sk_.2_1", 0x0000, 0x010000, CRC(dca42636) SHA1(c6e9aaf402c2fc7eec6e9b07aa4c33312bc0af0e), "Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 12)" ) +GAME_CUSTOM( 199?, m4tic__l, m4tic, "tt_25a_c.3_1", 0x0000, 0x010000, CRC(2e44c6db) SHA1(ffc96dafbcfae719c3971882e066971540fafe78), "Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 13)" ) +GAME_CUSTOM( 199?, m4tic__m, m4tic, "tt_25b_c.3_1", 0x0000, 0x010000, CRC(d393edf0) SHA1(66f17a88018fee71f3e0c7996371c9b6832ef23a), "Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 14)" ) +GAME_CUSTOM( 199?, m4tic__n, m4tic, "tt_25bdc.3_1", 0x0000, 0x010000, CRC(2ce71772) SHA1(a2f36d0d11826a7be7f8cc04f21a77facb4ce188), "Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 15)" ) +GAME_CUSTOM( 199?, m4tic__o, m4tic, "tt_25bgc.3_1", 0x0000, 0x010000, CRC(2dbeb9c3) SHA1(8288a9d17932582c7536563e34e2150a85c7a822), "Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 16)" ) +GAME_CUSTOM( 199?, m4tic__p, m4tic, "tt_25btc.3_1", 0x0000, 0x010000, CRC(d5702abf) SHA1(6115f39d70dfdf1a00bcfc5f0fe257dd1e0ff968), "Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 17)" ) +GAME_CUSTOM( 199?, m4tic__r, m4tic, "tt_25sbc.3_1", 0x0000, 0x010000, CRC(11c0152f) SHA1(d46b0a6774da35cf9d3a352b9fe7cb574880b210), "Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 18)" ) +GAME_CUSTOM( 199?, m4tic__s, m4tic, "tti20___.2_1", 0x0000, 0x010000, CRC(91054bf6) SHA1(68cc6c9b47849149a574e3af97bd0e8255fc5c43), "Bwb","Tic Tac Toe (Barcrest) (MPU4) (set 19)" ) #define M4RHRCL_EXTRA_ROMS \ ROM_REGION( 0x48, "fakechr", 0 ) \ @@ -4860,10 +5176,12 @@ GAME_CUSTOM( 199?, m4tic__s, m4tic, "tti20___.2_1", 0x0000, 0x010000, CRC(9105 ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4rhrcl, 0, "rhrc.hex", 0x0000, 0x010000, CRC(e4b89d53) SHA1(fc222d56cdba2891048726d6e6ecd8a4028ba8ba), "Barcrest","Red Hot Roll Club (Barcrest) (MPU4) (set 1)" ) +// "(C)1991 BARCREST" and "RH2 1.1" +GAME_CUSTOM( 199?, m4rhrcl, 0, "rh2s.p1", 0x0000, 0x010000, CRC(aa15e8a8) SHA1(243e7562a4cf938527afebbd99581acea1ab4134), "Barcrest","Red Hot Roll Club (Barcrest) (MPU4) (RH2 1.1)" ) GAME_CUSTOM( 199?, m4rhrcl__a, m4rhrcl, "rh2d.p1", 0x0000, 0x010000, CRC(b55a01c3) SHA1(8c94c2ca509ac7631528df78e82fb39b5f579c45), "Barcrest","Red Hot Roll Club (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4rhrcl__b, m4rhrcl, "rh2f.p1", 0x0000, 0x010000, CRC(83466c89) SHA1(790d626e361bfec1265edc6f6ce51f098eb774ba), "Barcrest","Red Hot Roll Club (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4rhrcl__c, m4rhrcl, "rh2s.p1", 0x0000, 0x010000, CRC(aa15e8a8) SHA1(243e7562a4cf938527afebbd99581acea1ab4134), "Barcrest","Red Hot Roll Club (Barcrest) (MPU4) (set 4)" ) +// "(C)1991 BARCREST" and "RH2 1.0" +GAME_CUSTOM( 199?, m4rhrcl__c, m4rhrcl, "rhrc.hex", 0x0000, 0x010000, CRC(e4b89d53) SHA1(fc222d56cdba2891048726d6e6ecd8a4028ba8ba), "Barcrest","Red Hot Roll Club (Barcrest) (MPU4) (RH2 1.0)" ) #define M4RHOGC_EXTRA_ROMS \ ROM_REGION( 0x48, "fakechr", 0 ) \ @@ -4880,9 +5198,9 @@ GAME_CUSTOM( 199?, m4rhrcl__c, m4rhrcl, "rh2s.p1", 0x0000, 0x010000, CRC(aa ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4rhogc, 0, "rhcf.p1", 0x0000, 0x010000, CRC(0b726e87) SHA1(12c334e7dd712b9e19e8241b1a8e278ff84110d4), "Barcrest","Road Hog Club (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4rhogc__a, m4rhogc, "rhcs.p1", 0x0000, 0x010000, CRC(d1541050) SHA1(ef1ee3b9319e2a357540cf0de902de439267c3e2), "Barcrest","Road Hog Club (Barcrest) (MPU4) (set 2)" ) +// "(C)1991 BARCREST" and "RHC 0.5" +GAME_CUSTOM( 199?, m4rhogc, 0, "rhcs.p1", 0x0000, 0x010000, CRC(d1541050) SHA1(ef1ee3b9319e2a357540cf0de902de439267c3e2), "Barcrest","Road Hog Club (Barcrest) (MPU4) (RHC 0.5)" ) +GAME_CUSTOM( 199?, m4rhogc__a, m4rhogc, "rhcf.p1", 0x0000, 0x010000, CRC(0b726e87) SHA1(12c334e7dd712b9e19e8241b1a8e278ff84110d4), "Barcrest","Road Hog Club (Barcrest) (MPU4) (set 1)" ) GAME_CUSTOM( 199?, m4rhogc__b, m4rhogc, "rhcd.p1", 0x0000, 0x010000, CRC(7a7df536) SHA1(9c53e5c6a5f3a32de05a574e1c8dedc3e5be66eb), "Barcrest","Road Hog Club (Barcrest) (MPU4) (set 3)" ) #define M4GB006_EXTRA_ROMS \ @@ -4901,11 +5219,11 @@ GAME_CUSTOM( 199?, m4rhogc__b, m4rhogc, "rhcd.p1", 0x0000, 0x010000, CRC(7a7 GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4gb006, 0, "006s.p1", 0x0000, 0x010000, CRC(6e750ab9) SHA1(2e1f08df7991efe450633e0bcec201e6fa7fdbaa), "Barcrest","Games Bond 006 (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4gb006__a, m4gb006, "006d.p1", 0x0000, 0x010000, CRC(7e0a4282) SHA1(8fd0cbdd9cf3ac74b7b202ce7615392c1a746906), "Barcrest","Games Bond 006 (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4gb006__b, m4gb006, "006y.p1", 0x0000, 0x010000, CRC(2947f4ed) SHA1(7d212bcef36e2bd792ded3e1e1638218e76da119), "Barcrest","Games Bond 006 (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4gb006__c, m4gb006, "bond20_11", 0x0000, 0x010000, CRC(8d810cb1) SHA1(065d8df33472a3476dd6cf21a684db9d7c8ba829), "Barcrest","Games Bond 006 (Barcrest) (MPU4) (set 4)" ) +// "(C)1993 BARCREST" and "006 0.6" +GAME_CUSTOM( 199?, m4gb006, 0, "006s.p1", 0x0000, 0x010000, CRC(6e750ab9) SHA1(2e1f08df7991efe450633e0bcec201e6fa7fdbaa), "Barcrest","Games Bond 006 (Barcrest) (MPU4) (006 0.6)" ) +GAME_CUSTOM( 199?, m4gb006__a, m4gb006, "006d.p1", 0x0000, 0x010000, CRC(7e0a4282) SHA1(8fd0cbdd9cf3ac74b7b202ce7615392c1a746906), "Barcrest","Games Bond 006 (Barcrest) (MPU4) (006 0.6D)" ) +GAME_CUSTOM( 199?, m4gb006__b, m4gb006, "006y.p1", 0x0000, 0x010000, CRC(2947f4ed) SHA1(7d212bcef36e2bd792ded3e1e1638218e76da119), "Barcrest","Games Bond 006 (Barcrest) (MPU4) (006 0.6Y)" ) +GAME_CUSTOM( 199?, m4gb006__c, m4gb006, "bond20_11", 0x0000, 0x010000, CRC(8d810cb1) SHA1(065d8df33472a3476dd6cf21a684db9d7c8ba829), "Barcrest","Games Bond 006 (Barcrest) (MPU4) (006 0.6C)" ) #define M4GBUST_EXTRA_ROMS \ @@ -4920,32 +5238,38 @@ GAME_CUSTOM( 199?, m4gb006__c, m4gb006, "bond20_11", 0x0000, 0x010000, CR ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) +// some of these ROMs (the non-D ones?) contain a 'Barcrest Video' string, and the game seems to do nothing, could require other (undumped?) parts as there really aren't many strings in here - -GAME_CUSTOM( 199?, m4gbust, 0, "gb_02___.2n3", 0x0000, 0x010000, CRC(973b3538) SHA1(31df04d9f35cbde4d5e395256927f146d1613178), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4gbust__a, m4gbust, "gb_02___.3a3", 0x0000, 0x010000, CRC(2b9d94b6) SHA1(ca433240f9e926cdf5240209589951e6018a496a), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4gbust__b, m4gbust, "gb_02___.3n3", 0x0000, 0x010000, CRC(99514ddd) SHA1(432d484525867c6ad68cd93a4bfded4dba36cf56), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4gbust__c, m4gbust, "gb_02___.3s3", 0x0000, 0x010000, CRC(2634aa5f) SHA1(58ab973940138bdfd2690867e2ac3eb52bffb633), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4gbust__d, m4gbust, "gb_05___.4a3", 0x0000, 0x010000, CRC(8be6949e) SHA1(9731a1cb0d17c3cec2bec263cd6348f05662d917), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4gbust__e, m4gbust, "gb_05___.4n3", 0x0000, 0x010000, CRC(621b25f0) SHA1(bf699068284def8bad9143c5841f667f2cb6f20f), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4gbust__f, m4gbust, "gb_05___.4s3", 0x0000, 0x010000, CRC(e2227701) SHA1(271682c7bf6e0f6f49f6d6b138aa19b6ef6bc626), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4gbust__g, m4gbust, "gb_05_d_.4a3", 0x0000, 0x010000, CRC(a1b2b32f) SHA1(c1504b3768920f90dbd441b9d50db9676528ca97), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4gbust__h, m4gbust, "gb_10___.2a3", 0x0000, 0x010000, CRC(a5c692f3) SHA1(8305c88ab8b80b407f4723df25135c25a4c0794f), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4gbust__i, m4gbust, "gb_10___.2n3", 0x0000, 0x010000, CRC(de18c441) SHA1(5a7055fcd755c1ac58e1b94af243801f169f29f5), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4gbust__j, m4gbust, "gb_10___.3s3", 0x0000, 0x010000, CRC(427e043b) SHA1(2f64c11a04306692ac5eb9919892f7226156dce0), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4gbust__k, m4gbust, "gb_10_b_.3s3", 0x0000, 0x010000, CRC(091afb66) SHA1(ac32d7be1e1f4f1453e37017966990a481506024), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4gbust__l, m4gbust, "gb_10_d_.2a3", 0x0000, 0x010000, CRC(f1446bf5) SHA1(4011d60e13045476741c5a02c64dabbe6a1ae2d6), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4gbust__m, m4gbust, "gb_10_d_.2n3", 0x0000, 0x010000, CRC(cac5057d) SHA1(afcc21dbd07515ed134675b7dbfb53c048a465b0), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4gbust__n, m4gbust, "gb_10_d_.3s3", 0x0000, 0x010000, CRC(776736de) SHA1(4f80d9ffdf4468801cf830e9774b6028f7684864), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4gbust__o, m4gbust, "gb_20___.2n3", 0x0000, 0x010000, CRC(27fc2ee1) SHA1(2e6a042f7117b4594b2601ae166ee0db72c70ed5), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4gbust__p, m4gbust, "gb_20___.3s3", 0x0000, 0x010000, CRC(4a86d879) SHA1(72e92b6482fdeb4dca36d9426a712ac24d60f7f7), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4gbust__q, m4gbust, "gb_20_b_.2a3", 0x0000, 0x010000, CRC(4dd7d38f) SHA1(8a71c27189ec3089c016a8292db68f7cdc91b083), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4gbust__r, m4gbust, "gb_20_b_.2n3", 0x0000, 0x010000, CRC(28cbb217) SHA1(a74978ff5e1511a33f543006b3f8ad30a77ea462), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4gbust__s, m4gbust, "gb_20_b_.3s3", 0x0000, 0x010000, CRC(1a7cc3cf) SHA1(0d5764d35489bde284965c197b217a06f26a3e3b), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4gbust__t, m4gbust, "gb_20_d_.2a3", 0x0000, 0x010000, CRC(70f40688) SHA1(ed14f8f460825ffa087394ef5984ae064e02f7b6), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4gbust__u, m4gbust, "gb_20_d_.2n3", 0x0000, 0x010000, CRC(431c2965) SHA1(eb24e560d5c4bf419465fc760621a4fa853fff95), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4gbust__v, m4gbust, "gb_20_d_.3s3", 0x0000, 0x010000, CRC(4fc69155) SHA1(09a0f2122893d9fd90204a74c8862e01386503a4), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4gbust__w, m4gbust, "ghostbusters 2p.bin", 0x0000, 0x010000, CRC(abb288c4) SHA1(2012e027711996a552ab59674ae3bce1bf14f44b), "Bwb / Barcrest","Ghost Buster (Barcrest) (MPU4) (set 24)" ) +// "(C)1994 B.W.B." and "GB 5.0" +GAME_CUSTOM( 199?, m4gbust, 0, "gb_05___.4s3", 0x0000, 0x010000, CRC(e2227701) SHA1(271682c7bf6e0f6f49f6d6b138aa19b6ef6bc626), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 5.0)" ) +// "(C)1994 B.W.B." and "GB 4.0" +GAME_CUSTOM( 199?, m4gbust__d, m4gbust, "gb_05___.4a3", 0x0000, 0x010000, CRC(8be6949e) SHA1(9731a1cb0d17c3cec2bec263cd6348f05662d917), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 4.0, set 1)" ) +GAME_CUSTOM( 199?, m4gbust__e, m4gbust, "gb_05___.4n3", 0x0000, 0x010000, CRC(621b25f0) SHA1(bf699068284def8bad9143c5841f667f2cb6f20f), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 4.0, set 2)" ) +GAME_CUSTOM( 199?, m4gbust__g, m4gbust, "gb_05_d_.4a3", 0x0000, 0x010000, CRC(a1b2b32f) SHA1(c1504b3768920f90dbd441b9d50db9676528ca97), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 4.0D)" ) +// "(C)1994 B.W.B." and "GB 3.0" +GAME_CUSTOM( 199?, m4gbust__b, m4gbust, "gb_02___.3n3", 0x0000, 0x010000, CRC(99514ddd) SHA1(432d484525867c6ad68cd93a4bfded4dba36cf56), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 3.0, 1994, set 1)" ) +GAME_CUSTOM( 199?, m4gbust__a, m4gbust, "gb_02___.3a3", 0x0000, 0x010000, CRC(2b9d94b6) SHA1(ca433240f9e926cdf5240209589951e6018a496a), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 3.0, 1994, set 2)" ) +// "(C)1994 B.W.B." and "GB 2.0" +GAME_CUSTOM( 199?, m4gbust__c, m4gbust, "gb_02___.3s3", 0x0000, 0x010000, CRC(2634aa5f) SHA1(58ab973940138bdfd2690867e2ac3eb52bffb633), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 2.0, 1994)" ) +// "(C)1993 B.W.B." and "GB 3.0" +GAME_CUSTOM( 199?, m4gbust__j, m4gbust, "gb_10___.3s3", 0x0000, 0x010000, CRC(427e043b) SHA1(2f64c11a04306692ac5eb9919892f7226156dce0), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 3.0, set 1)" ) +GAME_CUSTOM( 199?, m4gbust__p, m4gbust, "gb_20___.3s3", 0x0000, 0x010000, CRC(4a86d879) SHA1(72e92b6482fdeb4dca36d9426a712ac24d60f7f7), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 3.0, set 2)" ) +GAME_CUSTOM( 199?, m4gbust__n, m4gbust, "gb_10_d_.3s3", 0x0000, 0x010000, CRC(776736de) SHA1(4f80d9ffdf4468801cf830e9774b6028f7684864), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 3.0D, set 1)" ) +GAME_CUSTOM( 199?, m4gbust__v, m4gbust, "gb_20_d_.3s3", 0x0000, 0x010000, CRC(4fc69155) SHA1(09a0f2122893d9fd90204a74c8862e01386503a4), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 3.0D, set 2)" ) +GAME_CUSTOM( 199?, m4gbust__k, m4gbust, "gb_10_b_.3s3", 0x0000, 0x010000, CRC(091afb66) SHA1(ac32d7be1e1f4f1453e37017966990a481506024), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 3.0YD, set 1)" ) +GAME_CUSTOM( 199?, m4gbust__s, m4gbust, "gb_20_b_.3s3", 0x0000, 0x010000, CRC(1a7cc3cf) SHA1(0d5764d35489bde284965c197b217a06f26a3e3b), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 3.0YD, set 2)" ) +// "(C)1993 B.W.B." and "GB 2.0" +GAME_CUSTOM( 199?, m4gbust__f, m4gbust, "gb_02___.2n3", 0x0000, 0x010000, CRC(973b3538) SHA1(31df04d9f35cbde4d5e395256927f146d1613178), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 2.0, set 1)" ) +GAME_CUSTOM( 199?, m4gbust__i, m4gbust, "gb_10___.2n3", 0x0000, 0x010000, CRC(de18c441) SHA1(5a7055fcd755c1ac58e1b94af243801f169f29f5), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 2.0, set 2)" ) +GAME_CUSTOM( 199?, m4gbust__o, m4gbust, "gb_20___.2n3", 0x0000, 0x010000, CRC(27fc2ee1) SHA1(2e6a042f7117b4594b2601ae166ee0db72c70ed5), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 2.0, set 3)" ) +GAME_CUSTOM( 199?, m4gbust__h, m4gbust, "gb_10___.2a3", 0x0000, 0x010000, CRC(a5c692f3) SHA1(8305c88ab8b80b407f4723df25135c25a4c0794f), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 2.0, set 4)" ) +GAME_CUSTOM( 199?, m4gbust__w, m4gbust, "ghostbusters 2p.bin", 0x0000, 0x010000, CRC(abb288c4) SHA1(2012e027711996a552ab59674ae3bce1bf14f44b), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 2.0, set 5)" ) +GAME_CUSTOM( 199?, m4gbust__m, m4gbust, "gb_10_d_.2n3", 0x0000, 0x010000, CRC(cac5057d) SHA1(afcc21dbd07515ed134675b7dbfb53c048a465b0), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 2.0D, set 1)" ) +GAME_CUSTOM( 199?, m4gbust__u, m4gbust, "gb_20_d_.2n3", 0x0000, 0x010000, CRC(431c2965) SHA1(eb24e560d5c4bf419465fc760621a4fa853fff95), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 2.0D, set 2)" ) +GAME_CUSTOM( 199?, m4gbust__l, m4gbust, "gb_10_d_.2a3", 0x0000, 0x010000, CRC(f1446bf5) SHA1(4011d60e13045476741c5a02c64dabbe6a1ae2d6), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 2.0D, set 3)" ) +GAME_CUSTOM( 199?, m4gbust__t, m4gbust, "gb_20_d_.2a3", 0x0000, 0x010000, CRC(70f40688) SHA1(ed14f8f460825ffa087394ef5984ae064e02f7b6), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 2.0D, set 4)" ) +GAME_CUSTOM( 199?, m4gbust__r, m4gbust, "gb_20_b_.2n3", 0x0000, 0x010000, CRC(28cbb217) SHA1(a74978ff5e1511a33f543006b3f8ad30a77ea462), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 2.0YD, set 1)" ) +GAME_CUSTOM( 199?, m4gbust__q, m4gbust, "gb_20_b_.2a3", 0x0000, 0x010000, CRC(4dd7d38f) SHA1(8a71c27189ec3089c016a8292db68f7cdc91b083), "Bwb","Ghost Buster (Barcrest) (MPU4) (GB 2.0YD, set 2)" ) @@ -4962,11 +5286,12 @@ GAME_CUSTOM( 199?, m4gbust__w, m4gbust, "ghostbusters 2p.bin", 0x0000, 0x01 ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4cshenc, 0, "ca_sj__c.5_1", 0x0000, 0x020000, CRC(d9131b39) SHA1(4af89a7bc10de1406f401bede41e1bc452dbb159), "Bwb / Barcrest","Cash Encounters (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4cshenc__a, m4cshenc, "ca_sj_bc.5_1", 0x0000, 0x020000, CRC(30d1fb6d) SHA1(f845bef4ad7f2f48077eed74840916e87abb24b2), "Bwb / Barcrest","Cash Encounters (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4cshenc__b, m4cshenc, "ca_sj_dc.5_1", 0x0000, 0x020000, CRC(ac3ec716) SHA1(4ff8c26c46ec6e1321249b4d6d0c5194ed917f33), "Bwb / Barcrest","Cash Encounters (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4cshenc__c, m4cshenc, "ca_sja_c.5_1", 0x0000, 0x020000, CRC(c56a9d0b) SHA1(b0298c2e03097ab8ba5f99892e732ff1ab784c9b), "Bwb / Barcrest","Cash Encounters (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4cshenc__d, m4cshenc, "ca_sjb_c.5_1", 0x0000, 0x020000, CRC(8fad355d) SHA1(2ac16ad85ab8239a3e961abb06f9f71d17e5832a), "Bwb / Barcrest","Cash Encounters (Barcrest) (MPU4) (set 5)" ) +// "(C)1997 BWB" and "CA_ 5.0" +GAME_CUSTOM( 199?, m4cshenc, 0, "ca_sj__c.5_1", 0x0000, 0x020000, CRC(d9131b39) SHA1(4af89a7bc10de1406f401bede41e1bc452dbb159), "Bwb","Cash Encounters (Barcrest) (MPU4) (CA_ 5.0)" ) +GAME_CUSTOM( 199?, m4cshenc__a, m4cshenc, "ca_sj_bc.5_1", 0x0000, 0x020000, CRC(30d1fb6d) SHA1(f845bef4ad7f2f48077eed74840916e87abb24b2), "Bwb","Cash Encounters (Barcrest) (MPU4) (set 2)" ) +GAME_CUSTOM( 199?, m4cshenc__b, m4cshenc, "ca_sj_dc.5_1", 0x0000, 0x020000, CRC(ac3ec716) SHA1(4ff8c26c46ec6e1321249b4d6d0c5194ed917f33), "Bwb","Cash Encounters (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4cshenc__c, m4cshenc, "ca_sja_c.5_1", 0x0000, 0x020000, CRC(c56a9d0b) SHA1(b0298c2e03097ab8ba5f99892e732ff1ab784c9b), "Bwb","Cash Encounters (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4cshenc__d, m4cshenc, "ca_sjb_c.5_1", 0x0000, 0x020000, CRC(8fad355d) SHA1(2ac16ad85ab8239a3e961abb06f9f71d17e5832a), "Bwb","Cash Encounters (Barcrest) (MPU4) (set 5)" ) @@ -4983,14 +5308,15 @@ GAME_CUSTOM( 199?, m4cshenc__d, m4cshenc, "ca_sjb_c.5_1", 0x0000, 0x020000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4lvlcl, 0, "ll__x__x.1_1", 0x0000, 0x010000, CRC(1ef1c5b4) SHA1(455c147f158f8a36a9add9b984abc22af78258cf), "Bwb / Barcrest","Lucky Las Vegas Classic (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4lvlcl__a, m4lvlcl, "ll__x__x.3_1", 0x0000, 0x010000, CRC(42b85ebc) SHA1(a352d8389674fcfd90dc4e8155e6f4a78c9ec70d), "Bwb / Barcrest","Lucky Las Vegas Classic (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4lvlcl__b, m4lvlcl, "ll__x_dx.3_1", 0x0000, 0x010000, CRC(7753c8f0) SHA1(9600fee08529f29716697c4630730f15ef8a457b), "Bwb / Barcrest","Lucky Las Vegas Classic (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4lvlcl__c, m4lvlcl, "ll__xa_x.3_1", 0x0000, 0x010000, CRC(79468e93) SHA1(4beaa6fe2ad095b4674473ab99a7216513923077), "Bwb / Barcrest","Lucky Las Vegas Classic (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4lvlcl__d, m4lvlcl, "ll__xb_x.3_1", 0x0000, 0x010000, CRC(73b2fb34) SHA1(c127bc0954f8d01e9d8365a4506dde6f17da33fd), "Bwb / Barcrest","Lucky Las Vegas Classic (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4lvlcl__e, m4lvlcl, "ll__xgdx.1_1", 0x0000, 0x010000, CRC(65824c4f) SHA1(a514e48ac0f9d4a8d7506bf6932aeee88ca17104), "Bwb / Barcrest","Lucky Las Vegas Classic (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4lvlcl__f, m4lvlcl, "ll__xgdx.3_1", 0x0000, 0x010000, CRC(ba5b951a) SHA1(9ee36d3d42ce68f5797208633be87ddbbe605cf1), "Bwb / Barcrest","Lucky Las Vegas Classic (Barcrest) (MPU4) (set 7)" ) +// "(C)1998 BWB" and "LLU 0.1" +GAME_CUSTOM( 199?, m4lvlcl, 0, "ll__x__x.1_1", 0x0000, 0x010000, CRC(1ef1c5b4) SHA1(455c147f158f8a36a9add9b984abc22af78258cf), "Bwb","Lucky Las Vegas Classic (Barcrest) (MPU4) (LLU 0.1)" ) +GAME_CUSTOM( 199?, m4lvlcl__e, m4lvlcl, "ll__xgdx.1_1", 0x0000, 0x010000, CRC(65824c4f) SHA1(a514e48ac0f9d4a8d7506bf6932aeee88ca17104), "Bwb","Lucky Las Vegas Classic (Barcrest) (MPU4) (set 6)" ) +// "(C)1998 BWB" and "LLU 3.0" +GAME_CUSTOM( 199?, m4lvlcl__a, m4lvlcl, "ll__x__x.3_1", 0x0000, 0x010000, CRC(42b85ebc) SHA1(a352d8389674fcfd90dc4e8155e6f4a78c9ec70d), "Bwb","Lucky Las Vegas Classic (Barcrest) (MPU4) (LLU 3.0)" ) +GAME_CUSTOM( 199?, m4lvlcl__b, m4lvlcl, "ll__x_dx.3_1", 0x0000, 0x010000, CRC(7753c8f0) SHA1(9600fee08529f29716697c4630730f15ef8a457b), "Bwb","Lucky Las Vegas Classic (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4lvlcl__c, m4lvlcl, "ll__xa_x.3_1", 0x0000, 0x010000, CRC(79468e93) SHA1(4beaa6fe2ad095b4674473ab99a7216513923077), "Bwb","Lucky Las Vegas Classic (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4lvlcl__d, m4lvlcl, "ll__xb_x.3_1", 0x0000, 0x010000, CRC(73b2fb34) SHA1(c127bc0954f8d01e9d8365a4506dde6f17da33fd), "Bwb","Lucky Las Vegas Classic (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4lvlcl__f, m4lvlcl, "ll__xgdx.3_1", 0x0000, 0x010000, CRC(ba5b951a) SHA1(9ee36d3d42ce68f5797208633be87ddbbe605cf1), "Bwb","Lucky Las Vegas Classic (Barcrest) (MPU4) (set 7)" ) #define M4RHS_EXTRA_ROMS \ @@ -5011,20 +5337,23 @@ GAME_CUSTOM( 199?, m4lvlcl__f, m4lvlcl, "ll__xgdx.3_1", 0x0000, 0x010000, CR ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4rhs, 0, "rh_sj___.4s1", 0x0000, 0x020000, CRC(be6179cd) SHA1(8aefffdffb25bc4dd7d083c7027be746181c2ff9), "Bwb / Barcrest","Rocky Horror Show (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4rhs__a, m4rhs, "rh_sj__c.6_1", 0x0000, 0x020000, CRC(476f3cf2) SHA1(18ce990e28ca8565ade5eec9a62f0b243121af73), "Bwb / Barcrest","Rocky Horror Show (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4rhs__b, m4rhs, "rh_sj_b_.4s1", 0x0000, 0x020000, CRC(58a4480e) SHA1(f4ecfa1debbfa9dba75263bce2c9f66741c3466f), "Bwb / Barcrest","Rocky Horror Show (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4rhs__c, m4rhs, "rh_sj_bc.6_1", 0x0000, 0x020000, CRC(2e37a58c) SHA1(a48c96384aa81f98bfa980c93e93523ecef3d43c), "Bwb / Barcrest","Rocky Horror Show (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4rhs__d, m4rhs, "rh_sj_d_.4s1", 0x0000, 0x020000, CRC(8f1176db) SHA1(283ef0b9515eac342a02489118bd30016ba85399), "Bwb / Barcrest","Rocky Horror Show (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4rhs__e, m4rhs, "rh_sj_k_.4s1", 0x0000, 0x020000, CRC(3f2ef505) SHA1(28c3806bc48af21a2b7ea27d42ea9f6b4346f3b8), "Bwb / Barcrest","Rocky Horror Show (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4rhs__f, m4rhs, "rh_sja__.4s1", 0x0000, 0x020000, CRC(b8cdd5fb) SHA1(4e336dd3d61f4fdba731951c56e440766ea8efeb), "Bwb / Barcrest","Rocky Horror Show (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4rhs__g, m4rhs, "rh_sja_c.6_1", 0x0000, 0x020000, CRC(b7b790e5) SHA1(e2b34dc2f6ede4f4c22b11123dfaed46f2c5c45e), "Bwb / Barcrest","Rocky Horror Show (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4rhs__h, m4rhs, "rh_sjab_.4s1", 0x0000, 0x020000, CRC(c8468d4c) SHA1(6a9f8fe10949712ecacca3bfcd7d5ab4860682e2), "Bwb / Barcrest","Rocky Horror Show (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4rhs__i, m4rhs, "rh_sjad_.4s1", 0x0000, 0x020000, CRC(df4768f0) SHA1(74894b232b27e65058d59acf174172da86def95a), "Bwb / Barcrest","Rocky Horror Show (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4rhs__j, m4rhs, "rh_sjak_.4s1", 0x0000, 0x020000, CRC(6f78eb2e) SHA1(a9fec7a7ad9334c3d8760e1982ac00651858cee8), "Bwb / Barcrest","Rocky Horror Show (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4rhs__k, m4rhs, "rocky15g", 0x0000, 0x020000, CRC(05f4f333) SHA1(a1b917f6c91d751fb2433e46c4c60840b47eed9e), "Bwb / Barcrest","Rocky Horror Show (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4rhs__l, m4rhs, "rocky15t", 0x0000, 0x020000, CRC(3fbad6de) SHA1(e8d76b3878794c769187d92d2834018a84e764ac), "Bwb / Barcrest","Rocky Horror Show (Barcrest) (MPU4) (set 13)" ) +// "(C)1998 B.W.B." and "RH__4.0" +GAME_CUSTOM( 199?, m4rhs, 0, "rh_sj___.4s1", 0x0000, 0x020000, CRC(be6179cd) SHA1(8aefffdffb25bc4dd7d083c7027be746181c2ff9), "Bwb","Rocky Horror Show (Barcrest) (MPU4) (RH__4.0)" ) +GAME_CUSTOM( 199?, m4rhs__b, m4rhs, "rh_sj_b_.4s1", 0x0000, 0x020000, CRC(58a4480e) SHA1(f4ecfa1debbfa9dba75263bce2c9f66741c3466f), "Bwb","Rocky Horror Show (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4rhs__d, m4rhs, "rh_sj_d_.4s1", 0x0000, 0x020000, CRC(8f1176db) SHA1(283ef0b9515eac342a02489118bd30016ba85399), "Bwb","Rocky Horror Show (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4rhs__e, m4rhs, "rh_sj_k_.4s1", 0x0000, 0x020000, CRC(3f2ef505) SHA1(28c3806bc48af21a2b7ea27d42ea9f6b4346f3b8), "Bwb","Rocky Horror Show (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4rhs__f, m4rhs, "rh_sja__.4s1", 0x0000, 0x020000, CRC(b8cdd5fb) SHA1(4e336dd3d61f4fdba731951c56e440766ea8efeb), "Bwb","Rocky Horror Show (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4rhs__h, m4rhs, "rh_sjab_.4s1", 0x0000, 0x020000, CRC(c8468d4c) SHA1(6a9f8fe10949712ecacca3bfcd7d5ab4860682e2), "Bwb","Rocky Horror Show (Barcrest) (MPU4) (set 9)" ) +GAME_CUSTOM( 199?, m4rhs__i, m4rhs, "rh_sjad_.4s1", 0x0000, 0x020000, CRC(df4768f0) SHA1(74894b232b27e65058d59acf174172da86def95a), "Bwb","Rocky Horror Show (Barcrest) (MPU4) (set 10)" ) +GAME_CUSTOM( 199?, m4rhs__j, m4rhs, "rh_sjak_.4s1", 0x0000, 0x020000, CRC(6f78eb2e) SHA1(a9fec7a7ad9334c3d8760e1982ac00651858cee8), "Bwb","Rocky Horror Show (Barcrest) (MPU4) (set 11)" ) +// "(C)1998 B.W.B." and "RH__6.0" +GAME_CUSTOM( 199?, m4rhs__a, m4rhs, "rh_sj__c.6_1", 0x0000, 0x020000, CRC(476f3cf2) SHA1(18ce990e28ca8565ade5eec9a62f0b243121af73), "Bwb","Rocky Horror Show (Barcrest) (MPU4) (RH__6.0)" ) +GAME_CUSTOM( 199?, m4rhs__c, m4rhs, "rh_sj_bc.6_1", 0x0000, 0x020000, CRC(2e37a58c) SHA1(a48c96384aa81f98bfa980c93e93523ecef3d43c), "Bwb","Rocky Horror Show (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4rhs__g, m4rhs, "rh_sja_c.6_1", 0x0000, 0x020000, CRC(b7b790e5) SHA1(e2b34dc2f6ede4f4c22b11123dfaed46f2c5c45e), "Bwb","Rocky Horror Show (Barcrest) (MPU4) (set 8)" ) +// no copyright string and "RH__2.0" +GAME_CUSTOM( 199?, m4rhs__k, m4rhs, "rocky15g", 0x0000, 0x020000, CRC(05f4f333) SHA1(a1b917f6c91d751fb2433e46c4c60840b47eed9e), "hack","Rocky Horror Show (Barcrest) (MPU4) (RH__2.0, hack)" ) +// no copyright string and "RH__3.0" +GAME_CUSTOM( 199?, m4rhs__l, m4rhs, "rocky15t", 0x0000, 0x020000, CRC(3fbad6de) SHA1(e8d76b3878794c769187d92d2834018a84e764ac), "hack","Rocky Horror Show (Barcrest) (MPU4) (RH__3.0, hack)" ) #define M4OADRAC_EXTRA_ROMS \ @@ -5042,16 +5371,17 @@ GAME_CUSTOM( 199?, m4rhs__l, m4rhs, "rocky15t", 0x0000, 0x020000, CRC(3fba ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4oadrac, 0, "dr__x__x.2_0", 0x0000, 0x020000, CRC(4ca65bd9) SHA1(deb0a7d3596647210061b69a10fc6cdfc066538e), "Bwb / Barcrest","Ooh Aah Dracula (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4oadrac__a, m4oadrac, "dr__x__x.2_1", 0x0000, 0x020000, CRC(d91773af) SHA1(3d8dda0f409f55bce9c4d4e2a8377e43fe2f1f7d), "Bwb / Barcrest","Ooh Aah Dracula (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4oadrac__b, m4oadrac, "dr__x_dx.2_0", 0x0000, 0x020000, CRC(47f3ac5a) SHA1(e0413c55b897e96e32c3332dac041bc94da6dea3), "Bwb / Barcrest","Ooh Aah Dracula (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4oadrac__c, m4oadrac, "dr__x_dx.2_1", 0x0000, 0x020000, CRC(f8c36b67) SHA1(c765d7a5eb4d7cd74295da26a7c6f5341a1ca257), "Bwb / Barcrest","Ooh Aah Dracula (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4oadrac__d, m4oadrac, "dr__xa_x.2_0", 0x0000, 0x020000, CRC(702f0f7a) SHA1(8529c3eaa33cb972cc38067d176c7c8af0674147), "Bwb / Barcrest","Ooh Aah Dracula (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4oadrac__e, m4oadrac, "dr__xa_x.2_1", 0x0000, 0x020000, CRC(cf1fc847) SHA1(6b09c0de15a380da1783a387569d83328f5b29a0), "Bwb / Barcrest","Ooh Aah Dracula (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4oadrac__f, m4oadrac, "dr__xb_x.2_0", 0x0000, 0x020000, CRC(3ae8a72c) SHA1(a27faba69430b1d16abf62e0ef37182ab302bbbd), "Bwb / Barcrest","Ooh Aah Dracula (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4oadrac__g, m4oadrac, "dr__xb_x.2_1", 0x0000, 0x020000, CRC(85d86011) SHA1(81f8624908299aa37e75fc5d12059b3600212d35), "Bwb / Barcrest","Ooh Aah Dracula (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4oadrac__h, m4oadrac, "dri_xa_x.2_0", 0x0000, 0x020000, CRC(849d2a80) SHA1(c9ff0a5a543b62ca5b885f93a35b5f40e88db8c3), "Bwb / Barcrest","Ooh Aah Dracula (Barcrest) (MPU4) (set 9)" ) +// "(C)1999 BWB" and "DR_ 2.0" +GAME_CUSTOM( 199?, m4oadrac, 0, "dr__x__x.2_0", 0x0000, 0x020000, CRC(4ca65bd9) SHA1(deb0a7d3596647210061b69a10fc6cdfc066538e), "Bwb","Ooh Aah Dracula (Barcrest) (MPU4) (DR_ 2.0)" ) +GAME_CUSTOM( 199?, m4oadrac__b, m4oadrac, "dr__x_dx.2_0", 0x0000, 0x020000, CRC(47f3ac5a) SHA1(e0413c55b897e96e32c3332dac041bc94da6dea3), "Bwb","Ooh Aah Dracula (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4oadrac__d, m4oadrac, "dr__xa_x.2_0", 0x0000, 0x020000, CRC(702f0f7a) SHA1(8529c3eaa33cb972cc38067d176c7c8af0674147), "Bwb","Ooh Aah Dracula (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4oadrac__f, m4oadrac, "dr__xb_x.2_0", 0x0000, 0x020000, CRC(3ae8a72c) SHA1(a27faba69430b1d16abf62e0ef37182ab302bbbd), "Bwb","Ooh Aah Dracula (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4oadrac__h, m4oadrac, "dri_xa_x.2_0", 0x0000, 0x020000, CRC(849d2a80) SHA1(c9ff0a5a543b62ca5b885f93a35b5f40e88db8c3), "Bwb","Ooh Aah Dracula (Barcrest) (MPU4) (set 9)" ) +// "(C)1999 BWB" and "DR_ 2.1" +GAME_CUSTOM( 199?, m4oadrac__a, m4oadrac, "dr__x__x.2_1", 0x0000, 0x020000, CRC(d91773af) SHA1(3d8dda0f409f55bce9c4d4e2a8377e43fe2f1f7d), "Bwb","Ooh Aah Dracula (Barcrest) (MPU4) (DR_ 2.1)" ) +GAME_CUSTOM( 199?, m4oadrac__c, m4oadrac, "dr__x_dx.2_1", 0x0000, 0x020000, CRC(f8c36b67) SHA1(c765d7a5eb4d7cd74295da26a7c6f5341a1ca257), "Bwb","Ooh Aah Dracula (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4oadrac__e, m4oadrac, "dr__xa_x.2_1", 0x0000, 0x020000, CRC(cf1fc847) SHA1(6b09c0de15a380da1783a387569d83328f5b29a0), "Bwb","Ooh Aah Dracula (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4oadrac__g, m4oadrac, "dr__xb_x.2_1", 0x0000, 0x020000, CRC(85d86011) SHA1(81f8624908299aa37e75fc5d12059b3600212d35), "Bwb","Ooh Aah Dracula (Barcrest) (MPU4) (set 8)" ) @@ -5068,35 +5398,42 @@ GAME_CUSTOM( 199?, m4oadrac__h, m4oadrac, "dri_xa_x.2_0", 0x0000, 0x020000, GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) +// "(C)1996 B.W.B." and "CT4 7.0" +GAME_CUSTOM( 199?, m4ticcla, 0, "ct_20_b4.7_1", 0x0000, 0x010000, CRC(48b9a162) SHA1(2d19a5d6379dc93a56c920b3cd61a0d1a8c6b303), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4ticcla, 0, "ct_20_b4.7_1", 0x0000, 0x010000, CRC(48b9a162) SHA1(2d19a5d6379dc93a56c920b3cd61a0d1a8c6b303), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4ticcla__a, m4ticcla, "ct_20_bc.4_1", 0x0000, 0x010000, CRC(fb40b5ff) SHA1(723a07a2b6b08483aa75ecdd4fd9720a66201fc3), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4ticcla__b, m4ticcla, "ct_20_d4.7_1", 0x0000, 0x010000, CRC(3c7c862c) SHA1(a3577f29950e845a14ca68750d2ab6c56a395dba), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4ticcla__c, m4ticcla, "ct_20_dc.4_1", 0x0000, 0x010000, CRC(0f20a790) SHA1(02876178f0af64154d490cc048a7bc1c9a6f521b), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4ticcla__d, m4ticcla, "ct_20a_4.7_1", 0x0000, 0x010000, CRC(35318095) SHA1(888105a674c9ea8ccad33e24c05ef42936f5f4cf), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4ticcla__e, m4ticcla, "ct_20a_c.4_1", 0x0000, 0x010000, CRC(e409f49f) SHA1(8774015ec20ed9fe54e812013dfc12d408276c31), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4ticcla__f, m4ticcla, "ct_20b_c.4_1", 0x0000, 0x010000, CRC(864a59cf) SHA1(abd9b7a47c791ce4f91abbd3bf97bdcd9d8296ee), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4ticcla__g, m4ticcla, "ct_20bg4.7_1", 0x0000, 0x010000, CRC(7f200f42) SHA1(0ea6aa0de88982737d818c9dac9f2605cea7bc11), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4ticcla__h, m4ticcla, "ct_20bgc.4_1", 0x0000, 0x010000, CRC(215b8965) SHA1(883735066a1425b502e89d1234575294ac83746c), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4ticcla__i, m4ticcla, "ct_20bt4.7_1", 0x0000, 0x010000, CRC(7c7280a4) SHA1(3dbdc53a3474f4147427ed4fa8a161a3b364d43b), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4ticcla__j, m4ticcla, "ct_25_bc.3_1", 0x0000, 0x010000, CRC(9d6fb3b0) SHA1(a6278579d217b5544d9f0b942a7a344596153950), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4ticcla__k, m4ticcla, "ct_25_dc.2_1", 0x0000, 0x010000, CRC(b49af435) SHA1(e5f92f114931e554eb8eb5fe89f50298783d541c), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4ticcla__l, m4ticcla, "ct_25_dc.3_1", 0x0000, 0x010000, CRC(eb359c82) SHA1(c137768461b859d5277b08c8783b0c8625f9b1be), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4ticcla__m, m4ticcla, "ct_25_kc.2_1", 0x0000, 0x010000, CRC(43309e7b) SHA1(d8f6ecbea618da7f54309f2a6e93210c51b68b81), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4ticcla__n, m4ticcla, "ct_25a_c.2_1", 0x0000, 0x010000, CRC(717396ed) SHA1(6cdb0f99b40096178f6e85a0966182e704d1b99a), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4ticcla__o, m4ticcla, "ct_25a_c.3_1", 0x0000, 0x010000, CRC(28e0a15b) SHA1(b3678ba3d1f392665cc6ec9c24c2c506a41cd4fa), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4ticcla__p, m4ticcla, "ct_25b_c.2_1", 0x0000, 0x010000, CRC(b3d7e79c) SHA1(86c0b419c3ca054f8a2ed785cffeb03e6c5b69f2), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4ticcla__q, m4ticcla, "ct_25b_c.3_1", 0x0000, 0x010000, CRC(e0ba763d) SHA1(453d8a0dbe616c5a8c4313b918fcfe21fed473e0), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4ticcla__r, m4ticcla, "ct_25bgc.2_1", 0x0000, 0x010000, CRC(0869d04c) SHA1(0f0fd3982ac376c66d139655a50639f48bf740b4), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4ticcla__s, m4ticcla, "ct_25bgc.3_1", 0x0000, 0x010000, CRC(1e0ca1d1) SHA1(0b1023cdd5cd3db657cea53c85e31ed83c2e5524), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4ticcla__t, m4ticcla, "ct_25btc.2_1", 0x0000, 0x010000, CRC(032ec96d) SHA1(c5cef956bc0e3eb45cf128c8d0b4e1d6e5b01afe), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4ticcla__u, m4ticcla, "ct_25btc.3_1", 0x0000, 0x010000, CRC(f656897a) SHA1(92ad5c6ce2a696298bbfc8c1750825db4e3bc80b), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4ticcla__v, m4ticcla, "ct_30_dc.2_1", 0x0000, 0x010000, CRC(57fabdfb) SHA1(ad86621e4bc8141508c691e148a66e74fc070a88), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 23)" ) -GAME_CUSTOM( 199?, m4ticcla__w, m4ticcla, "ct_30a_c.2_1", 0x0000, 0x010000, CRC(800c94c3) SHA1(c78497899ea9cf27e66f6e8526b95d51215053b2), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 24)" ) -GAME_CUSTOM( 199?, m4ticcla__x, m4ticcla, "ct_30b_c.2_1", 0x0000, 0x010000, CRC(3036ef04) SHA1(de514a85d45d11a880ed147aebe211ffb5bee146), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 25)" ) -GAME_CUSTOM( 199?, m4ticcla__y, m4ticcla, "ct_30bdc.2_1", 0x0000, 0x010000, CRC(9852c9d4) SHA1(37bb20d63fa70ea99e18a16a8f11c461a377a07a), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 26)" ) -GAME_CUSTOM( 199?, m4ticcla__z, m4ticcla, "ct_30bgc.2_1", 0x0000, 0x010000, CRC(a1bc89b4) SHA1(4c82ce8fe78768443823e868f7cc49a06e7cc441), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 27)" ) -GAME_CUSTOM( 199?, m4ticcla__0, m4ticcla, "ct_30btc.2_1", 0x0000, 0x010000, CRC(cde0d12e) SHA1(5427ad700311c30cc86eccc7f1ff36cf0da3b980), "Bwb / Barcrest","Tic Tac Toe Classic (Barcrest) (MPU4) (set 28)" ) +GAME_CUSTOM( 199?, m4ticcla__b, m4ticcla, "ct_20_d4.7_1", 0x0000, 0x010000, CRC(3c7c862c) SHA1(a3577f29950e845a14ca68750d2ab6c56a395dba), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4ticcla__d, m4ticcla, "ct_20a_4.7_1", 0x0000, 0x010000, CRC(35318095) SHA1(888105a674c9ea8ccad33e24c05ef42936f5f4cf), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4ticcla__g, m4ticcla, "ct_20bg4.7_1", 0x0000, 0x010000, CRC(7f200f42) SHA1(0ea6aa0de88982737d818c9dac9f2605cea7bc11), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 8)" ) +GAME_CUSTOM( 199?, m4ticcla__i, m4ticcla, "ct_20bt4.7_1", 0x0000, 0x010000, CRC(7c7280a4) SHA1(3dbdc53a3474f4147427ed4fa8a161a3b364d43b), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 10)" ) + +// "(C)1996 B.W.B." and "CT 4.0" +GAME_CUSTOM( 199?, m4ticcla__a, m4ticcla, "ct_20_bc.4_1", 0x0000, 0x010000, CRC(fb40b5ff) SHA1(723a07a2b6b08483aa75ecdd4fd9720a66201fc3), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 2)" ) +GAME_CUSTOM( 199?, m4ticcla__c, m4ticcla, "ct_20_dc.4_1", 0x0000, 0x010000, CRC(0f20a790) SHA1(02876178f0af64154d490cc048a7bc1c9a6f521b), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4ticcla__e, m4ticcla, "ct_20a_c.4_1", 0x0000, 0x010000, CRC(e409f49f) SHA1(8774015ec20ed9fe54e812013dfc12d408276c31), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 6)" ) +GAME_CUSTOM( 199?, m4ticcla__f, m4ticcla, "ct_20b_c.4_1", 0x0000, 0x010000, CRC(864a59cf) SHA1(abd9b7a47c791ce4f91abbd3bf97bdcd9d8296ee), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4ticcla__h, m4ticcla, "ct_20bgc.4_1", 0x0000, 0x010000, CRC(215b8965) SHA1(883735066a1425b502e89d1234575294ac83746c), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 9)" ) + +// "(C)1996 B.W.B." and "CT4 3.0" (CTT on startup) +GAME_CUSTOM( 199?, m4ticcla__j, m4ticcla, "ct_25_bc.3_1", 0x0000, 0x010000, CRC(9d6fb3b0) SHA1(a6278579d217b5544d9f0b942a7a344596153950), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 11)" ) +GAME_CUSTOM( 199?, m4ticcla__l, m4ticcla, "ct_25_dc.3_1", 0x0000, 0x010000, CRC(eb359c82) SHA1(c137768461b859d5277b08c8783b0c8625f9b1be), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 13)" ) +GAME_CUSTOM( 199?, m4ticcla__o, m4ticcla, "ct_25a_c.3_1", 0x0000, 0x010000, CRC(28e0a15b) SHA1(b3678ba3d1f392665cc6ec9c24c2c506a41cd4fa), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 16)" ) +GAME_CUSTOM( 199?, m4ticcla__q, m4ticcla, "ct_25b_c.3_1", 0x0000, 0x010000, CRC(e0ba763d) SHA1(453d8a0dbe616c5a8c4313b918fcfe21fed473e0), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 18)" ) +GAME_CUSTOM( 199?, m4ticcla__s, m4ticcla, "ct_25bgc.3_1", 0x0000, 0x010000, CRC(1e0ca1d1) SHA1(0b1023cdd5cd3db657cea53c85e31ed83c2e5524), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 20)" ) +GAME_CUSTOM( 199?, m4ticcla__u, m4ticcla, "ct_25btc.3_1", 0x0000, 0x010000, CRC(f656897a) SHA1(92ad5c6ce2a696298bbfc8c1750825db4e3bc80b), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 22)" ) + +// "(C)1998 B.W.B." and "CT 2.3" +GAME_CUSTOM( 199?, m4ticcla__k, m4ticcla, "ct_25_dc.2_1", 0x0000, 0x010000, CRC(b49af435) SHA1(e5f92f114931e554eb8eb5fe89f50298783d541c), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 12)" ) +GAME_CUSTOM( 199?, m4ticcla__m, m4ticcla, "ct_25_kc.2_1", 0x0000, 0x010000, CRC(43309e7b) SHA1(d8f6ecbea618da7f54309f2a6e93210c51b68b81), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 14)" ) +GAME_CUSTOM( 199?, m4ticcla__n, m4ticcla, "ct_25a_c.2_1", 0x0000, 0x010000, CRC(717396ed) SHA1(6cdb0f99b40096178f6e85a0966182e704d1b99a), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 15)" ) +GAME_CUSTOM( 199?, m4ticcla__p, m4ticcla, "ct_25b_c.2_1", 0x0000, 0x010000, CRC(b3d7e79c) SHA1(86c0b419c3ca054f8a2ed785cffeb03e6c5b69f2), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 17)" ) +GAME_CUSTOM( 199?, m4ticcla__r, m4ticcla, "ct_25bgc.2_1", 0x0000, 0x010000, CRC(0869d04c) SHA1(0f0fd3982ac376c66d139655a50639f48bf740b4), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 19)" ) +GAME_CUSTOM( 199?, m4ticcla__t, m4ticcla, "ct_25btc.2_1", 0x0000, 0x010000, CRC(032ec96d) SHA1(c5cef956bc0e3eb45cf128c8d0b4e1d6e5b01afe), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 21)" ) +GAME_CUSTOM( 199?, m4ticcla__v, m4ticcla, "ct_30_dc.2_1", 0x0000, 0x010000, CRC(57fabdfb) SHA1(ad86621e4bc8141508c691e148a66e74fc070a88), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 23)" ) +GAME_CUSTOM( 199?, m4ticcla__w, m4ticcla, "ct_30a_c.2_1", 0x0000, 0x010000, CRC(800c94c3) SHA1(c78497899ea9cf27e66f6e8526b95d51215053b2), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 24)" ) +GAME_CUSTOM( 199?, m4ticcla__x, m4ticcla, "ct_30b_c.2_1", 0x0000, 0x010000, CRC(3036ef04) SHA1(de514a85d45d11a880ed147aebe211ffb5bee146), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 25)" ) +GAME_CUSTOM( 199?, m4ticcla__y, m4ticcla, "ct_30bdc.2_1", 0x0000, 0x010000, CRC(9852c9d4) SHA1(37bb20d63fa70ea99e18a16a8f11c461a377a07a), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 26)" ) +GAME_CUSTOM( 199?, m4ticcla__z, m4ticcla, "ct_30bgc.2_1", 0x0000, 0x010000, CRC(a1bc89b4) SHA1(4c82ce8fe78768443823e868f7cc49a06e7cc441), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 27)" ) +GAME_CUSTOM( 199?, m4ticcla__0, m4ticcla, "ct_30btc.2_1", 0x0000, 0x010000, CRC(cde0d12e) SHA1(5427ad700311c30cc86eccc7f1ff36cf0da3b980), "Bwb","Tic Tac Toe Classic (Barcrest) (MPU4) (set 28)" ) #define M4TICGLC_EXTRA_ROMS \ ROM_REGION( 0x200000, "msm6376", 0 ) \ @@ -5110,11 +5447,13 @@ GAME_CUSTOM( 199?, m4ticcla__0, m4ticcla, "ct_30btc.2_1", 0x0000, 0x010000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4ticglc, 0, "tg_25a_c.3_1", 0x0000, 0x010000, CRC(44b2b6b0) SHA1(c2caadd68659bd474df534101e3bc13b15a43694), "Bwb / Barcrest","Tic Tac Toe Gold (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4ticglc__a, m4ticglc, "tg_30_dc.4_1", 0x0000, 0x010000, CRC(19c0fb1e) SHA1(955da095df56f28ace6839c9b6df5669f576730c), "Bwb / Barcrest","Tic Tac Toe Gold (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4ticglc__b, m4ticglc, "tg_30a_c.4_1", 0x0000, 0x010000, CRC(3e4dcc70) SHA1(c4ad3a8633e19015d4d2b08a653119e9e4c5dcbb), "Bwb / Barcrest","Tic Tac Toe Gold (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4ticglc__c, m4ticglc, "tg_30b_c.4_1", 0x0000, 0x010000, CRC(83d1517a) SHA1(38a9269dac53ca701e4b621d5e77696142f429cd), "Bwb / Barcrest","Tic Tac Toe Gold (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4ticglc__d, m4ticglc, "tg_30bgc.4_1", 0x0000, 0x010000, CRC(a366c32d) SHA1(8d86778411ef07e06d99c12147a211d7620af9bf), "Bwb / Barcrest","Tic Tac Toe Gold (Barcrest) (MPU4) (set 5)" ) +// "(C)1998 B.W.B." and "TG 3.3" +GAME_CUSTOM( 199?, m4ticglc, 0, "tg_25a_c.3_1", 0x0000, 0x010000, CRC(44b2b6b0) SHA1(c2caadd68659bd474df534101e3bc13b15a43694), "Bwb","Tic Tac Toe Gold (Barcrest) (MPU4) (TG 3.3)" ) +// "(C)1998 B.W.B." and "TG 4.4" +GAME_CUSTOM( 199?, m4ticglc__a, m4ticglc, "tg_30_dc.4_1", 0x0000, 0x010000, CRC(19c0fb1e) SHA1(955da095df56f28ace6839c9b6df5669f576730c), "Bwb","Tic Tac Toe Gold (Barcrest) (MPU4) (TG 4.4)" ) +GAME_CUSTOM( 199?, m4ticglc__b, m4ticglc, "tg_30a_c.4_1", 0x0000, 0x010000, CRC(3e4dcc70) SHA1(c4ad3a8633e19015d4d2b08a653119e9e4c5dcbb), "Bwb","Tic Tac Toe Gold (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4ticglc__c, m4ticglc, "tg_30b_c.4_1", 0x0000, 0x010000, CRC(83d1517a) SHA1(38a9269dac53ca701e4b621d5e77696142f429cd), "Bwb","Tic Tac Toe Gold (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4ticglc__d, m4ticglc, "tg_30bgc.4_1", 0x0000, 0x010000, CRC(a366c32d) SHA1(8d86778411ef07e06d99c12147a211d7620af9bf), "Bwb","Tic Tac Toe Gold (Barcrest) (MPU4) (set 5)" ) #define M4SSCLAS_EXTRA_ROMS \ ROM_REGION( 0x48, "fakechr", 0 ) \ @@ -5130,13 +5469,15 @@ GAME_CUSTOM( 199?, m4ticglc__d, m4ticglc, "tg_30bgc.4_1", 0x0000, 0x010000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) - -GAME_CUSTOM( 199?, m4ssclas, 0, "cs__x__x.6_0", 0x0000, 0x010000, CRC(3230284d) SHA1(bca3b4c43859ed424956c4119fa6a91a2e7d6eec), "Bwb / Barcrest","Super Streak Classic (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4ssclas__a, m4ssclas, "cs__x_dx.2_0", 0x0000, 0x010000, CRC(ea004a13) SHA1(db9a187b0672c69a6a149ec6d1025bd6da9beccd), "Bwb / Barcrest","Super Streak Classic (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4ssclas__b, m4ssclas, "cs__x_dx.6_0", 0x0000, 0x010000, CRC(6dd2d11f) SHA1(8c7e60d3e5a0d4fccb024b5c0aa21fd2b9a5ada9), "Bwb / Barcrest","Super Streak Classic (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4ssclas__c, m4ssclas, "cs__xa_x.6_0", 0x0000, 0x010000, CRC(6657e810) SHA1(0860076cf01c732f419483876991fb42a838622a), "Bwb / Barcrest","Super Streak Classic (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4ssclas__d, m4ssclas, "cs__xb_x.5_0", 0x0000, 0x010000, CRC(a5f46ff5) SHA1(a068029f774bc6ed2e76acc2eb509bc6e2490945), "Bwb / Barcrest","Super Streak Classic (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4ssclas__e, m4ssclas, "cs__xb_x.6_0", 0x0000, 0x010000, CRC(801d543c) SHA1(f0905947312fb2a526765d17cde01af5095ef923), "Bwb / Barcrest","Super Streak Classic (Barcrest) (MPU4) (set 6)" ) +// "(C)2000 BWB" and "CSS 6.0" +GAME_CUSTOM( 199?, m4ssclas, 0, "cs__x__x.6_0", 0x0000, 0x010000, CRC(3230284d) SHA1(bca3b4c43859ed424956c4119fa6a91a2e7d6eec), "Bwb","Super Streak Classic (Barcrest) (MPU4) (CSS 6.0)" ) +GAME_CUSTOM( 199?, m4ssclas__b, m4ssclas, "cs__x_dx.6_0", 0x0000, 0x010000, CRC(6dd2d11f) SHA1(8c7e60d3e5a0d4fccb024b5c0aa21fd2b9a5ada9), "Bwb","Super Streak Classic (Barcrest) (MPU4) (set 3)" ) +GAME_CUSTOM( 199?, m4ssclas__c, m4ssclas, "cs__xa_x.6_0", 0x0000, 0x010000, CRC(6657e810) SHA1(0860076cf01c732f419483876991fb42a838622a), "Bwb","Super Streak Classic (Barcrest) (MPU4) (set 4)" ) +GAME_CUSTOM( 199?, m4ssclas__e, m4ssclas, "cs__xb_x.6_0", 0x0000, 0x010000, CRC(801d543c) SHA1(f0905947312fb2a526765d17cde01af5095ef923), "Bwb","Super Streak Classic (Barcrest) (MPU4) (set 6)" ) +// "(C)1998 BWB" and "CSS 5.0" +GAME_CUSTOM( 199?, m4ssclas__d, m4ssclas, "cs__xb_x.5_0", 0x0000, 0x010000, CRC(a5f46ff5) SHA1(a068029f774bc6ed2e76acc2eb509bc6e2490945), "Bwb","Super Streak Classic (Barcrest) (MPU4) (CSS 5.0)" ) +// "(C)1998 BWB" and "CSS 2.0" +GAME_CUSTOM( 199?, m4ssclas__a, m4ssclas, "cs__x_dx.2_0", 0x0000, 0x010000, CRC(ea004a13) SHA1(db9a187b0672c69a6a149ec6d1025bd6da9beccd), "Bwb","Super Streak Classic (Barcrest) (MPU4) (CSS 2.0)" ) // was in SC2 Super Star set, but seems to fit here, ident hacked to "BILL BIXBY" and "V1 0.1" GAME_CUSTOM( 199?, m4ssclas__f, m4ssclas, "supst20.15", 0x0000, 0x010000, CRC(c3446ec4) SHA1(3c1ad27385547a33993a839b53873d8b92214ade), "hack","Super Streak Classic (Barcrest) (MPU4) (hack)" ) @@ -5157,10 +5498,11 @@ GAME_CUSTOM( 199?, m4ssclas__f, m4ssclas, "supst20.15", 0x0000, 0x010000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4squid, 0, "squidsin.bin", 0x0000, 0x020000, CRC(be369b43) SHA1(e5c7b7a858b264db2f8f726396ddeb42004d7cb9), "Bwb / Barcrest","Squids In (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4squid__a, m4squid, "sq__x_dx.2_0", 0x0000, 0x020000, CRC(2eb6c814) SHA1(070ad5cb36220daf98043f175cf67d4d584c3d01), "Bwb / Barcrest","Squids In (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4squid__b, m4squid, "sq__xa_x.2_0", 0x0000, 0x020000, CRC(196a6b34) SHA1(a044ba73b4cf04657ddfcf787dedcb151507ef15), "Bwb / Barcrest","Squids In (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4squid__c, m4squid, "sq__xb_x.2_0", 0x0000, 0x020000, CRC(53adc362) SHA1(3920f08299bf284ee9f102ce1505d9e9cdc1d1f0), "Bwb / Barcrest","Squids In (Barcrest) (MPU4) (set 4)" ) +// "(C)1999 BWB" and "SQ_ 2.0" +GAME_CUSTOM( 199?, m4squid, 0, "squidsin.bin", 0x0000, 0x020000, CRC(be369b43) SHA1(e5c7b7a858b264db2f8f726396ddeb42004d7cb9), "Bwb","Squids In (Barcrest) (MPU4) (SQ_ 2.0, set 1)" ) +GAME_CUSTOM( 199?, m4squid__a, m4squid, "sq__x_dx.2_0", 0x0000, 0x020000, CRC(2eb6c814) SHA1(070ad5cb36220daf98043f175cf67d4d584c3d01), "Bwb","Squids In (Barcrest) (MPU4) (SQ_ 2.0, set 2)" ) +GAME_CUSTOM( 199?, m4squid__b, m4squid, "sq__xa_x.2_0", 0x0000, 0x020000, CRC(196a6b34) SHA1(a044ba73b4cf04657ddfcf787dedcb151507ef15), "Bwb","Squids In (Barcrest) (MPU4) (SQ_ 2.0, set 3)" ) +GAME_CUSTOM( 199?, m4squid__c, m4squid, "sq__xb_x.2_0", 0x0000, 0x020000, CRC(53adc362) SHA1(3920f08299bf284ee9f102ce1505d9e9cdc1d1f0), "Bwb","Squids In (Barcrest) (MPU4) (SQ_ 2.0, set 4)" ) #define M4CALAMA_EXTRA_ROMS \ ROM_REGION( 0x48, "fakechr", 0 ) \ @@ -5177,17 +5519,22 @@ GAME_CUSTOM( 199?, m4squid__c, m4squid, "sq__xb_x.2_0", 0x0000, 0x020000, CR ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4calama, 0, "cac03s.p1", 0x0000, 0x020000, CRC(edc97795) SHA1(58fb91809c7f475fbceacfc1c3bda41b86dff54b), "Bwb / Barcrest","Calamari Club (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4calama__a, m4calama, "ca301d.p1", 0x0000, 0x020000, CRC(9a220126) SHA1(d5b12955bb336f8233ed3f892e23a14ba755a511), "Bwb / Barcrest","Calamari Club (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4calama__b, m4calama, "ca301f.p1", 0x0000, 0x020000, CRC(e7af1462) SHA1(72659ef85c3b7916e10b4dbc09ad62638e7ab7e1), "Bwb / Barcrest","Calamari Club (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4calama__c, m4calama, "ca301s.p1", 0x0000, 0x020000, CRC(95beecf1) SHA1(70f72abc0d4280618033b61f9dbe5b90b455c2b1), "Bwb / Barcrest","Calamari Club (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4calama__d, m4calama, "cac03d.p1", 0x0000, 0x020000, CRC(14436ec7) SHA1(eb654ef5cef94e24296512acb6134440a5f8d17e), "Bwb / Barcrest","Calamari Club (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4calama__e, m4calama, "cac03f.p1", 0x0000, 0x020000, CRC(69ce7b83) SHA1(c1f2dea6fe7983f5cefbf58ad63bce5ae8d7f7a5), "Bwb / Barcrest","Calamari Club (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4calama__f, m4calama, "bc302f.p1", 0x0000, 0x020000, CRC(4b356aca) SHA1(81ce1585f529f1717ec56ace0a4902ae901593ae), "Bwb / Barcrest","Calamari Club (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4calama__g, m4calama, "bc302s.p1", 0x0000, 0x020000, CRC(b349bd2d) SHA1(9b026bece40584c4f53c30f3dacc91942c871a9f), "Bwb / Barcrest","Calamari Club (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4calama__h, m4calama, "calamari.cl", 0x0000, 0x020000, CRC(bb5e81ac) SHA1(b27f71321978712d2950d58715d18fd5523d6b06), "Bwb / Barcrest","Calamari Club (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4calama__i, m4calama, "bc302d.p1", 0x0000, 0x020000, CRC(36b87f8e) SHA1(6e3cbfa52d9ec52fe009d3331dda3781f7f7783a), "Bwb / Barcrest","Calamari Club (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4calama__j, m4calama, "bca04.p1", 0x0000, 0x020000, CRC(3f97fe65) SHA1(6bc2c7e60658f39701974426ab652e8dd96b1913), "Bwb / Barcrest","Calamari Club (Barcrest) (MPU4) (set 11)" ) +// "(C)1996 BARCREST" and "CAC 0.3" +GAME_CUSTOM( 199?, m4calama, 0, "cac03s.p1", 0x0000, 0x020000, CRC(edc97795) SHA1(58fb91809c7f475fbceacfc1c3bda41b86dff54b), "Barcrest","Calamari Club (Barcrest) (MPU4) (CAC 0.3)" ) +GAME_CUSTOM( 199?, m4calama__d, m4calama, "cac03d.p1", 0x0000, 0x020000, CRC(14436ec7) SHA1(eb654ef5cef94e24296512acb6134440a5f8d17e), "Barcrest","Calamari Club (Barcrest) (MPU4) (set 5)" ) +GAME_CUSTOM( 199?, m4calama__e, m4calama, "cac03f.p1", 0x0000, 0x020000, CRC(69ce7b83) SHA1(c1f2dea6fe7983f5cefbf58ad63bce5ae8d7f7a5), "Barcrest","Calamari Club (Barcrest) (MPU4) (set 6)" ) +// "(C)1996 BARCREST" and "CA3 0.1" +GAME_CUSTOM( 199?, m4calama__c, m4calama, "ca301s.p1", 0x0000, 0x020000, CRC(95beecf1) SHA1(70f72abc0d4280618033b61f9dbe5b90b455c2b1), "Barcrest","Calamari Club (Barcrest) (MPU4) (CA3 0.1)" ) +GAME_CUSTOM( 199?, m4calama__a, m4calama, "ca301d.p1", 0x0000, 0x020000, CRC(9a220126) SHA1(d5b12955bb336f8233ed3f892e23a14ba755a511), "Barcrest","Calamari Club (Barcrest) (MPU4) (set 2)" ) +GAME_CUSTOM( 199?, m4calama__b, m4calama, "ca301f.p1", 0x0000, 0x020000, CRC(e7af1462) SHA1(72659ef85c3b7916e10b4dbc09ad62638e7ab7e1), "Barcrest","Calamari Club (Barcrest) (MPU4) (set 3)" ) +// "(C)1996 BARCREST" and "BC3 0.2" +GAME_CUSTOM( 199?, m4calama__g, m4calama, "bc302s.p1", 0x0000, 0x020000, CRC(b349bd2d) SHA1(9b026bece40584c4f53c30f3dacc91942c871a9f), "Barcrest","Calamari Club (Barcrest) (MPU4) (BC3 0.2)" ) +GAME_CUSTOM( 199?, m4calama__f, m4calama, "bc302f.p1", 0x0000, 0x020000, CRC(4b356aca) SHA1(81ce1585f529f1717ec56ace0a4902ae901593ae), "Barcrest","Calamari Club (Barcrest) (MPU4) (set 7)" ) +GAME_CUSTOM( 199?, m4calama__i, m4calama, "bc302d.p1", 0x0000, 0x020000, CRC(36b87f8e) SHA1(6e3cbfa52d9ec52fe009d3331dda3781f7f7783a), "Barcrest","Calamari Club (Barcrest) (MPU4) (set 10)" ) +// "(C)1996 BARCREST" and "BCA 0.4" +GAME_CUSTOM( 199?, m4calama__j, m4calama, "bca04.p1", 0x0000, 0x020000, CRC(3f97fe65) SHA1(6bc2c7e60658f39701974426ab652e8dd96b1913), "Barcrest","Calamari Club (Barcrest) (MPU4) (BCA 0.4)" ) +// "(C)1996 BARCREST" and "BCA 0.2" +GAME_CUSTOM( 199?, m4calama__h, m4calama, "calamari.cl", 0x0000, 0x020000, CRC(bb5e81ac) SHA1(b27f71321978712d2950d58715d18fd5523d6b06), "Barcrest","Calamari Club (Barcrest) (MPU4) (BCA 0.2)" ) #define M4COSCAS_EXTRA_ROMS \ @@ -5203,29 +5550,33 @@ GAME_CUSTOM( 199?, m4calama__j, m4calama, "bca04.p1", 0x0000, 0x020000, ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4coscas, 0, "cc_sj__c.3r1", 0x0000, 0x020000, CRC(44b940a6) SHA1(7e621873fcf6460f654e35cc74552e86b6253ddb), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 1)" ) -GAME_CUSTOM( 199?, m4coscas__a, m4coscas, "cosm15g", 0x0000, 0x020000, CRC(edd01d55) SHA1(49246fa1e12ceb3297f35616cdc1cf62472a379f), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 2)" ) -GAME_CUSTOM( 199?, m4coscas__b, m4coscas, "cosmiccasinos15.bin", 0x0000, 0x020000, CRC(ddba1241) SHA1(7ca2928ae2ab4e323b60bb661b60681f89cc5663), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4coscas__c, m4coscas, "cc30s.p1", 0x0000, 0x020000, CRC(e308100a) SHA1(14cb07895d17237768877dd62ba7c3fc8e5b2630), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 4)" ) -GAME_CUSTOM( 199?, m4coscas__d, m4coscas, "cc_sj___.3s1", 0x0000, 0x020000, CRC(52c312b0) SHA1(bd5381d58b1acb7adf6857c142eae4a253081fbd), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 5)" ) -GAME_CUSTOM( 199?, m4coscas__e, m4coscas, "cc_sj__c.7_1", 0x0000, 0x020000, CRC(ee9e6126) SHA1(fab6fd04004acebf291544720ba06cea79d5a054), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 6)" ) -GAME_CUSTOM( 199?, m4coscas__f, m4coscas, "cc_sj_b_.3s1", 0x0000, 0x020000, CRC(019f0a71) SHA1(7a97f4e89c16e25f8e7502bba37f49c8496fbb47), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 7)" ) -GAME_CUSTOM( 199?, m4coscas__g, m4coscas, "cc_sj_bc.3r1", 0x0000, 0x020000, CRC(de9bb8e1) SHA1(7974b03974531eb4b5ed865b8eeb9649c1346df4), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 8)" ) -GAME_CUSTOM( 199?, m4coscas__h, m4coscas, "cc_sj_bc.7_1", 0x0000, 0x020000, CRC(afe1aac6) SHA1(fc9c69e45db6a85c45ef8d32d048e5726d7da655), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 9)" ) -GAME_CUSTOM( 199?, m4coscas__i, m4coscas, "cc_sj_d_.3s1", 0x0000, 0x020000, CRC(215e12f3) SHA1(68ed9923c6fd51e9305afac9d271c7b3ce38b12f), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 10)" ) -GAME_CUSTOM( 199?, m4coscas__j, m4coscas, "cc_sj_dc.3r1", 0x0000, 0x020000, CRC(00e357c3) SHA1(02bf7427899d2e536442b87d41c140ebd787a580), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 11)" ) -GAME_CUSTOM( 199?, m4coscas__k, m4coscas, "cc_sj_dc.7_1", 0x0000, 0x020000, CRC(330d68a2) SHA1(12410af5f37b26f29f5cd23606ab0e128675095a), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 12)" ) -GAME_CUSTOM( 199?, m4coscas__l, m4coscas, "cc_sj_k_.3s1", 0x0000, 0x020000, CRC(9161912d) SHA1(d11109f4bdc1c60f4cf477e1f26556800a83abdb), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 13)" ) -GAME_CUSTOM( 199?, m4coscas__m, m4coscas, "cc_sj_kc.3r1", 0x0000, 0x020000, CRC(b0dcd41d) SHA1(6b50a5e401bf854186331673dcc0c3fc5de2991b), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 14)" ) -GAME_CUSTOM( 199?, m4coscas__n, m4coscas, "cc_sja__.3s1", 0x0000, 0x020000, CRC(1682b1d3) SHA1(24baaf789eca150f0f6fd9c510e245aa7b88cc4c), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 15)" ) -GAME_CUSTOM( 199?, m4coscas__o, m4coscas, "cc_sja_c.3r1", 0x0000, 0x020000, CRC(373ff4e3) SHA1(55b7ab247863eb3c025e84782c8cab7734343077), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 16)" ) -GAME_CUSTOM( 199?, m4coscas__p, m4coscas, "cc_sja_c.7_1", 0x0000, 0x020000, CRC(e956898e) SHA1(f51682651520551d481360bf86eba510cd758441), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 17)" ) -GAME_CUSTOM( 199?, m4coscas__q, m4coscas, "cc_sjb__.3s1", 0x0000, 0x020000, CRC(5c451985) SHA1(517f634d31f7190ca6685c1037fb66a8b87effba), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 18)" ) -GAME_CUSTOM( 199?, m4coscas__r, m4coscas, "cc_sjb_c.7_1", 0x0000, 0x020000, CRC(109e9ae9) SHA1(00f381beb33cae58fc3429d3501efa4a9d9f0035), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 19)" ) -GAME_CUSTOM( 199?, m4coscas__s, m4coscas, "cc_sjbgc.3r1", 0x0000, 0x020000, CRC(2de82f88) SHA1(5c8029d43282a014e82b4f975616ed2bbc0e5641), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 20)" ) -GAME_CUSTOM( 199?, m4coscas__t, m4coscas, "cc_sjbtc.3r1", 0x0000, 0x020000, CRC(976c2858) SHA1(a70a8fe51d1b9d903d099e89a40481ea6af13683), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 21)" ) -GAME_CUSTOM( 199?, m4coscas__u, m4coscas, "cc_sjwb_.3s1", 0x0000, 0x020000, CRC(e2df8167) SHA1(c312b30402dd93c6d4a32932677430c9c996fd36), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 22)" ) -GAME_CUSTOM( 199?, m4coscas__v, m4coscas, "cc_sjwbc.3r1", 0x0000, 0x020000, CRC(a33a59a6) SHA1(a74ffd647e8390d89df475cc3f5205462c9d93d7), "Bwb / Barcrest","Cosmic Casino (Barcrest) (MPU4) (set 23)" ) +// "(C)1998 B.W.B." and "CC__3.0" +GAME_CUSTOM( 199?, m4coscas, 0, "cc_sj___.3s1", 0x0000, 0x020000, CRC(52c312b0) SHA1(bd5381d58b1acb7adf6857c142eae4a253081fbd), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__3.0)" ) +GAME_CUSTOM( 199?, m4coscas__d, m4coscas, "cc_sj__c.3r1", 0x0000, 0x020000, CRC(44b940a6) SHA1(7e621873fcf6460f654e35cc74552e86b6253ddb), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__3.0 C)" ) +GAME_CUSTOM( 199?, m4coscas__f, m4coscas, "cc_sj_b_.3s1", 0x0000, 0x020000, CRC(019f0a71) SHA1(7a97f4e89c16e25f8e7502bba37f49c8496fbb47), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__3.0 YD)" ) +GAME_CUSTOM( 199?, m4coscas__g, m4coscas, "cc_sj_bc.3r1", 0x0000, 0x020000, CRC(de9bb8e1) SHA1(7974b03974531eb4b5ed865b8eeb9649c1346df4), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__3.0 YCD)" ) +GAME_CUSTOM( 199?, m4coscas__i, m4coscas, "cc_sj_d_.3s1", 0x0000, 0x020000, CRC(215e12f3) SHA1(68ed9923c6fd51e9305afac9d271c7b3ce38b12f), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__3.0 D)" ) +GAME_CUSTOM( 199?, m4coscas__j, m4coscas, "cc_sj_dc.3r1", 0x0000, 0x020000, CRC(00e357c3) SHA1(02bf7427899d2e536442b87d41c140ebd787a580), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__3.0 CD)" ) +GAME_CUSTOM( 199?, m4coscas__l, m4coscas, "cc_sj_k_.3s1", 0x0000, 0x020000, CRC(9161912d) SHA1(d11109f4bdc1c60f4cf477e1f26556800a83abdb), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__3.0 Y)" ) +GAME_CUSTOM( 199?, m4coscas__m, m4coscas, "cc_sj_kc.3r1", 0x0000, 0x020000, CRC(b0dcd41d) SHA1(6b50a5e401bf854186331673dcc0c3fc5de2991b), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__3.0 YC)" ) +GAME_CUSTOM( 199?, m4coscas__n, m4coscas, "cc_sja__.3s1", 0x0000, 0x020000, CRC(1682b1d3) SHA1(24baaf789eca150f0f6fd9c510e245aa7b88cc4c), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__3.0 K)" ) +GAME_CUSTOM( 199?, m4coscas__o, m4coscas, "cc_sja_c.3r1", 0x0000, 0x020000, CRC(373ff4e3) SHA1(55b7ab247863eb3c025e84782c8cab7734343077), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__3.0 CK)" ) +GAME_CUSTOM( 199?, m4coscas__q, m4coscas, "cc_sjb__.3s1", 0x0000, 0x020000, CRC(5c451985) SHA1(517f634d31f7190ca6685c1037fb66a8b87effba), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__3.0 B)" ) +GAME_CUSTOM( 199?, m4coscas__s, m4coscas, "cc_sjbgc.3r1", 0x0000, 0x020000, CRC(2de82f88) SHA1(5c8029d43282a014e82b4f975616ed2bbc0e5641), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__3.0 BCAD)" ) +GAME_CUSTOM( 199?, m4coscas__t, m4coscas, "cc_sjbtc.3r1", 0x0000, 0x020000, CRC(976c2858) SHA1(a70a8fe51d1b9d903d099e89a40481ea6af13683), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__3.0 BCR)" ) +GAME_CUSTOM( 199?, m4coscas__u, m4coscas, "cc_sjwb_.3s1", 0x0000, 0x020000, CRC(e2df8167) SHA1(c312b30402dd93c6d4a32932677430c9c996fd36), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__3.0 YDH)" ) +GAME_CUSTOM( 199?, m4coscas__v, m4coscas, "cc_sjwbc.3r1", 0x0000, 0x020000, CRC(a33a59a6) SHA1(a74ffd647e8390d89df475cc3f5205462c9d93d7), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__3.0 YCDH)" ) +// "(C)1998 B.W.B." and "CC__7.0" +GAME_CUSTOM( 199?, m4coscas__e, m4coscas, "cc_sj__c.7_1", 0x0000, 0x020000, CRC(ee9e6126) SHA1(fab6fd04004acebf291544720ba06cea79d5a054), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__7.0)" ) +GAME_CUSTOM( 199?, m4coscas__h, m4coscas, "cc_sj_bc.7_1", 0x0000, 0x020000, CRC(afe1aac6) SHA1(fc9c69e45db6a85c45ef8d32d048e5726d7da655), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__7.0 YD)" ) +GAME_CUSTOM( 199?, m4coscas__k, m4coscas, "cc_sj_dc.7_1", 0x0000, 0x020000, CRC(330d68a2) SHA1(12410af5f37b26f29f5cd23606ab0e128675095a), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__7.0 D)" ) +GAME_CUSTOM( 199?, m4coscas__p, m4coscas, "cc_sja_c.7_1", 0x0000, 0x020000, CRC(e956898e) SHA1(f51682651520551d481360bf86eba510cd758441), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__7.0 K)" ) +GAME_CUSTOM( 199?, m4coscas__r, m4coscas, "cc_sjb_c.7_1", 0x0000, 0x020000, CRC(109e9ae9) SHA1(00f381beb33cae58fc3429d3501efa4a9d9f0035), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__7.0 B)" ) +GAME_CUSTOM( 199?, m4coscas__b, m4coscas, "cosmiccasinos15.bin", 0x0000, 0x020000, CRC(ddba1241) SHA1(7ca2928ae2ab4e323b60bb661b60681f89cc5663), "Bwb","Cosmic Casino (Barcrest) (MPU4) (CC__7.0 Y)" ) +// no copyright string and "CC__3.0" +GAME_CUSTOM( 199?, m4coscas__c, m4coscas, "cc30s.p1", 0x0000, 0x020000, CRC(e308100a) SHA1(14cb07895d17237768877dd62ba7c3fc8e5b2630), "hack","Cosmic Casino (Barcrest) (MPU4) (CC__3.0, hack)" ) +// no copyright string and "CC__6.0" +GAME_CUSTOM( 199?, m4coscas__a, m4coscas, "cosm15g", 0x0000, 0x020000, CRC(edd01d55) SHA1(49246fa1e12ceb3297f35616cdc1cf62472a379f), "hack","Cosmic Casino (Barcrest) (MPU4) (CC__6.0, hack)" ) #define M4DBLDM_EXTRA_ROMS \ @@ -5241,7 +5592,9 @@ GAME_CUSTOM( 199?, m4coscas__v, m4coscas, "cc_sjwbc.3r1", 0x0000, 0 ROM_END \ GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) -GAME_CUSTOM( 199?, m4dbldm, 0, "cdd05s.p1", 0x0000, 0x020000, CRC(fc14771f) SHA1(f418af9fed331560195a694f20ef2fea27ed04b0), "Barcrest","Double Diamond Club (Barcrest) (MPU4) (set 1)" ) +// "(C)1996 BARCREST" and "CDD 0.5" +GAME_CUSTOM( 199?, m4dbldm, 0, "cdd05s.p1", 0x0000, 0x020000, CRC(fc14771f) SHA1(f418af9fed331560195a694f20ef2fea27ed04b0), "Barcrest","Double Diamond Club (Barcrest) (MPU4) (CDD 0.5)" ) GAME_CUSTOM( 199?, m4dbldm__a, m4dbldm, "cdd05d.p1", 0x0000, 0x020000, CRC(fc1c5e90) SHA1(c756d2ac725168af5396c8ef7550db9087a50937), "Barcrest","Double Diamond Club (Barcrest) (MPU4) (set 2)" ) GAME_CUSTOM( 199?, m4dbldm__b, m4dbldm, "cdd05f.p1", 0x0000, 0x020000, CRC(81914bd4) SHA1(cf286810ad6732ca1d706e70f4c2958d28cc979c), "Barcrest","Double Diamond Club (Barcrest) (MPU4) (set 3)" ) -GAME_CUSTOM( 199?, m4dbldm__c, m4dbldm, "cdd01.p1", 0x0000, 0x020000, CRC(e35dffde) SHA1(0bfc977f25f25785f20b510c44d2d3d79e23af8b), "Barcrest","Double Diamond Club (Barcrest) (MPU4) (set 4)" ) +// "(C)1996 BARCREST" and "CDD 0.1" +GAME_CUSTOM( 199?, m4dbldm__c, m4dbldm, "cdd01.p1", 0x0000, 0x020000, CRC(e35dffde) SHA1(0bfc977f25f25785f20b510c44d2d3d79e23af8b), "Barcrest","Double Diamond Club (Barcrest) (MPU4) (CDD 0.1)" ) diff --git a/src/mame/drivers/mpu5.cpp b/src/mame/drivers/mpu5.cpp index 068b54fe23d..c2a5dce88cc 100644 --- a/src/mame/drivers/mpu5.cpp +++ b/src/mame/drivers/mpu5.cpp @@ -121,10 +121,10 @@ READ8_MEMBER(mpu5_state::asic_r8) READ32_MEMBER(mpu5_state::asic_r32) { UINT32 retdata = 0; - if (mem_mask&0xff000000) retdata |= asic_r8(space,(offset*4)+0) <<24; - if (mem_mask&0x00ff0000) retdata |= asic_r8(space,(offset*4)+1) <<16; - if (mem_mask&0x0000ff00) retdata |= asic_r8(space,(offset*4)+2) <<8; - if (mem_mask&0x000000ff) retdata |= asic_r8(space,(offset*4)+3) <<0; + if (ACCESSING_BITS_24_31) retdata |= asic_r8(space,(offset*4)+0) <<24; + if (ACCESSING_BITS_16_23) retdata |= asic_r8(space,(offset*4)+1) <<16; + if (ACCESSING_BITS_8_15) retdata |= asic_r8(space,(offset*4)+2) <<8; + if (ACCESSING_BITS_0_7) retdata |= asic_r8(space,(offset*4)+3) <<0; return retdata; } @@ -255,10 +255,10 @@ WRITE8_MEMBER(mpu5_state::asic_w8) WRITE32_MEMBER(mpu5_state::asic_w32) { - if (mem_mask&0xff000000) asic_w8(space,(offset*4)+0, (data>>24)&0xff); - if (mem_mask&0x00ff0000) asic_w8(space,(offset*4)+1, (data>>16)&0xff); - if (mem_mask&0x0000ff00) asic_w8(space,(offset*4)+2, (data>>8) &0xff); - if (mem_mask&0x000000ff) asic_w8(space,(offset*4)+3, (data>>0) &0xff); + if (ACCESSING_BITS_24_31) asic_w8(space,(offset*4)+0, (data>>24)&0xff); + if (ACCESSING_BITS_16_23) asic_w8(space,(offset*4)+1, (data>>16)&0xff); + if (ACCESSING_BITS_8_15) asic_w8(space,(offset*4)+2, (data>>8) &0xff); + if (ACCESSING_BITS_0_7) asic_w8(space,(offset*4)+3, (data>>0) &0xff); } diff --git a/src/mame/drivers/multigam.cpp b/src/mame/drivers/multigam.cpp index 6c3ea662967..5e49c9fe7bc 100644 --- a/src/mame/drivers/multigam.cpp +++ b/src/mame/drivers/multigam.cpp @@ -118,10 +118,16 @@ public: multigam_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_ppu(*this, "ppu") { } + m_ppu(*this, "ppu"), + m_p1(*this, "P1"), + m_p2(*this, "P2"), + m_dsw(*this, "DSW") { } required_device m_maincpu; required_device m_ppu; + required_ioport m_p1; + required_ioport m_p2; + optional_ioport m_dsw; std::unique_ptr m_nt_ram; std::unique_ptr m_vram; @@ -313,11 +319,11 @@ WRITE8_MEMBER(multigam_state::multigam_IN0_w) m_in_0_shift = 0; m_in_1_shift = 0; - m_in_0 = ioport("P1")->read(); - m_in_1 = ioport("P2")->read(); + m_in_0 = m_p1->read(); + m_in_1 = m_p2->read(); m_in_dsw_shift = 0; - m_in_dsw = read_safe(ioport("DSW"), 0); + m_in_dsw = m_dsw.read_safe(0); } READ8_MEMBER(multigam_state::multigam_IN1_r) diff --git a/src/mame/drivers/mystwarr.cpp b/src/mame/drivers/mystwarr.cpp index a552f78e3b4..3d2ec6f3c07 100644 --- a/src/mame/drivers/mystwarr.cpp +++ b/src/mame/drivers/mystwarr.cpp @@ -1684,7 +1684,7 @@ ROM_START( metamrph ) ROM_LOAD( "metamrph.nv", 0x0000, 0x080, CRC(2c51229a) SHA1(7f056792cc44ec3d4aacc33c825ab796a913488e) ) ROM_END -ROM_START( metamrpha ) /* alternate set - possibly a bugfix version. Only 2 adjusted bytes causing a swap in commands */ +ROM_START( metamrphe ) /* alternate set - possibly a bugfix version. Only 2 adjusted bytes causing a swap in commands */ /* main program */ ROM_REGION( 0x200000, "maincpu", 0 ) ROM_LOAD16_BYTE( "3.15h", 0x000001, 0x40000, CRC(8b9f1ba3) SHA1(cccbaf117800a030c8218a91740dc98182a27901) ) @@ -1721,6 +1721,43 @@ ROM_START( metamrpha ) /* alternate set - possibly a bugfix version. Only 2 adju ROM_LOAD( "metamrph.nv", 0x0000, 0x080, CRC(2c51229a) SHA1(7f056792cc44ec3d4aacc33c825ab796a913488e) ) ROM_END +ROM_START( metamrpha ) + /* main program */ + ROM_REGION( 0x200000, "maincpu", 0 ) + ROM_LOAD16_BYTE( "224aaa01.15h", 0x000001, 0x40000, CRC(12515518) SHA1(7c47ce7ee9817b5f3f516dda021028a0b0a2941f) ) + ROM_LOAD16_BYTE( "224aaa02.15f", 0x000000, 0x40000, CRC(04ed41df) SHA1(a966aa887f286b528d122aceee957ca2d9fdedb6) ) + ROM_LOAD16_BYTE( "224a03", 0x100001, 0x80000, CRC(a5bedb01) SHA1(5e7a0b93af654ba6a87be8d449c7080a0f0e2a43) ) + ROM_LOAD16_BYTE( "224a04", 0x100000, 0x80000, CRC(ada53ba4) SHA1(f77bf854dff1f8f718579fe6d3730066708396e2) ) + + /* sound program */ + ROM_REGION( 0x40000, "soundcpu", 0 ) + ROM_LOAD("224a05", 0x000000, 0x40000, CRC(4b4c985c) SHA1(c83cce05355023be9cd55b4aa595c61f8236269c) ) + + /* tiles */ + ROM_REGION( 0x500000, "gfx1", ROMREGION_ERASE00 ) + ROM_LOADTILE_WORD( "224a09", 0x000000, 1*1024*1024, CRC(1931afce) SHA1(78838c0fd2a9c80f130db1fcf6c88b14f7363639) ) + ROM_LOADTILE_WORD( "224a08", 0x000002, 1*1024*1024, CRC(dc94d53a) SHA1(91e16371a335f078a81c06a1045759653080aba0) ) + + /* sprites */ + ROM_REGION( 0x800000, "gfx2", ROMREGION_ERASE00 ) + ROM_LOAD64_WORD( "224a10", 0x000000, 2*1024*1024, CRC(161287f0) SHA1(a13b197a98fa1cebb11fb87b54e277c72852c4ee) ) + ROM_LOAD64_WORD( "224a11", 0x000002, 2*1024*1024, CRC(df5960e1) SHA1(ee7794dd119f5f2c52e7ba589d78067a89ff3cab) ) + ROM_LOAD64_WORD( "224a12", 0x000004, 2*1024*1024, CRC(ca72a4b3) SHA1(a09deb6d7cb8be4edaeb78e0e676ea2d6055e9e0) ) + ROM_LOAD64_WORD( "224a13", 0x000006, 2*1024*1024, CRC(86b58feb) SHA1(5a43746e2cd3c7aca21496c092aef83e64b3ab2c) ) + + /* K053250 linescroll/zoom thingy */ + ROM_REGION( 0x40000, "k053250_1", 0 ) + ROM_LOAD( "224a14", 0x000000, 0x40000, CRC(3c79b404) SHA1(7c6bb4cbf050f314ea0cd3e8bc6e1947d0573084) ) + + /* sound data */ + ROM_REGION( 0x400000, "shared", 0 ) + ROM_LOAD( "224a06", 0x000000, 2*1024*1024, CRC(972f6abe) SHA1(30907495fc49fe3424c092b074c1dc137aa14306) ) + ROM_LOAD( "224a07", 0x200000, 1*1024*1024, CRC(61b2f97a) SHA1(34bf835d6361c7809d40fa20fd238c9e2a84b101) ) + + ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error + ROM_LOAD( "metamrpha.nv", 0x0000, 0x080, CRC(6d34a4f2) SHA1(6ec2645ee4375d4924c3cfed2285224af6d19f4c) ) +ROM_END + ROM_START( metamrphu ) /* main program */ ROM_REGION( 0x200000, "maincpu", 0 ) @@ -2271,9 +2308,10 @@ GAME( 1993, viostorma, viostorm, viostorm, viostorm, driver_device, 0, ROT0, " GAME( 1993, viostormab, viostorm, viostorm, viostorm, driver_device, 0, ROT0, "Konami", "Violent Storm (ver AAB)", MACHINE_IMPERFECT_GRAPHICS ) GAME( 1993, metamrph, 0, metamrph, metamrph, driver_device, 0, ROT0, "Konami", "Metamorphic Force (ver EAA)", MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1993, metamrpha, metamrph, metamrph, metamrph, driver_device, 0, ROT0, "Konami", "Metamorphic Force (ver EAA - alternate)", MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1993, metamrphe, metamrph, metamrph, metamrph, driver_device, 0, ROT0, "Konami", "Metamorphic Force (ver EAA - alternate)", MACHINE_IMPERFECT_GRAPHICS ) GAME( 1993, metamrphu, metamrph, metamrph, metamrph, driver_device, 0, ROT0, "Konami", "Metamorphic Force (ver UAA)", MACHINE_IMPERFECT_GRAPHICS ) GAME( 1993, metamrphj, metamrph, metamrph, metamrph, driver_device, 0, ROT0, "Konami", "Metamorphic Force (ver JAA)", MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1993, metamrpha, metamrph, metamrph, metamrph, driver_device, 0, ROT0, "Konami", "Metamorphic Force (ver AAA)", MACHINE_IMPERFECT_GRAPHICS ) GAME( 1993, mtlchamp, 0, martchmp, martchmp, driver_device, 0, ROT0, "Konami", "Martial Champion (ver EAB)", MACHINE_IMPERFECT_GRAPHICS ) GAME( 1993, mtlchamp1, mtlchamp, martchmp, martchmp, driver_device, 0, ROT0, "Konami", "Martial Champion (ver EAA)", MACHINE_IMPERFECT_GRAPHICS ) diff --git a/src/mame/drivers/mz2000.cpp b/src/mame/drivers/mz2000.cpp index a601941cab7..ce7e7857c62 100644 --- a/src/mame/drivers/mz2000.cpp +++ b/src/mame/drivers/mz2000.cpp @@ -55,21 +55,7 @@ public: m_region_chargen(*this, "chargen"), m_region_ipl(*this, "ipl"), m_region_wram(*this, "wram"), - m_io_key0(*this, "KEY0"), - m_io_key1(*this, "KEY1"), - m_io_key2(*this, "KEY2"), - m_io_key3(*this, "KEY3"), - m_io_key4(*this, "KEY4"), - m_io_key5(*this, "KEY5"), - m_io_key6(*this, "KEY6"), - m_io_key7(*this, "KEY7"), - m_io_key8(*this, "KEY8"), - m_io_key9(*this, "KEY9"), - m_io_keya(*this, "KEYA"), - m_io_keyb(*this, "KEYB"), - m_io_keyc(*this, "KEYC"), - m_io_keyd(*this, "KEYD"), - m_io_unused(*this, "UNUSED"), + m_io_keys(*this, {"KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5", "KEY6", "KEY7", "KEY8", "KEY9", "KEYA", "KEYB", "KEYC", "KEYD", "UNUSED", "UNUSED"}), m_io_config(*this, "CONFIG"), m_palette(*this, "palette") { } @@ -141,21 +127,7 @@ protected: required_memory_region m_region_chargen; required_memory_region m_region_ipl; required_memory_region m_region_wram; - required_ioport m_io_key0; - required_ioport m_io_key1; - required_ioport m_io_key2; - required_ioport m_io_key3; - required_ioport m_io_key4; - required_ioport m_io_key5; - required_ioport m_io_key6; - required_ioport m_io_key7; - required_ioport m_io_key8; - required_ioport m_io_key9; - required_ioport m_io_keya; - required_ioport m_io_keyb; - required_ioport m_io_keyc; - required_ioport m_io_keyd; - required_ioport m_io_unused; + required_ioport_array<16> m_io_keys; required_ioport m_io_config; required_device m_palette; }; @@ -760,23 +732,18 @@ WRITE8_MEMBER(mz2000_state::mz2000_pio1_porta_w) READ8_MEMBER(mz2000_state::mz2000_pio1_portb_r) { - ioport_port* keynames[] = { m_io_key0, m_io_key1, m_io_key2, m_io_key3, - m_io_key4, m_io_key5, m_io_key6, m_io_key7, - m_io_key8, m_io_key9, m_io_keya, m_io_keyb, - m_io_keyc, m_io_keyd, m_io_unused, m_io_unused }; - if(((m_key_mux & 0x10) == 0x00) || ((m_key_mux & 0x0f) == 0x0f)) //status read { int res,i; res = 0xff; for(i=0;i<0xe;i++) - res &= keynames[i]->read(); + res &= m_io_keys[i]->read(); return res; } - return keynames[m_key_mux & 0xf]->read(); + return m_io_keys[m_key_mux & 0xf]->read(); } READ8_MEMBER(mz2000_state::mz2000_pio1_porta_r) diff --git a/src/mame/drivers/namcofl.cpp b/src/mame/drivers/namcofl.cpp index 7291f72ff69..ece0a205a75 100644 --- a/src/mame/drivers/namcofl.cpp +++ b/src/mame/drivers/namcofl.cpp @@ -282,16 +282,16 @@ READ8_MEMBER(namcofl_state::port7_r) switch (m_mcu_port6 & 0xf0) { case 0x00: - return ioport("IN0")->read(); + return m_in0->read(); case 0x20: - return ioport("MISC")->read(); + return m_misc->read(); case 0x40: - return ioport("IN1")->read(); + return m_in1->read(); case 0x60: - return ioport("IN2")->read(); + return m_in2->read(); default: break; @@ -302,17 +302,17 @@ READ8_MEMBER(namcofl_state::port7_r) READ8_MEMBER(namcofl_state::dac7_r) { - return read_safe(ioport("ACCEL"), 0xff); + return m_accel.read_safe(0xff); } READ8_MEMBER(namcofl_state::dac6_r) { - return read_safe(ioport("BRAKE"), 0xff); + return m_brake.read_safe(0xff); } READ8_MEMBER(namcofl_state::dac5_r) { - return read_safe(ioport("WHEEL"), 0xff); + return m_wheel.read_safe(0xff); } READ8_MEMBER(namcofl_state::dac4_r){ return 0xff; } diff --git a/src/mame/drivers/namconb1.cpp b/src/mame/drivers/namconb1.cpp index 3a07948c684..32a698289dd 100644 --- a/src/mame/drivers/namconb1.cpp +++ b/src/mame/drivers/namconb1.cpp @@ -639,10 +639,10 @@ READ32_MEMBER(namconb1_state::gunbulet_gun_r) switch (offset) { - case 0: case 1: result = (UINT8)(0x0f + ioport("LIGHT1_Y")->read() * 224/255); break; /* Y (p2) */ - case 2: case 3: result = (UINT8)(0x26 + ioport("LIGHT1_X")->read() * 288/314); break; /* X (p2) */ - case 4: case 5: result = (UINT8)(0x0f + ioport("LIGHT0_Y")->read() * 224/255); break; /* Y (p1) */ - case 6: case 7: result = (UINT8)(0x26 + ioport("LIGHT0_X")->read() * 288/314); break; /* X (p1) */ + case 0: case 1: result = (UINT8)(0x0f + m_light1_y->read() * 224/255); break; /* Y (p2) */ + case 2: case 3: result = (UINT8)(0x26 + m_light1_x->read() * 288/314); break; /* X (p2) */ + case 4: case 5: result = (UINT8)(0x0f + m_light0_y->read() * 224/255); break; /* Y (p1) */ + case 6: case 7: result = (UINT8)(0x26 + m_light0_x->read() * 288/314); break; /* X (p1) */ } return result<<24; } /* gunbulet_gun_r */ @@ -757,16 +757,16 @@ READ8_MEMBER(namconb1_state::port7_r) switch (m_port6 & 0xf0) { case 0x00: - return read_safe(ioport("P4"), 0xff); + return m_p4.read_safe(0xff); case 0x20: - return ioport("MISC")->read(); + return m_misc->read(); case 0x40: - return ioport("P1")->read(); + return m_p1->read(); case 0x60: - return ioport("P2")->read(); + return m_p2->read(); default: break; @@ -780,42 +780,42 @@ READ8_MEMBER(namconb1_state::port7_r) // register full scale, so it works... READ8_MEMBER(namconb1_state::dac7_r)// bit 7 { - return read_safe(ioport("P3"), 0xff)&0x80; + return m_p3.read_safe(0xff)&0x80; } READ8_MEMBER(namconb1_state::dac6_r)// bit 3 { - return (read_safe(ioport("P3"), 0xff)<<1)&0x80; + return (m_p3.read_safe(0xff)<<1)&0x80; } READ8_MEMBER(namconb1_state::dac5_r)// bit 2 { - return (read_safe(ioport("P3"), 0xff)<<2)&0x80; + return (m_p3.read_safe(0xff)<<2)&0x80; } READ8_MEMBER(namconb1_state::dac4_r)// bit 1 { - return (read_safe(ioport("P3"), 0xff)<<3)&0x80; + return (m_p3.read_safe(0xff)<<3)&0x80; } READ8_MEMBER(namconb1_state::dac3_r)// bit 0 { - return (read_safe(ioport("P3"), 0xff)<<4)&0x80; + return (m_p3.read_safe(0xff)<<4)&0x80; } READ8_MEMBER(namconb1_state::dac2_r)// bit 4 { - return (read_safe(ioport("P3"), 0xff)<<5)&0x80; + return (m_p3.read_safe(0xff)<<5)&0x80; } READ8_MEMBER(namconb1_state::dac1_r)// bit 5 { - return (read_safe(ioport("P3"), 0xff)<<6)&0x80; + return (m_p3.read_safe(0xff)<<6)&0x80; } READ8_MEMBER(namconb1_state::dac0_r)// bit 6 { - return (read_safe(ioport("P3"), 0xff)<<7)&0x80; + return (m_p3.read_safe(0xff)<<7)&0x80; } static ADDRESS_MAP_START( namcoc75_io, AS_IO, 8, namconb1_state ) diff --git a/src/mame/drivers/namcos22.cpp b/src/mame/drivers/namcos22.cpp index e0617229634..33e43c44051 100644 --- a/src/mame/drivers/namcos22.cpp +++ b/src/mame/drivers/namcos22.cpp @@ -1582,7 +1582,7 @@ READ32_MEMBER(namcos22_state::namcos22_dspram_r) WRITE32_MEMBER(namcos22_state::namcos22_dspram_w) { - if (mem_mask & 0x00ff0000) + if (ACCESSING_BITS_16_23) { // only d0-23 are connected mem_mask |= 0xff000000; @@ -1686,7 +1686,7 @@ READ16_MEMBER(namcos22_state::namcos22_portbit_r) WRITE16_MEMBER(namcos22_state::namcos22_portbit_w) { - m_portbits[offset] = read_safe(ioport((offset == 0) ? "P1" : "P2"), 0xffff); + m_portbits[offset] = ((offset == 0) ? m_p1 : m_p2).read_safe(0xffff); } READ16_MEMBER(namcos22_state::namcos22_dipswitch_r) @@ -2760,9 +2760,9 @@ WRITE8_MEMBER(namcos22_state::mcu_port5_w) READ8_MEMBER(namcos22_state::mcu_port5_r) { if (m_p4 & 8) - return read_safe(ioport("MCUP5A"), 0xff); + return m_mcup5a.read_safe(0xff); else - return read_safe(ioport("MCUP5B"), 0xff); + return m_mcup5b.read_safe(0xff); } WRITE8_MEMBER(namcos22_state::mcu_port6_w) @@ -2787,7 +2787,7 @@ READ8_MEMBER(namcos22_state::mcu_port7_r) READ8_MEMBER(namcos22_state::namcos22s_mcu_adc_r) { - UINT16 adc = read_safe(m_adc_ports[offset >> 1 & 7], 0) << 2; + UINT16 adc = m_adc_ports[offset >> 1 & 7].read_safe(0) << 2; return (offset & 1) ? adc >> 8 : adc; } diff --git a/src/mame/drivers/namcos23.cpp b/src/mame/drivers/namcos23.cpp index 1494bcd520f..0d730716a07 100644 --- a/src/mame/drivers/namcos23.cpp +++ b/src/mame/drivers/namcos23.cpp @@ -3129,7 +3129,7 @@ WRITE16_MEMBER(namcos23_state::iob_p6_w) READ16_MEMBER(namcos23_state::iob_analog_r) { - return read_safe(m_adc_ports[offset], 0); + return m_adc_ports[offset].read_safe(0); } diff --git a/src/mame/drivers/nanos.cpp b/src/mame/drivers/nanos.cpp index 02d5471a472..9951564fc39 100644 --- a/src/mame/drivers/nanos.cpp +++ b/src/mame/drivers/nanos.cpp @@ -39,13 +39,7 @@ public: m_bank1(*this, "bank1"), m_bank2(*this, "bank2"), m_bank3(*this, "bank3"), - m_line0(*this, "LINE0"), - m_line1(*this, "LINE1"), - m_line2(*this, "LINE2"), - m_line3(*this, "LINE3"), - m_line4(*this, "LINE4"), - m_line5(*this, "LINE5"), - m_line6(*this, "LINE6"), + m_lines(*this, {"LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5", "LINE6"}), m_linec(*this, "LINEC") { } @@ -84,13 +78,7 @@ protected: required_memory_bank m_bank1; required_memory_bank m_bank2; required_memory_bank m_bank3; - required_ioport m_line0; - required_ioport m_line1; - required_ioport m_line2; - required_ioport m_line3; - required_ioport m_line4; - required_ioport m_line5; - required_ioport m_line6; + required_ioport_array<7> m_lines; required_ioport m_linec; UINT8 row_number(UINT8 code); }; @@ -343,8 +331,6 @@ UINT8 nanos_state::row_number(UINT8 code) TIMER_DEVICE_CALLBACK_MEMBER(nanos_state::keyboard_callback) { - ioport_port *io_ports[] = { m_line0, m_line1, m_line2, m_line3, m_line4, m_line5, m_line6 }; - int i; UINT8 code; UINT8 key_code = 0; @@ -353,7 +339,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(nanos_state::keyboard_callback) m_key_pressed = 0xff; for(i = 0; i < 7; i++) { - code = io_ports[i]->read(); + code = m_lines[i]->read(); if (code != 0) { if (i==0 && shift==0) { diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp index 3fea358ae7e..86860289026 100644 --- a/src/mame/drivers/naomi.cpp +++ b/src/mame/drivers/naomi.cpp @@ -2982,7 +2982,9 @@ Probably at some stage of development NAOMI was planned as non-JVS system as wel ROM_SYSTEM_BIOS( 0, "bios0", "Ferrari F355 (Export)" ) \ ROM_LOAD16_WORD_SWAP_BIOS( 0, "epr-22851.ic27", 0x000000, 0x200000, CRC(62483677) SHA1(3e3bcacf5f972c376b569f45307ee7fd0b5031b7) ) \ ROM_SYSTEM_BIOS( 1, "bios1", "Ferrari F355 (USA)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 1, "epr-22850.ic27", 0x000000, 0x200000, CRC(28aa539d) SHA1(14485368656af80504b212da620179c49f84c1a2) ) + ROM_LOAD16_WORD_SWAP_BIOS( 1, "epr-22850.ic27", 0x000000, 0x200000, CRC(28aa539d) SHA1(14485368656af80504b212da620179c49f84c1a2) ) \ + ROM_SYSTEM_BIOS( 2, "bios2", "Ferrari F355 (Japan)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 2, "epr-22849.ic27", 0x000000, 0x200000, CRC(121e009c) SHA1(3beb91f660e60590491b209b6be8584b05a90548) ) #define AIRLINE_BIOS \ ROM_REGION( 0x200000, "maincpu", 0) \ diff --git a/src/mame/drivers/nbmj8688.cpp b/src/mame/drivers/nbmj8688.cpp index 314a62da37f..1f8e25d9fc7 100644 --- a/src/mame/drivers/nbmj8688.cpp +++ b/src/mame/drivers/nbmj8688.cpp @@ -435,7 +435,7 @@ static INPUT_PORTS_START( mjsikaku ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 @@ -540,7 +540,7 @@ static INPUT_PORTS_START( mmsikaku ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 @@ -606,7 +606,7 @@ static INPUT_PORTS_START( otonano ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 @@ -672,7 +672,7 @@ static INPUT_PORTS_START( mjcamera ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 @@ -736,7 +736,7 @@ static INPUT_PORTS_START( kaguya ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY // PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -803,7 +803,7 @@ static INPUT_PORTS_START( kaguya2 ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY // PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -867,7 +867,7 @@ static INPUT_PORTS_START( kanatuen ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -931,7 +931,7 @@ static INPUT_PORTS_START( kyuhito ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -996,7 +996,7 @@ static INPUT_PORTS_START( idhimitu ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -1061,7 +1061,7 @@ static INPUT_PORTS_START( secolove ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -1126,7 +1126,7 @@ static INPUT_PORTS_START( barline ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -1236,7 +1236,7 @@ static INPUT_PORTS_START( citylove ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -1298,7 +1298,7 @@ static INPUT_PORTS_START( mcitylov ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN2 @@ -1364,7 +1364,7 @@ static INPUT_PORTS_START( seiha ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 @@ -1428,7 +1428,7 @@ static INPUT_PORTS_START( seiham ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 @@ -1494,7 +1494,7 @@ static INPUT_PORTS_START( iemoto ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 @@ -1558,7 +1558,7 @@ static INPUT_PORTS_START( iemotom ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 @@ -1623,7 +1623,7 @@ static INPUT_PORTS_START( ryuuha ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 @@ -1688,7 +1688,7 @@ static INPUT_PORTS_START( bijokkoy ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 @@ -1764,7 +1764,7 @@ static INPUT_PORTS_START( bijokkog ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 @@ -1840,7 +1840,7 @@ static INPUT_PORTS_START( housemnq ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 @@ -1915,7 +1915,7 @@ static INPUT_PORTS_START( housemn2 ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 @@ -1993,7 +1993,7 @@ static INPUT_PORTS_START( orangec ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN2 @@ -2058,7 +2058,7 @@ static INPUT_PORTS_START( orangeci ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN2 @@ -2123,7 +2123,7 @@ static INPUT_PORTS_START( vipclub ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN2 @@ -2186,7 +2186,7 @@ static INPUT_PORTS_START( livegal ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 @@ -2235,7 +2235,7 @@ static INPUT_PORTS_START( ojousan ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 @@ -2299,7 +2299,7 @@ static INPUT_PORTS_START( ojousanm ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -2365,7 +2365,7 @@ static INPUT_PORTS_START( korinai ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -2429,7 +2429,7 @@ static INPUT_PORTS_START( korinaim ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -2493,7 +2493,7 @@ static INPUT_PORTS_START( crystalg ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -2555,7 +2555,7 @@ static INPUT_PORTS_START( crystal2 ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -2617,7 +2617,7 @@ static INPUT_PORTS_START( apparel ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -2687,7 +2687,7 @@ static INPUT_PORTS_START( nightlov ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 diff --git a/src/mame/drivers/nbmj8891.cpp b/src/mame/drivers/nbmj8891.cpp index 25c4fdbb1bd..3e9b2b41351 100644 --- a/src/mame/drivers/nbmj8891.cpp +++ b/src/mame/drivers/nbmj8891.cpp @@ -616,7 +616,7 @@ static INPUT_PORTS_START( hanamomo ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Credit Clear") PORT_CODE(KEYCODE_4) // CREDIT CLEAR @@ -689,7 +689,7 @@ static INPUT_PORTS_START( mjcamerb ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 @@ -755,7 +755,7 @@ static INPUT_PORTS_START( mmcamera ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Credit Clear") PORT_CODE(KEYCODE_4) // CREDIT CLEAR @@ -798,7 +798,7 @@ static INPUT_PORTS_START( msjiken ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Credit Clear") PORT_CODE(KEYCODE_4) // CREDIT CLEAR @@ -883,7 +883,7 @@ static INPUT_PORTS_START( gionbana ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Credit Clear") PORT_CODE(KEYCODE_4) // CREDIT CLEAR @@ -949,7 +949,7 @@ static INPUT_PORTS_START( mgion ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Credit Clear") PORT_CODE(KEYCODE_4) // CREDIT CLEAR @@ -1015,7 +1015,7 @@ static INPUT_PORTS_START( omotesnd ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -1080,7 +1080,7 @@ static INPUT_PORTS_START( abunai ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Credit Clear") PORT_CODE(KEYCODE_4) // CREDIT CLEAR @@ -1146,7 +1146,7 @@ static INPUT_PORTS_START( mgmen89 ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Credit Clear") PORT_CODE(KEYCODE_4) // CREDIT CLEAR @@ -1188,7 +1188,7 @@ static INPUT_PORTS_START( mjfocus ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Credit Clear") PORT_CODE(KEYCODE_4) // CREDIT CLEAR @@ -1252,7 +1252,7 @@ static INPUT_PORTS_START( mjfocusm ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 @@ -1319,7 +1319,7 @@ static INPUT_PORTS_START( scandal ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 @@ -1383,7 +1383,7 @@ static INPUT_PORTS_START( scandalm ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 @@ -1449,7 +1449,7 @@ static INPUT_PORTS_START( mjnanpas ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Credit Clear") PORT_CODE(KEYCODE_4) // CREDIT CLEAR @@ -1515,7 +1515,7 @@ static INPUT_PORTS_START( mjnanpaa ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Credit Clear") PORT_CODE(KEYCODE_4) // CREDIT CLEAR @@ -1584,7 +1584,7 @@ static INPUT_PORTS_START( bananadr ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -1649,7 +1649,7 @@ static INPUT_PORTS_START( club90s ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Credit Clear") PORT_CODE(KEYCODE_4) // CREDIT CLEAR @@ -1728,7 +1728,7 @@ static INPUT_PORTS_START( lovehous ) PORT_START("PORT0-2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_outcoin_flag_r, nullptr) // OUT COIN - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -1768,7 +1768,7 @@ static INPUT_PORTS_START( mladyhtr ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Credit Clear") PORT_CODE(KEYCODE_4) // CREDIT CLEAR @@ -1833,7 +1833,7 @@ static INPUT_PORTS_START( chinmoku ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Credit Clear") PORT_CODE(KEYCODE_4) // CREDIT CLEAR @@ -1911,7 +1911,7 @@ static INPUT_PORTS_START( maiko ) PORT_START("PORT0-2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) // PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_outcoin_flag_r, nullptr) // OUT COIN - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) // @@ -1987,7 +1987,7 @@ static INPUT_PORTS_START( mmaiko ) PORT_START("PORT0-2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_outcoin_flag_r, nullptr) // OUT COIN - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -2063,7 +2063,7 @@ static INPUT_PORTS_START( hanaoji ) PORT_START("PORT0-2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) // PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_outcoin_flag_r, nullptr) // OUT COIN - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) // @@ -2229,7 +2229,7 @@ static INPUT_PORTS_START( taiwanmb ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // COIN OUT - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 diff --git a/src/mame/drivers/nbmj8991.cpp b/src/mame/drivers/nbmj8991.cpp index 50900d54b80..e84c59224d2 100644 --- a/src/mame/drivers/nbmj8991.cpp +++ b/src/mame/drivers/nbmj8991.cpp @@ -288,7 +288,7 @@ static INPUT_PORTS_START( pstadium ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -330,7 +330,7 @@ static INPUT_PORTS_START( triplew1 ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -395,7 +395,7 @@ static INPUT_PORTS_START( ntopstar ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -460,7 +460,7 @@ static INPUT_PORTS_START( mjlstory ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -525,7 +525,7 @@ static INPUT_PORTS_START( vanilla ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -592,7 +592,7 @@ static INPUT_PORTS_START( finalbny ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -657,7 +657,7 @@ static INPUT_PORTS_START( qmhayaku ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -701,7 +701,7 @@ static INPUT_PORTS_START( galkoku ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -770,7 +770,7 @@ static INPUT_PORTS_START( hyouban ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -839,7 +839,7 @@ static INPUT_PORTS_START( galkaika ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -908,7 +908,7 @@ static INPUT_PORTS_START( tokyogal ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -977,7 +977,7 @@ static INPUT_PORTS_START( tokimbsj ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -1046,7 +1046,7 @@ static INPUT_PORTS_START( mcontest ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -1115,7 +1115,7 @@ static INPUT_PORTS_START( uchuuai ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -1184,7 +1184,7 @@ static INPUT_PORTS_START( mjgottub ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -1248,7 +1248,7 @@ static INPUT_PORTS_START( av2mj1bb ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 @@ -1315,7 +1315,7 @@ static INPUT_PORTS_START( av2mj2rg ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 diff --git a/src/mame/drivers/neodriv.hxx b/src/mame/drivers/neodriv.hxx index 519f6941966..6d8a8416830 100644 --- a/src/mame/drivers/neodriv.hxx +++ b/src/mame/drivers/neodriv.hxx @@ -8589,7 +8589,7 @@ GAME( 1990, nam1975, neogeo, neobase, neogeo, neogeo_state, neogeo, R GAME( 1990, bstars, neogeo, neobase, neogeo, neogeo_state, neogeo, ROT0, "SNK", "Baseball Stars Professional (NGM-002)", MACHINE_SUPPORTS_SAVE ) GAME( 1990, bstarsh, bstars, neobase, neogeo, neogeo_state, neogeo, ROT0, "SNK", "Baseball Stars Professional (NGH-002)", MACHINE_SUPPORTS_SAVE ) GAME( 1990, tpgolf, neogeo, neobase, neogeo, neogeo_state, neogeo, ROT0, "SNK", "Top Player's Golf (NGM-003 ~ NGH-003)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, mahretsu, neogeo, neobase, neogeo, neogeo_state, neogeo, ROT0, "SNK", "Mahjong Kyo Retsuden (NGM-004 ~ NGH-004)", MACHINE_SUPPORTS_SAVE ) // does not support mahjong panel in MVS mode +GAME( 1990, mahretsu, neogeo, neogeo_mj, mjneogeo, neogeo_state, neogeo, ROT0, "SNK", "Mahjong Kyo Retsuden (NGM-004 ~ NGH-004)", MACHINE_SUPPORTS_SAVE ) // does not support mahjong panel in MVS mode <- it actually works fine??? GAME( 1990, ridhero, neogeo, neobase, neogeo, neogeo_state, neogeo, ROT0, "SNK", "Riding Hero (NGM-006 ~ NGH-006)", MACHINE_SUPPORTS_SAVE ) GAME( 1990, ridheroh, ridhero, neobase, neogeo, neogeo_state, neogeo, ROT0, "SNK", "Riding Hero (set 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1991, alpham2, neogeo, neobase, neogeo, neogeo_state, neogeo, ROT0, "SNK", "Alpha Mission II / ASO II - Last Guardian (NGM-007 ~ NGH-007)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/ngen.cpp b/src/mame/drivers/ngen.cpp index 63778115301..0d2dbac5add 100644 --- a/src/mame/drivers/ngen.cpp +++ b/src/mame/drivers/ngen.cpp @@ -283,32 +283,32 @@ WRITE16_MEMBER(ngen_state::peripheral_w) case 0x0d: case 0x0e: case 0x0f: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) m_dmac->write(space,offset,data & 0xff); break; case 0x80: // DMA page offset? case 0x81: case 0x82: case 0x83: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) m_dma_offset[offset-0x80] = data & 0xff; break; case 0xc0: // X-Bus modules reset m_xbus_current = 0; break; case 0x10c: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) m_pic->write(space,0,data & 0xff); break; case 0x10d: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) m_pic->write(space,1,data & 0xff); break; case 0x110: case 0x111: case 0x112: case 0x113: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) m_pit->write(space,offset-0x110,data & 0xff); break; case 0x141: @@ -316,19 +316,19 @@ WRITE16_MEMBER(ngen_state::peripheral_w) COMBINE_DATA(&m_periph141); break; case 0x144: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) m_crtc->address_w(space,0,data & 0xff); break; case 0x145: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) m_crtc->register_w(space,0,data & 0xff); break; case 0x146: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) m_viduart->data_w(space,0,data & 0xff); break; case 0x147: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) m_viduart->control_w(space,0,data & 0xff); break; case 0x1a0: // serial? @@ -360,7 +360,7 @@ READ16_MEMBER(ngen_state::peripheral_r) case 0x0d: case 0x0e: case 0x0f: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) ret = m_dmac->read(space,offset); logerror("DMA read offset %04x mask %04x returning %04x\n",offset,mem_mask,ret); break; @@ -368,42 +368,42 @@ READ16_MEMBER(ngen_state::peripheral_r) case 0x81: case 0x82: case 0x83: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) ret = m_dma_offset[offset-0x80] & 0xff; break; case 0x10c: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) ret = m_pic->read(space,0); break; case 0x10d: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) ret = m_pic->read(space,1); break; case 0x110: case 0x111: case 0x112: case 0x113: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) ret = m_pit->read(space,offset-0x110); break; case 0x141: ret = m_periph141; break; case 0x144: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) ret = m_crtc->status_r(space,0); break; case 0x145: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) ret = m_crtc->register_r(space,0); break; case 0x146: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) ret = m_viduart->data_r(space,0); break; case 0x147: // keyboard UART // expects bit 0 to be set (UART transmit ready) - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) ret = m_viduart->status_r(space,0); break; case 0x1a0: // I/O control register? @@ -478,11 +478,11 @@ WRITE16_MEMBER(ngen_state::hfd_w) case 0x00: case 0x01: case 0x02: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) m_fdc->write(space,offset,data & 0xff); break; case 0x03: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) { m_fdc->write(space,offset,data & 0xff); m_fdc_timer->write_clk0(1); @@ -490,22 +490,22 @@ WRITE16_MEMBER(ngen_state::hfd_w) } break; case 0x04: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) fdc_control_w(space,0,data & 0xff); break; case 0x05: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) hdc_control_w(space,0,data & 0xff); break; case 0x07: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) disk_addr_ext(space,0,data & 0xff); break; case 0x08: case 0x09: case 0x0a: case 0x0b: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) m_fdc_timer->write(space,offset-0x08,data & 0xff); break; case 0x10: @@ -516,7 +516,7 @@ WRITE16_MEMBER(ngen_state::hfd_w) case 0x15: case 0x16: case 0x17: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) m_hdc->write(space,offset-0x10,data & 0xff); logerror("WD1010 register %i write %02x mask %04x\n",offset-0x10,data & 0xff,mem_mask); break; @@ -524,7 +524,7 @@ WRITE16_MEMBER(ngen_state::hfd_w) case 0x19: case 0x1a: case 0x1b: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) m_hdc_timer->write(space,offset-0x18,data & 0xff); break; } @@ -539,11 +539,11 @@ READ16_MEMBER(ngen_state::hfd_r) case 0x00: case 0x01: case 0x02: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) ret = m_fdc->read(space,offset); break; case 0x03: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) { ret = m_fdc->read(space,offset); m_fdc_timer->write_clk0(1); @@ -554,7 +554,7 @@ READ16_MEMBER(ngen_state::hfd_r) case 0x09: case 0x0a: case 0x0b: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) ret = m_fdc_timer->read(space,offset-0x08); break; case 0x10: @@ -565,7 +565,7 @@ READ16_MEMBER(ngen_state::hfd_r) case 0x15: case 0x16: case 0x17: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) ret = m_hdc->read(space,offset-0x10); logerror("WD1010 register %i read, mask %04x\n",offset-0x10,mem_mask); break; @@ -573,7 +573,7 @@ READ16_MEMBER(ngen_state::hfd_r) case 0x19: case 0x1a: case 0x1b: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) ret = m_hdc_timer->read(space,offset-0x18); break; } @@ -769,12 +769,12 @@ READ16_MEMBER( ngen_state::b38_keyboard_r ) switch(offset) { case 0: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) ret = m_viduart->data_r(space,0); break; case 1: // keyboard UART // expects bit 0 to be set (UART transmit ready) - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) ret = m_viduart->status_r(space,0); break; } @@ -786,11 +786,11 @@ WRITE16_MEMBER( ngen_state::b38_keyboard_w ) switch(offset) { case 0: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) m_viduart->data_w(space,0,data & 0xff); break; case 1: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) m_viduart->control_w(space,0,data & 0xff); break; } @@ -802,11 +802,11 @@ READ16_MEMBER( ngen_state::b38_crtc_r ) switch(offset) { case 0: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) ret = m_crtc->register_r(space,0); break; case 1: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) ret = m_viduart->data_r(space,0); break; } @@ -818,11 +818,11 @@ WRITE16_MEMBER( ngen_state::b38_crtc_w ) switch(offset) { case 0: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) m_crtc->address_w(space,0,data & 0xff); break; case 1: - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) m_crtc->register_w(space,0,data & 0xff); break; } diff --git a/src/mame/drivers/pc6001.cpp b/src/mame/drivers/pc6001.cpp index 9abf639ea1d..0b8aa5e782c 100644 --- a/src/mame/drivers/pc6001.cpp +++ b/src/mame/drivers/pc6001.cpp @@ -155,9 +155,7 @@ public: m_io_mode4_dsw(*this, "MODE4_DSW"), m_io_p1(*this, "P1"), m_io_p2(*this, "P2"), - m_io_key1(*this, "key1"), - m_io_key2(*this, "key2"), - m_io_key3(*this, "key3"), + m_io_keys(*this, {"key1", "key2", "key3"}), m_io_key_modifiers(*this, "key_modifiers"), m_bank1(*this, "bank1"), m_bank2(*this, "bank2"), @@ -278,9 +276,7 @@ protected: required_ioport m_io_mode4_dsw; required_ioport m_io_p1; required_ioport m_io_p2; - required_ioport m_io_key1; - required_ioport m_io_key2; - required_ioport m_io_key3; + required_ioport_array<3> m_io_keys; required_ioport m_io_key_modifiers; required_memory_bank m_bank1; optional_memory_bank m_bank2; @@ -1903,7 +1899,6 @@ READ8_MEMBER(pc6001_state::pc6001_8255_portc_r) UINT8 pc6001_state::check_keyboard_press() { - ioport_port *ports[3] = { m_io_key1, m_io_key2, m_io_key3 }; int i,port_i,scancode; UINT8 shift_pressed,caps_lock; scancode = 0; @@ -1915,7 +1910,7 @@ UINT8 pc6001_state::check_keyboard_press() { for(i=0;i<32;i++) { - if((ports[port_i]->read()>>i) & 1) + if((m_io_keys[port_i]->read()>>i) & 1) { if((shift_pressed != caps_lock) && scancode >= 0x41 && scancode <= 0x5f) scancode+=0x20; @@ -1948,7 +1943,7 @@ UINT8 pc6001_state::check_joy_press() { UINT8 p1_key = m_io_p1->read() ^ 0xff; UINT8 shift_key = m_io_key_modifiers->read() & 0x02; - UINT8 space_key = m_io_key2->read() & 0x01; + UINT8 space_key = m_io_keys[1]->read() & 0x01; UINT8 joy_press; /* @@ -2027,9 +2022,9 @@ TIMER_DEVICE_CALLBACK_MEMBER(pc6001_state::cassette_callback) TIMER_DEVICE_CALLBACK_MEMBER(pc6001_state::keyboard_callback) { - UINT32 key1 = m_io_key1->read(); - UINT32 key2 = m_io_key2->read(); - UINT32 key3 = m_io_key3->read(); + UINT32 key1 = m_io_keys[0]->read(); + UINT32 key2 = m_io_keys[1]->read(); + UINT32 key3 = m_io_keys[2]->read(); // UINT8 p1_key = m_io_p1->read(); if(m_cas_switch == 0) diff --git a/src/mame/drivers/pcxt.cpp b/src/mame/drivers/pcxt.cpp index 9805d1c7179..92b1dcf8ea9 100644 --- a/src/mame/drivers/pcxt.cpp +++ b/src/mame/drivers/pcxt.cpp @@ -101,7 +101,7 @@ public: // construction/destruction isa8_cga_filetto_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; const device_type ISA8_CGA_FILETTO = &device_creator; @@ -120,7 +120,7 @@ ROM_START( filetto_cga ) ROM_LOAD("u67.bin", 0x0000, 0x2000, CRC(09710122) SHA1(de84bdd9245df287bbd3bb808f0c3531d13a3545) ) ROM_END -const rom_entry *isa8_cga_filetto_device::device_rom_region() const +const tiny_rom_entry *isa8_cga_filetto_device::device_rom_region() const { return ROM_NAME( filetto_cga ); } @@ -135,7 +135,7 @@ public: virtual UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) override; virtual void device_start() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_READ8_MEMBER(bg_bank_r); DECLARE_WRITE8_MEMBER(bg_bank_w); @@ -228,7 +228,7 @@ ROM_START( tetriskr_cga ) ROM_LOAD( "b-9.u43", 0x70000, 0x10000, CRC(4ea22349) SHA1(14dfd3dbd51f8bd6f3290293b8ea1c165e8cf7fd)) ROM_END -const rom_entry *isa8_cga_tetriskr_device::device_rom_region() const +const tiny_rom_entry *isa8_cga_tetriskr_device::device_rom_region() const { return ROM_NAME( tetriskr_cga ); } diff --git a/src/mame/drivers/peplus.cpp b/src/mame/drivers/peplus.cpp index da136b1e0d4..07ef7eb4c8b 100644 --- a/src/mame/drivers/peplus.cpp +++ b/src/mame/drivers/peplus.cpp @@ -227,6 +227,14 @@ public: m_screen(*this, "screen"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), + m_in0(*this, "IN0"), + m_door(*this, "DOOR"), + m_sensor(*this, "SENSOR"), + m_dbv(*this, "DBV"), + m_bc(*this, "BC"), + m_bp(*this, "BP"), + m_touch_x(*this, "TOUCH_X"), + m_touch_y(*this, "TOUCH_Y"), m_cmos_ram(*this, "cmos"), m_program_ram(*this, "prograram"), m_s3000_ram(*this, "s3000_ram"), @@ -247,6 +255,15 @@ public: required_device m_gfxdecode; required_device m_palette; + optional_ioport m_in0; + optional_ioport m_door; + optional_ioport m_sensor; + optional_ioport m_dbv; + optional_ioport m_bc; + optional_ioport m_bp; + optional_ioport m_touch_x; + optional_ioport m_touch_y; + required_shared_ptr m_cmos_ram; required_shared_ptr m_program_ram; required_shared_ptr m_s3000_ram; @@ -406,8 +423,8 @@ void peplus_state::device_timer(emu_timer &timer, device_timer_id id, int param, void peplus_state::handle_lightpen() { - int x_val = read_safe(ioport("TOUCH_X"), 0x00); - int y_val = read_safe(ioport("TOUCH_Y"), 0x00); + int x_val = m_touch_x.read_safe(0x00); + int y_val = m_touch_y.read_safe(0x00); const rectangle &vis_area = m_screen->visible_area(); int xt, yt; @@ -581,14 +598,14 @@ 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 && ((read_safe(ioport("DBV"), 0xff) & 0x01) == 0x00)) { + if (m_bv_enable_state == 0x01 && ((m_dbv.read_safe(0xff) & 0x01) == 0x00)) { // If not busy if (m_bv_busy == 0) { m_bv_busy = 1; // Fetch Current Denomination and Protocol - m_bv_denomination = ioport("BC")->read(); - m_bv_protocol = ioport("BP")->read(); + m_bv_denomination = m_bc->read(); + m_bv_protocol = m_bp->read(); if (m_bv_protocol == 0) { // ID-022 @@ -775,9 +792,9 @@ READ8_MEMBER(peplus_state::peplus_input0_r) } if (m_bv_pulse == 1) { - return (0x70 || ioport("IN0")->read()); // Add Bill Validator Credit Pulse + return (0x70 || m_in0->read()); // Add Bill Validator Credit Pulse } else { - return ioport("IN0")->read(); + return m_in0->read(); } } @@ -804,7 +821,7 @@ READ8_MEMBER(peplus_state::peplus_input_bank_a_r) sda = m_i2cmem->read_sda(); } - if ((read_safe(ioport("SENSOR"), 0x00) & 0x01) == 0x01 && m_coin_state == 0) { + if ((m_sensor.read_safe(0x00) & 0x01) == 0x01 && m_coin_state == 0) { m_coin_state = 1; // Start Coin Cycle m_last_cycles = m_maincpu->total_cycles(); } else { @@ -840,7 +857,7 @@ READ8_MEMBER(peplus_state::peplus_input_bank_a_r) } if (curr_cycles - m_last_door > door_wait) { - if ((read_safe(ioport("DOOR"), 0xff) & 0x01) == 0x01) { + if ((m_door.read_safe(0xff) & 0x01) == 0x01) { if (m_doorcycle) { m_door_open = (m_door_open ^ 0x01) & 0x01; } else { diff --git a/src/mame/drivers/play_1.cpp b/src/mame/drivers/play_1.cpp index 1f4b934c249..1095d67e464 100644 --- a/src/mame/drivers/play_1.cpp +++ b/src/mame/drivers/play_1.cpp @@ -1,44 +1,173 @@ // license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic +// copyright-holders:Miodrag Milanovic, Robbbert /********************************************************************************* - Pinball - Playmatic MPU 1 +PINBALL +Playmatic MPU 1 + +Status: +- Main board is emulated and appears to be working (currently in attract mode) +- Displays to add +- Switches, lamps, solenoids to add +- Sound board to emulate +- Mechanical sounds to add **********************************************************************************/ -#include "emu.h" +#include "machine/genpin.h" #include "cpu/cosmac/cosmac.h" +#include "machine/clock.h" class play_1_state : public driver_device { public: play_1_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu") + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") { } -protected: - - // devices - required_device m_maincpu; - - // driver_device overrides - virtual void machine_reset() override; -public: DECLARE_DRIVER_INIT(play_1); + DECLARE_READ8_MEMBER(port00_r); + DECLARE_READ8_MEMBER(port01_r); + DECLARE_READ8_MEMBER(port06_r); + DECLARE_READ8_MEMBER(port07_r); + DECLARE_WRITE8_MEMBER(port01_w); + DECLARE_WRITE8_MEMBER(port02_w); + DECLARE_WRITE8_MEMBER(port03_w); + DECLARE_WRITE8_MEMBER(port04_w); + DECLARE_WRITE8_MEMBER(port05_w); + DECLARE_WRITE8_MEMBER(port06_w); + DECLARE_WRITE8_MEMBER(port07_w); + DECLARE_READ_LINE_MEMBER(clear_r); + DECLARE_READ_LINE_MEMBER(ef2_r); + DECLARE_READ_LINE_MEMBER(ef3_r); + DECLARE_READ_LINE_MEMBER(ef4_r); + DECLARE_WRITE_LINE_MEMBER(clock_w); + +private: + UINT16 m_resetcnt; + virtual void machine_reset() override; + required_device m_maincpu; }; static ADDRESS_MAP_START( play_1_map, AS_PROGRAM, 8, play_1_state ) - AM_RANGE(0x0000, 0xffff) AM_NOP + ADDRESS_MAP_GLOBAL_MASK(0xfff) + AM_RANGE(0x0000, 0x07ff) AM_ROM + AM_RANGE(0x0800, 0x081f) AM_RAM + AM_RANGE(0x0c00, 0x0c1f) AM_RAM +ADDRESS_MAP_END + +static ADDRESS_MAP_START( chance_map, AS_PROGRAM, 8, play_1_state ) + ADDRESS_MAP_GLOBAL_MASK(0xfff) + AM_RANGE(0x0000, 0x0bff) AM_ROM + AM_RANGE(0x0c00, 0x0c1f) AM_RAM + AM_RANGE(0x0e00, 0x0e1f) AM_RAM +ADDRESS_MAP_END + +static ADDRESS_MAP_START( play_1_io, AS_IO, 8, play_1_state ) + AM_RANGE(0x00, 0x00) AM_READ(port00_r) + AM_RANGE(0x01, 0x01) AM_READWRITE(port01_r,port01_w) //segments + AM_RANGE(0x02, 0x02) AM_WRITE(port02_w) // N1-8 + AM_RANGE(0x03, 0x03) AM_WRITE(port03_w) // D1-4 + AM_RANGE(0x04, 0x04) AM_WRITE(port04_w) // U1-8 + AM_RANGE(0x05, 0x05) AM_WRITE(port05_w) // V1-8 + AM_RANGE(0x06, 0x06) AM_READWRITE(port06_r,port06_w) // W1-8, input selector + AM_RANGE(0x07, 0x07) AM_READ(port07_r) // another input selector ADDRESS_MAP_END static INPUT_PORTS_START( play_1 ) + PORT_START("DSW0") + PORT_DIPNAME(0x01, 0x01, DEF_STR( Coinage ) ) // this is something else, don't know what yet + PORT_DIPSETTING ( 0x00, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING ( 0x01, DEF_STR( 1C_1C ) ) + PORT_DIPNAME(0x02, 0x00, "Balls") + PORT_DIPSETTING ( 0x00, "3" ) + PORT_DIPSETTING ( 0x02, "5" ) + PORT_DIPNAME(0x04, 0x00, "Special award") + PORT_DIPSETTING ( 0x00, "Free game" ) + PORT_DIPSETTING ( 0x04, "Extra ball" ) + // rotary switches for credits per coin INPUT_PORTS_END void play_1_state::machine_reset() { + m_resetcnt = 0; +} + +READ8_MEMBER( play_1_state::port00_r ) +{ + return 0; +} + +READ8_MEMBER( play_1_state::port01_r ) +{ + return 0; +} + +READ8_MEMBER( play_1_state::port06_r ) +{ + return 0xff; // Big Town etc check this at boot +} + +READ8_MEMBER( play_1_state::port07_r ) +{ + return 0; +} + +WRITE8_MEMBER( play_1_state::port01_w ) +{ +} + +WRITE8_MEMBER( play_1_state::port02_w ) +{ +} + +WRITE8_MEMBER( play_1_state::port03_w ) +{ +} + +WRITE8_MEMBER( play_1_state::port04_w ) +{ +} + +WRITE8_MEMBER( play_1_state::port05_w ) +{ +} + +WRITE8_MEMBER( play_1_state::port06_w ) +{ +} + +READ_LINE_MEMBER( play_1_state::clear_r ) +{ + // A hack to make the machine reset itself on boot + if (m_resetcnt < 0xffff) + m_resetcnt++; + return (m_resetcnt == 0xff00) ? 0 : 1; +} + +READ_LINE_MEMBER( play_1_state::ef2_r ) +{ + return BIT(ioport("DSW0")->read(), 0); // 1 or 3 games dip (1=1 game) +} + +READ_LINE_MEMBER( play_1_state::ef3_r ) +{ + return BIT(ioport("DSW0")->read(), 1); // 3 or 5 balls dip (1=5 balls) +} + +READ_LINE_MEMBER( play_1_state::ef4_r ) +{ + return BIT(ioport("DSW0")->read(), 2); // extra ball or game dip (1=extra ball) +} + +WRITE_LINE_MEMBER( play_1_state::clock_w ) +{ + m_maincpu->int_w(1); + m_maincpu->int_w(0); // INT is a pulse-line + m_maincpu->ef1_w(state); + // also, state and !state go to display panel } DRIVER_INIT_MEMBER(play_1_state,play_1) @@ -49,6 +178,23 @@ static MACHINE_CONFIG_START( play_1, play_1_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", CDP1802, 400000) MCFG_CPU_PROGRAM_MAP(play_1_map) + MCFG_CPU_IO_MAP(play_1_io) + MCFG_COSMAC_WAIT_CALLBACK(VCC) + MCFG_COSMAC_CLEAR_CALLBACK(READLINE(play_1_state, clear_r)) + MCFG_COSMAC_EF2_CALLBACK(READLINE(play_1_state, ef2_r)) + MCFG_COSMAC_EF3_CALLBACK(READLINE(play_1_state, ef3_r)) + MCFG_COSMAC_EF4_CALLBACK(READLINE(play_1_state, ef4_r)) + + MCFG_DEVICE_ADD("xpoint", CLOCK, 60) // crossing-point detector + MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(play_1_state, clock_w)) + + /* Sound */ + MCFG_FRAGMENT_ADD( genpin_audio ) +MACHINE_CONFIG_END + +static MACHINE_CONFIG_DERIVED( chance, play_1 ) + MCFG_CPU_MODIFY("maincpu") + MCFG_CPU_PROGRAM_MAP(chance_map) MACHINE_CONFIG_END /*------------------------------------------------------------------- @@ -100,7 +246,7 @@ ROM_END /* Big Town, Last Lap and Party all reportedly share the same roms with different playfield/machine artworks */ GAME(1978, bigtown, 0, play_1, play_1, play_1_state, play_1, ROT0, "Playmatic", "Big Town", MACHINE_IS_SKELETON_MECHANICAL) -GAME(1978, chance, 0, play_1, play_1, play_1_state, play_1, ROT0, "Playmatic", "Chance", MACHINE_IS_SKELETON_MECHANICAL) +GAME(1978, chance, 0, chance, play_1, play_1_state, play_1, ROT0, "Playmatic", "Chance", MACHINE_IS_SKELETON_MECHANICAL) GAME(1978, lastlap, 0, play_1, play_1, play_1_state, play_1, ROT0, "Playmatic", "Last Lap", MACHINE_IS_SKELETON_MECHANICAL) -GAME(1978, spcgambl, 0, play_1, play_1, play_1_state, play_1, ROT0, "Playmatic", "Space Gambler", MACHINE_IS_SKELETON_MECHANICAL) +GAME(1978, spcgambl, 0, play_1, play_1, play_1_state, play_1, ROT0, "Playmatic", "Space Gambler", MACHINE_IS_SKELETON_MECHANICAL) GAME(1979, party, 0, play_1, play_1, play_1_state, play_1, ROT0, "Playmatic", "Party", MACHINE_IS_SKELETON_MECHANICAL) diff --git a/src/mame/drivers/play_2.cpp b/src/mame/drivers/play_2.cpp index d9130b783ac..4a386b6cc6f 100644 --- a/src/mame/drivers/play_2.cpp +++ b/src/mame/drivers/play_2.cpp @@ -1,51 +1,194 @@ // license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/* - Playmatic MPU 2 -*/ +// copyright-holders:Miodrag Milanovic, Robbbert +/********************************************************************************** + +PINBALL +Playmatic MPU 2 + +Status: +- Main board is emulated and working (currently runs the initial test mode) +- Displays to add +- Switches, lamps, solenoids to add +- Sound board to emulate +- Mechanical sounds to add + +***********************************************************************************/ -#include "emu.h" +#include "machine/genpin.h" #include "cpu/cosmac/cosmac.h" +#include "machine/clock.h" +#include "machine/7474.h" class play_2_state : public driver_device { public: play_2_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu") + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_4013a(*this, "4013a") + , m_4013b(*this, "4013b") { } -protected: - - // devices - required_device m_maincpu; - - // driver_device overrides - virtual void machine_reset() override; -public: DECLARE_DRIVER_INIT(play_2); + DECLARE_WRITE8_MEMBER(port01_w); + DECLARE_WRITE8_MEMBER(port02_w); + DECLARE_WRITE8_MEMBER(port03_w); + DECLARE_READ8_MEMBER(port04_r); + DECLARE_READ8_MEMBER(port05_r); + DECLARE_WRITE8_MEMBER(port06_w); + DECLARE_WRITE8_MEMBER(port07_w); + DECLARE_READ_LINE_MEMBER(clear_r); + DECLARE_READ_LINE_MEMBER(ef1_r); + DECLARE_READ_LINE_MEMBER(ef4_r); + DECLARE_WRITE_LINE_MEMBER(q4013a_w); + DECLARE_WRITE_LINE_MEMBER(clock_w); + DECLARE_WRITE_LINE_MEMBER(clock2_w); + +private: + UINT16 m_clockcnt; + UINT16 m_resetcnt; + virtual void machine_reset() override; + required_device m_maincpu; + required_device m_4013a; + required_device m_4013b; }; + static ADDRESS_MAP_START( play_2_map, AS_PROGRAM, 8, play_2_state ) - AM_RANGE(0x0000, 0xffff) AM_NOP + AM_RANGE(0x0000, 0x1fff) AM_ROM + AM_RANGE(0x2000, 0x20ff) AM_RAM AM_SHARE("nvram") // pair of 5101, battery-backed ADDRESS_MAP_END +static ADDRESS_MAP_START( play_2_io, AS_IO, 8, play_2_state ) + AM_RANGE(0x01, 0x01) AM_WRITE(port01_w) // digits + AM_RANGE(0x02, 0x02) AM_WRITE(port02_w) + AM_RANGE(0x03, 0x03) AM_WRITE(port03_w) + AM_RANGE(0x04, 0x04) AM_READ(port04_r) + AM_RANGE(0x05, 0x05) AM_READ(port05_r) + AM_RANGE(0x06, 0x06) AM_WRITE(port06_w) // segments + AM_RANGE(0x07, 0x07) AM_WRITE(port07_w) +ADDRESS_MAP_END + + static INPUT_PORTS_START( play_2 ) INPUT_PORTS_END void play_2_state::machine_reset() { + m_clockcnt = 0; + m_resetcnt = 0; + m_4013b->d_w(1); } -DRIVER_INIT_MEMBER(play_2_state,play_2) +WRITE8_MEMBER( play_2_state::port01_w ) { } +WRITE8_MEMBER( play_2_state::port02_w ) +{ +} + +WRITE8_MEMBER( play_2_state::port03_w ) +{ +} + +READ8_MEMBER( play_2_state::port04_r ) +{ + return 0xff; +} + +READ8_MEMBER( play_2_state::port05_r ) +{ + return 0xff; +} + +WRITE8_MEMBER( play_2_state::port06_w ) +{ +} + +WRITE8_MEMBER( play_2_state::port07_w ) +{ + m_4013b->clear_w(0); + m_4013b->clear_w(1); +} + +READ_LINE_MEMBER( play_2_state::clear_r ) +{ + // A hack to make the machine reset itself on boot + if (m_resetcnt < 0xffff) + m_resetcnt++; + return (m_resetcnt == 0xff00) ? 0 : 1; +} + +READ_LINE_MEMBER( play_2_state::ef1_r ) +{ + return BIT(m_clockcnt, 10); +} + +READ_LINE_MEMBER( play_2_state::ef4_r ) +{ + return 1; // test button +} + +DRIVER_INIT_MEMBER( play_2_state, play_2 ) +{ +} + +WRITE_LINE_MEMBER( play_2_state::clock_w ) +{ + m_4013a->clock_w(state); + + if (!state) + { + m_clockcnt++; + // simulate 4020 chip + if ((m_clockcnt & 0x3ff) == 0) + m_4013b->preset_w(BIT(m_clockcnt, 10)); // Q10 output + } +} + +WRITE_LINE_MEMBER( play_2_state::clock2_w ) +{ + m_4013b->clock_w(state); + m_maincpu->ef3_w(!state); +} + +WRITE_LINE_MEMBER( play_2_state::q4013a_w ) +{ + m_clockcnt = 0; +} + static MACHINE_CONFIG_START( play_2, play_2_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", CDP1802, 2950000) MCFG_CPU_PROGRAM_MAP(play_2_map) + MCFG_CPU_IO_MAP(play_2_io) + MCFG_COSMAC_WAIT_CALLBACK(VCC) + MCFG_COSMAC_CLEAR_CALLBACK(READLINE(play_2_state, clear_r)) + MCFG_COSMAC_EF1_CALLBACK(READLINE(play_2_state, ef1_r)) + MCFG_COSMAC_EF4_CALLBACK(READLINE(play_2_state, ef4_r)) + MCFG_COSMAC_Q_CALLBACK(DEVWRITELINE("4013a", ttl7474_device, clear_w)) + + MCFG_NVRAM_ADD_0FILL("nvram") + + MCFG_DEVICE_ADD("tpb_clock", CLOCK, 2950000 / 8) // TPB line from CPU + MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(play_2_state, clock_w)) + + MCFG_DEVICE_ADD("xpoint", CLOCK, 60) // crossing-point detector + MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(play_2_state, clock2_w)) + + // This is actually a 4013 chip (has 2 RS flipflops) + MCFG_DEVICE_ADD("4013a", TTL7474, 0) + MCFG_7474_COMP_OUTPUT_CB(DEVWRITELINE("4013a", ttl7474_device, d_w)) + MCFG_7474_OUTPUT_CB(WRITELINE(play_2_state, q4013a_w)) + + MCFG_DEVICE_ADD("4013b", TTL7474, 0) + MCFG_7474_OUTPUT_CB(DEVWRITELINE("maincpu", cosmac_device, ef2_w)) + MCFG_7474_COMP_OUTPUT_CB(DEVWRITELINE("maincpu", cosmac_device, int_w)) MCFG_DEVCB_INVERT // int is reversed in mame + + /* Sound */ + MCFG_FRAGMENT_ADD( genpin_audio ) MACHINE_CONFIG_END /*------------------------------------------------------------------- @@ -53,42 +196,18 @@ MACHINE_CONFIG_END /-------------------------------------------------------------------*/ ROM_START(antar) ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("antar08.bin", 0x0000, 0x0400, CRC(f6207f77) SHA1(f68ce967c6189457bd0ce8638e9c477f16e65763)) - ROM_RELOAD(0x4000, 0x0400) - ROM_RELOAD(0x8000, 0x0400) - ROM_RELOAD(0xc000, 0x0400) - ROM_LOAD("antar09.bin", 0x0400, 0x0400, CRC(2c954f1a) SHA1(fa83a5f1c269ea28d4eeff181f493cbb4dc9bc47)) - ROM_RELOAD(0x4400, 0x0400) - ROM_RELOAD(0x8400, 0x0400) - ROM_RELOAD(0xc400, 0x0400) - ROM_LOAD("antar10.bin", 0x0800, 0x0400, CRC(a6ce5667) SHA1(85ecd4fce94dc419e4c210262f867310b0889cd3)) - ROM_RELOAD(0x4800, 0x0400) - ROM_RELOAD(0x8800, 0x0400) - ROM_RELOAD(0xc800, 0x0400) - ROM_LOAD("antar11.bin", 0x0c00, 0x0400, CRC(6474b17f) SHA1(e4325ceff820393b06eb2e8e4a85412b0d01a385)) - ROM_RELOAD(0x4c00, 0x0400) - ROM_RELOAD(0x8c00, 0x0400) - ROM_RELOAD(0xcc00, 0x0400) + ROM_LOAD("antar08.bin", 0x0000, 0x0400, CRC(f6207f77) SHA1(f68ce967c6189457bd0ce8638e9c477f16e65763)) + ROM_LOAD("antar09.bin", 0x0400, 0x0400, CRC(2c954f1a) SHA1(fa83a5f1c269ea28d4eeff181f493cbb4dc9bc47)) + ROM_LOAD("antar10.bin", 0x0800, 0x0400, CRC(a6ce5667) SHA1(85ecd4fce94dc419e4c210262f867310b0889cd3)) + ROM_LOAD("antar11.bin", 0x0c00, 0x0400, CRC(6474b17f) SHA1(e4325ceff820393b06eb2e8e4a85412b0d01a385)) ROM_END ROM_START(antar2) ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("antar08.bin", 0x0000, 0x0400, CRC(f6207f77) SHA1(f68ce967c6189457bd0ce8638e9c477f16e65763)) - ROM_RELOAD(0x4000, 0x0400) - ROM_RELOAD(0x8000, 0x0400) - ROM_RELOAD(0xc000, 0x0400) - ROM_LOAD("antar09.bin", 0x0400, 0x0400, CRC(2c954f1a) SHA1(fa83a5f1c269ea28d4eeff181f493cbb4dc9bc47)) - ROM_RELOAD(0x4400, 0x0400) - ROM_RELOAD(0x8400, 0x0400) - ROM_RELOAD(0xc400, 0x0400) + ROM_LOAD("antar08.bin", 0x0000, 0x0400, CRC(f6207f77) SHA1(f68ce967c6189457bd0ce8638e9c477f16e65763)) + ROM_LOAD("antar09.bin", 0x0400, 0x0400, CRC(2c954f1a) SHA1(fa83a5f1c269ea28d4eeff181f493cbb4dc9bc47)) ROM_LOAD("antar10a.bin", 0x0800, 0x0400, CRC(520eb401) SHA1(1d5e3f829a7e7f38c7c519c488e6b7e1a4d34321)) - ROM_RELOAD(0x4800, 0x0400) - ROM_RELOAD(0x8800, 0x0400) - ROM_RELOAD(0xc800, 0x0400) ROM_LOAD("antar11a.bin", 0x0c00, 0x0400, CRC(17ad38bf) SHA1(e2c9472ed8fbe9d5965a5c79515a1b7ea9edaa79)) - ROM_RELOAD(0x4c00, 0x0400) - ROM_RELOAD(0x8c00, 0x0400) - ROM_RELOAD(0xcc00, 0x0400) ROM_END @@ -97,22 +216,10 @@ ROM_END /-------------------------------------------------------------------*/ ROM_START(evlfight) ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("evfg08.bin", 0x0000, 0x0400, CRC(2cc2e79a) SHA1(17440512c419b3bb2012539666a5f052f3cd8c1d)) - ROM_RELOAD(0x4000, 0x0400) - ROM_RELOAD(0x8000, 0x0400) - ROM_RELOAD(0xc000, 0x0400) - ROM_LOAD("evfg09.bin", 0x0400, 0x0400, CRC(5232dc4c) SHA1(6f95a578e9f09688e6ce8b0a622bcee887936c82)) - ROM_RELOAD(0x4400, 0x0400) - ROM_RELOAD(0x8400, 0x0400) - ROM_RELOAD(0xc400, 0x0400) - ROM_LOAD("evfg10.bin", 0x0800, 0x0400, CRC(de2f754d) SHA1(0287a9975095bcbf03ddb2b374ff25c080c8020f)) - ROM_RELOAD(0x4800, 0x0400) - ROM_RELOAD(0x8800, 0x0400) - ROM_RELOAD(0xc800, 0x0400) - ROM_LOAD("evfg11.bin", 0x0c00, 0x0400, CRC(5eb8ac02) SHA1(31c80e74a4272becf7014aa96eaf7de555e26cd6)) - ROM_RELOAD(0x4c00, 0x0400) - ROM_RELOAD(0x8c00, 0x0400) - ROM_RELOAD(0xcc00, 0x0400) + ROM_LOAD("evfg08.bin", 0x0000, 0x0400, CRC(2cc2e79a) SHA1(17440512c419b3bb2012539666a5f052f3cd8c1d)) + ROM_LOAD("evfg09.bin", 0x0400, 0x0400, CRC(5232dc4c) SHA1(6f95a578e9f09688e6ce8b0a622bcee887936c82)) + ROM_LOAD("evfg10.bin", 0x0800, 0x0400, CRC(de2f754d) SHA1(0287a9975095bcbf03ddb2b374ff25c080c8020f)) + ROM_LOAD("evfg11.bin", 0x0c00, 0x0400, CRC(5eb8ac02) SHA1(31c80e74a4272becf7014aa96eaf7de555e26cd6)) ROM_END /*------------------------------------------------------------------- @@ -120,27 +227,13 @@ ROM_END /-------------------------------------------------------------------*/ ROM_START(madrace) ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("madrace.2a0", 0x0000, 0x0800, CRC(ab487c79) SHA1(a5df29b2af4c9d94d8bf54c5c91d1e9b5ca4d065)) - ROM_RELOAD(0x4000, 0x0800) - ROM_RELOAD(0x8000, 0x0800) - ROM_RELOAD(0xc000, 0x0800) - ROM_LOAD("madrace.2b0", 0x0800, 0x0800, CRC(dcb54b39) SHA1(8e2ca7180f5ea3a28feb34b01f3387b523dbfa3b)) - ROM_RELOAD(0x4800, 0x0800) - ROM_RELOAD(0x8800, 0x0800) - ROM_RELOAD(0xc800, 0x0800) - ROM_LOAD("madrace.2c0", 0x1000, 0x0800, CRC(b24ea245) SHA1(3f868ccbc4bfb77c40c4cc05dcd8eeca85ecd76f)) - ROM_RELOAD(0x5000, 0x0800) - ROM_RELOAD(0x9000, 0x0800) - ROM_RELOAD(0xd000, 0x0800) - ROM_REGION(0x10000, "cpu2", 0) + ROM_LOAD("madrace.2a0", 0x0000, 0x0800, CRC(ab487c79) SHA1(a5df29b2af4c9d94d8bf54c5c91d1e9b5ca4d065)) + ROM_LOAD("madrace.2b0", 0x0800, 0x0800, CRC(dcb54b39) SHA1(8e2ca7180f5ea3a28feb34b01f3387b523dbfa3b)) + ROM_LOAD("madrace.2c0", 0x1000, 0x0800, CRC(b24ea245) SHA1(3f868ccbc4bfb77c40c4cc05dcd8eeca85ecd76f)) + + ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("madrace1.snd", 0x0000, 0x2000, CRC(49e956a5) SHA1(8790cc27a0fda7b8e07bee65109874140b4018a2)) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) ROM_LOAD("madrace2.snd", 0x2000, 0x0800, CRC(c19283d3) SHA1(42f9770c46030ef20a80cc94fdbe6548772aa525)) - ROM_RELOAD(0x6000, 0x0800) - ROM_RELOAD(0xa000, 0x0800) - ROM_RELOAD(0xe000, 0x0800) ROM_END @@ -149,22 +242,10 @@ ROM_END /-------------------------------------------------------------------*/ ROM_START(attack) ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("attack8.bin", 0x0000, 0x0400, CRC(a5204b58) SHA1(afb4b81720f8d56e88f47fc842b23313824a1085)) - ROM_RELOAD(0x4000, 0x0400) - ROM_RELOAD(0x8000, 0x0400) - ROM_RELOAD(0xc000, 0x0400) - ROM_LOAD("attack9.bin", 0x0400, 0x0400, CRC(bbd086b4) SHA1(6fc94b94beea482d8c8f5b3c69d3f218e2b2dfc4)) - ROM_RELOAD(0x4400, 0x0400) - ROM_RELOAD(0x8400, 0x0400) - ROM_RELOAD(0xc400, 0x0400) + ROM_LOAD("attack8.bin", 0x0000, 0x0400, CRC(a5204b58) SHA1(afb4b81720f8d56e88f47fc842b23313824a1085)) + ROM_LOAD("attack9.bin", 0x0400, 0x0400, CRC(bbd086b4) SHA1(6fc94b94beea482d8c8f5b3c69d3f218e2b2dfc4)) ROM_LOAD("attack10.bin", 0x0800, 0x0400, CRC(764925e4) SHA1(2f207ef87786d27d0d856c5816a570a59d89b718)) - ROM_RELOAD(0x4800, 0x0400) - ROM_RELOAD(0x8800, 0x0400) - ROM_RELOAD(0xc800, 0x0400) ROM_LOAD("attack11.bin", 0x0c00, 0x0400, CRC(972157b4) SHA1(23c90f23a34b34acfe445496a133b6022a749ccc)) - ROM_RELOAD(0x4c00, 0x0400) - ROM_RELOAD(0x8c00, 0x0400) - ROM_RELOAD(0xcc00, 0x0400) ROM_END /*------------------------------------------------------------------- @@ -172,22 +253,10 @@ ROM_END /-------------------------------------------------------------------*/ ROM_START(blkfever) ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("blackf8.bin", 0x0000, 0x0400, CRC(916b8ed8) SHA1(ddc7e09b68e3e1a033af5dc5ec32ab5b0922a833)) - ROM_RELOAD(0x4000, 0x0400) - ROM_RELOAD(0x8000, 0x0400) - ROM_RELOAD(0xc000, 0x0400) - ROM_LOAD("blackf9.bin", 0x0400, 0x0400, CRC(ecb72fdc) SHA1(d3598031b7170fab39727b3402b7053d4f9e1ca7)) - ROM_RELOAD(0x4400, 0x0400) - ROM_RELOAD(0x8400, 0x0400) - ROM_RELOAD(0xc400, 0x0400) + ROM_LOAD("blackf8.bin", 0x0000, 0x0400, CRC(916b8ed8) SHA1(ddc7e09b68e3e1a033af5dc5ec32ab5b0922a833)) + ROM_LOAD("blackf9.bin", 0x0400, 0x0400, CRC(ecb72fdc) SHA1(d3598031b7170fab39727b3402b7053d4f9e1ca7)) ROM_LOAD("blackf10.bin", 0x0800, 0x0400, CRC(b3fae788) SHA1(e14e09cc7da1098abf2f60f26a8ec507e123ff7c)) - ROM_RELOAD(0x4800, 0x0400) - ROM_RELOAD(0x8800, 0x0400) - ROM_RELOAD(0xc800, 0x0400) ROM_LOAD("blackf11.bin", 0x0c00, 0x0400, CRC(5a97c1b4) SHA1(b9d7eb0dd55ef6d959c0fab48f710e4b1c8d8003)) - ROM_RELOAD(0x4c00, 0x0400) - ROM_RELOAD(0x8c00, 0x0400) - ROM_RELOAD(0xcc00, 0x0400) ROM_END /*------------------------------------------------------------------- @@ -195,16 +264,11 @@ ROM_END /-------------------------------------------------------------------*/ ROM_START(zira) ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("zira_u8.bin", 0x0000, 0x0800, CRC(53f8bf17) SHA1(5eb74f27bc65374a85dd44bbc8f6142488c226a2)) - ROM_RELOAD(0x4000, 0x0800) - ROM_RELOAD(0x8000, 0x0800) - ROM_RELOAD(0xc000, 0x0800) - ROM_LOAD("zira_u9.bin", 0x0800, 0x0800, CRC(d50a2419) SHA1(81b157f579a433389506817b1b6e02afaa2cf0d5)) - ROM_RELOAD(0x4800, 0x0800) - ROM_RELOAD(0x8800, 0x0800) - ROM_RELOAD(0xc800, 0x0800) - ROM_REGION(0x10000, "cpu2", 0) - ROM_LOAD("zira.snd", 0x0000, 0x0400, NO_DUMP) + ROM_LOAD("zira_u8.bin", 0x0000, 0x0800, CRC(53f8bf17) SHA1(5eb74f27bc65374a85dd44bbc8f6142488c226a2)) + ROM_LOAD("zira_u9.bin", 0x0800, 0x0800, CRC(d50a2419) SHA1(81b157f579a433389506817b1b6e02afaa2cf0d5)) + + ROM_REGION(0x10000, "audiocpu", 0) + ROM_LOAD("zira.snd", 0x0000, 0x0400, NO_DUMP) ROM_END /*------------------------------------------------------------------- @@ -212,26 +276,12 @@ ROM_END /-------------------------------------------------------------------*/ ROM_START(cerberup) ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("cerb8.cpu", 0x0000, 0x0800, CRC(021d0452) SHA1(496010e6892311b1cabcdac62296cd6aa0782c5d)) - ROM_RELOAD(0x4000, 0x0800) - ROM_RELOAD(0x8000, 0x0800) - ROM_RELOAD(0xc000, 0x0800) - ROM_LOAD("cerb9.cpu", 0x0800, 0x0800, CRC(0fd41156) SHA1(95d1bf42c82f480825e3d907ae3c87b5f994fd2a)) - ROM_RELOAD(0x4800, 0x0800) - ROM_RELOAD(0x8800, 0x0800) - ROM_RELOAD(0xc800, 0x0800) - ROM_LOAD("cerb10.cpu", 0x1000, 0x0800, CRC(785602e0) SHA1(f38df3156cd14ab21752dbc849c654802079eb33)) - ROM_RELOAD(0x5000, 0x0800) - ROM_RELOAD(0x9000, 0x0800) - ROM_RELOAD(0xd000, 0x0800) - ROM_REGION(0x10000, "cpu2", 0) - ROM_LOAD("cerb.snd", 0x0000, 0x2000, CRC(8af53a23) SHA1(a80b57576a1eb1b4544b718b9abba100531e3942)) - ROM_RELOAD(0x2000, 0x2000) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x6000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xa000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) + ROM_LOAD("cerb8.cpu", 0x0000, 0x0800, CRC(021d0452) SHA1(496010e6892311b1cabcdac62296cd6aa0782c5d)) + ROM_LOAD("cerb9.cpu", 0x0800, 0x0800, CRC(0fd41156) SHA1(95d1bf42c82f480825e3d907ae3c87b5f994fd2a)) + ROM_LOAD("cerb10.cpu", 0x1000, 0x0800, CRC(785602e0) SHA1(f38df3156cd14ab21752dbc849c654802079eb33)) + + ROM_REGION(0x10000, "audiocpu", 0) + ROM_LOAD("cerb.snd", 0x0000, 0x2000, CRC(8af53a23) SHA1(a80b57576a1eb1b4544b718b9abba100531e3942)) ROM_END // ??/84 Nautilus diff --git a/src/mame/drivers/play_3.cpp b/src/mame/drivers/play_3.cpp index ac95103507e..83c4b7c82ac 100644 --- a/src/mame/drivers/play_3.cpp +++ b/src/mame/drivers/play_3.cpp @@ -1,55 +1,195 @@ // license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic +// copyright-holders:Miodrag Milanovic, Robbbert /********************************************************************************** - Pinball - Playmatic MPU 3 +PINBALL +Playmatic MPU 3 + +Status: +- Main board is emulated and working (currently runs the initial test mode) +- Displays to add +- Switches, lamps, solenoids to add +- Sound board to emulate +- Mechanical sounds to add ***********************************************************************************/ -#include "emu.h" +#include "machine/genpin.h" #include "cpu/cosmac/cosmac.h" +#include "machine/clock.h" +#include "machine/7474.h" class play_3_state : public driver_device { public: play_3_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu") + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_4013a(*this, "4013a") + , m_4013b(*this, "4013b") { } -protected: - - // devices - required_device m_maincpu; - - // driver_device overrides - virtual void machine_reset() override; -public: DECLARE_DRIVER_INIT(play_3); + DECLARE_WRITE8_MEMBER(port01_w); + DECLARE_WRITE8_MEMBER(port02_w); + DECLARE_WRITE8_MEMBER(port03_w); + DECLARE_READ8_MEMBER(port04_r); + DECLARE_READ8_MEMBER(port05_r); + DECLARE_WRITE8_MEMBER(port06_w); + DECLARE_WRITE8_MEMBER(port07_w); + DECLARE_READ_LINE_MEMBER(clear_r); + DECLARE_READ_LINE_MEMBER(ef1_r); + DECLARE_READ_LINE_MEMBER(ef4_r); + DECLARE_WRITE_LINE_MEMBER(q4013a_w); + DECLARE_WRITE_LINE_MEMBER(clock_w); + DECLARE_WRITE_LINE_MEMBER(clock2_w); + +private: + UINT16 m_clockcnt; + UINT16 m_resetcnt; + virtual void machine_reset() override; + required_device m_maincpu; + required_device m_4013a; + required_device m_4013b; }; static ADDRESS_MAP_START( play_3_map, AS_PROGRAM, 8, play_3_state ) - AM_RANGE(0x0000, 0xffff) AM_NOP + AM_RANGE(0x0000, 0x1fff) AM_MIRROR(0x4000) AM_ROM // 2x 2732 + //AM_RANGE(0x3000, 0x30ff) AM_MIRROR(0x4f00) AM_ROM // undumped PAL + AM_RANGE(0x8000, 0x80ff) AM_MIRROR(0x7f00) AM_RAM AM_SHARE("nvram") // pair of 5101, battery-backed ADDRESS_MAP_END +static ADDRESS_MAP_START( play_3_io, AS_IO, 8, play_3_state ) + AM_RANGE(0x01, 0x01) AM_WRITE(port01_w) // digits + AM_RANGE(0x02, 0x02) AM_WRITE(port02_w) + AM_RANGE(0x03, 0x03) AM_WRITE(port03_w) + AM_RANGE(0x04, 0x04) AM_READ(port04_r) + AM_RANGE(0x05, 0x05) AM_READ(port05_r) + AM_RANGE(0x06, 0x06) AM_WRITE(port06_w) // segments + AM_RANGE(0x07, 0x07) AM_WRITE(port07_w) +ADDRESS_MAP_END + + static INPUT_PORTS_START( play_3 ) INPUT_PORTS_END void play_3_state::machine_reset() { + m_clockcnt = 0; + m_resetcnt = 0; + m_4013b->d_w(1); } -DRIVER_INIT_MEMBER(play_3_state,play_3) +WRITE8_MEMBER( play_3_state::port01_w ) { } +WRITE8_MEMBER( play_3_state::port02_w ) +{ +} + +WRITE8_MEMBER( play_3_state::port03_w ) +{ +} + +READ8_MEMBER( play_3_state::port04_r ) +{ + return 0xff; +} + +READ8_MEMBER( play_3_state::port05_r ) +{ + return 0xff; +} + +WRITE8_MEMBER( play_3_state::port06_w ) +{ +} + +WRITE8_MEMBER( play_3_state::port07_w ) +{ + m_4013b->clear_w(0); + m_4013b->clear_w(1); +} + +READ_LINE_MEMBER( play_3_state::clear_r ) +{ + // A hack to make the machine reset itself on boot + if (m_resetcnt < 0xffff) + m_resetcnt++; + return (m_resetcnt == 0xff00) ? 0 : 1; +} + +READ_LINE_MEMBER( play_3_state::ef1_r ) +{ + return BIT(m_clockcnt, 10); +} + +READ_LINE_MEMBER( play_3_state::ef4_r ) +{ + return 1; // reset button +} + +DRIVER_INIT_MEMBER( play_3_state, play_3 ) +{ +} + +WRITE_LINE_MEMBER( play_3_state::clock_w ) +{ + m_4013a->clock_w(state); + + if (!state) + { + m_clockcnt++; + // simulate 4020 chip + if ((m_clockcnt & 0x3ff) == 0) + m_4013b->preset_w(BIT(m_clockcnt, 10)); // Q10 output + } +} + +WRITE_LINE_MEMBER( play_3_state::clock2_w ) +{ + m_4013b->clock_w(state); + m_maincpu->ef3_w(!state); +} + +WRITE_LINE_MEMBER( play_3_state::q4013a_w ) +{ + m_clockcnt = 0; +} + static MACHINE_CONFIG_START( play_3, play_3_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", CDP1802, 2950000) MCFG_CPU_PROGRAM_MAP(play_3_map) + MCFG_CPU_IO_MAP(play_3_io) + MCFG_COSMAC_WAIT_CALLBACK(VCC) + MCFG_COSMAC_CLEAR_CALLBACK(READLINE(play_3_state, clear_r)) + MCFG_COSMAC_EF1_CALLBACK(READLINE(play_3_state, ef1_r)) + MCFG_COSMAC_EF4_CALLBACK(READLINE(play_3_state, ef4_r)) + MCFG_COSMAC_Q_CALLBACK(DEVWRITELINE("4013a", ttl7474_device, clear_w)) + + MCFG_NVRAM_ADD_0FILL("nvram") + + MCFG_DEVICE_ADD("tpb_clock", CLOCK, 2950000 / 8) // TPB line from CPU + MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(play_3_state, clock_w)) + + MCFG_DEVICE_ADD("xpoint", CLOCK, 60) // crossing-point detector + MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(play_3_state, clock2_w)) + + // This is actually a 4013 chip (has 2 RS flipflops) + MCFG_DEVICE_ADD("4013a", TTL7474, 0) + MCFG_7474_COMP_OUTPUT_CB(DEVWRITELINE("4013a", ttl7474_device, d_w)) + MCFG_7474_OUTPUT_CB(WRITELINE(play_3_state, q4013a_w)) + + MCFG_DEVICE_ADD("4013b", TTL7474, 0) + MCFG_7474_OUTPUT_CB(DEVWRITELINE("maincpu", cosmac_device, ef2_w)) + MCFG_7474_COMP_OUTPUT_CB(DEVWRITELINE("maincpu", cosmac_device, int_w)) MCFG_DEVCB_INVERT // int is reversed in mame + + /* Sound */ + MCFG_FRAGMENT_ADD( genpin_audio ) MACHINE_CONFIG_END /*------------------------------------------------------------------- @@ -59,41 +199,21 @@ MACHINE_CONFIG_END ROM_START(megaaton) ROM_REGION(0x10000, "maincpu", 0) ROM_LOAD("cpumegat.bin", 0x0000, 0x2000, CRC(7e7a4ede) SHA1(3194b367cbbf6e0cb2629cd5d82ddee6fe36985a)) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) - ROM_REGION(0x10000, "cpu2", 0) + ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("smogot.bin", 0x0000, 0x2000, CRC(fefc3ab2) SHA1(e748d9b443a69fcdd587f22c87d41818b6c0e436)) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) ROM_LOAD("smegat.bin", 0x2000, 0x1000, CRC(910ab7fe) SHA1(0ddfd15c9c25f43b8fcfc4e11bc8ea180f6bd761)) - ROM_RELOAD(0x6000, 0x1000) - ROM_RELOAD(0xa000, 0x1000) - ROM_RELOAD(0xe000, 0x1000) ROM_END ROM_START(megaatona) ROM_REGION(0x10000, "maincpu", 0) ROM_LOAD("mega_u12.bin", 0x0000, 0x1000, CRC(65761b02) SHA1(dd9586eaf70698ef7a80ce1be293322f64829aea)) - ROM_RELOAD(0x4000, 0x1000) - ROM_RELOAD(0x8000, 0x1000) - ROM_RELOAD(0xc000, 0x1000) ROM_LOAD("mega_u11.bin", 0x1000, 0x1000, CRC(513f3683) SHA1(0f080a33426df1ffdb14e9b2e6382304e201e335)) - ROM_RELOAD(0x5000, 0x1000) - ROM_RELOAD(0x9000, 0x1000) - ROM_RELOAD(0xd000, 0x1000) - ROM_REGION(0x10000, "cpu2", 0) + + ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("smogot.bin", 0x0000, 0x2000, CRC(fefc3ab2) SHA1(e748d9b443a69fcdd587f22c87d41818b6c0e436)) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) ROM_LOAD("smegat.bin", 0x2000, 0x1000, CRC(910ab7fe) SHA1(0ddfd15c9c25f43b8fcfc4e11bc8ea180f6bd761)) - ROM_RELOAD(0x6000, 0x1000) - ROM_RELOAD(0xa000, 0x1000) - ROM_RELOAD(0xe000, 0x1000) ROM_END -GAME(1983, megaaton, 0, play_3, play_3, play_3_state, play_3, ROT0, "Playmatic", "Meg-Aaton", MACHINE_IS_SKELETON_MECHANICAL) +GAME(1983, megaaton, 0, play_3, play_3, play_3_state, play_3, ROT0, "Playmatic", "Meg-Aaton", MACHINE_IS_SKELETON_MECHANICAL) GAME(1983, megaatona, megaaton, play_3, play_3, play_3_state, play_3, ROT0, "Playmatic", "Meg-Aaton (alternate set)", MACHINE_IS_SKELETON_MECHANICAL) diff --git a/src/mame/drivers/play_5.cpp b/src/mame/drivers/play_5.cpp index 09edd089fe3..cef4e7dd4c7 100644 --- a/src/mame/drivers/play_5.cpp +++ b/src/mame/drivers/play_5.cpp @@ -1,52 +1,198 @@ // license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/* - Playmatic MPU 5 -*/ +// copyright-holders:Miodrag Milanovic, Robbbert +/********************************************************************************** + +PINBALL +Playmatic MPU 5 + +Status: +- Main board is emulated and working (currently runs the initial test mode) +- Displays to add +- Switches, lamps, solenoids to add +- Sound board to emulate +- Mechanical sounds to add + +(note to self: MPU3 and MPU5 appear at first glance to be identical apart from +cpu clock. MPU2 also appears to be identical to MPU3 apart from the RAM address. +If the sound cards are sufficiently similar, we should be able to merge all 3.) + +***********************************************************************************/ -#include "emu.h" +#include "machine/genpin.h" #include "cpu/cosmac/cosmac.h" +#include "machine/clock.h" +#include "machine/7474.h" class play_5_state : public driver_device { public: play_5_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu") + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_4013a(*this, "4013a") + , m_4013b(*this, "4013b") { } -protected: - - // devices - required_device m_maincpu; - - // driver_device overrides - virtual void machine_reset() override; -public: DECLARE_DRIVER_INIT(play_5); + DECLARE_WRITE8_MEMBER(port01_w); + DECLARE_WRITE8_MEMBER(port02_w); + DECLARE_WRITE8_MEMBER(port03_w); + DECLARE_READ8_MEMBER(port04_r); + DECLARE_READ8_MEMBER(port05_r); + DECLARE_WRITE8_MEMBER(port06_w); + DECLARE_WRITE8_MEMBER(port07_w); + DECLARE_READ_LINE_MEMBER(clear_r); + DECLARE_READ_LINE_MEMBER(ef1_r); + DECLARE_READ_LINE_MEMBER(ef4_r); + DECLARE_WRITE_LINE_MEMBER(q4013a_w); + DECLARE_WRITE_LINE_MEMBER(clock_w); + DECLARE_WRITE_LINE_MEMBER(clock2_w); + +private: + UINT16 m_clockcnt; + UINT16 m_resetcnt; + virtual void machine_reset() override; + required_device m_maincpu; + required_device m_4013a; + required_device m_4013b; }; static ADDRESS_MAP_START( play_5_map, AS_PROGRAM, 8, play_5_state ) - AM_RANGE(0x0000, 0xffff) AM_NOP + AM_RANGE(0x0000, 0x3fff) AM_ROM + AM_RANGE(0x8000, 0x80ff) AM_RAM AM_SHARE("nvram") // pair of 5101, battery-backed ADDRESS_MAP_END +static ADDRESS_MAP_START( play_5_io, AS_IO, 8, play_5_state ) + AM_RANGE(0x01, 0x01) AM_WRITE(port01_w) // digits + AM_RANGE(0x02, 0x02) AM_WRITE(port02_w) + AM_RANGE(0x03, 0x03) AM_WRITE(port03_w) + AM_RANGE(0x04, 0x04) AM_READ(port04_r) + AM_RANGE(0x05, 0x05) AM_READ(port05_r) + AM_RANGE(0x06, 0x06) AM_WRITE(port06_w) // segments + AM_RANGE(0x07, 0x07) AM_WRITE(port07_w) +ADDRESS_MAP_END + + static INPUT_PORTS_START( play_5 ) INPUT_PORTS_END void play_5_state::machine_reset() { + m_clockcnt = 0; + m_resetcnt = 0; + m_4013b->d_w(1); } -DRIVER_INIT_MEMBER(play_5_state,play_5) +WRITE8_MEMBER( play_5_state::port01_w ) { } +WRITE8_MEMBER( play_5_state::port02_w ) +{ +} + +WRITE8_MEMBER( play_5_state::port03_w ) +{ +} + +READ8_MEMBER( play_5_state::port04_r ) +{ + return 0xff; +} + +READ8_MEMBER( play_5_state::port05_r ) +{ + return 0xff; +} + +WRITE8_MEMBER( play_5_state::port06_w ) +{ +} + +WRITE8_MEMBER( play_5_state::port07_w ) +{ + m_4013b->clear_w(0); + m_4013b->clear_w(1); +} + +READ_LINE_MEMBER( play_5_state::clear_r ) +{ + // A hack to make the machine reset itself on boot + if (m_resetcnt < 0xffff) + m_resetcnt++; + return (m_resetcnt == 0xff00) ? 0 : 1; +} + +READ_LINE_MEMBER( play_5_state::ef1_r ) +{ + return BIT(m_clockcnt, 10); +} + +READ_LINE_MEMBER( play_5_state::ef4_r ) +{ + return 1; // reset button +} + +DRIVER_INIT_MEMBER( play_5_state, play_5 ) +{ +} + +WRITE_LINE_MEMBER( play_5_state::clock_w ) +{ + m_4013a->clock_w(state); + + if (!state) + { + m_clockcnt++; + // simulate 4020 chip + if ((m_clockcnt & 0x3ff) == 0) + m_4013b->preset_w(BIT(m_clockcnt, 10)); // Q10 output + } +} + +WRITE_LINE_MEMBER( play_5_state::clock2_w ) +{ + m_4013b->clock_w(state); + m_maincpu->ef3_w(!state); +} + +WRITE_LINE_MEMBER( play_5_state::q4013a_w ) +{ + m_clockcnt = 0; +} + static MACHINE_CONFIG_START( play_5, play_5_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", CDP1802, 2950000) + MCFG_CPU_ADD("maincpu", CDP1802, XTAL_3_579545MHz) MCFG_CPU_PROGRAM_MAP(play_5_map) + MCFG_CPU_IO_MAP(play_5_io) + MCFG_COSMAC_WAIT_CALLBACK(VCC) + MCFG_COSMAC_CLEAR_CALLBACK(READLINE(play_5_state, clear_r)) + MCFG_COSMAC_EF1_CALLBACK(READLINE(play_5_state, ef1_r)) + MCFG_COSMAC_EF4_CALLBACK(READLINE(play_5_state, ef4_r)) + MCFG_COSMAC_Q_CALLBACK(DEVWRITELINE("4013a", ttl7474_device, clear_w)) + + MCFG_NVRAM_ADD_0FILL("nvram") + + MCFG_DEVICE_ADD("tpb_clock", CLOCK, XTAL_3_579545MHz / 8) // TPB line from CPU + MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(play_5_state, clock_w)) + + MCFG_DEVICE_ADD("xpoint", CLOCK, 60) // crossing-point detector + MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(play_5_state, clock2_w)) + + // This is actually a 4013 chip (has 2 RS flipflops) + MCFG_DEVICE_ADD("4013a", TTL7474, 0) + MCFG_7474_COMP_OUTPUT_CB(DEVWRITELINE("4013a", ttl7474_device, d_w)) + MCFG_7474_OUTPUT_CB(WRITELINE(play_5_state, q4013a_w)) + + MCFG_DEVICE_ADD("4013b", TTL7474, 0) + MCFG_7474_OUTPUT_CB(DEVWRITELINE("maincpu", cosmac_device, ef2_w)) + MCFG_7474_COMP_OUTPUT_CB(DEVWRITELINE("maincpu", cosmac_device, int_w)) MCFG_DEVCB_INVERT // int is reversed in mame + + /* Sound */ + MCFG_FRAGMENT_ADD( genpin_audio ) MACHINE_CONFIG_END /*------------------------------------------------------------------- @@ -55,18 +201,10 @@ MACHINE_CONFIG_END ROM_START(kz26) ROM_REGION(0x10000, "maincpu", 0) ROM_LOAD("kz26.cpu", 0x0000, 0x2000, CRC(8030a699) SHA1(4f86b325801d8ce16011f7b6ba2f3633e2f2af35)) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) - ROM_REGION(0x10000, "cpu2", 0) + + ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("sound1.su3", 0x0000, 0x2000, CRC(8ad1a804) SHA1(6177619f09af4302ffddd8c0c1b374dab7f47e91)) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) ROM_LOAD("sound2.su4", 0x2000, 0x0800, CRC(355dc9ad) SHA1(eac8bc27157afd908f9bc5b5a7c40be5b9427269)) - ROM_RELOAD(0x6000, 0x0800) - ROM_RELOAD(0xa000, 0x0800) - ROM_RELOAD(0xe000, 0x0800) ROM_END /*------------------------------------------------------------------- @@ -75,21 +213,10 @@ ROM_END ROM_START(spain82) ROM_REGION(0x10000, "maincpu", 0) ROM_LOAD("spaic12.bin", 0x0000, 0x1000, CRC(cd37ecdc) SHA1(ff2d406b6ac150daef868121e5857a956aabf005)) - ROM_RELOAD(0x4000, 0x1000) - ROM_RELOAD(0x8000, 0x1000) - ROM_RELOAD(0xc000, 0x1000) ROM_LOAD("spaic11.bin", 0x1000, 0x0800, CRC(c86c0801) SHA1(1b52539538dae883f9c8fe5bc6454f9224780d11)) - ROM_RELOAD(0x5000, 0x0800) - ROM_RELOAD(0x9000, 0x0800) - ROM_RELOAD(0xd000, 0x0800) - ROM_REGION(0x10000, "cpu2", 0) + + ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("spasnd.bin", 0x0000, 0x2000, CRC(62412e2e) SHA1(9e48dc3295e78e1024f726906be6e8c3fe3e61b1)) - ROM_RELOAD(0x2000, 0x2000) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x6000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xa000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) ROM_END /*------------------------------------------------------------------- @@ -98,17 +225,9 @@ ROM_END ROM_START(nautilus) ROM_REGION(0x10000, "maincpu", 0) ROM_LOAD("nautilus.rom", 0x0000, 0x2000, CRC(197e5492) SHA1(0f83fc2e742fd0cca0bd162add4bef68c6620067)) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) - ROM_REGION(0x10000, "cpu2", 0) + + ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("nautilus.snd", 0x0000, 0x2000, CRC(413d110f) SHA1(8360f652296c46339a70861efb34c41e92b25d0e)) - ROM_RELOAD(0x2000, 0x2000) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x6000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xa000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) ROM_END /*------------------------------------------------------------------- @@ -117,17 +236,9 @@ ROM_END ROM_START(theraid) ROM_REGION(0x10000, "maincpu", 0) ROM_LOAD("theraid.rom", 0x0000, 0x2000, CRC(97aa1489) SHA1(6b691b287138cc78cfc1010f380ff8c66342c39b)) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) - ROM_REGION(0x10000, "cpu2", 0) + + ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("theraid.snd", 0x0000, 0x2000, CRC(e33f8363) SHA1(e7f251c334b15e12b1eb7e079c2e9a5f64338052)) - ROM_RELOAD(0x2000, 0x2000) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x6000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xa000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) ROM_END /*------------------------------------------------------------------- @@ -136,18 +247,10 @@ ROM_END ROM_START(ufo_x) ROM_REGION(0x10000, "maincpu", 0) ROM_LOAD("ufoxcpu.rom", 0x0000, 0x2000, CRC(cf0f7c52) SHA1(ce52da05b310ac84bdd57609e21b0401ee3a2564)) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) - ROM_REGION(0x10000, "cpu2", 0) + + ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("ufoxu3.rom", 0x0000, 0x2000, CRC(6ebd8ee1) SHA1(83522b76a755556fd38d7b292273b4c68bfc0ddf)) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) ROM_LOAD("ufoxu4.rom", 0x2000, 0x0800, CRC(aa54ede6) SHA1(7dd7e2852d42aa0f971936dbb84c7708727ce0e7)) - ROM_RELOAD(0x6000, 0x0800) - ROM_RELOAD(0xa000, 0x0800) - ROM_RELOAD(0xe000, 0x0800) ROM_END /*------------------------------------------------------------------- @@ -156,17 +259,9 @@ ROM_END ROM_START(rock2500) ROM_REGION(0x10000, "maincpu", 0) ROM_LOAD("r2500cpu.rom", 0x0000, 0x2000, CRC(9c07e373) SHA1(5bd4e69d11e69fdb911a6e65b3d0a7192075abc8)) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) - ROM_REGION(0x10000, "cpu2", 0) + + ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("r2500snd.rom", 0x0000, 0x2000, CRC(24fbaeae) SHA1(20ff35ed689291f321e483287a977c02e84d4524)) - ROM_RELOAD(0x2000, 0x2000) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x6000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xa000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) ROM_END /*------------------------------------------------------------------- @@ -175,35 +270,19 @@ ROM_END ROM_START(starfirp) ROM_REGION(0x10000, "maincpu", 0) ROM_LOAD("starfcpu.rom", 0x0000, 0x2000, CRC(450ddf20) SHA1(c63c4e3833ffc1f69fcec39bafecae9c80befb2a)) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) - ROM_REGION(0x10000, "cpu2", 0) + + ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("starfu3.rom", 0x0000, 0x2000, CRC(5d602d80) SHA1(19d21adbcbd0067c051f3033468eda8c5af57be1)) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) ROM_LOAD("starfu4.rom", 0x2000, 0x0800, CRC(9af8be9a) SHA1(da6db3716db73baf8e1493aba91d4d85c5d613b4)) - ROM_RELOAD(0x6000, 0x0800) - ROM_RELOAD(0xa000, 0x0800) - ROM_RELOAD(0xe000, 0x0800) ROM_END ROM_START(starfirpa) ROM_REGION(0x10000, "maincpu", 0) ROM_LOAD("starcpua.rom", 0x0000, 0x2000, CRC(29bac350) SHA1(ab3e3ea4881be954f7fa7278800ffd791c4581da)) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) - ROM_REGION(0x10000, "cpu2", 0) + + ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("starfu3.rom", 0x0000, 0x2000, CRC(5d602d80) SHA1(19d21adbcbd0067c051f3033468eda8c5af57be1)) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) ROM_LOAD("starfu4.rom", 0x2000, 0x0800, CRC(9af8be9a) SHA1(da6db3716db73baf8e1493aba91d4d85c5d613b4)) - ROM_RELOAD(0x6000, 0x0800) - ROM_RELOAD(0xa000, 0x0800) - ROM_RELOAD(0xe000, 0x0800) ROM_END /*------------------------------------------------------------------- @@ -212,22 +291,11 @@ ROM_END ROM_START(fldragon) ROM_REGION(0x10000, "maincpu", 0) ROM_LOAD("fldrcpu1.rom", 0x0000, 0x2000, CRC(e513ded0) SHA1(64ed3dcff53311fb93bd50d105a4c1186043fdd7)) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) - ROM_LOAD("fldrcpu2.rom", 0x2000, 0x2000, CRC(6ff2b276) SHA1(040b614f0b0587521ef5550b5587b94a7f3f178b)) - ROM_RELOAD(0x6000, 0x2000) - ROM_RELOAD(0xa000, 0x2000) - ROM_RELOAD(0xe000, 0x2000) - ROM_REGION(0x10000, "cpu2", 0) + ROM_LOAD("fldraudiocpu.rom", 0x2000, 0x2000, CRC(6ff2b276) SHA1(040b614f0b0587521ef5550b5587b94a7f3f178b)) + + ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("fdsndu3.rom", 0x0000, 0x2000, NO_DUMP) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) ROM_LOAD("fdsndu4.rom", 0x2000, 0x0800, NO_DUMP) - ROM_RELOAD(0x6000, 0x0800) - ROM_RELOAD(0xa000, 0x0800) - ROM_RELOAD(0xe000, 0x0800) ROM_END /*------------------------------------------------------------------- @@ -240,22 +308,11 @@ ROM_END ROM_START(sklflite) ROM_REGION(0x10000, "maincpu", 0) ROM_LOAD("skflcpu1.rom", 0x0000, 0x2000, CRC(8f833b55) SHA1(1729203582c22b51d1cc401aa8f270aa5cdadabe)) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) - ROM_LOAD("skflcpu2.rom", 0x2000, 0x2000, CRC(ffc497aa) SHA1(3e88539ae1688322b9268f502d8ca41cffb28df3)) - ROM_RELOAD(0x6000, 0x2000) - ROM_RELOAD(0xa000, 0x2000) - ROM_RELOAD(0xe000, 0x2000) - ROM_REGION(0x10000, "cpu2", 0) + ROM_LOAD("skflaudiocpu.rom", 0x2000, 0x2000, CRC(ffc497aa) SHA1(3e88539ae1688322b9268f502d8ca41cffb28df3)) + + ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("sfsndu3.rom", 0x0000, 0x2000, NO_DUMP) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) ROM_LOAD("sfsndu4.rom", 0x2000, 0x0800, NO_DUMP) - ROM_RELOAD(0x6000, 0x0800) - ROM_RELOAD(0xa000, 0x0800) - ROM_RELOAD(0xe000, 0x0800) ROM_END /*------------------------------------------------------------------- @@ -268,18 +325,10 @@ ROM_END ROM_START(trailer) ROM_REGION(0x10000, "maincpu", 0) ROM_LOAD("trcpu.rom", 0x0000, 0x2000, CRC(cc81f84d) SHA1(7a3282a47de271fde84cfddbaceb118add0df116)) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) - ROM_REGION(0x10000, "cpu2", 0) + + ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("trsndu3.rom", 0x0000, 0x2000, CRC(05975c29) SHA1(e54d3a5613c3e39fc0338a53dbadc2e91c09ffe3)) - ROM_RELOAD(0x4000, 0x2000) - ROM_RELOAD(0x8000, 0x2000) - ROM_RELOAD(0xc000, 0x2000) ROM_LOAD("trsndu4.rom", 0x2000, 0x0800, CRC(bda2a735) SHA1(134b5abb813ed8bf2eeac0861b4c88c7176582d8)) - ROM_RELOAD(0x6000, 0x0800) - ROM_RELOAD(0xa000, 0x0800) - ROM_RELOAD(0xe000, 0x0800) ROM_END GAME(1982, spain82, 0, play_5, play_5, play_5_state, play_5, ROT0, "Playmatic", "Spain '82", MACHINE_IS_SKELETON_MECHANICAL) diff --git a/src/mame/drivers/plygonet.cpp b/src/mame/drivers/plygonet.cpp index 4feea095396..2082fbb9811 100644 --- a/src/mame/drivers/plygonet.cpp +++ b/src/mame/drivers/plygonet.cpp @@ -236,13 +236,13 @@ WRITE32_MEMBER(polygonet_state::shared_ram_write) } /* write to the current dsp56k word */ - if (mem_mask & 0xffff0000) + if (ACCESSING_BITS_16_31) { m_dsp56k_shared_ram_16[(offset<<1)] = (m_shared_ram[offset] & 0xffff0000) >> 16 ; } /* write to the next dsp56k word */ - if (mem_mask & 0x0000ffff) + if (ACCESSING_BITS_0_15) { m_dsp56k_shared_ram_16[(offset<<1)+1] = (m_shared_ram[offset] & 0x0000ffff) ; } diff --git a/src/mame/drivers/pofo.cpp b/src/mame/drivers/pofo.cpp index c58c0ad7131..57cd2d30ad9 100644 --- a/src/mame/drivers/pofo.cpp +++ b/src/mame/drivers/pofo.cpp @@ -9,20 +9,26 @@ http://www.best-electronics-ca.com/portfoli.htm http://www.atari-portfolio.co.uk/pfnews/pf9.txt + Command line for dual RAM expansion with A: File Manager ROM card and B: RAM card + ./mess64 pofo -exp ram -exp:ram:exp ram2 -cart1 fileman -exp:ram:ccmb ram + */ /* TODO: - - clock is running too fast - - create chargen ROM from tech manual - - memory error interrupt vector + - cursor is missing + - where do CDET and NMD1 connect to ?? - i/o port 8051 - screen contrast - system tick frequency selection (1 or 128 Hz) - - speaker - - credit card memory (A:/B:) + - soft power off + - LCD board + - HD61830A00 + - 5816 2Kx8 RAM + - 27C256 32Kx8 EPROM + - PCD3311T DTMF generator @ 3.578640MHz */ @@ -30,19 +36,35 @@ #include "rendlay.h" #include "softlist.h" #include "cpu/i86/i86.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" +#include "bus/pofo/ccm.h" #include "bus/pofo/exp.h" #include "machine/nvram.h" #include "machine/ram.h" -#include "sound/speaker.h" +#include "sound/pcd3311.h" #include "video/hd61830.h" + + +//************************************************************************** +// MACROS / CONSTANTS +//************************************************************************** + +#define LOG 0 + #define M80C88A_TAG "u1" #define HD61830_TAG "hd61830" +#define PCD3311T_TAG "pcd3311t" #define TIMER_TICK_TAG "tick" #define SCREEN_TAG "screen" +static const UINT8 INTERRUPT_VECTOR[] = { 0x08, 0x09, 0x00 }; + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + class portfolio_state : public driver_device { public: @@ -50,9 +72,12 @@ public: driver_device(mconfig, type, tag), m_maincpu(*this, M80C88A_TAG), m_lcdc(*this, HD61830_TAG), - m_speaker(*this, "speaker"), + m_dtmf(*this, PCD3311T_TAG), + m_ccm(*this, PORTFOLIO_MEMORY_CARD_SLOT_A_TAG), m_exp(*this, PORTFOLIO_EXPANSION_SLOT_TAG), m_timer_tick(*this, TIMER_TICK_TAG), + m_nvram(*this, "nvram"), + m_ram(*this, "ram"), m_rom(*this, M80C88A_TAG), m_char_rom(*this, HD61830_TAG), m_y0(*this, "Y0"), @@ -64,15 +89,17 @@ public: m_y6(*this, "Y6"), m_y7(*this, "Y7"), m_battery(*this, "BATTERY"), - m_contrast(*this, "contrast"), - m_ram(*this, RAM_TAG) + m_keylatch(0xff) { } required_device m_maincpu; required_device m_lcdc; - required_device m_speaker; + required_device m_dtmf; + required_device m_ccm; required_device m_exp; required_device m_timer_tick; + required_device m_nvram; + required_device m_ram; required_region_ptr m_rom; required_region_ptr m_char_rom; required_ioport m_y0; @@ -100,54 +127,51 @@ public: INT_EXTERNAL }; + enum + { + ROM_APP, + CCM_A, + CCM_B, + ROM_EXT + }; + + DECLARE_READ8_MEMBER( mem_r ); + DECLARE_WRITE8_MEMBER( mem_w ); + + DECLARE_READ8_MEMBER( io_r ); + DECLARE_WRITE8_MEMBER( io_w ); + DECLARE_READ8_MEMBER( irq_status_r ); DECLARE_READ8_MEMBER( keyboard_r ); DECLARE_READ8_MEMBER( battery_r ); DECLARE_READ8_MEMBER( counter_r ); DECLARE_WRITE8_MEMBER( irq_mask_w ); - DECLARE_WRITE8_MEMBER( speaker_w ); + DECLARE_WRITE8_MEMBER( dtmf_w ); DECLARE_WRITE8_MEMBER( power_w ); - DECLARE_WRITE8_MEMBER( unknown_w ); + DECLARE_WRITE8_MEMBER( select_w ); DECLARE_WRITE8_MEMBER( counter_w ); + DECLARE_WRITE8_MEMBER( contrast_w ); DECLARE_WRITE_LINE_MEMBER( iint_w ); DECLARE_WRITE_LINE_MEMBER( eint_w ); - /* interrupt state */ - UINT8 m_ip; /* interrupt pending */ - UINT8 m_ie; /* interrupt enable */ - - /* counter state */ + UINT8 m_ip; + UINT8 m_ie; UINT16 m_counter; - - /* keyboard state */ UINT8 m_keylatch; + int m_rom_b; - /* video state */ - required_shared_ptr m_contrast; - - /* peripheral state */ DECLARE_PALETTE_INIT(portfolio); TIMER_DEVICE_CALLBACK_MEMBER(keyboard_tick); TIMER_DEVICE_CALLBACK_MEMBER(system_tick); TIMER_DEVICE_CALLBACK_MEMBER(counter_tick); DECLARE_READ8_MEMBER(hd61830_rd_r); IRQ_CALLBACK_MEMBER(portfolio_int_ack); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( portfolio_cart ); - required_device m_ram; }; -//************************************************************************** -// MACROS / CONSTANTS -//************************************************************************** - -static const UINT8 INTERRUPT_VECTOR[] = { 0x08, 0x09, 0x00 }; - - - //************************************************************************** // INTERRUPTS //************************************************************************** @@ -177,6 +201,29 @@ void portfolio_state::trigger_interrupt(int level) } +//------------------------------------------------- +// iint_w - internal interrupt +//------------------------------------------------- + +WRITE_LINE_MEMBER( portfolio_state::iint_w ) +{ + // TODO +} + + +//------------------------------------------------- +// eint_w - external interrupt +//------------------------------------------------- + +WRITE_LINE_MEMBER( portfolio_state::eint_w ) +{ + if (state) + { + trigger_interrupt(INT_EXTERNAL); + } +} + + //------------------------------------------------- // irq_status_r - interrupt status read //------------------------------------------------- @@ -194,7 +241,8 @@ READ8_MEMBER( portfolio_state::irq_status_r ) WRITE8_MEMBER( portfolio_state::irq_mask_w ) { m_ie = data; - //logerror("IE %02x\n", data); + + if (LOG) logerror("%s %s IE %01x\n", machine().time().as_string(), machine().describe_context(), data); check_interrupt(); } @@ -215,6 +263,8 @@ IRQ_CALLBACK_MEMBER(portfolio_state::portfolio_int_ack) // clear interrupt pending bit m_ip &= ~(1 << i); + if (LOG) logerror("%s %s IP %01x\n", machine().time().as_string(), machine().describe_context(), m_ip); + if (i == 3) vector = m_exp->eack_r(); else @@ -275,7 +325,7 @@ void portfolio_state::scan_keyboard() else { // key released - if (m_keylatch != 0xff) + if (!(m_keylatch & 0x80)) { m_keylatch |= 0x80; @@ -307,33 +357,36 @@ READ8_MEMBER( portfolio_state::keyboard_r ) //************************************************************************** -// INTERNAL SPEAKER +// SOUND //************************************************************************** //------------------------------------------------- -// speaker_w - internal speaker output +// dtmf_w - //------------------------------------------------- -WRITE8_MEMBER( portfolio_state::speaker_w ) +WRITE8_MEMBER( portfolio_state::dtmf_w ) { /* bit description - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 speaker level + 0 PCD3311T D0 + 1 PCD3311T D1 + 2 PCD3311T D2 + 3 PCD3311T D3 + 4 PCD3311T D4 + 5 PCD3311T D5 + 6 PCD3311T STROBE + 7 PCD3311T VDD,MODE,A0 */ - m_speaker->level_w(!BIT(data, 7)); + if (LOG) logerror("%s %s DTMF %02x\n", machine().time().as_string(), machine().describe_context(), data); - //logerror("SPEAKER %02x\n", data); + m_dtmf->mode_w(!BIT(data, 7)); + m_dtmf->a0_w(!BIT(data, 7)); + m_dtmf->write(space, 0, data & 0x3f); + m_dtmf->strobe_w(BIT(data, 6)); } @@ -363,7 +416,12 @@ WRITE8_MEMBER( portfolio_state::power_w ) */ - //logerror("POWER %02x\n", data); + if (LOG) logerror("%s %s POWER %02x\n", machine().time().as_string(), machine().describe_context(), data); + + if (BIT(data, 1)) + { + // TODO power off + } } @@ -377,36 +435,59 @@ READ8_MEMBER( portfolio_state::battery_r ) bit signal description - 0 - 1 - 2 - 3 - 4 + 0 ? 1=boots from B: + 1 ? 1=boots from external ROM + 2 ? 1=boots from B: + 3 ? 1=boots from ??? + 4 ? 5 PDET 1=peripheral connected 6 BATD? 0=battery low - 7 1=cold boot + 7 ? 1=cold boot */ UINT8 data = 0; - /* peripheral detect */ + // peripheral detect data |= m_exp->pdet_r() << 5; - /* battery status */ - data |= BIT(m_battery->read(), 0) << 6; + // battery status + data |= (m_battery->read() & 0x03) << 6; return data; } //------------------------------------------------- -// unknown_w - ? +// select_w - //------------------------------------------------- -WRITE8_MEMBER( portfolio_state::unknown_w ) +WRITE8_MEMBER( portfolio_state::select_w ) { - //logerror("UNKNOWN %02x\n", data); + /* + + bit description + + 0 ? + 1 ? + 2 ? + 3 ? + 4 + 5 + 6 ? + 7 ? + + */ + + if (LOG) logerror("%s %s SELECT %02x\n", machine().time().as_string(), machine().describe_context(), data); + + switch (data & 0x0f) + { + case 3: m_rom_b = CCM_A; break; + case 7: m_rom_b = CCM_B; break; + case 0: m_rom_b = ROM_APP; break; + case 2: m_rom_b = ROM_EXT; break; + } } @@ -421,7 +502,7 @@ WRITE8_MEMBER( portfolio_state::unknown_w ) TIMER_DEVICE_CALLBACK_MEMBER(portfolio_state::system_tick) { - trigger_interrupt(INT_TICK); + //trigger_interrupt(INT_TICK); } @@ -450,7 +531,7 @@ READ8_MEMBER( portfolio_state::counter_r ) break; case 1: - data = m_counter >> 1; + data = m_counter >> 8; break; } @@ -478,6 +559,223 @@ WRITE8_MEMBER( portfolio_state::counter_w ) +//************************************************************************** +// MEMORY MAPPING +//************************************************************************** + +//------------------------------------------------- +// mem_r - +//------------------------------------------------- + +READ8_MEMBER( portfolio_state::mem_r ) +{ + UINT8 data = 0; + + int iom = 0; + int bcom = 1; + int ncc1 = 1; + + if (offset < 0x1f000) + { + data = m_ram->read(offset); + } + else if (offset >= 0xb0000 && offset < 0xc0000) + { + data = m_ram->read(0x1f000 + (offset & 0xfff)); + } + else if (offset >= 0xc0000 && offset < 0xe0000) + { + switch (m_rom_b) + { + case ROM_APP: + data = m_rom[offset & 0x3ffff]; + break; + + case CCM_A: + if (LOG) logerror("%s %s CCM0 read %05x\n", machine().time().as_string(), machine().describe_context(), offset & 0x1ffff); + + data = m_ccm->nrdi_r(space, offset & 0x1ffff); + break; + + case CCM_B: + ncc1 = 0; + break; + + case ROM_EXT: + // TODO + break; + } + } + else if (offset >= 0xe0000) + { + data = m_rom[offset & 0x3ffff]; + } + + data = m_exp->nrdi_r(space, offset, data, iom, bcom, ncc1); + + return data; +} + + +//------------------------------------------------- +// mem_w - +//------------------------------------------------- + +WRITE8_MEMBER( portfolio_state::mem_w ) +{ + int iom = 0; + int bcom = 1; + int ncc1 = 1; + + if (offset < 0x1f000) + { + m_ram->write(offset, data); + } + else if (offset >= 0xb0000 && offset < 0xc0000) + { + m_ram->write(0x1f000 + (offset & 0xfff), data); + } + else if (offset >= 0xc0000 && offset < 0xe0000) + { + switch (m_rom_b) + { + case CCM_A: + if (LOG) logerror("%s %s CCM0 write %05x:%02x\n", machine().time().as_string(), machine().describe_context(), offset & 0x1ffff, data); + + m_ccm->nwri_w(space, offset & 0x1ffff, data); + break; + + case CCM_B: + ncc1 = 0; + break; + } + } + + m_exp->nwri_w(space, offset, data, iom, bcom, ncc1); +} + + +//------------------------------------------------- +// io_r - +//------------------------------------------------- + +READ8_MEMBER( portfolio_state::io_r ) +{ + UINT8 data = 0; + + int iom = 1; + int bcom = 1; + int ncc1 = 0; + + if ((offset & 0xff00) == 0x8000) + { + switch ((offset >> 4) & 0x0f) + { + case 0: + data = keyboard_r(space, 0); + break; + + case 1: + if (offset & 0x01) + { + data = m_lcdc->status_r(space, 0); + } + else + { + data = m_lcdc->data_r(space, 0); + } + break; + + case 4: + data = counter_r(space, offset & 0x01); + break; + + case 5: + if (offset & 0x01) + { + data = battery_r(space, 0); + } + else + { + data = irq_status_r(space, 0); + } + break; + + case 7: + bcom = 0; + break; + } + } + + data = m_exp->nrdi_r(space, offset, data, iom, bcom, ncc1); + + return data; +} + + +//------------------------------------------------- +// io_w - +//------------------------------------------------- + +WRITE8_MEMBER( portfolio_state::io_w ) +{ + int iom = 1; + int bcom = 1; + int ncc1 = 0; + + if ((offset & 0xff00) == 0x8000) + { + switch ((offset >> 4) & 0x0f) + { + case 1: + if (offset & 0x01) + { + m_lcdc->control_w(space, 0, data); + } + else + { + m_lcdc->data_w(space, 0, data); + } + break; + + case 2: + dtmf_w(space, 0, data); + break; + + case 3: + power_w(space, 0, data); + break; + + case 4: + counter_w(space, offset & 0x01, data); + break; + + case 5: + if (offset & 0x01) + { + select_w(space, 0, data); + } + else + { + irq_mask_w(space, 0, data); + } + break; + + case 6: + contrast_w(space, 0, data); + break; + + case 7: + bcom = 0; + break; + } + } + + m_exp->nwri_w(space, offset, data, iom, bcom, ncc1); +} + + + //************************************************************************** // ADDRESS MAPS //************************************************************************** @@ -487,11 +785,7 @@ WRITE8_MEMBER( portfolio_state::counter_w ) //------------------------------------------------- static ADDRESS_MAP_START( portfolio_mem, AS_PROGRAM, 8, portfolio_state ) - AM_RANGE(0x00000, 0x1efff) AM_RAM AM_SHARE("nvram1") - AM_RANGE(0x1f000, 0x9efff) AM_RAM // expansion - AM_RANGE(0xb0000, 0xb0fff) AM_MIRROR(0xf000) AM_RAM AM_SHARE("nvram2") // video RAM - AM_RANGE(0xc0000, 0xdffff) AM_ROM AM_REGION(M80C88A_TAG, 0) // or credit card memory - AM_RANGE(0xe0000, 0xfffff) AM_ROM AM_REGION(M80C88A_TAG, 0x20000) + AM_RANGE(0x00000, 0xfffff) AM_READWRITE(mem_r, mem_w) ADDRESS_MAP_END @@ -500,15 +794,17 @@ ADDRESS_MAP_END //------------------------------------------------- static ADDRESS_MAP_START( portfolio_io, AS_IO, 8, portfolio_state ) - AM_RANGE(0x8000, 0x8000) AM_READ(keyboard_r) - AM_RANGE(0x8010, 0x8010) AM_DEVREADWRITE(HD61830_TAG, hd61830_device, data_r, data_w) - AM_RANGE(0x8011, 0x8011) AM_DEVREADWRITE(HD61830_TAG, hd61830_device, status_r, control_w) - AM_RANGE(0x8020, 0x8020) AM_WRITE(speaker_w) - AM_RANGE(0x8030, 0x8030) AM_WRITE(power_w) - AM_RANGE(0x8040, 0x8041) AM_READWRITE(counter_r, counter_w) - AM_RANGE(0x8050, 0x8050) AM_READWRITE(irq_status_r, irq_mask_w) - AM_RANGE(0x8051, 0x8051) AM_READWRITE(battery_r, unknown_w) - AM_RANGE(0x8060, 0x8060) AM_RAM AM_SHARE("contrast") + AM_RANGE(0x0000, 0xffff) AM_READWRITE(io_r, io_w) +ADDRESS_MAP_END + + +//------------------------------------------------- +// ADDRESS_MAP( portfolio_lcdc ) +//------------------------------------------------- + +static ADDRESS_MAP_START( portfolio_lcdc, AS_0, 8, portfolio_state ) + ADDRESS_MAP_GLOBAL_MASK(0x7ff) + AM_RANGE(0x0000, 0x07ff) AM_RAM ADDRESS_MAP_END @@ -606,6 +902,9 @@ static INPUT_PORTS_START( portfolio ) PORT_CONFNAME( 0x01, 0x01, "Battery Status" ) PORT_CONFSETTING( 0x01, DEF_STR( Normal ) ) PORT_CONFSETTING( 0x00, "Low Battery" ) + PORT_CONFNAME( 0x02, 0x00, "Boot" ) + PORT_CONFSETTING( 0x02, "Cold" ) + PORT_CONFSETTING( 0x00, "Warm" ) INPUT_PORTS_END @@ -614,10 +913,24 @@ INPUT_PORTS_END // VIDEO //************************************************************************** +//------------------------------------------------- +// contrast_w - +//------------------------------------------------- + +WRITE8_MEMBER( portfolio_state::contrast_w ) +{ + if (LOG) logerror("%s %s CONTRAST %02x\n", machine().time().as_string(), machine().describe_context(), data); +} + + +//------------------------------------------------- +// PALETTE_INIT( portfolio ) +//------------------------------------------------- + PALETTE_INIT_MEMBER(portfolio_state, portfolio) { - palette.set_pen_color(0, rgb_t(138, 146, 148)); - palette.set_pen_color(1, rgb_t(92, 83, 88)); + palette.set_pen_color(0, rgb_t(142, 193, 172)); + palette.set_pen_color(1, rgb_t(67, 71, 151)); } @@ -627,6 +940,7 @@ PALETTE_INIT_MEMBER(portfolio_state, portfolio) READ8_MEMBER( portfolio_state::hd61830_rd_r ) { + // TODO with real ROM: offs_t address = ((offset & 0xff) << 4) | ((offset >> 12) & 0x0f); UINT16 address = ((offset & 0xff) << 3) | ((offset >> 12) & 0x07); UINT8 data = m_char_rom[address]; @@ -660,35 +974,6 @@ GFXDECODE_END -//************************************************************************** -// DEVICE CONFIGURATION -//************************************************************************** - -WRITE_LINE_MEMBER( portfolio_state::iint_w ) -{ -} - -WRITE_LINE_MEMBER( portfolio_state::eint_w ) -{ - if (state) - trigger_interrupt(INT_EXTERNAL); -} - -//************************************************************************** -// IMAGE LOADING -//************************************************************************** - -//------------------------------------------------- -// DEVICE_IMAGE_LOAD( portfolio_cart ) -//------------------------------------------------- - -DEVICE_IMAGE_LOAD_MEMBER( portfolio_state, portfolio_cart ) -{ - return image_init_result::FAIL; -} - - - //************************************************************************** // MACHINE INITIALIZATION //************************************************************************** @@ -699,29 +984,14 @@ DEVICE_IMAGE_LOAD_MEMBER( portfolio_state, portfolio_cart ) void portfolio_state::machine_start() { - address_space &program = m_maincpu->space(AS_PROGRAM); + m_nvram->set_base(m_ram->pointer(), m_ram->size()); - /* memory expansions */ - switch (m_ram->size()) - { - case 128 * 1024: - program.unmap_readwrite(0x1f000, 0x9efff); - break; - - case 384 * 1024: - program.unmap_readwrite(0x5f000, 0x9efff); - break; - } - - /* set initial values */ - m_keylatch = 0xff; - - /* register for state saving */ + // state saving save_item(NAME(m_ip)); save_item(NAME(m_ie)); save_item(NAME(m_counter)); save_item(NAME(m_keylatch)); - save_pointer(NAME(m_contrast.target()), m_contrast.bytes()); + save_item(NAME(m_rom_b)); } @@ -731,6 +1001,9 @@ void portfolio_state::machine_start() void portfolio_state::machine_reset() { + m_lcdc->reset(); + + m_exp->reset(); } @@ -744,13 +1017,13 @@ void portfolio_state::machine_reset() //------------------------------------------------- static MACHINE_CONFIG_START( portfolio, portfolio_state ) - /* basic machine hardware */ + // basic machine hardware MCFG_CPU_ADD(M80C88A_TAG, I8088, XTAL_4_9152MHz) MCFG_CPU_PROGRAM_MAP(portfolio_mem) MCFG_CPU_IO_MAP(portfolio_io) MCFG_CPU_IRQ_ACKNOWLEDGE_DRIVER(portfolio_state,portfolio_int_ack) - /* video hardware */ + // video hardware MCFG_SCREEN_ADD(SCREEN_TAG, LCD) MCFG_SCREEN_REFRESH_RATE(72) MCFG_SCREEN_UPDATE_DEVICE(HD61830_TAG, hd61830_device, screen_update) @@ -766,15 +1039,18 @@ static MACHINE_CONFIG_START( portfolio, portfolio_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", portfolio) MCFG_DEVICE_ADD(HD61830_TAG, HD61830, XTAL_4_9152MHz/2/2) + MCFG_DEVICE_ADDRESS_MAP(AS_0, portfolio_lcdc) MCFG_HD61830_RD_CALLBACK(READ8(portfolio_state, hd61830_rd_r)) MCFG_VIDEO_SET_SCREEN(SCREEN_TAG) - /* sound hardware */ + // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ADD(PCD3311T_TAG, PCD3311, XTAL_3_57864MHz) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) // devices + MCFG_PORTFOLIO_MEMORY_CARD_SLOT_ADD(PORTFOLIO_MEMORY_CARD_SLOT_A_TAG, portfolio_memory_cards, nullptr) + MCFG_PORTFOLIO_EXPANSION_SLOT_ADD(PORTFOLIO_EXPANSION_SLOT_TAG, XTAL_4_9152MHz, portfolio_expansion_cards, nullptr) MCFG_PORTFOLIO_EXPANSION_SLOT_IINT_CALLBACK(WRITELINE(portfolio_state, iint_w)) MCFG_PORTFOLIO_EXPANSION_SLOT_EINT_CALLBACK(WRITELINE(portfolio_state, eint_w)) @@ -784,23 +1060,17 @@ static MACHINE_CONFIG_START( portfolio, portfolio_state ) MCFG_TIMER_DRIVER_ADD_PERIODIC("counter", portfolio_state, counter_tick, attotime::from_hz(XTAL_32_768kHz/16384)) MCFG_TIMER_DRIVER_ADD_PERIODIC(TIMER_TICK_TAG, portfolio_state, system_tick, attotime::from_hz(XTAL_32_768kHz/32768)) - /* fake keyboard */ + // fake keyboard MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard", portfolio_state, keyboard_tick, attotime::from_usec(2500)) - /* cartridge */ - MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "portfolio_cart") - MCFG_GENERIC_LOAD(portfolio_state, portfolio_cart) - - /* software lists */ + // software list MCFG_SOFTWARE_LIST_ADD("cart_list", "pofo") - /* internal ram */ + // internal ram MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("128K") - MCFG_RAM_EXTRA_OPTIONS("384K,640K") - MCFG_NVRAM_ADD_RANDOM_FILL("nvram1") - MCFG_NVRAM_ADD_RANDOM_FILL("nvram2") + MCFG_NVRAM_ADD_RANDOM_FILL("nvram") MACHINE_CONFIG_END @@ -819,7 +1089,7 @@ ROM_START( pofo ) ROMX_LOAD( "rom b.u4", 0x00000, 0x20000, BAD_DUMP CRC(c9852766) SHA1(c74430281bc717bd36fd9b5baec1cc0f4489fe82), ROM_BIOS(1) ) // dumped with debug.com ROMX_LOAD( "rom a.u3", 0x20000, 0x20000, BAD_DUMP CRC(b8fb730d) SHA1(1b9d82b824cab830256d34912a643a7d048cd401), ROM_BIOS(1) ) // dumped with debug.com - ROM_REGION( 0x800, HD61830_TAG, 0 ) + ROM_REGION( 0x8000, HD61830_TAG, 0 ) ROM_LOAD( "hd61830 external character generator", 0x000, 0x800, BAD_DUMP CRC(747a1db3) SHA1(a4b29678fdb43791a8ce4c1ec778f3231bb422c5) ) // typed in from manual ROM_END @@ -829,5 +1099,5 @@ ROM_END // SYSTEM DRIVERS //************************************************************************** -/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ -COMP( 1989, pofo, 0, 0, portfolio, portfolio, driver_device, 0, "Atari", "Portfolio", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +// YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS +COMP( 1989, pofo, 0, 0, portfolio, portfolio, driver_device, 0, "Atari", "Portfolio", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/poisk1.cpp b/src/mame/drivers/poisk1.cpp index 8e7408060f1..a152e1ff78f 100644 --- a/src/mame/drivers/poisk1.cpp +++ b/src/mame/drivers/poisk1.cpp @@ -151,6 +151,11 @@ WRITE8_MEMBER(p1_state::p1_trap_w) READ8_MEMBER(p1_state::p1_cga_r) { + UINT16 port = offset + 0x3d0; + + DBG_LOG(1,"cga",("R %.4x\n", port)); + m_video.trap[1] = 0x40 | ((port >> 8) & 0x3f); + m_video.trap[0] = port & 255; m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); return 0; } @@ -189,15 +194,18 @@ WRITE8_MEMBER(p1_state::p1_vram_w) WRITE8_MEMBER(p1_state::p1_ppi2_porta_w) { + address_space &program = m_maincpu->space(AS_PROGRAM); + DBG_LOG(1,"color_select_68",("W $%02x\n", data)); // NMI DISABLE if (BIT((data ^ m_video.color_select_68), 3)) { + program.unmap_readwrite( 0xb8000, 0xbbfff, 0 ); if (BIT(data, 3)) { - space.install_readwrite_bank( 0xb8000, 0xbbfff, "bank11" ); + program.install_readwrite_bank( 0xb8000, 0xbbfff, "bank11" ); } else { - space.install_read_bank( 0xb8000, 0xbbfff, "bank11" ); - space.install_write_handler( 0xb8000, 0xbbfff, WRITE8_DELEGATE(p1_state, p1_vram_w) ); + program.install_read_bank( 0xb8000, 0xbbfff, "bank11" ); + program.install_write_handler( 0xb8000, 0xbbfff, WRITE8_DELEGATE(p1_state, p1_vram_w) ); } } // DISPLAY BANK @@ -386,8 +394,10 @@ void p1_state::video_start() m_video.videoram = m_video.videoram_base.get(); m_video.stride = 80; - space.install_readwrite_bank(0xb8000, 0xbffff, "bank11" ); + space.install_readwrite_bank(0xb8000, 0xbbfff, "bank11" ); machine().root_device().membank("bank11")->set_base(m_video.videoram); + space.install_readwrite_bank(0xbc000, 0xbffff, "bank12" ); + machine().root_device().membank("bank12")->set_base(m_video.videoram + 0x4000); } UINT32 p1_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) @@ -641,7 +651,7 @@ static MACHINE_CONFIG_START( poisk1, p1_state ) MCFG_ISA8_SLOT_ADD("isa", "isa4", p1_isa8_cards, nullptr, false) MCFG_CASSETTE_ADD( "cassette" ) - MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) MCFG_SOFTWARE_LIST_ADD("flop_list","poisk1_flop") // MCFG_SOFTWARE_LIST_ADD("cass_list","poisk1_cass") diff --git a/src/mame/drivers/s6.cpp b/src/mame/drivers/s6.cpp index cc28d6f3c58..86ababe599e 100644 --- a/src/mame/drivers/s6.cpp +++ b/src/mame/drivers/s6.cpp @@ -120,7 +120,7 @@ static ADDRESS_MAP_START( s6_main_map, AS_PROGRAM, 8, s6_state ) AM_RANGE(0x2200, 0x2203) AM_DEVREADWRITE("pia22", pia6821_device, read, write) // solenoids AM_RANGE(0x2400, 0x2403) AM_DEVREADWRITE("pia24", pia6821_device, read, write) // lamps AM_RANGE(0x2800, 0x2803) AM_DEVREADWRITE("pia28", pia6821_device, read, write) // display - AM_RANGE(0xb000, 0x3003) AM_DEVREADWRITE("pia30", pia6821_device, read, write) // inputs + AM_RANGE(0x3000, 0x3003) AM_DEVREADWRITE("pia30", pia6821_device, read, write) // inputs AM_RANGE(0x6000, 0x7fff) AM_ROM AM_REGION("roms", 0) ADDRESS_MAP_END diff --git a/src/mame/drivers/sega_sawatte.cpp b/src/mame/drivers/sega_sawatte.cpp index 9ef349c81e4..04dd9fa432e 100644 --- a/src/mame/drivers/sega_sawatte.cpp +++ b/src/mame/drivers/sega_sawatte.cpp @@ -25,7 +25,7 @@ http://mamedev.emulab.it/haze/reference/sawatte/cartridge_example.jpg */ #include "emu.h" -#include "softlist.h" +#include "softlist_dev.h" class sawatte_state : public driver_device diff --git a/src/mame/drivers/segahang.cpp b/src/mame/drivers/segahang.cpp index b1d1c178394..b374f09182a 100644 --- a/src/mame/drivers/segahang.cpp +++ b/src/mame/drivers/segahang.cpp @@ -177,10 +177,7 @@ READ16_MEMBER( segahang_state::hangon_io_r ) return m_i8255_2->read(space, offset & 3); case 0x3020/2: // ADC0804 data output - { - static const char *const adcports[] = { "ADC0", "ADC1", "ADC2", "ADC3" }; - return read_safe(ioport(adcports[m_adc_select]), 0); - } + return m_adc_ports[m_adc_select].read_safe(0); } //logerror("%06X:hangon_io_r - unknown read access to address %04X\n", m_maincpu->pc(), offset * 2); @@ -238,10 +235,7 @@ READ16_MEMBER( segahang_state::sharrier_io_r ) return m_i8255_2->read(space, offset & 3); case 0x0030/2: // ADC0804 data output - { - static const char *const adcports[] = { "ADC0", "ADC1", "ADC2", "ADC3" }; - return read_safe(ioport(adcports[m_adc_select]), 0); - } + return m_adc_ports[m_adc_select].read_safe(0); } //logerror("%06X:sharrier_io_r - unknown read access to address %04X\n", m_maincpu->pc(), offset * 2); @@ -391,7 +385,7 @@ void segahang_state::sharrier_i8751_sim() m_workram[0x0f0/2] = 0; // read I/O ports - m_workram[0x492/2] = (ioport("ADC0")->read() << 8) | ioport("ADC1")->read(); + m_workram[0x492/2] = (m_adc_ports[0]->read() << 8) | m_adc_ports[1]->read(); } diff --git a/src/mame/drivers/segaorun.cpp b/src/mame/drivers/segaorun.cpp index 318468eeb7d..00fbcaa3bcc 100644 --- a/src/mame/drivers/segaorun.cpp +++ b/src/mame/drivers/segaorun.cpp @@ -695,7 +695,7 @@ READ16_MEMBER( segaorun_state::outrun_custom_io_r ) case 0x30/2: { - return read_safe(m_adc_ports[m_adc_select], 0x0010); + return m_adc_ports[m_adc_select].read_safe(0x0010); } case 0x60/2: @@ -781,7 +781,7 @@ READ16_MEMBER( segaorun_state::shangon_custom_io_r ) case 0x3020/2: { - return read_safe(m_adc_ports[m_adc_select], 0x0010); + return m_adc_ports[m_adc_select].read_safe(0x0010); } default: diff --git a/src/mame/drivers/segapico.cpp b/src/mame/drivers/segapico.cpp index 1df769c0363..fa953d8a9cf 100644 --- a/src/mame/drivers/segapico.cpp +++ b/src/mame/drivers/segapico.cpp @@ -330,8 +330,8 @@ WRITE16_MEMBER(pico_base_state::pico_68k_io_write ) m_sega_315_5641_pcm->reset_w(1); m_sega_315_5641_pcm->start_w(1); - if (mem_mask&0x00ff) m_sega_315_5641_pcm->port_w(space,0,data&0xff); - if (mem_mask&0xff00) m_sega_315_5641_pcm->port_w(space,0,(data>>8)&0xff);*/ + if (ACCESSING_BITS_0_7) m_sega_315_5641_pcm->port_w(space,0,data&0xff); + if (ACCESSING_BITS_8_15) m_sega_315_5641_pcm->port_w(space,0,(data>>8)&0xff);*/ break; } diff --git a/src/mame/drivers/segas16a.cpp b/src/mame/drivers/segas16a.cpp index daece602870..be4486d08ec 100644 --- a/src/mame/drivers/segas16a.cpp +++ b/src/mame/drivers/segas16a.cpp @@ -917,19 +917,18 @@ READ16_MEMBER( segas16a_state::sdi_custom_io_r ) READ16_MEMBER( segas16a_state::sjryuko_custom_io_r ) { - static const char *const portname[] = { "MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5" }; switch (offset & (0x3000/2)) { case 0x1000/2: switch (offset & 3) { case 1: - if (read_safe(ioport(portname[m_mj_input_num]), 0xff) != 0xff) + if (m_mj_inputs[m_mj_input_num].read_safe(0xff) != 0xff) return 0xff & ~(1 << m_mj_input_num); return 0xff; case 2: - return read_safe(ioport(portname[m_mj_input_num]), 0xff); + return m_mj_inputs[m_mj_input_num].read_safe(0xff); } break; } diff --git a/src/mame/drivers/segas16b.cpp b/src/mame/drivers/segas16b.cpp index 1e71a6afb92..8f3d43a25bb 100644 --- a/src/mame/drivers/segas16b.cpp +++ b/src/mame/drivers/segas16b.cpp @@ -1590,14 +1590,30 @@ READ16_MEMBER( segas16b_state::hwchamp_custom_io_r ) WRITE16_MEMBER( segas16b_state::hwchamp_custom_io_w ) { - static const char *const portname[4] = { "MONITOR", "LEFT", "RIGHT", "DUMMY" }; switch (offset & (0x3000/2)) { case 0x3000/2: switch (offset & 0x30/2) { case 0x20/2: - m_hwc_input_value = read_safe(ioport(portname[offset & 3]), 0xff); + switch (offset & 3) + { + case 0: + m_hwc_input_value = m_hwc_monitor->read(); + break; + + case 1: + m_hwc_input_value = m_hwc_left->read(); + break; + + case 2: + m_hwc_input_value = m_hwc_right->read(); + break; + + default: + m_hwc_input_value = 0xff; + break; + } break; case 0x30/2: @@ -1668,20 +1684,18 @@ READ16_MEMBER( segas16b_state::sdi_custom_io_r ) READ16_MEMBER( segas16b_state::sjryuko_custom_io_r ) { - static const char *const portname[] = { "MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5" }; - switch (offset & (0x3000/2)) { case 0x1000/2: switch (offset & 3) { case 1: - if (read_safe(ioport(portname[m_mj_input_num]), 0xff) != 0xff) + if (m_mj_inputs[m_mj_input_num].read_safe(0xff) != 0xff) return 0xff & ~(1 << m_mj_input_num); return 0xff; case 2: - return read_safe(ioport(portname[m_mj_input_num]), 0xff); + return m_mj_inputs[m_mj_input_num].read_safe(0xff); } break; } diff --git a/src/mame/drivers/segas24.cpp b/src/mame/drivers/segas24.cpp index d6e5deaf9fa..9d9fe017c6b 100644 --- a/src/mame/drivers/segas24.cpp +++ b/src/mame/drivers/segas24.cpp @@ -518,19 +518,19 @@ UINT8 segas24_state::hotrod_io_r(UINT8 port) switch(port) { case 0: - return ioport("P1")->read(); + return m_p1->read(); case 1: - return ioport("P2")->read(); + return m_p2->read(); case 2: - return read_safe(ioport("P3"), 0xff); + return m_p3.read_safe(0xff); case 3: return 0xff; case 4: - return ioport("SERVICE")->read(); + return m_service->read(); case 5: // Dip switches - return ioport("COINAGE")->read(); + return m_coinage->read(); case 6: - return ioport("DSW")->read(); + return m_dsw->read(); case 7: // DAC return 0xff; } @@ -544,20 +544,20 @@ UINT8 segas24_state::dcclub_io_r(UINT8 port) case 0: { static const UINT8 pos[16] = { 0, 1, 3, 2, 6, 4, 12, 8, 9 }; - return (ioport("P1")->read() & 0xf) | ((~pos[ioport("PADDLE")->read()>>4]<<4) & 0xf0); + return (m_p1->read() & 0xf) | ((~pos[m_paddle->read()>>4]<<4) & 0xf0); } case 1: - return ioport("P2")->read(); + return m_p2->read(); case 2: return 0xff; case 3: return 0xff; case 4: - return ioport("SERVICE")->read(); + return m_service->read(); case 5: // Dip switches - return ioport("COINAGE")->read(); + return m_coinage->read(); case 6: - return ioport("DSW")->read(); + return m_dsw->read(); case 7: // DAC return 0xff; } @@ -567,8 +567,6 @@ UINT8 segas24_state::dcclub_io_r(UINT8 port) UINT8 segas24_state::mahmajn_io_r(UINT8 port) { - static const char *const keynames[] = { "MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5", "P1", "P2" }; - switch(port) { case 0: @@ -576,15 +574,15 @@ UINT8 segas24_state::mahmajn_io_r(UINT8 port) case 1: return 0xff; case 2: - return ioport(keynames[cur_input_line])->read(); + return m_mj_inputs[cur_input_line].read_safe(0xff); case 3: return 0xff; case 4: - return ioport("SERVICE")->read(); + return m_service->read(); case 5: // Dip switches - return ioport("COINAGE")->read(); + return m_coinage->read(); case 6: - return ioport("DSW")->read(); + return m_dsw->read(); case 7: // DAC return 0xff; } @@ -624,12 +622,10 @@ void segas24_state::hotrod_io_w(UINT8 port, UINT8 data) WRITE16_MEMBER( segas24_state::hotrod3_ctrl_w ) { - static const char *const portnames[] = { "PEDAL1", "PEDAL2", "PEDAL3", "PEDAL4" }; - if(ACCESSING_BITS_0_7) { data &= 3; - hotrod_ctrl_cur = read_safe(ioport(portnames[data]), 0); + hotrod_ctrl_cur = m_pedals[data].read_safe(0); } } @@ -641,21 +637,21 @@ READ16_MEMBER( segas24_state::hotrod3_ctrl_r ) { // Steering dials case 0: - return read_safe(ioport("DIAL1"), 0) & 0xff; + return m_dials[0].read_safe(0) & 0xff; case 1: - return read_safe(ioport("DIAL1"), 0) >> 8; + return m_dials[0].read_safe(0) >> 8; case 2: - return read_safe(ioport("DIAL2"), 0) & 0xff; + return m_dials[1].read_safe(0) & 0xff; case 3: - return read_safe(ioport("DIAL2"), 0) >> 8; + return m_dials[1].read_safe(0) >> 8; case 4: - return read_safe(ioport("DIAL3"), 0) & 0xff; + return m_dials[2].read_safe(0) & 0xff; case 5: - return read_safe(ioport("DIAL3"), 0) >> 8; + return m_dials[2].read_safe(0) >> 8; case 6: - return read_safe(ioport("DIAL4"), 0) & 0xff; + return m_dials[3].read_safe(0) & 0xff; case 7: - return read_safe(ioport("DIAL4"), 0) >> 8; + return m_dials[3].read_safe(0) >> 8; case 8: { diff --git a/src/mame/drivers/segas32.cpp b/src/mame/drivers/segas32.cpp index 251f99639a1..39932d84bb7 100644 --- a/src/mame/drivers/segas32.cpp +++ b/src/mame/drivers/segas32.cpp @@ -545,6 +545,11 @@ segas32_state::segas32_state(const machine_config &mconfig, const char *tag, dev m_system32_videoram(*this,"videoram", 0), m_system32_spriteram(*this,"spriteram", 0), m_system32_paletteram(*this,"paletteram", 0) , + m_ports_a(*this, {"P1_A", "P2_A", "PORTC_A", "PORTD_A", "SERVICE12_A", "SERVICE34_A", "PORTG_A", "PORTH_A"}), + m_ports_b(*this, {"P1_B", "P2_B", "PORTC_B", "PORTD_B", "SERVICE12_B", "SERVICE34_B", "PORTG_B", "PORTH_B"}), + m_analog_ports(*this, {"ANALOG1", "ANALOG2", "ANALOG3", "ANALOG4", "ANALOG5", "ANALOG6", "ANALOG7", "ANALOG8"}), + m_extra_ports(*this, {"EXTRA1", "EXTRA2", "EXTRA3", "EXTRA4"}), + m_track_ports(*this, {"TRACKX1", "TRACKY1", "TRACKX2", "TRACKY2", "TRACKX3", "TRACKY3"}), m_maincpu(*this, "maincpu"), m_soundcpu(*this, "soundcpu"), m_multipcm(*this, "sega"), @@ -805,11 +810,6 @@ INTERRUPT_GEN_MEMBER(segas32_state::start_of_vblank_int) UINT16 segas32_state::common_io_chip_r(address_space &space, int which, offs_t offset, UINT16 mem_mask) { - static const char *const portnames[2][8] = - { - { "P1_A", "P2_A", "PORTC_A", "PORTD_A", "SERVICE12_A", "SERVICE34_A", "PORTG_A", "PORTH_A" }, - { "P1_B", "P2_B", "PORTC_B", "PORTD_B", "SERVICE12_B", "SERVICE34_B", "PORTG_B", "PORTH_B" }, - }; offset &= 0x1f/2; switch (offset) @@ -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 read_safe(ioport(portnames[which][offset]), 0xffff); + return (which ? m_ports_b : m_ports_a)[offset].read_safe(0xffff); /* 'SEGA' protection */ case 0x10/2: @@ -1090,14 +1090,13 @@ READ16_MEMBER(segas32_state::analog_custom_io_r) WRITE16_MEMBER(segas32_state::analog_custom_io_w) { - static const char *const names[] = { "ANALOG1", "ANALOG2", "ANALOG3", "ANALOG4" }; switch (offset) { case 0x10/2: case 0x12/2: case 0x14/2: case 0x16/2: - m_analog_value[offset & 3] = read_safe(ioport(names[offset & 3]), 0); + m_analog_value[offset & 3] = m_analog_ports[offset & 3].read_safe(0); return; } logerror("%06X:unknown analog_custom_io_w(%X) = %04X & %04X\n", space.device().safe_pc(), offset*2, data, mem_mask); @@ -1106,14 +1105,13 @@ WRITE16_MEMBER(segas32_state::analog_custom_io_w) READ16_MEMBER(segas32_state::extra_custom_io_r) { - static const char *const names[] = { "EXTRA1", "EXTRA2", "EXTRA3", "EXTRA4" }; switch (offset) { case 0x20/2: case 0x22/2: case 0x24/2: case 0x26/2: - return read_safe(ioport(names[offset & 3]), 0xffff); + return m_extra_ports[offset & 3].read_safe(0xffff); } logerror("%06X:unknown extra_custom_io_r(%X) & %04X\n", space.device().safe_pc(), offset*2, mem_mask); @@ -1123,14 +1121,13 @@ READ16_MEMBER(segas32_state::extra_custom_io_r) WRITE16_MEMBER(segas32_state::orunners_custom_io_w) { - static const char *const names[] = { "ANALOG1", "ANALOG2", "ANALOG3", "ANALOG4", "ANALOG5", "ANALOG6", "ANALOG7", "ANALOG8" }; switch (offset) { case 0x10/2: case 0x12/2: case 0x14/2: case 0x16/2: - m_analog_value[offset & 3] = read_safe(ioport(names[m_analog_bank * 4 + (offset & 3)]), 0); + m_analog_value[offset & 3] = m_analog_ports[m_analog_bank * 4 + (offset & 3)].read_safe(0); return; case 0x20/2: @@ -1143,8 +1140,6 @@ WRITE16_MEMBER(segas32_state::orunners_custom_io_w) READ16_MEMBER(segas32_state::sonic_custom_io_r) { - static const char *const names[] = { "TRACKX1", "TRACKY1", "TRACKX2", "TRACKY2", "TRACKX3", "TRACKY3" }; - switch (offset) { case 0x00/2: @@ -1153,7 +1148,7 @@ READ16_MEMBER(segas32_state::sonic_custom_io_r) case 0x0c/2: case 0x10/2: case 0x14/2: - return (UINT8)(ioport(names[offset/2])->read() - m_sonic_last[offset/2]); + return (UINT8)(m_track_ports[offset/2]->read() - m_sonic_last[offset/2]); } logerror("%06X:unknown sonic_custom_io_r(%X) & %04X\n", space.device().safe_pc(), offset*2, mem_mask); @@ -1163,15 +1158,13 @@ READ16_MEMBER(segas32_state::sonic_custom_io_r) WRITE16_MEMBER(segas32_state::sonic_custom_io_w) { - static const char *const names[] = { "TRACKX1", "TRACKY1", "TRACKX2", "TRACKY2", "TRACKX3", "TRACKY3" }; - switch (offset) { case 0x00/2: case 0x08/2: case 0x10/2: - m_sonic_last[offset/2 + 0] = ioport(names[offset/2 + 0])->read(); - m_sonic_last[offset/2 + 1] = ioport(names[offset/2 + 1])->read(); + m_sonic_last[offset/2 + 0] = m_track_ports[offset/2 + 0]->read(); + m_sonic_last[offset/2 + 1] = m_track_ports[offset/2 + 1]->read(); return; } diff --git a/src/mame/drivers/segasp.cpp b/src/mame/drivers/segasp.cpp index ed1d4a91a2f..6f51857d51b 100644 --- a/src/mame/drivers/segasp.cpp +++ b/src/mame/drivers/segasp.cpp @@ -79,14 +79,14 @@ G 171-8278G 315-6416 2x 512Mbit RMI READ64_MEMBER(segasp_state::sp_bank_r) { - if (mem_mask & U64(0xffffffff00000000)) + if (ACCESSING_BITS_32_63) return -1; return m_sp_bank; } WRITE64_MEMBER(segasp_state::sp_bank_w) { - if (mem_mask & U64(0xffffffff00000000)) + if (ACCESSING_BITS_32_63) return; UINT16 bank = data & 0xffff; if (bank != m_sp_bank) @@ -116,14 +116,14 @@ WRITE64_MEMBER(segasp_state::sn_93c46a_w) READ64_MEMBER(segasp_state::sp_eeprom_r) { - if (mem_mask & U64(0xffffffff00000000)) + if (ACCESSING_BITS_32_63) return -1; return m_sp_eeprom->do_read() << 4; } WRITE64_MEMBER(segasp_state::sp_eeprom_w) { - if (mem_mask & U64(0xffffffff00000000)) + if (ACCESSING_BITS_32_63) return; m_sp_eeprom->di_write(data & 1); m_sp_eeprom->cs_write((data & 2) ? ASSERT_LINE : CLEAR_LINE); @@ -144,7 +144,7 @@ READ64_MEMBER(segasp_state::sp_io_r) int reg = offset * 2; int shift = 0; - if (mem_mask & U64(0xffffffff00000000)) + if (ACCESSING_BITS_32_63) { reg++; shift = 32; diff --git a/src/mame/drivers/segaxbd.cpp b/src/mame/drivers/segaxbd.cpp index 9d4cb0a5c67..43219edf6a7 100644 --- a/src/mame/drivers/segaxbd.cpp +++ b/src/mame/drivers/segaxbd.cpp @@ -293,7 +293,9 @@ segaxbd_state::segaxbd_state(const machine_config &mconfig, const char *tag, dev m_gprider_hack(false), m_palette_entries(0), m_screen(*this, "screen"), - m_palette(*this, "palette") + m_palette(*this, "palette"), + m_adc_ports(*this, {"ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6", "ADC7"}), + m_mux_ports(*this, {"MUX0", "MUX1", "MUX2", "MUX3"}) { memset(m_adc_reverse, 0, sizeof(m_adc_reverse)); memset(m_iochip_regs, 0, sizeof(m_iochip_regs)); @@ -462,11 +464,9 @@ void segaxbd_state::sound_data_w(UINT8 data) READ16_MEMBER( segaxbd_state::adc_r ) { - static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6", "ADC7" }; - // on the write, latch the selected input port and stash the value int which = (m_iochip_regs[0][2] >> 2) & 7; - int value = read_safe(ioport(ports[which]), 0x0010); + int value = m_adc_ports[which].read_safe(0x0010); // reverse some port values if (m_adc_reverse[which]) @@ -926,8 +926,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 read_safe(ioport(port_names[m_lastsurv_mux]), 0xff); + return m_mux_ports[m_lastsurv_mux].read_safe(0xff); } diff --git a/src/mame/drivers/segaybd.cpp b/src/mame/drivers/segaybd.cpp index 9495f33306b..98b99e80cdc 100644 --- a/src/mame/drivers/segaybd.cpp +++ b/src/mame/drivers/segaybd.cpp @@ -106,7 +106,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] = read_safe(m_adc_ports[selected], 0xff); + m_analog_data[offset & 3] = m_adc_ports[selected].read_safe(0xff); } diff --git a/src/mame/drivers/seicross.cpp b/src/mame/drivers/seicross.cpp index ab912c70ae8..9761fb364b6 100644 --- a/src/mame/drivers/seicross.cpp +++ b/src/mame/drivers/seicross.cpp @@ -79,7 +79,7 @@ void seicross_state::machine_reset() READ8_MEMBER(seicross_state::portB_r) { - return (m_portb & 0x9f) | (read_safe(ioport("DEBUG"), 0) & 0x60); + return (m_portb & 0x9f) | (m_debug_port.read_safe(0) & 0x60); } WRITE8_MEMBER(seicross_state::portB_w) diff --git a/src/mame/drivers/sengokmj.cpp b/src/mame/drivers/sengokmj.cpp index 3a95d926d9e..8f3666fa763 100644 --- a/src/mame/drivers/sengokmj.cpp +++ b/src/mame/drivers/sengokmj.cpp @@ -344,7 +344,7 @@ void sengokmj_state::machine_start() /* Multiplexer device for the mahjong panel */ READ16_MEMBER(sengokmj_state::mahjong_panel_r) { - const char *const mpnames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "UNUSED" }; + const char *const mpnames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5" }; int i; UINT16 res = 0xffff; @@ -405,7 +405,7 @@ static ADDRESS_MAP_START( sengokmj_io_map, AS_IO, 16, sengokmj_state ) // AM_RANGE(0x8100, 0x8101) AM_WRITENOP // always 0 AM_RANGE(0x8180, 0x8181) AM_WRITE(out_w) AM_RANGE(0x8140, 0x8141) AM_WRITE(mahjong_panel_w) - AM_RANGE(0xc000, 0xc001) AM_READ_PORT("DSW1") + AM_RANGE(0xc000, 0xc001) AM_READ_PORT("DSW") AM_RANGE(0xc002, 0xc003) AM_READ(mahjong_panel_r) AM_RANGE(0xc004, 0xc005) AM_READ(system_r) //switches ADDRESS_MAP_END @@ -414,7 +414,7 @@ ADDRESS_MAP_END static INPUT_PORTS_START( sengokmj ) SEIBU_COIN_INPUTS /* coin inputs read through sound cpu */ - PORT_START("DSW1") + PORT_START("DSW") // Names and locations from service mode PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) @@ -432,92 +432,84 @@ static INPUT_PORTS_START( sengokmj ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) PORT_DIPUNUSED_DIPLOC( 0x0020, 0x0020, "SW1:6" ) PORT_DIPNAME( 0x0040, 0x0040, "Out Sw" ) PORT_DIPLOCATION("SW1:7") - PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) // One of these probably selects coins + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) // The other probably selects tickets PORT_DIPNAME( 0x0080, 0x0000, "Hopper" ) PORT_DIPLOCATION("SW1:8") //game gives hopper error with this off. PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_DIPUNUSED_DIPLOC( 0x0100, 0x0100, "SW2:1" ) + PORT_DIPUNUSED_DIPLOC( 0x0200, 0x0200, "SW2:2" ) + PORT_DIPUNUSED_DIPLOC( 0x0400, 0x0400, "SW2:3" ) + PORT_DIPUNUSED_DIPLOC( 0x0800, 0x0800, "SW2:4" ) + PORT_DIPUNUSED_DIPLOC( 0x1000, 0x1000, "SW2:5" ) + PORT_DIPUNUSED_DIPLOC( 0x2000, 0x2000, "SW2:6" ) + PORT_DIPUNUSED_DIPLOC( 0x4000, 0x4000, "SW2:7" ) + PORT_DIPUNUSED_DIPLOC( 0x8000, 0x8000, "SW2:8" ) PORT_START("KEY0") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_A ) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_E ) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_I ) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_M ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_A ) // Internal code 0F0h + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_E ) // Internal code 0F4h + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_I ) // Internal code 0F8h + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_M ) // Internal code 0FCh + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) // Internal code 3h + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START1 ) // Internal code 0Ah + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Bet 2") PORT_CODE(KEYCODE_4) // Internal code 0FFFFh; ignored in service mode but probably does something + PORT_BIT( 0xff80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("KEY1") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_B ) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_F ) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_J ) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_N ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_B ) // Internal code 0F1h + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_F ) // Internal code 0F5h + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_J ) // Internal code 0F9h + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_N ) // Internal code 0FBh + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) // Internal code 0Bh + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) // Internal code 9h + PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("KEY2") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_C ) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_G ) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_K ) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_C ) // Internal code 0F2h + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_G ) // Internal code 0F6h + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_K ) // Internal code 0FAh + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) // Internal code 1h + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) // Internal code 0Ch PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("KEY3") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_D ) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_H ) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_L ) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_D ) // Internal code 0F3h + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_H ) // Internal code 0F7h + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_L ) // Internal code 0FBh + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) // Internal code 2h + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Internal code 6h; not shown in service mode and probably does nothing PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("KEY4") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) // Internal code 4h + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) // Internal code 8h + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) // Internal code 7h + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Show Checksum") PORT_CODE(KEYCODE_X) // Internal code 5h; not shown in service mode but certainly does something + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("KEY5") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("UNUSED") - PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("SYSTEM") - PORT_DIPNAME( 0x0001, 0x0001, "Door" ) - PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_SERVICE( 0x0002, IP_ACTIVE_LOW ) - PORT_DIPNAME( 0x0004, 0x0004, "Opt. 1st" ) - PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0008, 0x0008, "Reset" ) - PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0020, 0x0020, "Cash" ) - PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_DOOR ) // Only used in service mode? + PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_LOW ) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_NAME("Opt. 1st") // Only used in service mode? + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Cash") // Only used in service mode? // 0x40 Hopper - PORT_DIPNAME( 0x0080, 0x0080, "Meter" ) - PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meter") PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END diff --git a/src/mame/drivers/seta.cpp b/src/mame/drivers/seta.cpp index f7db8a7e0ca..de7e049bad4 100644 --- a/src/mame/drivers/seta.cpp +++ b/src/mame/drivers/seta.cpp @@ -1583,12 +1583,12 @@ READ16_MEMBER(seta_state::seta_dsw_r) READ8_MEMBER(seta_state::dsw1_r) { - return (ioport("DSW")->read() >> 8) & 0xff; + return (m_dsw->read() >> 8) & 0xff; } READ8_MEMBER(seta_state::dsw2_r) { - return (ioport("DSW")->read() >> 0) & 0xff; + return (m_dsw->read() >> 0) & 0xff; } @@ -1683,15 +1683,15 @@ ADDRESS_MAP_END READ16_MEMBER(seta_state::calibr50_ip_r) { - int dir1 = ioport("ROT1")->read(); // analog port - int dir2 = ioport("ROT2")->read(); // analog port + int dir1 = m_rot[0]->read(); // analog port + int dir2 = m_rot[1]->read(); // analog port switch (offset) { - case 0x00/2: return ioport("P1")->read(); // p1 - case 0x02/2: return ioport("P2")->read(); // p2 + case 0x00/2: return m_p1->read(); // p1 + case 0x02/2: return m_p2->read(); // p2 - case 0x08/2: return ioport("COINS")->read(); // Coins + case 0x08/2: return m_coins->read(); // Coins case 0x10/2: return (dir1 & 0xff); // lower 8 bits of p1 rotation case 0x12/2: return (dir1 >> 8); // upper 4 bits of p1 rotation @@ -1746,10 +1746,10 @@ READ16_MEMBER(seta_state::usclssic_dsw_r) { switch (offset) { - case 0/2: return (ioport("DSW")->read() >> 8) & 0xf; - case 2/2: return (ioport("DSW")->read() >> 12) & 0xf; - case 4/2: return (ioport("DSW")->read() >> 0) & 0xf; - case 6/2: return (ioport("DSW")->read() >> 4) & 0xf; + case 0/2: return (m_dsw->read() >> 8) & 0xf; + case 2/2: return (m_dsw->read() >> 12) & 0xf; + case 4/2: return (m_dsw->read() >> 0) & 0xf; + case 6/2: return (m_dsw->read() >> 4) & 0xf; } return 0; } @@ -1963,7 +1963,7 @@ WRITE16_MEMBER(seta_state::zombraid_gun_w) READ16_MEMBER(seta_state::extra_r) { - return read_safe(ioport("EXTRA"), 0xff); + return m_extra_port.read_safe(0xff); } static ADDRESS_MAP_START( wrofaero_map, AS_PROGRAM, 16, seta_state ) @@ -2137,7 +2137,7 @@ READ16_MEMBER(seta_state::keroppi_protection_init_r) READ16_MEMBER(seta_state::keroppi_coin_r) { - UINT16 result = ioport("COINS")->read(); + UINT16 result = m_coins->read(); if (m_keroppi_prize_hop == 2) { @@ -2548,10 +2548,10 @@ ADDRESS_MAP_END READ16_MEMBER(seta_state::krzybowl_input_r) { // analog ports - int dir1x = ioport("TRACK1_X")->read() & 0xfff; - int dir1y = ioport("TRACK1_Y")->read() & 0xfff; - int dir2x = ioport("TRACK2_X")->read() & 0xfff; - int dir2y = ioport("TRACK2_Y")->read() & 0xfff; + int dir1x = m_track1_x->read() & 0xfff; + int dir1y = m_track1_y->read() & 0xfff; + int dir2x = m_track2_x->read() & 0xfff; + int dir2y = m_track2_y->read() & 0xfff; switch (offset) { @@ -2724,7 +2724,7 @@ READ16_MEMBER(seta_state::kiwame_input_r) { case 0x00/2: return ioport(keynames[i])->read(); case 0x02/2: return 0xffff; - case 0x04/2: return ioport("COINS")->read(); + case 0x04/2: return m_coins->read(); // case 0x06/2: case 0x08/2: return 0xffff; @@ -2991,20 +2991,20 @@ ADDRESS_MAP_END READ16_MEMBER(seta_state::inttoote_dsw_r) { int shift = offset * 4; - return ((((ioport("DSW1")->read() >> shift) & 0xf)) << 0) | - ((((ioport("DSW2_3")->read() >> shift) & 0xf)) << 4) | - ((((ioport("DSW2_3")->read() >> (shift+8)) & 0xf)) << 8) ; + return ((((m_dsw1->read() >> shift) & 0xf)) << 0) | + ((((m_dsw2_3->read() >> shift) & 0xf)) << 4) | + ((((m_dsw2_3->read() >> (shift+8)) & 0xf)) << 8) ; } READ16_MEMBER(seta_state::inttoote_key_r) { switch( *m_inttoote_key_select ) { - case 0x08: return ioport("BET0")->read(); - case 0x10: return ioport("BET1")->read(); - case 0x20: return ioport("BET2")->read(); - case 0x40: return ioport("BET3")->read(); - case 0x80: return ioport("BET4")->read(); + case 0x08: return m_bet[0]->read(); + case 0x10: return m_bet[1]->read(); + case 0x20: return m_bet[2]->read(); + case 0x40: return m_bet[3]->read(); + case 0x80: return m_bet[4]->read(); } logerror("%06X: unknown read, select = %04x\n",space.device().safe_pc(), *m_inttoote_key_select); @@ -3055,11 +3055,11 @@ READ16_MEMBER(seta_state::jockeyc_mux_r) { switch( m_jockeyc_key_select ) { - case 0x08: return ioport("BET0")->read(); - case 0x10: return ioport("BET1")->read(); - case 0x20: return ioport("BET2")->read(); - case 0x40: return ioport("BET3")->read(); - case 0x80: return ioport("BET4")->read(); + case 0x08: return m_bet[0]->read(); + case 0x10: return m_bet[1]->read(); + case 0x20: return m_bet[2]->read(); + case 0x40: return m_bet[3]->read(); + case 0x80: return m_bet[4]->read(); } return 0xffff; diff --git a/src/mame/drivers/sidearms.cpp b/src/mame/drivers/sidearms.cpp index 35341c137e8..a5beb5cc756 100644 --- a/src/mame/drivers/sidearms.cpp +++ b/src/mame/drivers/sidearms.cpp @@ -70,7 +70,7 @@ READ8_MEMBER(sidearms_state::turtship_ports_r) { int res = 0; for (int i = 0; i < 5;i++) - res |= ((read_safe(m_ports[i], 0) >> offset) & 1) << i; + res |= ((m_ports[i].read_safe(0) >> offset) & 1) << i; return res; } diff --git a/src/mame/drivers/slc1.cpp b/src/mame/drivers/slc1.cpp index f367e3b1705..a2eec395f04 100644 --- a/src/mame/drivers/slc1.cpp +++ b/src/mame/drivers/slc1.cpp @@ -182,7 +182,7 @@ static ADDRESS_MAP_START( slc1_map, AS_PROGRAM, 8, slc1_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0x4fff) AM_RANGE(0x0000, 0x0fff) AM_ROM - AM_RANGE(0x5000, 0x53ff) AM_RAM AM_MIRROR(0xc00) + AM_RANGE(0x4000, 0x43ff) AM_RAM AM_MIRROR(0xc00) ADDRESS_MAP_END static ADDRESS_MAP_START( slc1_io, AS_IO, 8, slc1_state ) diff --git a/src/mame/drivers/sms.cpp b/src/mame/drivers/sms.cpp index 1e930dc1bb2..937b714c4dd 100644 --- a/src/mame/drivers/sms.cpp +++ b/src/mame/drivers/sms.cpp @@ -377,7 +377,7 @@ ADDRESS_MAP_END static INPUT_PORTS_START( sms ) PORT_START("PAUSE") PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START ) PORT_NAME(DEF_STR(Pause)) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME(DEF_STR(Pause)) PORT_CODE(KEYCODE_1) INPUT_PORTS_END static INPUT_PORTS_START( sg1000m3 ) diff --git a/src/mame/drivers/spectrum.cpp b/src/mame/drivers/spectrum.cpp index 4bf71cbce22..e5ee94a4f95 100644 --- a/src/mame/drivers/spectrum.cpp +++ b/src/mame/drivers/spectrum.cpp @@ -329,11 +329,11 @@ READ8_MEMBER(spectrum_state::spectrum_port_fe_r) int lines = offset >> 8; int data = 0xff; - int cs_extra1 = m_io_plus0 ? m_io_plus0->read() & 0x1f : 0x1f; - int cs_extra2 = m_io_plus1 ? m_io_plus1->read() & 0x1f : 0x1f; - int cs_extra3 = m_io_plus2 ? m_io_plus2->read() & 0x1f : 0x1f; - int ss_extra1 = m_io_plus3 ? m_io_plus3->read() & 0x1f : 0x1f; - int ss_extra2 = m_io_plus4 ? m_io_plus4->read() & 0x1f : 0x1f; + int cs_extra1 = m_io_plus0.read_safe(0x1f) & 0x1f; + int cs_extra2 = m_io_plus1.read_safe(0x1f) & 0x1f; + int cs_extra3 = m_io_plus2.read_safe(0x1f) & 0x1f; + int ss_extra1 = m_io_plus3.read_safe(0x1f) & 0x1f; + int ss_extra2 = m_io_plus4.read_safe(0x1f) & 0x1f; /* Caps - V */ if ((lines & 1) == 0) diff --git a/src/mame/drivers/ssv.cpp b/src/mame/drivers/ssv.cpp index f0c8a4f1b64..b1cfeede68d 100644 --- a/src/mame/drivers/ssv.cpp +++ b/src/mame/drivers/ssv.cpp @@ -444,9 +444,7 @@ ADDRESS_MAP_END READ16_MEMBER(ssv_state::gdfs_eeprom_r) { - ioport_port *gun[] = { m_io_gunx1, m_io_guny1, m_io_gunx2, m_io_guny2 }; - - return (((m_gdfs_lightgun_select & 1) ? 0 : 0xff) ^ gun[m_gdfs_lightgun_select]->read()) | (m_eeprom->do_read() << 8); + return (((m_gdfs_lightgun_select & 1) ? 0 : 0xff) ^ m_io_gun[m_gdfs_lightgun_select]->read()) | (m_eeprom->do_read() << 8); } WRITE16_MEMBER(ssv_state::gdfs_eeprom_w) @@ -722,11 +720,7 @@ ADDRESS_MAP_END READ16_MEMBER(ssv_state::sxyreact_ballswitch_r) { - if ( m_io_service ) - { - return m_io_service->read(); - } - return 0; + return m_io_service.read_safe(0); } READ16_MEMBER(ssv_state::sxyreact_dial_r) @@ -740,7 +734,7 @@ WRITE16_MEMBER(ssv_state::sxyreact_dial_w) if (ACCESSING_BITS_0_7) { if (data & 0x20) - m_sxyreact_serial = ( m_io_paddle ? m_io_paddle->read() : 0 ) & 0xff; + m_sxyreact_serial = m_io_paddle.read_safe(0) & 0xff; if ( (m_sxyreact_dial & 0x40) && !(data & 0x40) ) // $40 -> $00 m_sxyreact_serial <<= 1; // shift 1 bit diff --git a/src/mame/drivers/starfire.cpp b/src/mame/drivers/starfire.cpp index 38bc76ccf61..94a36925297 100644 --- a/src/mame/drivers/starfire.cpp +++ b/src/mame/drivers/starfire.cpp @@ -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 (read_safe(ioport("NMI"), 0x01)) + if (m_nmi.read_safe(0x01)) device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } diff --git a/src/mame/drivers/stfight.cpp b/src/mame/drivers/stfight.cpp index 2db11fdc3f6..a8f71fab77f 100644 --- a/src/mame/drivers/stfight.cpp +++ b/src/mame/drivers/stfight.cpp @@ -4,6 +4,17 @@ *** STREET FIGHT hardware *** This has been adapted from the excellent ***************************** Psychic 5 description (by Roberto Ventura) + + Notes: Lower Board - CPU board S-0086-002-B0 (both games) + Top Board - GFX board S-0086-002A-A0 (Street Fight) + Top Board - GFX board S-0087-807 (Cross Shooter) + + for the single PCB version of Air Raid / Cross Shooter on the S-0087-011A-0 PCB, + see airraid.cpp + + +--- + Street Fight (c) Seibu Kaihatsu (1986) @@ -180,8 +191,6 @@ colors on screen. Each color component (RGB) depth is 4 bits, two bytes $100 apart are used for each color code (12 bits). -format: unknown - probably RRRRGGGG - 0000BBBB - I suspect that the colors are organized in sub-palettes, since the graphics layers are all 4 bits (16 colors) each. Each of the text/graphics layers have 'attribute' bytes associated with them that would define the palette @@ -190,14 +199,16 @@ usage for each character/tile. The 16 colours at offset $C0 appear to be the text palette. This group of colours does not appear to change throughout the game, and the lower 192 colours fade in/out independently of these 16 - consistent with observations -of the real game. You'd think then that the palette would be reaonably -easy to deduce from the text video ram attribute byte - go ahead and try! :P - -The mapping of graphics pixels to palette similarly escapes me, though I -must admit I haven't exhausted all avenues of investigation just yet! +of the real game. There is a related mystery with the transparency colour. For the most part colour 15 corresponds to the transparent colour, except in a few cases. +(for some Seibu PCB types transparency is handled by bit 0x40 in the CLUT + PROMs, but not here, unless they've been dumped incorrectly) + +----- + +Notes below are for Street Fight video board only 6) TILE-BASED LAYERS @@ -232,7 +243,6 @@ conventional RAM. See the memory map for sprite data format. **************************************************************************** TODO: -- palette is incorporated - fix!!! - handle transparency in text layer properly (how?) - second bank of sf02 is this used? (probably NOT) - stfight/empcity YM2203s should be clocked at 1.5MHz but this results in @@ -254,8 +264,8 @@ TODO: static ADDRESS_MAP_START( cpu1_map, AS_PROGRAM, 8, stfight_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") /* sf02.bin */ - AM_RANGE(0xc000, 0xc0ff) AM_RAM_DEVWRITE("palette", palette_device, write_indirect) AM_SHARE("palette") - AM_RANGE(0xc100, 0xc1ff) AM_RAM_DEVWRITE("palette", palette_device, write_indirect_ext) AM_SHARE("palette_ext") + AM_RANGE(0xc000, 0xc0ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") + AM_RANGE(0xc100, 0xc1ff) AM_RAM_DEVWRITE("palette", palette_device, write_ext) AM_SHARE("palette_ext") AM_RANGE(0xc200, 0xc200) AM_READ_PORT("P1") AM_RANGE(0xc201, 0xc201) AM_READ_PORT("P2") AM_RANGE(0xc202, 0xc202) AM_READ_PORT("START") @@ -267,26 +277,34 @@ static ADDRESS_MAP_START( cpu1_map, AS_PROGRAM, 8, stfight_state ) AM_RANGE(0xc700, 0xc700) AM_WRITE(stfight_coin_w) AM_RANGE(0xc804, 0xc804) AM_WRITE(stfight_io_w) AM_RANGE(0xc806, 0xc806) AM_WRITENOP /* TBD */ - AM_RANGE(0xc807, 0xc807) AM_WRITE(stfight_sprite_bank_w) - AM_RANGE(0xd000, 0xd3ff) AM_RAM_WRITE(stfight_text_char_w) AM_SHARE("text_char_ram") - AM_RANGE(0xd400, 0xd7ff) AM_RAM_WRITE(stfight_text_attr_w) AM_SHARE("text_attr_ram") - AM_RANGE(0xd800, 0xd808) AM_WRITE(stfight_vh_latch_w) AM_SHARE("vh_latch_ram") AM_RANGE(0xe000, 0xefff) AM_RAM - AM_RANGE(0xf000, 0xffff) AM_RAM AM_SHARE("sprite_ram") ADDRESS_MAP_END +static ADDRESS_MAP_START( stfight_cpu1_map, AS_PROGRAM, 8, stfight_state ) + AM_RANGE(0xc807, 0xc807) AM_DEVWRITE("stfight_vid", stfight_video_device, stfight_sprite_bank_w) + AM_RANGE(0xd000, 0xd7ff) AM_RAM_DEVWRITE("stfight_vid", stfight_video_device, stfight_text_char_w) AM_SHARE("txram") + AM_RANGE(0xd800, 0xd808) AM_RAM_DEVWRITE("stfight_vid", stfight_video_device, stfight_vh_latch_w) AM_SHARE("vregs") + AM_RANGE(0xf000, 0xffff) AM_RAM AM_SHARE("sprite_ram") + AM_IMPORT_FROM(cpu1_map) +ADDRESS_MAP_END + + static ADDRESS_MAP_START( decrypted_opcodes_map, AS_DECRYPTED_OPCODES, 8, stfight_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_SHARE("decrypted_opcodes") ADDRESS_MAP_END + static ADDRESS_MAP_START( cshooter_cpu1_map, AS_PROGRAM, 8, stfight_state ) AM_RANGE(0xc801, 0xc801) AM_WRITE(stfight_bank_w) - AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(cshooter_text_w) AM_SHARE("tx_vram") + AM_RANGE(0xd000, 0xd7ff) AM_RAM_DEVWRITE("airraid_vid", airraid_video_device, txram_w) AM_SHARE("txram") + AM_RANGE(0xd800, 0xd80f) AM_RAM_DEVWRITE("airraid_vid", airraid_video_device, vregs_w) AM_SHARE("vregs") // wrong? AM_RANGE(0xe000, 0xfdff) AM_RAM AM_RANGE(0xfe00, 0xffff) AM_RAM AM_SHARE("sprite_ram") AM_IMPORT_FROM(cpu1_map) ADDRESS_MAP_END + + static ADDRESS_MAP_START( cpu2_map, AS_PROGRAM, 8, stfight_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE("ym1", ym2203_device, read, write) @@ -433,115 +451,15 @@ static INPUT_PORTS_START( cshooter ) PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW1:8" ) INPUT_PORTS_END -/* text-layer characters */ -static const gfx_layout charlayout = -{ - 8,8, /* 8*8 pixels */ - 512, /* 512 characters */ - 2, /* 2 bits per pixel */ - { 4, 0 }, - { 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3 }, - { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 }, - 8*16 /* every char takes 16 consecutive bytes */ -}; - -static const gfx_layout cshooter_charlayout = -{ - 8,8, /* 8*8 characters */ - RGN_FRAC(1,1), /* 512 characters */ - 2, /* 4 bits per pixel */ - { 0,4 }, - { 8,9,10,11,0,1,2,3 }, - { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 }, - 128*1 -}; -/* foreground tiles */ -static const gfx_layout fglayout = -{ - 16,16, /* 16*16 pixels */ - 1024, /* 1024 tiles */ - 4, /* 4 bits per pixel */ - { 64*1024*8+0, 64*1024*8+4, 0, 4 }, - { 0, 1, 2, 3, - 8, 9, 10, 11, - 32*8+0, 32*8+1, 32*8+ 2, 32*8+ 3, - 32*8+8, 32*8+9, 32*8+10, 32*8+11 }, - { 0*8, 2*8, 4*8, 6*8, - 8*8, 10*8, 12*8, 14*8, - 16*8, 18*8, 20*8, 22*8, - 24*8, 26*8, 28*8, 30*8 }, - 64*8 /* every char takes 64 consecutive bytes */ -}; -/* - * The background tiles are interleaved in banks of 2 - * - so we need to create two separate layout structs - * to handle them properly with tilemaps - */ - -/* background tiles */ -static const gfx_layout bglayout = -{ - 16,16, /* 16*16 pixels */ - 512, /* 512 tiles */ - 4, /* 4 bits per pixel */ - { 64*1024*8+4, 64*1024*8+0, 4, 0 }, - { 0, 1, 2, 3, - 8, 9, 10, 11, - 64*8+0, 64*8+1, 64*8+ 2, 64*8+ 3, - 64*8+8, 64*8+9, 64*8+10, 64*8+11 }, - { 0*8, 2*8, 4*8, 6*8, - 8*8, 10*8, 12*8, 14*8, - 16*8, 18*8, 20*8, 22*8, - 24*8, 26*8, 28*8, 30*8 }, - 128*8 /* every tile takes 64/128 consecutive bytes */ -}; - -/* sprites */ -static const gfx_layout spritelayout = -{ - 16,16, /* 16*16 pixels */ - 1024, /* 1024 sprites */ - 4, /* 4 bits per pixel */ - { 64*1024*8+0, 64*1024*8+4, 0, 4 }, - { 0, 1, 2, 3, - 8, 9, 10, 11, - 32*8+0, 32*8+1, 32*8+ 2, 32*8+ 3, - 32*8+8, 32*8+9, 32*8+10, 32*8+11 }, - { 0*8, 2*8, 4*8, 6*8, - 8*8, 10*8, 12*8, 14*8, - 16*8, 18*8, 20*8, 22*8, - 24*8, 26*8, 28*8, 30*8 }, - 64*8 /* every sprite takes 64 consecutive bytes */ -}; - - -static GFXDECODE_START( stfight ) - GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 0, 16 ) - GFXDECODE_ENTRY( "gfx2", 0x0000, fglayout, 16*4, 16 ) - GFXDECODE_ENTRY( "gfx3", 0x0000, bglayout, 16*4+16*16, 16 ) - GFXDECODE_ENTRY( "gfx3", 0x0020, bglayout, 16*4+16*16, 16 ) - GFXDECODE_ENTRY( "gfx4", 0x0000, spritelayout, 16*4+16*16+16*16, 16 ) -GFXDECODE_END - -static GFXDECODE_START( cshooter ) - GFXDECODE_ENTRY( "gfx1", 0x0000, cshooter_charlayout,0, 16 ) - GFXDECODE_ENTRY( "gfx2", 0x0000, fglayout, 16*4, 16 ) - GFXDECODE_ENTRY( "gfx3", 0x0000, bglayout, 16*4+16*16, 16 ) - GFXDECODE_ENTRY( "gfx3", 0x0020, bglayout, 16*4+16*16, 16 ) - GFXDECODE_ENTRY( "gfx4", 0x0000, spritelayout, 16*4+16*16+16*16, 16 ) -GFXDECODE_END - - -static MACHINE_CONFIG_START( stfight, stfight_state ) +static MACHINE_CONFIG_START( stfight_base, stfight_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz / 4) MCFG_CPU_PROGRAM_MAP(cpu1_map) - MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", stfight_state, stfight_vb_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("stfight_vid:screen", stfight_state, stfight_vb_interrupt) MCFG_CPU_ADD("audiocpu", Z80, XTAL_12MHz / 4) MCFG_CPU_PROGRAM_MAP(cpu2_map) @@ -552,21 +470,8 @@ static MACHINE_CONFIG_START( stfight, stfight_state ) MCFG_QUANTUM_TIME(attotime::from_hz(600)) - /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - 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(stfight_state, screen_update_stfight) - MCFG_SCREEN_PALETTE("palette") - MCFG_VIDEO_START_OVERRIDE(stfight_state,stfight) - - MCFG_GFXDECODE_ADD("gfxdecode", "palette", stfight) - MCFG_PALETTE_ADD("palette", 16*4+16*16+16*16+16*16) - MCFG_PALETTE_INDIRECT_ENTRIES(256) + MCFG_PALETTE_ADD("palette", 256) MCFG_PALETTE_FORMAT(xxxxBBBBRRRRGGGG) - MCFG_PALETTE_INIT_OWNER(stfight_state, stfight) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -590,30 +495,22 @@ static MACHINE_CONFIG_START( stfight, stfight_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) MACHINE_CONFIG_END +static MACHINE_CONFIG_DERIVED( stfight, stfight_base ) + MCFG_CPU_MODIFY("maincpu") + MCFG_CPU_PROGRAM_MAP(stfight_cpu1_map) + MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map) + MCFG_CPU_VBLANK_INT_DRIVER("stfight_vid:screen", stfight_state, stfight_vb_interrupt) -static MACHINE_CONFIG_DERIVED( cshooter, stfight ) - MCFG_CPU_REPLACE("maincpu", Z80, XTAL_12MHz / 2) + MCFG_STFIGHT_VIDEO_ADD("stfight_vid") +MACHINE_CONFIG_END + + +static MACHINE_CONFIG_DERIVED( cshooter, stfight_base ) + MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(cshooter_cpu1_map) - MCFG_DEVICE_REMOVE_ADDRESS_MAP(AS_DECRYPTED_OPCODES) - MCFG_CPU_VBLANK_INT_DRIVER("screen", stfight_state, stfight_vb_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("airraid_vid:screen", stfight_state, stfight_vb_interrupt) - MCFG_CPU_REPLACE("audiocpu", Z80, XTAL_12MHz / 2) - MCFG_CPU_PROGRAM_MAP(cpu2_map) - MCFG_CPU_PERIODIC_INT_DRIVER(stfight_state, irq0_line_hold, 120) - - MCFG_QUANTUM_TIME(attotime::from_hz(600)) - - MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_DRIVER(stfight_state, screen_update_cshooter) - - MCFG_GFXDECODE_MODIFY("gfxdecode", cshooter) - MCFG_VIDEO_START_OVERRIDE(stfight_state,cshooter) - - MCFG_SOUND_MODIFY("ym1") - MCFG_SOUND_CLOCK(XTAL_12MHz / 8) - - MCFG_SOUND_MODIFY("ym2") - MCFG_SOUND_CLOCK(XTAL_12MHz / 8) + MCFG_AIRRAID_VIDEO_ADD("airraid_vid") MACHINE_CONFIG_END @@ -635,45 +532,52 @@ ROM_START( empcity ) ROM_REGION( 0x0800, "mcu", 0 ) ROM_LOAD( "empcityu_68705.3j", 0x0000, 0x0800, CRC(182f7616) SHA1(38b4f23a559ae13f8ca1b974407a2a40fc52879f) ) - ROM_REGION( 0x02000, "gfx1", 0 ) /* character data */ + ROM_REGION( 0x02000, "stfight_vid:tx_gfx", 0 ) /* character data */ ROM_LOAD( "17.2N", 0x0000, 0x2000, CRC(1b3706b5) SHA1(61f069329a7a836523ffc8cce915b0d0129fd896) ) - ROM_REGION( 0x20000, "gfx2", 0 ) /* foreground tile pixel data */ + ROM_REGION( 0x20000, "stfight_vid:fg_gfx", 0 ) /* foreground tile pixel data */ ROM_LOAD( "7.4C", 0x10000, 0x8000, CRC(2c6caa5f) SHA1(f6893cb87004979ead331897c684f995f850447e) ) ROM_LOAD( "8.5C", 0x18000, 0x8000, CRC(e11ded31) SHA1(e3e634ad324d51e52d79dd79e5e6e5697cb8d21f) ) ROM_LOAD( "5.2C", 0x00000, 0x8000, CRC(0c099a31) SHA1(dabaf8edc59e4954941cd8176031a358f45a1956) ) ROM_LOAD( "6.3C", 0x08000, 0x8000, CRC(3cc77c31) SHA1(13d2324df5a322d499c9959a6bb3a844edaefb45) ) - ROM_REGION( 0x20000, "gfx3", 0 ) /* background tile pixel data */ + ROM_REGION( 0x20000, "stfight_vid:bg_gfx", 0 ) /* background tile pixel data */ ROM_LOAD( "13.4C", 0x10000, 0x8000, CRC(0ae48dd3) SHA1(ca3d9aeb9f4343c379cef9282e408fbf8aa67d99) ) ROM_LOAD( "14.5J", 0x18000, 0x8000, CRC(debf5d76) SHA1(eb18c35166eb5f93be98b3c30c7d909c0a68eada) ) ROM_LOAD( "11.2J", 0x00000, 0x8000, CRC(8261ecfe) SHA1(5817f4a0458a949298414fe09c86bbcf50be52f3) ) ROM_LOAD( "12.3J", 0x08000, 0x8000, CRC(71137301) SHA1(087a9f401939bc30f1dafa9916e8d8c564595a57) ) - ROM_REGION( 0x20000, "gfx4", 0 ) /* sprite data */ + ROM_REGION( 0x20000, "stfight_vid:spr_gfx", 0 ) /* sprite data */ ROM_LOAD( "20.8W", 0x10000, 0x8000, CRC(8299f247) SHA1(71891f7b1fbfaed14c3854b7f6e10a3ddb4bd479) ) ROM_LOAD( "21.9W", 0x18000, 0x8000, CRC(b57dc037) SHA1(69ac79a95ba9ace7c9ca7af480a4a10176be5ace) ) ROM_LOAD( "18.6W", 0x00000, 0x8000, CRC(68acd627) SHA1(f98ff9ccb0913711079a2988e8dd08695fb5e107) ) ROM_LOAD( "19.7W", 0x08000, 0x8000, CRC(5170a057) SHA1(9222f9febc222fa0c2eead258ad77c857f6d40c8) ) - ROM_REGION( 0x10000, "gfx5", 0 ) /* foreground map data */ + ROM_REGION( 0x10000, "stfight_vid:fg_map", 0 ) /* foreground map data */ ROM_LOAD( "9.7C", 0x00000, 0x8000, CRC(8ceaf4fe) SHA1(5698f2ff44c109825b8d9d0b6dd2426624df668b) ) ROM_LOAD( "10.8C", 0x08000, 0x8000, CRC(5a1a227a) SHA1(24928ab218824ae1f5380398ceb90dcad525cc08) ) - ROM_REGION( 0x10000, "gfx6", 0 ) /* background map data */ + ROM_REGION( 0x10000, "stfight_vid:bg_map", 0 ) /* background map data */ ROM_LOAD( "15.7J", 0x00000, 0x8000, CRC(27a310bc) SHA1(dd30d72bc33b0bf7ddaf3ab730e028f51b20152a) ) ROM_LOAD( "16.8J", 0x08000, 0x8000, CRC(3d19ce18) SHA1(38f691a23c96ef672637965c1a13f6d1595f9d51) ) - ROM_REGION( 0x0800, "proms", 0 ) + ROM_REGION( 0x0100, "stfight_vid:tx_clut", 0 ) ROM_LOAD( "82s129.006", 0x0000, 0x0100, CRC(f9424b5b) SHA1(e3bc23213406d35d54f1221f17f25d433df273a2) ) /* text lookup table */ - ROM_LOAD( "82s129.002", 0x0100, 0x0100, CRC(c883d49b) SHA1(e84900ccf6f27e5043e43c0d85ea1e4eee7e52d3) ) /* fg lookup table */ - ROM_LOAD( "82s129.003", 0x0200, 0x0100, CRC(af81882a) SHA1(b1008c991bd8d1157b3479e465ab286c70418b58) ) - ROM_LOAD( "82s129.004", 0x0300, 0x0100, CRC(1831ce7c) SHA1(57afbee9225f0efd63895a5f522e96dc87ca2616) ) /* bg lookup table */ - ROM_LOAD( "82s129.005", 0x0400, 0x0100, CRC(96cb6293) SHA1(1dcdeaa995e6ffa3753b742842c5ffe0f68ef8cd) ) - ROM_LOAD( "82s129.052", 0x0500, 0x0100, CRC(3d915ffc) SHA1(921be6d5e5fc0fdee9c9f545c1c4a0c334e9844c) ) /* sprite lookup table */ - ROM_LOAD( "82s129.066", 0x0600, 0x0100, CRC(51e8832f) SHA1(ed8c00559e7a02bb8c11861d747c8c64c01b7437) ) - ROM_LOAD( "82s129.015", 0x0700, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* timing? (not used) */ + ROM_REGION( 0x0100, "stfight_vid:fg_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.002", 0x0000, 0x0100, CRC(c883d49b) SHA1(e84900ccf6f27e5043e43c0d85ea1e4eee7e52d3) ) /* fg lookup table */ + ROM_LOAD_NIB_LOW( "82s129.003", 0x0000, 0x0100, CRC(af81882a) SHA1(b1008c991bd8d1157b3479e465ab286c70418b58) ) + + ROM_REGION( 0x0100, "stfight_vid:bg_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.004", 0x0000, 0x0100, CRC(1831ce7c) SHA1(57afbee9225f0efd63895a5f522e96dc87ca2616) ) /* bg lookup table */ + ROM_LOAD_NIB_LOW( "82s129.005", 0x0000, 0x0100, CRC(96cb6293) SHA1(1dcdeaa995e6ffa3753b742842c5ffe0f68ef8cd) ) + + ROM_REGION( 0x0100, "stfight_vid:spr_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.052", 0x0000, 0x0100, CRC(3d915ffc) SHA1(921be6d5e5fc0fdee9c9f545c1c4a0c334e9844c) ) /* sprite lookup table */ + ROM_LOAD_NIB_LOW( "82s129.066", 0x0000, 0x0100, CRC(51e8832f) SHA1(ed8c00559e7a02bb8c11861d747c8c64c01b7437) ) + + ROM_REGION( 0x0800, "proms", 0 ) + ROM_LOAD( "82s129.015", 0x0700, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* timing? (not used) */ ROM_REGION( 0x08000, "adpcm", 0 ) /* ADPCM voice data */ ROM_LOAD( "5J", 0x00000, 0x8000, CRC(1b8d0c07) SHA1(c163ccd2b7ed6c84facc075eb1564ca399f3ba17) ) ROM_END @@ -690,43 +594,51 @@ ROM_START( empcityu ) ROM_REGION( 0x0800, "mcu", 0 ) ROM_LOAD( "empcityu_68705.3j", 0x0000, 0x0800, CRC(182f7616) SHA1(38b4f23a559ae13f8ca1b974407a2a40fc52879f) ) - ROM_REGION( 0x02000, "gfx1", 0 ) /* character data */ + ROM_REGION( 0x02000, "stfight_vid:tx_gfx", 0 ) /* character data */ ROM_LOAD( "vid.2p", 0x0000, 0x2000, CRC(15593793) SHA1(ac9ca8a0aa0ce3810f45aa41e74d4946ecced245) ) - ROM_REGION( 0x20000, "gfx2", 0 ) /* foreground tile pixel data */ + ROM_REGION( 0x20000, "stfight_vid:fg_gfx", 0 ) /* foreground tile pixel data */ ROM_LOAD( "7.4C", 0x10000, 0x8000, CRC(2c6caa5f) SHA1(f6893cb87004979ead331897c684f995f850447e) ) ROM_LOAD( "8.5C", 0x18000, 0x8000, CRC(e11ded31) SHA1(e3e634ad324d51e52d79dd79e5e6e5697cb8d21f) ) ROM_LOAD( "5.2C", 0x00000, 0x8000, CRC(0c099a31) SHA1(dabaf8edc59e4954941cd8176031a358f45a1956) ) ROM_LOAD( "6.3C", 0x08000, 0x8000, CRC(3cc77c31) SHA1(13d2324df5a322d499c9959a6bb3a844edaefb45) ) - ROM_REGION( 0x20000, "gfx3", 0 ) /* background tile pixel data */ + ROM_REGION( 0x20000, "stfight_vid:bg_gfx", 0 ) /* background tile pixel data */ ROM_LOAD( "13.4C", 0x10000, 0x8000, CRC(0ae48dd3) SHA1(ca3d9aeb9f4343c379cef9282e408fbf8aa67d99) ) ROM_LOAD( "14.5J", 0x18000, 0x8000, CRC(debf5d76) SHA1(eb18c35166eb5f93be98b3c30c7d909c0a68eada) ) ROM_LOAD( "11.2J", 0x00000, 0x8000, CRC(8261ecfe) SHA1(5817f4a0458a949298414fe09c86bbcf50be52f3) ) ROM_LOAD( "12.3J", 0x08000, 0x8000, CRC(71137301) SHA1(087a9f401939bc30f1dafa9916e8d8c564595a57) ) - ROM_REGION( 0x20000, "gfx4", 0 ) /* sprite data */ + ROM_REGION( 0x20000, "stfight_vid:spr_gfx", 0 ) /* sprite data */ ROM_LOAD( "20.8W", 0x10000, 0x8000, CRC(8299f247) SHA1(71891f7b1fbfaed14c3854b7f6e10a3ddb4bd479) ) ROM_LOAD( "21.9W", 0x18000, 0x8000, CRC(b57dc037) SHA1(69ac79a95ba9ace7c9ca7af480a4a10176be5ace) ) ROM_LOAD( "18.6W", 0x00000, 0x8000, CRC(68acd627) SHA1(f98ff9ccb0913711079a2988e8dd08695fb5e107) ) ROM_LOAD( "19.7W", 0x08000, 0x8000, CRC(5170a057) SHA1(9222f9febc222fa0c2eead258ad77c857f6d40c8) ) - ROM_REGION( 0x10000, "gfx5", 0 ) /* foreground map data */ + ROM_REGION( 0x10000, "stfight_vid:fg_map", 0 ) /* foreground map data */ ROM_LOAD( "9.7C", 0x00000, 0x8000, CRC(8ceaf4fe) SHA1(5698f2ff44c109825b8d9d0b6dd2426624df668b) ) ROM_LOAD( "10.8C", 0x08000, 0x8000, CRC(5a1a227a) SHA1(24928ab218824ae1f5380398ceb90dcad525cc08) ) - ROM_REGION( 0x10000, "gfx6", 0 ) /* background map data */ + ROM_REGION( 0x10000, "stfight_vid:bg_map", 0 ) /* background map data */ ROM_LOAD( "15.7J", 0x00000, 0x8000, CRC(27a310bc) SHA1(dd30d72bc33b0bf7ddaf3ab730e028f51b20152a) ) ROM_LOAD( "16.8J", 0x08000, 0x8000, CRC(3d19ce18) SHA1(38f691a23c96ef672637965c1a13f6d1595f9d51) ) - ROM_REGION( 0x0800, "proms", 0 ) + ROM_REGION( 0x0100, "stfight_vid:tx_clut", 0 ) ROM_LOAD( "82s129.006", 0x0000, 0x0100, CRC(f9424b5b) SHA1(e3bc23213406d35d54f1221f17f25d433df273a2) ) /* text lookup table */ - ROM_LOAD( "82s129.002", 0x0100, 0x0100, CRC(c883d49b) SHA1(e84900ccf6f27e5043e43c0d85ea1e4eee7e52d3) ) /* fg lookup table */ - ROM_LOAD( "82s129.003", 0x0200, 0x0100, CRC(af81882a) SHA1(b1008c991bd8d1157b3479e465ab286c70418b58) ) - ROM_LOAD( "82s129.004", 0x0300, 0x0100, CRC(1831ce7c) SHA1(57afbee9225f0efd63895a5f522e96dc87ca2616) ) /* bg lookup table */ - ROM_LOAD( "82s129.005", 0x0400, 0x0100, CRC(96cb6293) SHA1(1dcdeaa995e6ffa3753b742842c5ffe0f68ef8cd) ) - ROM_LOAD( "82s129.052", 0x0500, 0x0100, CRC(3d915ffc) SHA1(921be6d5e5fc0fdee9c9f545c1c4a0c334e9844c) ) /* sprite lookup table */ - ROM_LOAD( "82s129.066", 0x0600, 0x0100, CRC(51e8832f) SHA1(ed8c00559e7a02bb8c11861d747c8c64c01b7437) ) + + ROM_REGION( 0x0100, "stfight_vid:fg_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.002", 0x0000, 0x0100, CRC(c883d49b) SHA1(e84900ccf6f27e5043e43c0d85ea1e4eee7e52d3) ) /* fg lookup table */ + ROM_LOAD_NIB_LOW( "82s129.003", 0x0000, 0x0100, CRC(af81882a) SHA1(b1008c991bd8d1157b3479e465ab286c70418b58) ) + + ROM_REGION( 0x0100, "stfight_vid:bg_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.004", 0x0000, 0x0100, CRC(1831ce7c) SHA1(57afbee9225f0efd63895a5f522e96dc87ca2616) ) /* bg lookup table */ + ROM_LOAD_NIB_LOW( "82s129.005", 0x0000, 0x0100, CRC(96cb6293) SHA1(1dcdeaa995e6ffa3753b742842c5ffe0f68ef8cd) ) + + ROM_REGION( 0x0100, "stfight_vid:spr_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.052", 0x0000, 0x0100, CRC(3d915ffc) SHA1(921be6d5e5fc0fdee9c9f545c1c4a0c334e9844c) ) /* sprite lookup table */ + ROM_LOAD_NIB_LOW( "82s129.066", 0x0000, 0x0100, CRC(51e8832f) SHA1(ed8c00559e7a02bb8c11861d747c8c64c01b7437) ) + + ROM_REGION( 0x0800, "proms", 0 ) ROM_LOAD( "82s129.015", 0x0700, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* timing? (not used) */ ROM_REGION( 0x08000, "adpcm", 0 ) /* ADPCM voice data */ @@ -747,43 +659,51 @@ ROM_START( empcityj ) ROM_REGION( 0x0800, "mcu", 0 ) ROM_LOAD( "empcityj_68705.3j", 0x0000, 0x0800, BAD_DUMP CRC(19bdb0a9) SHA1(6baba9a46d64ae8349c7e9713419141f76a7af96) ) - ROM_REGION( 0x02000, "gfx1", 0 ) /* character data */ + ROM_REGION( 0x02000, "stfight_vid:tx_gfx", 0 ) /* character data */ ROM_LOAD( "17.2N", 0x0000, 0x2000, CRC(1b3706b5) SHA1(61f069329a7a836523ffc8cce915b0d0129fd896) ) - ROM_REGION( 0x20000, "gfx2", 0 ) /* foreground tile pixel data */ + ROM_REGION( 0x20000, "stfight_vid:fg_gfx", 0 ) /* foreground tile pixel data */ ROM_LOAD( "7.4C", 0x10000, 0x8000, CRC(2c6caa5f) SHA1(f6893cb87004979ead331897c684f995f850447e) ) ROM_LOAD( "8.5C", 0x18000, 0x8000, CRC(e11ded31) SHA1(e3e634ad324d51e52d79dd79e5e6e5697cb8d21f) ) ROM_LOAD( "5.2C", 0x00000, 0x8000, CRC(0c099a31) SHA1(dabaf8edc59e4954941cd8176031a358f45a1956) ) ROM_LOAD( "6.3C", 0x08000, 0x8000, CRC(3cc77c31) SHA1(13d2324df5a322d499c9959a6bb3a844edaefb45) ) - ROM_REGION( 0x20000, "gfx3", 0 ) /* background tile pixel data */ + ROM_REGION( 0x20000, "stfight_vid:bg_gfx", 0 ) /* background tile pixel data */ ROM_LOAD( "13.4C", 0x10000, 0x8000, CRC(0ae48dd3) SHA1(ca3d9aeb9f4343c379cef9282e408fbf8aa67d99) ) ROM_LOAD( "14.5J", 0x18000, 0x8000, CRC(debf5d76) SHA1(eb18c35166eb5f93be98b3c30c7d909c0a68eada) ) ROM_LOAD( "11.2J", 0x00000, 0x8000, CRC(8261ecfe) SHA1(5817f4a0458a949298414fe09c86bbcf50be52f3) ) ROM_LOAD( "12.3J", 0x08000, 0x8000, CRC(71137301) SHA1(087a9f401939bc30f1dafa9916e8d8c564595a57) ) - ROM_REGION( 0x20000, "gfx4", 0 ) /* sprite data */ + ROM_REGION( 0x20000, "stfight_vid:spr_gfx", 0 ) /* sprite data */ ROM_LOAD( "20.8W", 0x10000, 0x8000, CRC(8299f247) SHA1(71891f7b1fbfaed14c3854b7f6e10a3ddb4bd479) ) ROM_LOAD( "21.9W", 0x18000, 0x8000, CRC(b57dc037) SHA1(69ac79a95ba9ace7c9ca7af480a4a10176be5ace) ) ROM_LOAD( "18.6W", 0x00000, 0x8000, CRC(68acd627) SHA1(f98ff9ccb0913711079a2988e8dd08695fb5e107) ) ROM_LOAD( "19.7W", 0x08000, 0x8000, CRC(5170a057) SHA1(9222f9febc222fa0c2eead258ad77c857f6d40c8) ) - ROM_REGION( 0x10000, "gfx5", 0 ) /* foreground map data */ + ROM_REGION( 0x10000, "stfight_vid:fg_map", 0 ) /* foreground map data */ ROM_LOAD( "9.7C", 0x00000, 0x8000, CRC(8ceaf4fe) SHA1(5698f2ff44c109825b8d9d0b6dd2426624df668b) ) ROM_LOAD( "10.8C", 0x08000, 0x8000, CRC(5a1a227a) SHA1(24928ab218824ae1f5380398ceb90dcad525cc08) ) - ROM_REGION( 0x10000, "gfx6", 0 ) /* background map data */ + ROM_REGION( 0x10000, "stfight_vid:bg_map", 0 ) /* background map data */ ROM_LOAD( "15.7J", 0x00000, 0x8000, CRC(27a310bc) SHA1(dd30d72bc33b0bf7ddaf3ab730e028f51b20152a) ) ROM_LOAD( "16.8J", 0x08000, 0x8000, CRC(3d19ce18) SHA1(38f691a23c96ef672637965c1a13f6d1595f9d51) ) - ROM_REGION( 0x0800, "proms", 0 ) + ROM_REGION( 0x0100, "stfight_vid:tx_clut", 0 ) ROM_LOAD( "82s129.006", 0x0000, 0x0100, CRC(f9424b5b) SHA1(e3bc23213406d35d54f1221f17f25d433df273a2) ) /* text lookup table */ - ROM_LOAD( "82s129.002", 0x0100, 0x0100, CRC(c883d49b) SHA1(e84900ccf6f27e5043e43c0d85ea1e4eee7e52d3) ) /* fg lookup table */ - ROM_LOAD( "82s129.003", 0x0200, 0x0100, CRC(af81882a) SHA1(b1008c991bd8d1157b3479e465ab286c70418b58) ) - ROM_LOAD( "82s129.004", 0x0300, 0x0100, CRC(1831ce7c) SHA1(57afbee9225f0efd63895a5f522e96dc87ca2616) ) /* bg lookup table */ - ROM_LOAD( "82s129.005", 0x0400, 0x0100, CRC(96cb6293) SHA1(1dcdeaa995e6ffa3753b742842c5ffe0f68ef8cd) ) - ROM_LOAD( "82s129.052", 0x0500, 0x0100, CRC(3d915ffc) SHA1(921be6d5e5fc0fdee9c9f545c1c4a0c334e9844c) ) /* sprite lookup table */ - ROM_LOAD( "82s129.066", 0x0600, 0x0100, CRC(51e8832f) SHA1(ed8c00559e7a02bb8c11861d747c8c64c01b7437) ) + + ROM_REGION( 0x0100, "stfight_vid:fg_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.002", 0x0000, 0x0100, CRC(c883d49b) SHA1(e84900ccf6f27e5043e43c0d85ea1e4eee7e52d3) ) /* fg lookup table */ + ROM_LOAD_NIB_LOW( "82s129.003", 0x0000, 0x0100, CRC(af81882a) SHA1(b1008c991bd8d1157b3479e465ab286c70418b58) ) + + ROM_REGION( 0x0100, "stfight_vid:bg_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.004", 0x0000, 0x0100, CRC(1831ce7c) SHA1(57afbee9225f0efd63895a5f522e96dc87ca2616) ) /* bg lookup table */ + ROM_LOAD_NIB_LOW( "82s129.005", 0x0000, 0x0100, CRC(96cb6293) SHA1(1dcdeaa995e6ffa3753b742842c5ffe0f68ef8cd) ) + + ROM_REGION( 0x0100, "stfight_vid:spr_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.052", 0x0000, 0x0100, CRC(3d915ffc) SHA1(921be6d5e5fc0fdee9c9f545c1c4a0c334e9844c) ) /* sprite lookup table */ + ROM_LOAD_NIB_LOW( "82s129.066", 0x0000, 0x0100, CRC(51e8832f) SHA1(ed8c00559e7a02bb8c11861d747c8c64c01b7437) ) + + ROM_REGION( 0x0800, "proms", 0 ) ROM_LOAD( "82s129.015", 0x0700, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* timing? (not used) */ ROM_REGION( 0x08000, "adpcm", 0 ) /* ADPCM voice data */ @@ -801,43 +721,51 @@ ROM_START( stfight ) ROM_REGION( 0x0800, "mcu", 0 ) ROM_LOAD( "stfight_68705.3j", 0x0000, 0x0800, BAD_DUMP CRC(f4cc50d6) SHA1(2ff62a349b74fa965b5d19615e52b867c04988dc) ) - ROM_REGION( 0x02000, "gfx1", 0 ) /* character data */ + ROM_REGION( 0x02000, "stfight_vid:tx_gfx", 0 ) /* character data */ ROM_LOAD( "17.2N", 0x0000, 0x2000, CRC(1b3706b5) SHA1(61f069329a7a836523ffc8cce915b0d0129fd896) ) - ROM_REGION( 0x20000, "gfx2", 0 ) /* foreground tile pixel data */ + ROM_REGION( 0x20000, "stfight_vid:fg_gfx", 0 ) /* foreground tile pixel data */ ROM_LOAD( "7.4C", 0x10000, 0x8000, CRC(2c6caa5f) SHA1(f6893cb87004979ead331897c684f995f850447e) ) ROM_LOAD( "8.5C", 0x18000, 0x8000, CRC(e11ded31) SHA1(e3e634ad324d51e52d79dd79e5e6e5697cb8d21f) ) ROM_LOAD( "5.2C", 0x00000, 0x8000, CRC(0c099a31) SHA1(dabaf8edc59e4954941cd8176031a358f45a1956) ) ROM_LOAD( "6.3C", 0x08000, 0x8000, CRC(3cc77c31) SHA1(13d2324df5a322d499c9959a6bb3a844edaefb45) ) - ROM_REGION( 0x20000, "gfx3", 0 ) /* background tile pixel data */ + ROM_REGION( 0x20000, "stfight_vid:bg_gfx", 0 ) /* background tile pixel data */ ROM_LOAD( "13.4C", 0x10000, 0x8000, CRC(0ae48dd3) SHA1(ca3d9aeb9f4343c379cef9282e408fbf8aa67d99) ) ROM_LOAD( "14.5J", 0x18000, 0x8000, CRC(debf5d76) SHA1(eb18c35166eb5f93be98b3c30c7d909c0a68eada) ) ROM_LOAD( "11.2J", 0x00000, 0x8000, CRC(8261ecfe) SHA1(5817f4a0458a949298414fe09c86bbcf50be52f3) ) ROM_LOAD( "12.3J", 0x08000, 0x8000, CRC(71137301) SHA1(087a9f401939bc30f1dafa9916e8d8c564595a57) ) - ROM_REGION( 0x20000, "gfx4", 0 ) /* sprite data */ + ROM_REGION( 0x20000, "stfight_vid:spr_gfx", 0 ) /* sprite data */ ROM_LOAD( "20.8W", 0x10000, 0x8000, CRC(8299f247) SHA1(71891f7b1fbfaed14c3854b7f6e10a3ddb4bd479) ) ROM_LOAD( "21.9W", 0x18000, 0x8000, CRC(b57dc037) SHA1(69ac79a95ba9ace7c9ca7af480a4a10176be5ace) ) ROM_LOAD( "18.6W", 0x00000, 0x8000, CRC(68acd627) SHA1(f98ff9ccb0913711079a2988e8dd08695fb5e107) ) ROM_LOAD( "19.7W", 0x08000, 0x8000, CRC(5170a057) SHA1(9222f9febc222fa0c2eead258ad77c857f6d40c8) ) - ROM_REGION( 0x10000, "gfx5", 0 ) /* foreground map data */ + ROM_REGION( 0x10000, "stfight_vid:fg_map", 0 ) /* foreground map data */ ROM_LOAD( "9.7C", 0x00000, 0x8000, CRC(8ceaf4fe) SHA1(5698f2ff44c109825b8d9d0b6dd2426624df668b) ) ROM_LOAD( "10.8C", 0x08000, 0x8000, CRC(5a1a227a) SHA1(24928ab218824ae1f5380398ceb90dcad525cc08) ) - ROM_REGION( 0x10000, "gfx6", 0 ) /* background map data */ + ROM_REGION( 0x10000, "stfight_vid:bg_map", 0 ) /* background map data */ ROM_LOAD( "15.7J", 0x00000, 0x8000, CRC(27a310bc) SHA1(dd30d72bc33b0bf7ddaf3ab730e028f51b20152a) ) ROM_LOAD( "16.8J", 0x08000, 0x8000, CRC(3d19ce18) SHA1(38f691a23c96ef672637965c1a13f6d1595f9d51) ) - ROM_REGION( 0x0800, "proms", 0 ) + ROM_REGION( 0x0100, "stfight_vid:tx_clut", 0 ) ROM_LOAD( "82s129.006", 0x0000, 0x0100, CRC(f9424b5b) SHA1(e3bc23213406d35d54f1221f17f25d433df273a2) ) /* text lookup table */ - ROM_LOAD( "82s129.002", 0x0100, 0x0100, CRC(c883d49b) SHA1(e84900ccf6f27e5043e43c0d85ea1e4eee7e52d3) ) /* fg lookup table */ - ROM_LOAD( "82s129.003", 0x0200, 0x0100, CRC(af81882a) SHA1(b1008c991bd8d1157b3479e465ab286c70418b58) ) - ROM_LOAD( "82s129.004", 0x0300, 0x0100, CRC(1831ce7c) SHA1(57afbee9225f0efd63895a5f522e96dc87ca2616) ) /* bg lookup table */ - ROM_LOAD( "82s129.005", 0x0400, 0x0100, CRC(96cb6293) SHA1(1dcdeaa995e6ffa3753b742842c5ffe0f68ef8cd) ) - ROM_LOAD( "82s129.052", 0x0500, 0x0100, CRC(3d915ffc) SHA1(921be6d5e5fc0fdee9c9f545c1c4a0c334e9844c) ) /* sprite lookup table */ - ROM_LOAD( "82s129.066", 0x0600, 0x0100, CRC(51e8832f) SHA1(ed8c00559e7a02bb8c11861d747c8c64c01b7437) ) + + ROM_REGION( 0x0100, "stfight_vid:fg_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.002", 0x0000, 0x0100, CRC(c883d49b) SHA1(e84900ccf6f27e5043e43c0d85ea1e4eee7e52d3) ) /* fg lookup table */ + ROM_LOAD_NIB_LOW( "82s129.003", 0x0000, 0x0100, CRC(af81882a) SHA1(b1008c991bd8d1157b3479e465ab286c70418b58) ) + + ROM_REGION( 0x0100, "stfight_vid:bg_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.004", 0x0000, 0x0100, CRC(1831ce7c) SHA1(57afbee9225f0efd63895a5f522e96dc87ca2616) ) /* bg lookup table */ + ROM_LOAD_NIB_LOW( "82s129.005", 0x0000, 0x0100, CRC(96cb6293) SHA1(1dcdeaa995e6ffa3753b742842c5ffe0f68ef8cd) ) + + ROM_REGION( 0x0100, "stfight_vid:spr_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.052", 0x0000, 0x0100, CRC(3d915ffc) SHA1(921be6d5e5fc0fdee9c9f545c1c4a0c334e9844c) ) /* sprite lookup table */ + ROM_LOAD_NIB_LOW( "82s129.066", 0x0000, 0x0100, CRC(51e8832f) SHA1(ed8c00559e7a02bb8c11861d747c8c64c01b7437) ) + + ROM_REGION( 0x0800, "proms", 0 ) ROM_LOAD( "82s129.015", 0x0700, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* timing? (not used) */ ROM_REGION( 0x08000, "adpcm", 0 ) /* ADPCM voice data */ @@ -857,43 +785,51 @@ ROM_START( stfighta ) ROM_REGION( 0x0800, "mcu", 0 ) ROM_LOAD( "stfight_68705.3j", 0x0000, 0x0800, BAD_DUMP CRC(f4cc50d6) SHA1(2ff62a349b74fa965b5d19615e52b867c04988dc) ) - ROM_REGION( 0x02000, "gfx1", 0 ) /* character data */ + ROM_REGION( 0x02000, "stfight_vid:tx_gfx", 0 ) /* character data */ ROM_LOAD( "17.2N", 0x0000, 0x2000, CRC(1b3706b5) SHA1(61f069329a7a836523ffc8cce915b0d0129fd896) ) - ROM_REGION( 0x20000, "gfx2", 0 ) /* foreground tile pixel data */ + ROM_REGION( 0x20000, "stfight_vid:fg_gfx", 0 ) /* foreground tile pixel data */ ROM_LOAD( "7.4C", 0x10000, 0x8000, CRC(2c6caa5f) SHA1(f6893cb87004979ead331897c684f995f850447e) ) ROM_LOAD( "8.5C", 0x18000, 0x8000, CRC(e11ded31) SHA1(e3e634ad324d51e52d79dd79e5e6e5697cb8d21f) ) ROM_LOAD( "5.2C", 0x00000, 0x8000, CRC(0c099a31) SHA1(dabaf8edc59e4954941cd8176031a358f45a1956) ) ROM_LOAD( "6.3C", 0x08000, 0x8000, CRC(3cc77c31) SHA1(13d2324df5a322d499c9959a6bb3a844edaefb45) ) - ROM_REGION( 0x20000, "gfx3", 0 ) /* background tile pixel data */ + ROM_REGION( 0x20000, "stfight_vid:bg_gfx", 0 ) /* background tile pixel data */ ROM_LOAD( "13.4C", 0x10000, 0x8000, CRC(0ae48dd3) SHA1(ca3d9aeb9f4343c379cef9282e408fbf8aa67d99) ) ROM_LOAD( "14.5J", 0x18000, 0x8000, CRC(debf5d76) SHA1(eb18c35166eb5f93be98b3c30c7d909c0a68eada) ) ROM_LOAD( "11.2J", 0x00000, 0x8000, CRC(8261ecfe) SHA1(5817f4a0458a949298414fe09c86bbcf50be52f3) ) ROM_LOAD( "12.3J", 0x08000, 0x8000, CRC(71137301) SHA1(087a9f401939bc30f1dafa9916e8d8c564595a57) ) - ROM_REGION( 0x20000, "gfx4", 0 ) /* sprite data */ + ROM_REGION( 0x20000, "stfight_vid:spr_gfx", 0 ) /* sprite data */ ROM_LOAD( "20.8W", 0x10000, 0x8000, CRC(8299f247) SHA1(71891f7b1fbfaed14c3854b7f6e10a3ddb4bd479) ) ROM_LOAD( "21.9W", 0x18000, 0x8000, CRC(b57dc037) SHA1(69ac79a95ba9ace7c9ca7af480a4a10176be5ace) ) ROM_LOAD( "18.6W", 0x00000, 0x8000, CRC(68acd627) SHA1(f98ff9ccb0913711079a2988e8dd08695fb5e107) ) ROM_LOAD( "19.7W", 0x08000, 0x8000, CRC(5170a057) SHA1(9222f9febc222fa0c2eead258ad77c857f6d40c8) ) - ROM_REGION( 0x10000, "gfx5", 0 ) /* foreground map data */ + ROM_REGION( 0x10000, "stfight_vid:fg_map", 0 ) /* foreground map data */ ROM_LOAD( "9.7C", 0x00000, 0x8000, CRC(8ceaf4fe) SHA1(5698f2ff44c109825b8d9d0b6dd2426624df668b) ) ROM_LOAD( "10.8C", 0x08000, 0x8000, CRC(5a1a227a) SHA1(24928ab218824ae1f5380398ceb90dcad525cc08) ) - ROM_REGION( 0x10000, "gfx6", 0 ) /* background map data */ + ROM_REGION( 0x10000, "stfight_vid:bg_map", 0 ) /* background map data */ ROM_LOAD( "15.7J", 0x00000, 0x8000, CRC(27a310bc) SHA1(dd30d72bc33b0bf7ddaf3ab730e028f51b20152a) ) ROM_LOAD( "16.8J", 0x08000, 0x8000, CRC(3d19ce18) SHA1(38f691a23c96ef672637965c1a13f6d1595f9d51) ) - ROM_REGION( 0x0800, "proms", 0 ) + ROM_REGION( 0x0100, "stfight_vid:tx_clut", 0 ) ROM_LOAD( "82s129.006", 0x0000, 0x0100, CRC(f9424b5b) SHA1(e3bc23213406d35d54f1221f17f25d433df273a2) ) /* text lookup table */ - ROM_LOAD( "82s129.002", 0x0100, 0x0100, CRC(c883d49b) SHA1(e84900ccf6f27e5043e43c0d85ea1e4eee7e52d3) ) /* fg lookup table */ - ROM_LOAD( "82s129.003", 0x0200, 0x0100, CRC(af81882a) SHA1(b1008c991bd8d1157b3479e465ab286c70418b58) ) - ROM_LOAD( "82s129.004", 0x0300, 0x0100, CRC(1831ce7c) SHA1(57afbee9225f0efd63895a5f522e96dc87ca2616) ) /* bg lookup table */ - ROM_LOAD( "82s129.005", 0x0400, 0x0100, CRC(96cb6293) SHA1(1dcdeaa995e6ffa3753b742842c5ffe0f68ef8cd) ) - ROM_LOAD( "82s129.052", 0x0500, 0x0100, CRC(3d915ffc) SHA1(921be6d5e5fc0fdee9c9f545c1c4a0c334e9844c) ) /* sprite lookup table */ - ROM_LOAD( "82s129.066", 0x0600, 0x0100, CRC(51e8832f) SHA1(ed8c00559e7a02bb8c11861d747c8c64c01b7437) ) + + ROM_REGION( 0x0100, "stfight_vid:fg_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.002", 0x0000, 0x0100, CRC(c883d49b) SHA1(e84900ccf6f27e5043e43c0d85ea1e4eee7e52d3) ) /* fg lookup table */ + ROM_LOAD_NIB_LOW( "82s129.003", 0x0000, 0x0100, CRC(af81882a) SHA1(b1008c991bd8d1157b3479e465ab286c70418b58) ) + + ROM_REGION( 0x0100, "stfight_vid:bg_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.004", 0x0000, 0x0100, CRC(1831ce7c) SHA1(57afbee9225f0efd63895a5f522e96dc87ca2616) ) /* bg lookup table */ + ROM_LOAD_NIB_LOW( "82s129.005", 0x0000, 0x0100, CRC(96cb6293) SHA1(1dcdeaa995e6ffa3753b742842c5ffe0f68ef8cd) ) + + ROM_REGION( 0x0100, "stfight_vid:spr_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.052", 0x0000, 0x0100, CRC(3d915ffc) SHA1(921be6d5e5fc0fdee9c9f545c1c4a0c334e9844c) ) /* sprite lookup table */ + ROM_LOAD_NIB_LOW( "82s129.066", 0x0000, 0x0100, CRC(51e8832f) SHA1(ed8c00559e7a02bb8c11861d747c8c64c01b7437) ) + + ROM_REGION( 0x0800, "proms", 0 ) ROM_LOAD( "82s129.015", 0x0700, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* timing? (not used) */ ROM_REGION( 0x08000, "adpcm", 0 ) /* ADPCM voice data */ @@ -911,43 +847,51 @@ ROM_START( empcityi ) // very similar to above set ROM_REGION( 0x0800, "mcu", 0 ) ROM_LOAD( "empcityi_68705.3j", 0x0000, 0x0800, BAD_DUMP CRC(b1817d44) SHA1(395aad763eb054514f658a14c12b92c1b90c02ce) ) - ROM_REGION( 0x02000, "gfx1", 0 ) /* character data */ + ROM_REGION( 0x02000, "stfight_vid:tx_gfx", 0 ) /* character data */ ROM_LOAD( "17.2N", 0x0000, 0x2000, CRC(1b3706b5) SHA1(61f069329a7a836523ffc8cce915b0d0129fd896) ) - ROM_REGION( 0x20000, "gfx2", 0 ) /* foreground tile pixel data */ + ROM_REGION( 0x20000, "stfight_vid:fg_gfx", 0 ) /* foreground tile pixel data */ ROM_LOAD( "7.4C", 0x10000, 0x8000, CRC(2c6caa5f) SHA1(f6893cb87004979ead331897c684f995f850447e) ) ROM_LOAD( "8.5C", 0x18000, 0x8000, CRC(e11ded31) SHA1(e3e634ad324d51e52d79dd79e5e6e5697cb8d21f) ) ROM_LOAD( "5.2C", 0x00000, 0x8000, CRC(0c099a31) SHA1(dabaf8edc59e4954941cd8176031a358f45a1956) ) ROM_LOAD( "6.3C", 0x08000, 0x8000, CRC(3cc77c31) SHA1(13d2324df5a322d499c9959a6bb3a844edaefb45) ) - ROM_REGION( 0x20000, "gfx3", 0 ) /* background tile pixel data */ + ROM_REGION( 0x20000, "stfight_vid:bg_gfx", 0 ) /* background tile pixel data */ ROM_LOAD( "13.4C", 0x10000, 0x8000, CRC(0ae48dd3) SHA1(ca3d9aeb9f4343c379cef9282e408fbf8aa67d99) ) ROM_LOAD( "14.5J", 0x18000, 0x8000, CRC(debf5d76) SHA1(eb18c35166eb5f93be98b3c30c7d909c0a68eada) ) ROM_LOAD( "11.2J", 0x00000, 0x8000, CRC(8261ecfe) SHA1(5817f4a0458a949298414fe09c86bbcf50be52f3) ) ROM_LOAD( "12.3J", 0x08000, 0x8000, CRC(71137301) SHA1(087a9f401939bc30f1dafa9916e8d8c564595a57) ) - ROM_REGION( 0x20000, "gfx4", 0 ) /* sprite data */ + ROM_REGION( 0x20000, "stfight_vid:spr_gfx", 0 ) /* sprite data */ ROM_LOAD( "20.8W", 0x10000, 0x8000, CRC(8299f247) SHA1(71891f7b1fbfaed14c3854b7f6e10a3ddb4bd479) ) ROM_LOAD( "21.9W", 0x18000, 0x8000, CRC(b57dc037) SHA1(69ac79a95ba9ace7c9ca7af480a4a10176be5ace) ) ROM_LOAD( "18.6W", 0x00000, 0x8000, CRC(68acd627) SHA1(f98ff9ccb0913711079a2988e8dd08695fb5e107) ) ROM_LOAD( "19.7W", 0x08000, 0x8000, CRC(5170a057) SHA1(9222f9febc222fa0c2eead258ad77c857f6d40c8) ) - ROM_REGION( 0x10000, "gfx5", 0 ) /* foreground map data */ + ROM_REGION( 0x10000, "stfight_vid:fg_map", 0 ) /* foreground map data */ ROM_LOAD( "9.7C", 0x00000, 0x8000, CRC(8ceaf4fe) SHA1(5698f2ff44c109825b8d9d0b6dd2426624df668b) ) ROM_LOAD( "10.8C", 0x08000, 0x8000, CRC(5a1a227a) SHA1(24928ab218824ae1f5380398ceb90dcad525cc08) ) - ROM_REGION( 0x10000, "gfx6", 0 ) /* background map data */ + ROM_REGION( 0x10000, "stfight_vid:bg_map", 0 ) /* background map data */ ROM_LOAD( "15.7J", 0x00000, 0x8000, CRC(27a310bc) SHA1(dd30d72bc33b0bf7ddaf3ab730e028f51b20152a) ) ROM_LOAD( "16.8J", 0x08000, 0x8000, CRC(3d19ce18) SHA1(38f691a23c96ef672637965c1a13f6d1595f9d51) ) - ROM_REGION( 0x0800, "proms", 0 ) + ROM_REGION( 0x0100, "stfight_vid:tx_clut", 0 ) ROM_LOAD( "82s129.006", 0x0000, 0x0100, CRC(f9424b5b) SHA1(e3bc23213406d35d54f1221f17f25d433df273a2) ) /* text lookup table */ - ROM_LOAD( "82s129.002", 0x0100, 0x0100, CRC(c883d49b) SHA1(e84900ccf6f27e5043e43c0d85ea1e4eee7e52d3) ) /* fg lookup table */ - ROM_LOAD( "82s129.003", 0x0200, 0x0100, CRC(af81882a) SHA1(b1008c991bd8d1157b3479e465ab286c70418b58) ) - ROM_LOAD( "82s129.004", 0x0300, 0x0100, CRC(1831ce7c) SHA1(57afbee9225f0efd63895a5f522e96dc87ca2616) ) /* bg lookup table */ - ROM_LOAD( "82s129.005", 0x0400, 0x0100, CRC(96cb6293) SHA1(1dcdeaa995e6ffa3753b742842c5ffe0f68ef8cd) ) - ROM_LOAD( "82s129.052", 0x0500, 0x0100, CRC(3d915ffc) SHA1(921be6d5e5fc0fdee9c9f545c1c4a0c334e9844c) ) /* sprite lookup table */ - ROM_LOAD( "82s129.066", 0x0600, 0x0100, CRC(51e8832f) SHA1(ed8c00559e7a02bb8c11861d747c8c64c01b7437) ) + + ROM_REGION( 0x0100, "stfight_vid:fg_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.002", 0x0000, 0x0100, CRC(c883d49b) SHA1(e84900ccf6f27e5043e43c0d85ea1e4eee7e52d3) ) /* fg lookup table */ + ROM_LOAD_NIB_LOW( "82s129.003", 0x0000, 0x0100, CRC(af81882a) SHA1(b1008c991bd8d1157b3479e465ab286c70418b58) ) + + ROM_REGION( 0x0100, "stfight_vid:bg_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.004", 0x0000, 0x0100, CRC(1831ce7c) SHA1(57afbee9225f0efd63895a5f522e96dc87ca2616) ) /* bg lookup table */ + ROM_LOAD_NIB_LOW( "82s129.005", 0x0000, 0x0100, CRC(96cb6293) SHA1(1dcdeaa995e6ffa3753b742842c5ffe0f68ef8cd) ) + + ROM_REGION( 0x0100, "stfight_vid:spr_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.052", 0x0000, 0x0100, CRC(3d915ffc) SHA1(921be6d5e5fc0fdee9c9f545c1c4a0c334e9844c) ) /* sprite lookup table */ + ROM_LOAD_NIB_LOW( "82s129.066", 0x0000, 0x0100, CRC(51e8832f) SHA1(ed8c00559e7a02bb8c11861d747c8c64c01b7437) ) + + ROM_REGION( 0x0800, "proms", 0 ) ROM_LOAD( "82s129.015", 0x0700, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* timing? (not used) */ ROM_REGION( 0x08000, "adpcm", 0 ) /* ADPCM voice data */ @@ -965,43 +909,51 @@ ROM_START( stfightgb ) ROM_REGION( 0x0800, "mcu", 0 ) ROM_LOAD( "stfightgb_68705.3J", 0x0000, 0x0800, BAD_DUMP CRC(3b1b2660) SHA1(8d5d853a0861ff9cdea27eb3588586b441cc77b1) ) //hand-crafted, to be dumped - ROM_REGION( 0x02000, "gfx1", 0 ) /* character data */ + ROM_REGION( 0x02000, "stfight_vid:tx_gfx", 0 ) /* character data */ ROM_LOAD( "17.2N", 0x0000, 0x2000, CRC(1b3706b5) SHA1(61f069329a7a836523ffc8cce915b0d0129fd896) ) - ROM_REGION( 0x20000, "gfx2", 0 ) /* foreground tile pixel data */ + ROM_REGION( 0x20000, "stfight_vid:fg_gfx", 0 ) /* foreground tile pixel data */ ROM_LOAD( "7.4C", 0x10000, 0x8000, CRC(2c6caa5f) SHA1(f6893cb87004979ead331897c684f995f850447e) ) ROM_LOAD( "8.5C", 0x18000, 0x8000, CRC(e11ded31) SHA1(e3e634ad324d51e52d79dd79e5e6e5697cb8d21f) ) ROM_LOAD( "5.2C", 0x00000, 0x8000, CRC(0c099a31) SHA1(dabaf8edc59e4954941cd8176031a358f45a1956) ) ROM_LOAD( "6.3C", 0x08000, 0x8000, CRC(3cc77c31) SHA1(13d2324df5a322d499c9959a6bb3a844edaefb45) ) - ROM_REGION( 0x20000, "gfx3", 0 ) /* background tile pixel data */ + ROM_REGION( 0x20000, "stfight_vid:bg_gfx", 0 ) /* background tile pixel data */ ROM_LOAD( "13.4C", 0x10000, 0x8000, CRC(0ae48dd3) SHA1(ca3d9aeb9f4343c379cef9282e408fbf8aa67d99) ) ROM_LOAD( "14.5J", 0x18000, 0x8000, CRC(debf5d76) SHA1(eb18c35166eb5f93be98b3c30c7d909c0a68eada) ) ROM_LOAD( "11.2J", 0x00000, 0x8000, CRC(8261ecfe) SHA1(5817f4a0458a949298414fe09c86bbcf50be52f3) ) ROM_LOAD( "12.3J", 0x08000, 0x8000, CRC(71137301) SHA1(087a9f401939bc30f1dafa9916e8d8c564595a57) ) - ROM_REGION( 0x20000, "gfx4", 0 ) /* sprite data */ + ROM_REGION( 0x20000, "stfight_vid:spr_gfx", 0 ) /* sprite data */ ROM_LOAD( "20.8W", 0x10000, 0x8000, CRC(8299f247) SHA1(71891f7b1fbfaed14c3854b7f6e10a3ddb4bd479) ) ROM_LOAD( "21.9W", 0x18000, 0x8000, CRC(b57dc037) SHA1(69ac79a95ba9ace7c9ca7af480a4a10176be5ace) ) ROM_LOAD( "18.6W", 0x00000, 0x8000, CRC(68acd627) SHA1(f98ff9ccb0913711079a2988e8dd08695fb5e107) ) ROM_LOAD( "19.7W", 0x08000, 0x8000, CRC(5170a057) SHA1(9222f9febc222fa0c2eead258ad77c857f6d40c8) ) - ROM_REGION( 0x10000, "gfx5", 0 ) /* foreground map data */ + ROM_REGION( 0x10000, "stfight_vid:fg_map", 0 ) /* foreground map data */ ROM_LOAD( "9.7C", 0x00000, 0x8000, CRC(8ceaf4fe) SHA1(5698f2ff44c109825b8d9d0b6dd2426624df668b) ) ROM_LOAD( "10.8C", 0x08000, 0x8000, CRC(5a1a227a) SHA1(24928ab218824ae1f5380398ceb90dcad525cc08) ) - ROM_REGION( 0x10000, "gfx6", 0 ) /* background map data */ + ROM_REGION( 0x10000, "stfight_vid:bg_map", 0 ) /* background map data */ ROM_LOAD( "15.7J", 0x00000, 0x8000, CRC(27a310bc) SHA1(dd30d72bc33b0bf7ddaf3ab730e028f51b20152a) ) ROM_LOAD( "16.8J", 0x08000, 0x8000, CRC(3d19ce18) SHA1(38f691a23c96ef672637965c1a13f6d1595f9d51) ) - ROM_REGION( 0x0800, "proms", 0 ) + ROM_REGION( 0x0100, "stfight_vid:tx_clut", 0 ) ROM_LOAD( "82s129.006", 0x0000, 0x0100, CRC(f9424b5b) SHA1(e3bc23213406d35d54f1221f17f25d433df273a2) ) /* text lookup table */ - ROM_LOAD( "82s129.002", 0x0100, 0x0100, CRC(c883d49b) SHA1(e84900ccf6f27e5043e43c0d85ea1e4eee7e52d3) ) /* fg lookup table */ - ROM_LOAD( "82s129.003", 0x0200, 0x0100, CRC(af81882a) SHA1(b1008c991bd8d1157b3479e465ab286c70418b58) ) - ROM_LOAD( "82s129.004", 0x0300, 0x0100, CRC(1831ce7c) SHA1(57afbee9225f0efd63895a5f522e96dc87ca2616) ) /* bg lookup table */ - ROM_LOAD( "82s129.005", 0x0400, 0x0100, CRC(96cb6293) SHA1(1dcdeaa995e6ffa3753b742842c5ffe0f68ef8cd) ) - ROM_LOAD( "82s129.052", 0x0500, 0x0100, CRC(3d915ffc) SHA1(921be6d5e5fc0fdee9c9f545c1c4a0c334e9844c) ) /* sprite lookup table */ - ROM_LOAD( "82s129.066", 0x0600, 0x0100, CRC(51e8832f) SHA1(ed8c00559e7a02bb8c11861d747c8c64c01b7437) ) + + ROM_REGION( 0x0100, "stfight_vid:fg_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.002", 0x0000, 0x0100, CRC(c883d49b) SHA1(e84900ccf6f27e5043e43c0d85ea1e4eee7e52d3) ) /* fg lookup table */ + ROM_LOAD_NIB_LOW( "82s129.003", 0x0000, 0x0100, CRC(af81882a) SHA1(b1008c991bd8d1157b3479e465ab286c70418b58) ) + + ROM_REGION( 0x0100, "stfight_vid:bg_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.004", 0x0000, 0x0100, CRC(1831ce7c) SHA1(57afbee9225f0efd63895a5f522e96dc87ca2616) ) /* bg lookup table */ + ROM_LOAD_NIB_LOW( "82s129.005", 0x0000, 0x0100, CRC(96cb6293) SHA1(1dcdeaa995e6ffa3753b742842c5ffe0f68ef8cd) ) + + ROM_REGION( 0x0100, "stfight_vid:spr_clut", 0 ) + ROM_LOAD_NIB_HIGH( "82s129.052", 0x0000, 0x0100, CRC(3d915ffc) SHA1(921be6d5e5fc0fdee9c9f545c1c4a0c334e9844c) ) /* sprite lookup table */ + ROM_LOAD_NIB_LOW( "82s129.066", 0x0000, 0x0100, CRC(51e8832f) SHA1(ed8c00559e7a02bb8c11861d747c8c64c01b7437) ) + + ROM_REGION( 0x0800, "proms", 0 ) ROM_LOAD( "82s129.015", 0x0700, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* timing? (not used) */ ROM_REGION( 0x08000, "adpcm", 0 ) /* ADPCM voice data */ @@ -1028,13 +980,6 @@ TB 4E 82S129 2.BPR 00DC [ motion objects ] TB 16A 63S281 x x [ clut ] NOTE: dumped much later LB 3J 68705 - -Notes: LB - CPU board S-0086-002-0B - TB - GFX board S-0087-807 - - The PCB looks like a prototype, due to the modifications - to the PCB. The game is probably licensed from Seibu. - The 0/1/2 bipolar PROMs are not used for colour. However, this contradicts Guru's findings: "If I short some of the pins(of 0.bpr at 7A) @@ -1056,12 +1001,11 @@ Sound processor - Z80 6MHz (5.897MHz) 2 x - YM2203C -The game data seems to be small. There may be graphics -data in the custom SIPs. I am not sure though. +See airraid.cpp for notes about custom modules */ -ROM_START( cshooter ) +ROM_START( cshootert ) ROM_REGION( 0x20000, "maincpu", 0 ) // Main CPU ROM_LOAD( "r1.4u", 0x00000, 0x08000, CRC(fbe8c518) SHA1(bff8319f4892e6d06f1c7a679f67dc8407279cfa) ) ROM_LOAD( "r2.2u", 0x10000, 0x10000, CRC(5ddf9f4e) SHA1(69e4d422ca272bf2e9f00edbe7d23760485fdfe6) ) @@ -1069,34 +1013,53 @@ ROM_START( cshooter ) ROM_REGION( 0x10000, "audiocpu", 0 ) // Sub/Sound CPU ROM_LOAD( "r4.5c", 0x00000, 0x08000, CRC(84fed017) SHA1(9a564c9379eb48569cfba48562889277991864d8) ) + ROM_REGION( 0x08000, "adpcm", ROMREGION_ERASEFF ) /* ADPCM voice data */ + ROM_REGION( 0x0800, "mcu", 0 ) /* 2k for the microcontroller */ ROM_LOAD( "crshooter.3j", 0x0000, 0x0800, CRC(aae61ce7) SHA1(bb2b9887ec73a5b82604b9b64c533c2242d20d0f) ) - ROM_REGION( 0x02000, "gfx1", 0 ) // TX Layer - ROM_LOAD( "r3.11a", 0x00000, 0x02000, CRC(67b50a47) SHA1(b1f4aefc9437edbeefba5371149cc08c0b55c741) ) - - ROM_REGION( 0x20000, "gfx2", ROMREGION_ERASEFF ) // foreground tiles - ROM_LOAD( "graphics.14c", 0x00000, 0x10000, NO_DUMP ) - ROM_LOAD( "graphics.16c", 0x10000, 0x10000, NO_DUMP ) - - ROM_REGION( 0x20000, "gfx3", ROMREGION_ERASEFF ) // background tiles - - ROM_REGION( 0x20000, "gfx4", 0 ) // sprites - ROM_LOAD( "graphics.1a", 0x00000, 0x20000, NO_DUMP ) - - ROM_REGION( 0x10000, "gfx5", ROMREGION_ERASEFF ) /* foreground map data */ - - ROM_REGION( 0x10000, "gfx6", ROMREGION_ERASEFF ) /* background map data */ - - ROM_REGION( 0x08000, "adpcm", ROMREGION_ERASEFF ) /* ADPCM voice data */ - ROM_REGION( 0x820, "proms", 0 ) - ROM_LOAD( "63s281.16a", 0x0000, 0x0100, CRC(0b8b914b) SHA1(8cf4910b846de79661cc187887171ed8ebfd6719) ) // clut ROM_LOAD( "82s129.9s", 0x0500, 0x0100, CRC(cf14ba30) SHA1(3284b6809075756b3c8e07d9705fc7eacb7556f1) ) // timing? (not used) ROM_LOAD( "82s129.4e", 0x0600, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) // timing? (not used) - ROM_LOAD( "82s123.7a", 0x0800, 0x0020, CRC(93e2d292) SHA1(af8edd0cfe85f28ede9604cfaf4516d54e5277c9) ) // sprite color related? (not used) + ROM_LOAD( "82s123.7a", 0x0800, 0x0020, CRC(93e2d292) SHA1(af8edd0cfe85f28ede9604cfaf4516d54e5277c9) ) // ? (not used) + + // below are from the video board + + ROM_REGION( 0x02000, "airraid_vid:tx_gfx", 0 ) // TX Layer + ROM_LOAD( "r3.11a", 0x00000, 0x02000, CRC(67b50a47) SHA1(b1f4aefc9437edbeefba5371149cc08c0b55c741) ) + + ROM_REGION( 0x100, "airraid_vid:tx_clut", 0 ) + ROM_LOAD( "63s281.16a", 0x0000, 0x0100, CRC(0b8b914b) SHA1(8cf4910b846de79661cc187887171ed8ebfd6719) ) // clut + + /* ### MODULE 1 ### Background generation / graphics */ + ROM_REGION( 0x40000, "airraid_vid:bg_map", 0 ) + ROM_LOAD16_BYTE( "bg_layouts_even", 0x00000, 0x20000, NO_DUMP ) + ROM_LOAD16_BYTE( "bg_layouts_odd", 0x00001, 0x20000, NO_DUMP ) + ROM_REGION( 0x40000, "airraid_vid:bg_gfx", 0 ) + ROM_LOAD16_BYTE( "bg_tiles_even", 0x00000, 0x20000, NO_DUMP ) + ROM_LOAD16_BYTE( "bg_tiles_odd", 0x00001, 0x20000, NO_DUMP ) + ROM_REGION( 0x100, "airraid_vid:bg_clut", 0 ) + ROM_LOAD( "bg_clut", 0x000, 0x100, NO_DUMP ) + + /* ### MODULE 2 ### Foreground generation / graphics */ + ROM_REGION( 0x40000, "airraid_vid:fg_map", 0 ) + ROM_LOAD16_BYTE( "fg_layouts_even", 0x00000, 0x20000, NO_DUMP ) + ROM_LOAD16_BYTE( "fg_layouts_odd", 0x00001, 0x20000, NO_DUMP ) + ROM_REGION( 0x40000, "airraid_vid:fg_gfx", 0 ) + ROM_LOAD16_BYTE( "fg_tiles_even", 0x00000, 0x20000, NO_DUMP ) + ROM_LOAD16_BYTE( "fg_tiles_odd", 0x00001, 0x20000, NO_DUMP ) + ROM_REGION( 0x100, "airraid_vid:fg_clut", 0 ) + ROM_LOAD( "fg_clut", 0x000, 0x100, NO_DUMP ) + + /* ### MODULE 3 ### Sprite graphics */ + ROM_REGION( 0x40000, "airraid_vid:spr_gfx", 0 ) + ROM_LOAD16_BYTE( "sprite_tiles_even", 0x00000, 0x20000, NO_DUMP ) + ROM_LOAD16_BYTE( "sprite_tiles_odd", 0x00001, 0x20000, NO_DUMP ) + ROM_REGION( 0x100, "airraid_vid:spr_clut", 0 ) + ROM_LOAD( "spr_clut", 0x000, 0x100, NO_DUMP ) ROM_END + // Note: Marked MACHINE_IMPERFECT_SOUND due to YM2203 clock issue GAME( 1986, empcity, 0, stfight, stfight, stfight_state, empcity, ROT0, "Seibu Kaihatsu", "Empire City: 1931 (bootleg?)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1986, empcityu, empcity, stfight, stfight, stfight_state, stfight, ROT0, "Seibu Kaihatsu (Taito / Romstar license)", "Empire City: 1931 (US)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // different title logo @@ -1106,6 +1069,5 @@ GAME( 1986, stfight, empcity, stfight, stfight, stfight_state, stfight, ROT0, GAME( 1986, stfighta, empcity, stfight, stfight, stfight_state, stfight, ROT0, "Seibu Kaihatsu", "Street Fight (bootleg?)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1986, stfightgb,empcity, stfight, stfight, stfight_state, stfight, ROT0, "Seibu Kaihatsu (Tuning license)", "Street Fight (Germany - Benelux)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) - -/* Cross Shooter runs on a slightly modified PCB, with a different text tilemap and gfx blobs (see also cshooter.c) */ -GAME( 1987, cshooter, 0, cshooter, cshooter, stfight_state, cshooter, ROT270, "Seibu Kaihatsu (Taito license)", "Cross Shooter (not encrypted)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +/* Cross Shooter uses the same base board, but different video board */ +GAME( 1987, cshootert, airraid, cshooter, cshooter, stfight_state, cshooter, ROT270, "Seibu Kaihatsu (Taito license)", "Cross Shooter (2 PCB Stack)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/supracan.cpp b/src/mame/drivers/supracan.cpp index 3e4c00d964f..1679a167351 100644 --- a/src/mame/drivers/supracan.cpp +++ b/src/mame/drivers/supracan.cpp @@ -1368,13 +1368,13 @@ WRITE16_MEMBER( supracan_state::_68k_soundram_w ) if(offset*2 < 0x500 && offset*2 >= 0x300) { - if(mem_mask & 0xff00) + if(ACCESSING_BITS_8_15) { m_hack_68k_to_6502_access = true; _6502_soundmem_w(mem, offset*2, data >> 8); m_hack_68k_to_6502_access = false; } - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) { m_hack_68k_to_6502_access = true; _6502_soundmem_w(mem, offset*2 + 1, data & 0xff); @@ -1392,13 +1392,13 @@ READ16_MEMBER( supracan_state::_68k_soundram_r ) if(offset*2 >= 0x300 && offset*2 < 0x500) { val = 0; - if(mem_mask & 0xff00) + if(ACCESSING_BITS_8_15) { m_hack_68k_to_6502_access = true; val |= _6502_soundmem_r(mem, offset*2) << 8; m_hack_68k_to_6502_access = false; } - if(mem_mask & 0x00ff) + if(ACCESSING_BITS_0_7) { m_hack_68k_to_6502_access = true; val |= _6502_soundmem_r(mem, offset*2 + 1); diff --git a/src/mame/drivers/svision.cpp b/src/mame/drivers/svision.cpp index b6ff3ec2618..c3c13f193b5 100644 --- a/src/mame/drivers/svision.cpp +++ b/src/mame/drivers/svision.cpp @@ -29,7 +29,7 @@ TIMER_CALLBACK_MEMBER(svision_state::svision_pet_timer) switch (m_pet.state) { case 0: - if ( m_joy2 ) + if (m_joy2.found()) { m_pet.input = m_joy2->read(); } diff --git a/src/mame/drivers/taito_l.cpp b/src/mame/drivers/taito_l.cpp index c033a47b026..a3feb5c5e8f 100644 --- a/src/mame/drivers/taito_l.cpp +++ b/src/mame/drivers/taito_l.cpp @@ -1213,6 +1213,12 @@ static INPUT_PORTS_START( plotting ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) INPUT_PORTS_END +static INPUT_PORTS_START( plottingu ) + PORT_INCLUDE(plotting) + PORT_MODIFY("DSWA") + TAITO_COINAGE_US_LOC(SW1) +INPUT_PORTS_END + static INPUT_PORTS_START( palamed ) PORT_START("DSWA") TAITO_MACHINE_NO_COCKTAIL_LOC(SW1) @@ -2595,7 +2601,7 @@ GAME( 1988, kurikinta, kurikint, kurikint, kurikinta, driver_device, 0, GAME( 1989, plotting, 0, plotting, plotting, driver_device, 0, ROT0, "Taito Corporation Japan", "Plotting (World set 1)", 0 ) GAME( 1989, plottinga, plotting, plotting, plotting, taitol_state, plottinga, ROT0, "Taito Corporation Japan", "Plotting (World set 2, protected)", 0 ) GAME( 1989, plottingb, plotting, plotting, plotting, driver_device, 0, ROT0, "Taito Corporation Japan", "Plotting (World set 3, earliest version)", 0 ) -GAME( 1989, plottingu, plotting, plotting, plotting, driver_device, 0, ROT0, "Taito America Corporation", "Plotting (US)", 0 ) +GAME( 1989, plottingu, plotting, plotting, plottingu, driver_device, 0, ROT0, "Taito America Corporation", "Plotting (US)", 0 ) GAME( 1989, flipull, plotting, plotting, plotting, driver_device, 0, ROT0, "Taito Corporation", "Flipull (Japan)", 0 ) GAME( 1989, puzznic, 0, puzznic, puzznic, driver_device, 0, ROT0, "Taito Corporation Japan", "Puzznic (World)", 0 ) diff --git a/src/mame/drivers/taito_z.cpp b/src/mame/drivers/taito_z.cpp index 4c9c985a2af..9ac3352f681 100644 --- a/src/mame/drivers/taito_z.cpp +++ b/src/mame/drivers/taito_z.cpp @@ -1104,8 +1104,8 @@ WRITE16_MEMBER(taitoz_state::spacegun_output_bypass_w) 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[read_safe(ioport(tag), 0) & 7]; + ioport_port *port = ioport((const char *)param); + return retval[port != nullptr ? port->read() & 7 : 0]; } @@ -1114,7 +1114,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 + read_safe(ioport("STEER"), 0x80); + UINT16 steer = 0xff80 + m_steer.read_safe(0x80); switch (port) { @@ -1135,7 +1135,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 + read_safe(ioport("STEER"), 0x80); + UINT16 steer = 0xff80 + m_steer.read_safe(0x80); switch (port) { @@ -1222,7 +1222,7 @@ WRITE16_MEMBER(taitoz_state::bshark_stick_w) READ16_MEMBER(taitoz_state::sci_steer_input_r) { - UINT16 steer = 0xff80 + read_safe(ioport("STEER"), 0x80); + UINT16 steer = 0xff80 + m_steer.read_safe(0x80); switch (offset) { @@ -1293,7 +1293,7 @@ WRITE16_MEMBER(taitoz_state::spacegun_gun_output_w) READ16_MEMBER(taitoz_state::dblaxle_steer_input_r) { - UINT16 steer = 0xff80 + read_safe(ioport("STEER"), 0x80); + UINT16 steer = 0xff80 + m_steer.read_safe(0x80); switch (offset) { diff --git a/src/mame/drivers/taitojc.cpp b/src/mame/drivers/taitojc.cpp index 0ee62e39216..66c931cf112 100644 --- a/src/mame/drivers/taitojc.cpp +++ b/src/mame/drivers/taitojc.cpp @@ -754,7 +754,7 @@ WRITE8_MEMBER(taitojc_state::hc11_output_w) READ8_MEMBER(taitojc_state::hc11_analog_r) { - return read_safe(m_analog_ports[offset], 0); + return m_analog_ports[offset].read_safe(0); } diff --git a/src/mame/drivers/tek440x.cpp b/src/mame/drivers/tek440x.cpp old mode 100755 new mode 100644 diff --git a/src/mame/drivers/tmc1800.cpp b/src/mame/drivers/tmc1800.cpp index 1b6c5b4e155..257c9b876a4 100644 --- a/src/mame/drivers/tmc1800.cpp +++ b/src/mame/drivers/tmc1800.cpp @@ -634,16 +634,6 @@ void tmc2000_state::machine_start() m_colorram[addr] = machine().rand() & 0xff; } - // find keyboard rows - m_key_row[0] = m_y0; - m_key_row[1] = m_y1; - m_key_row[2] = m_y2; - m_key_row[3] = m_y3; - m_key_row[4] = m_y4; - m_key_row[5] = m_y5; - m_key_row[6] = m_y6; - m_key_row[7] = m_y7; - // state saving save_item(NAME(m_keylatch)); save_item(NAME(m_rac)); diff --git a/src/mame/drivers/tmc2000e.cpp b/src/mame/drivers/tmc2000e.cpp index fffc43334f2..4586f557996 100644 --- a/src/mame/drivers/tmc2000e.cpp +++ b/src/mame/drivers/tmc2000e.cpp @@ -258,16 +258,6 @@ WRITE8_MEMBER( tmc2000e_state::dma_w ) void tmc2000e_state::machine_start() { - // find keyboard rows - m_key_row[0] = m_y0; - m_key_row[1] = m_y1; - m_key_row[2] = m_y2; - m_key_row[3] = m_y3; - m_key_row[4] = m_y4; - m_key_row[5] = m_y5; - m_key_row[6] = m_y6; - m_key_row[7] = m_y7; - /* register for state saving */ save_item(NAME(m_cdp1864_efx)); save_item(NAME(m_keylatch)); diff --git a/src/mame/drivers/tmc600.cpp b/src/mame/drivers/tmc600.cpp index 5b0f73c05dc..4eddb1c7d01 100644 --- a/src/mame/drivers/tmc600.cpp +++ b/src/mame/drivers/tmc600.cpp @@ -236,16 +236,6 @@ void tmc600_state::machine_start() break; } - // find keyboard rows - m_key_row[0] = m_y0; - m_key_row[1] = m_y1; - m_key_row[2] = m_y2; - m_key_row[3] = m_y3; - m_key_row[4] = m_y4; - m_key_row[5] = m_y5; - m_key_row[6] = m_y6; - m_key_row[7] = m_y7; - /* register for state saving */ save_item(NAME(m_keylatch)); } diff --git a/src/mame/drivers/tnzs.cpp b/src/mame/drivers/tnzs.cpp index 40e734cb960..9a033fd1a90 100644 --- a/src/mame/drivers/tnzs.cpp +++ b/src/mame/drivers/tnzs.cpp @@ -2397,7 +2397,7 @@ Taito, 1988 This PCB runs on Taito/Seta hardware. -PCB Layout +PCB Layout ("New style PCB" with 3x z80 and no M-chip, and a daughterboard w/roms and z80) ---------- M6100356A (on PCB) @@ -2467,23 +2467,23 @@ Notes: ROM_START( tnzs ) ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k + bankswitch areas for the first CPU */ - ROM_LOAD( "b53-24.1", 0x00000, 0x20000, CRC(d66824c6) SHA1(fd381ac0dc52ce670c3fde320ea60a209e288a52) ) + ROM_LOAD( "b53-24.u1", 0x00000, 0x20000, CRC(d66824c6) SHA1(fd381ac0dc52ce670c3fde320ea60a209e288a52) ) ROM_REGION( 0x10000, "sub", 0 ) /* 64k for the second CPU */ - ROM_LOAD( "b53-25.3", 0x00000, 0x10000, CRC(d6ac4e71) SHA1(f3e71624a8a5e4e4c8a6aa01711ed26bdd5abf5a) ) + ROM_LOAD( "b53-25.u3", 0x00000, 0x10000, CRC(d6ac4e71) SHA1(f3e71624a8a5e4e4c8a6aa01711ed26bdd5abf5a) ) ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the third CPU */ - ROM_LOAD( "b53-26.34", 0x00000, 0x10000, CRC(cfd5649c) SHA1(4f6afccd535d39b41661dc3ccd17af125bfac015) ) + ROM_LOAD( "b53-26.u34", 0x00000, 0x10000, CRC(cfd5649c) SHA1(4f6afccd535d39b41661dc3ccd17af125bfac015) ) - ROM_REGION( 0x100000, "gfx1", 0 ) /* the newer PCBs have updated GFX rom labels, content is the same */ - ROM_LOAD( "b53-16.8", 0x00000, 0x20000, CRC(c3519c2a) SHA1(30fe7946fbc95ab6b3ccb6944fb24bf47bf3d743) ) - ROM_LOAD( "b53-17.7", 0x20000, 0x20000, CRC(2bf199e8) SHA1(4ed73e4f00ae2f5f4028a0ea5ae3cd238863a370) ) - ROM_LOAD( "b53-18.6", 0x40000, 0x20000, CRC(92f35ed9) SHA1(5fdd8d6ddbb7be9887af3c8dea9ad3b58c4e86f9) ) - ROM_LOAD( "b53-19.5", 0x60000, 0x20000, CRC(edbb9581) SHA1(539396a01ca0b69455f000d446759b232530b542) ) - ROM_LOAD( "b53-22.4", 0x80000, 0x20000, CRC(59d2aef6) SHA1(b657b7603c3eb5f169000d38497ebb93f26f7832) ) - ROM_LOAD( "b53-23.3", 0xa0000, 0x20000, CRC(74acfb9b) SHA1(90b544ed7ede7565660bdd13c94c15c54423cda9) ) - ROM_LOAD( "b53-20.2", 0xc0000, 0x20000, CRC(095d0dc0) SHA1(ced2937d0594fa00ae344a4e3a3cba23772dc160) ) - ROM_LOAD( "b53-21.1", 0xe0000, 0x20000, CRC(9800c54d) SHA1(761647177d621ac2cdd8b009876eed35809f3c92) ) + ROM_REGION( 0x100000, "gfx1", 0 ) /* the newer PCBs have updated GFX rom labels, content is the same. Located on a SUB PCB */ + ROM_LOAD( "b53-16.ic7", 0x00000, 0x20000, CRC(c3519c2a) SHA1(30fe7946fbc95ab6b3ccb6944fb24bf47bf3d743) ) /* Also labeled as U35L */ + ROM_LOAD( "b53-17.ic8", 0x20000, 0x20000, CRC(2bf199e8) SHA1(4ed73e4f00ae2f5f4028a0ea5ae3cd238863a370) ) /* Also labeled as U35U */ + ROM_LOAD( "b53-18.ic9", 0x40000, 0x20000, CRC(92f35ed9) SHA1(5fdd8d6ddbb7be9887af3c8dea9ad3b58c4e86f9) ) /* Also labeled as U39L */ + ROM_LOAD( "b53-19.ic10", 0x60000, 0x20000, CRC(edbb9581) SHA1(539396a01ca0b69455f000d446759b232530b542) ) /* Also labeled as U39U */ + ROM_LOAD( "b53-22.ic11", 0x80000, 0x20000, CRC(59d2aef6) SHA1(b657b7603c3eb5f169000d38497ebb93f26f7832) ) /* Also labeled as U43L */ + ROM_LOAD( "b53-23.ic13", 0xa0000, 0x20000, CRC(74acfb9b) SHA1(90b544ed7ede7565660bdd13c94c15c54423cda9) ) /* Also labeled as U43U */ + ROM_LOAD( "b53-20.ic12", 0xc0000, 0x20000, CRC(095d0dc0) SHA1(ced2937d0594fa00ae344a4e3a3cba23772dc160) ) /* Also labeled as U46L */ + ROM_LOAD( "b53-21.ic14", 0xe0000, 0x20000, CRC(9800c54d) SHA1(761647177d621ac2cdd8b009876eed35809f3c92) ) /* Also labeled as U46U */ ROM_REGION( 0x10000, "pal", 0 ) ROM_LOAD( "b53-15.pal16l8a.subpcb.ic6.jed", 0x00000, 0x01000, NO_DUMP) // on sub pcb @@ -2491,23 +2491,23 @@ ROM_END ROM_START( tnzsj ) ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k + bankswitch areas for the first CPU */ - ROM_LOAD( "b53-24.1", 0x00000, 0x20000, CRC(d66824c6) SHA1(fd381ac0dc52ce670c3fde320ea60a209e288a52) ) + ROM_LOAD( "b53-24.u1", 0x00000, 0x20000, CRC(d66824c6) SHA1(fd381ac0dc52ce670c3fde320ea60a209e288a52) ) ROM_REGION( 0x10000, "sub", 0 ) /* 64k for the second CPU */ ROM_LOAD( "b53-27.u3", 0x00000, 0x10000, CRC(b3415fc3) SHA1(a12b1788509e2ac2b05a083f432eecdce00769f6) ) ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the third CPU */ - ROM_LOAD( "b53-26.34", 0x00000, 0x10000, CRC(cfd5649c) SHA1(4f6afccd535d39b41661dc3ccd17af125bfac015) ) + ROM_LOAD( "b53-26.u34", 0x00000, 0x10000, CRC(cfd5649c) SHA1(4f6afccd535d39b41661dc3ccd17af125bfac015) ) - ROM_REGION( 0x100000, "gfx1", 0 ) /* the newer PCBs have updated GFX rom labels, content is the same */ - ROM_LOAD( "b53-16.8", 0x00000, 0x20000, CRC(c3519c2a) SHA1(30fe7946fbc95ab6b3ccb6944fb24bf47bf3d743) ) - ROM_LOAD( "b53-17.7", 0x20000, 0x20000, CRC(2bf199e8) SHA1(4ed73e4f00ae2f5f4028a0ea5ae3cd238863a370) ) - ROM_LOAD( "b53-18.6", 0x40000, 0x20000, CRC(92f35ed9) SHA1(5fdd8d6ddbb7be9887af3c8dea9ad3b58c4e86f9) ) - ROM_LOAD( "b53-19.5", 0x60000, 0x20000, CRC(edbb9581) SHA1(539396a01ca0b69455f000d446759b232530b542) ) - ROM_LOAD( "b53-22.4", 0x80000, 0x20000, CRC(59d2aef6) SHA1(b657b7603c3eb5f169000d38497ebb93f26f7832) ) - ROM_LOAD( "b53-23.3", 0xa0000, 0x20000, CRC(74acfb9b) SHA1(90b544ed7ede7565660bdd13c94c15c54423cda9) ) - ROM_LOAD( "b53-20.2", 0xc0000, 0x20000, CRC(095d0dc0) SHA1(ced2937d0594fa00ae344a4e3a3cba23772dc160) ) - ROM_LOAD( "b53-21.1", 0xe0000, 0x20000, CRC(9800c54d) SHA1(761647177d621ac2cdd8b009876eed35809f3c92) ) + ROM_REGION( 0x100000, "gfx1", 0 ) /* the newer PCBs have updated GFX rom labels, content is the same. Located on a SUB PCB */ + ROM_LOAD( "b53-16.ic7", 0x00000, 0x20000, CRC(c3519c2a) SHA1(30fe7946fbc95ab6b3ccb6944fb24bf47bf3d743) ) /* Also labeled as U35L */ + ROM_LOAD( "b53-17.ic8", 0x20000, 0x20000, CRC(2bf199e8) SHA1(4ed73e4f00ae2f5f4028a0ea5ae3cd238863a370) ) /* Also labeled as U35U */ + ROM_LOAD( "b53-18.ic9", 0x40000, 0x20000, CRC(92f35ed9) SHA1(5fdd8d6ddbb7be9887af3c8dea9ad3b58c4e86f9) ) /* Also labeled as U39L */ + ROM_LOAD( "b53-19.ic10", 0x60000, 0x20000, CRC(edbb9581) SHA1(539396a01ca0b69455f000d446759b232530b542) ) /* Also labeled as U39U */ + ROM_LOAD( "b53-22.ic11", 0x80000, 0x20000, CRC(59d2aef6) SHA1(b657b7603c3eb5f169000d38497ebb93f26f7832) ) /* Also labeled as U43L */ + ROM_LOAD( "b53-23.ic13", 0xa0000, 0x20000, CRC(74acfb9b) SHA1(90b544ed7ede7565660bdd13c94c15c54423cda9) ) /* Also labeled as U43U */ + ROM_LOAD( "b53-20.ic12", 0xc0000, 0x20000, CRC(095d0dc0) SHA1(ced2937d0594fa00ae344a4e3a3cba23772dc160) ) /* Also labeled as U46L */ + ROM_LOAD( "b53-21.ic14", 0xe0000, 0x20000, CRC(9800c54d) SHA1(761647177d621ac2cdd8b009876eed35809f3c92) ) /* Also labeled as U46U */ ROM_REGION( 0x10000, "pal", 0 ) ROM_LOAD( "b53-15.pal16l8a.subpcb.ic6.jed", 0x00000, 0x01000, NO_DUMP) // on sub pcb @@ -2522,89 +2522,119 @@ Taito ID: K1100356A MAIN PCB Seta ID: P0-041A */ -/* This pcb is similar but not identical to the Chuka Taisen pcb above; - there is an M-chip i8742 (with Taito silkscreen) and no 3rd z80. - There is no sub-pcb like the later TNZS pcb has. */ +/* This pcb is similar but not identical to the Chuka Taisen pcb; + There is an M-chip i8742 (with Taito silkscreen) and no 3rd z80. + There is no daughter-pcb like the later TNZS pcb has. */ ROM_START( tnzsjo ) ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k + bankswitch areas for the first CPU */ - ROM_LOAD( "b53-10.u32", 0x00000, 0x20000, CRC(a73745c6) SHA1(73eb38e75e08312d752332f988dc655084b4a86d) ) + ROM_LOAD( "b53-10.27c1001d.u32", 0x00000, 0x20000, CRC(a73745c6) SHA1(73eb38e75e08312d752332f988dc655084b4a86d) ) ROM_REGION( 0x10000, "sub", 0 ) /* 64k for the second CPU */ - ROM_LOAD( "b53-11.u38", 0x00000, 0x10000, CRC(9784d443) SHA1(bc3647aac9974031dbe4898417fbaa99841f9548) ) + ROM_LOAD( "b53-11.27c512.u38", 0x00000, 0x10000, CRC(9784d443) SHA1(bc3647aac9974031dbe4898417fbaa99841f9548) ) ROM_REGION( 0x10000, "mcu", 0 ) /* M-Chip (i8742 internal ROM) */ ROM_LOAD( "b53-09.u46", 0x0000, 0x0800, CRC(a4bfce19) SHA1(9340862d5bdc1ad4799dc92cae9bce1428b47478) ) ROM_REGION( 0x100000, "gfx1", 0 ) /* ROMs taken from another set (the ones from this set were read incorrectly) */ - ROM_LOAD( "b53-08.8", 0x00000, 0x20000, CRC(c3519c2a) SHA1(30fe7946fbc95ab6b3ccb6944fb24bf47bf3d743) ) - ROM_LOAD( "b53-07.7", 0x20000, 0x20000, CRC(2bf199e8) SHA1(4ed73e4f00ae2f5f4028a0ea5ae3cd238863a370) ) - ROM_LOAD( "b53-06.6", 0x40000, 0x20000, CRC(92f35ed9) SHA1(5fdd8d6ddbb7be9887af3c8dea9ad3b58c4e86f9) ) - ROM_LOAD( "b53-05.5", 0x60000, 0x20000, CRC(edbb9581) SHA1(539396a01ca0b69455f000d446759b232530b542) ) - ROM_LOAD( "b53-04.4", 0x80000, 0x20000, CRC(59d2aef6) SHA1(b657b7603c3eb5f169000d38497ebb93f26f7832) ) - ROM_LOAD( "b53-03.3", 0xa0000, 0x20000, CRC(74acfb9b) SHA1(90b544ed7ede7565660bdd13c94c15c54423cda9) ) - ROM_LOAD( "b53-02.2", 0xc0000, 0x20000, CRC(095d0dc0) SHA1(ced2937d0594fa00ae344a4e3a3cba23772dc160) ) - ROM_LOAD( "b53-01.1", 0xe0000, 0x20000, CRC(9800c54d) SHA1(761647177d621ac2cdd8b009876eed35809f3c92) ) + ROM_LOAD( "b53-08.u8", 0x00000, 0x20000, CRC(c3519c2a) SHA1(30fe7946fbc95ab6b3ccb6944fb24bf47bf3d743) ) + ROM_LOAD( "b53-07.u7", 0x20000, 0x20000, CRC(2bf199e8) SHA1(4ed73e4f00ae2f5f4028a0ea5ae3cd238863a370) ) + ROM_LOAD( "b53-06.u6", 0x40000, 0x20000, CRC(92f35ed9) SHA1(5fdd8d6ddbb7be9887af3c8dea9ad3b58c4e86f9) ) + ROM_LOAD( "b53-05.u5", 0x60000, 0x20000, CRC(edbb9581) SHA1(539396a01ca0b69455f000d446759b232530b542) ) + ROM_LOAD( "b53-04.u4", 0x80000, 0x20000, CRC(59d2aef6) SHA1(b657b7603c3eb5f169000d38497ebb93f26f7832) ) + ROM_LOAD( "b53-03.u3", 0xa0000, 0x20000, CRC(74acfb9b) SHA1(90b544ed7ede7565660bdd13c94c15c54423cda9) ) + ROM_LOAD( "b53-02.u2", 0xc0000, 0x20000, CRC(095d0dc0) SHA1(ced2937d0594fa00ae344a4e3a3cba23772dc160) ) + ROM_LOAD( "b53-01.u1", 0xe0000, 0x20000, CRC(9800c54d) SHA1(761647177d621ac2cdd8b009876eed35809f3c92) ) - ROM_REGION( 0x10000, "pal", 0 ) /* these are marked b06 and so are probably shared with extermination */ - ROM_LOAD( "b06-12.pal16l8a.ic26.jed", 0x00000, 0x01000, NO_DUMP) - ROM_LOAD( "b06-13.pal16l8a.ic25.jed", 0x01000, 0x01000, NO_DUMP) - ROM_LOAD( "b06-14.pal16x8a.icxx.jed", 0x02000, 0x01000, NO_DUMP) // does this chip exist? + ROM_REGION( 0x10000, "pal", 0 ) /* these are probably shared with extermination except for u35 */ + ROM_LOAD( "b06-12.pal16l8a.u26.jed", 0x00000, 0x01000, NO_DUMP) + ROM_LOAD( "b06-13.pal16l8a.u25.jed", 0x01000, 0x01000, NO_DUMP) + ROM_LOAD( "b53-12.pal16l8a.u35.jed", 0x02000, 0x01000, NO_DUMP) + ROM_LOAD( "b06-101.pal16l8a.u36.jed", 0x03000, 0x01000, NO_DUMP) +ROM_END + +ROM_START( tnzsuo ) + ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k + bankswitch areas for the first CPU */ + ROM_LOAD( "b53-10.27c1001d.u32", 0x00000, 0x20000, CRC(a73745c6) SHA1(73eb38e75e08312d752332f988dc655084b4a86d) ) + + ROM_REGION( 0x10000, "sub", 0 ) /* 64k for the second CPU */ + ROM_LOAD( "b53-13.27c512.u38", 0x00000, 0x10000, CRC(c09f4d28) SHA1(f1fd3202869738e17abcbb757f9ce7260707dd3d) ) + + ROM_REGION( 0x10000, "mcu", 0 ) /* M-Chip (i8742 internal ROM) */ + ROM_LOAD( "b53-09.u46", 0x0000, 0x0800, CRC(a4bfce19) SHA1(9340862d5bdc1ad4799dc92cae9bce1428b47478) ) + + ROM_REGION( 0x100000, "gfx1", 0 ) + ROM_LOAD( "b53-08.u8", 0x00000, 0x20000, CRC(c3519c2a) SHA1(30fe7946fbc95ab6b3ccb6944fb24bf47bf3d743) ) + ROM_LOAD( "b53-07.u7", 0x20000, 0x20000, CRC(2bf199e8) SHA1(4ed73e4f00ae2f5f4028a0ea5ae3cd238863a370) ) + ROM_LOAD( "b53-06.u6", 0x40000, 0x20000, CRC(92f35ed9) SHA1(5fdd8d6ddbb7be9887af3c8dea9ad3b58c4e86f9) ) + ROM_LOAD( "b53-05.u5", 0x60000, 0x20000, CRC(edbb9581) SHA1(539396a01ca0b69455f000d446759b232530b542) ) + ROM_LOAD( "b53-04.u4", 0x80000, 0x20000, CRC(59d2aef6) SHA1(b657b7603c3eb5f169000d38497ebb93f26f7832) ) + ROM_LOAD( "b53-03.u3", 0xa0000, 0x20000, CRC(74acfb9b) SHA1(90b544ed7ede7565660bdd13c94c15c54423cda9) ) + ROM_LOAD( "b53-02.u2", 0xc0000, 0x20000, CRC(095d0dc0) SHA1(ced2937d0594fa00ae344a4e3a3cba23772dc160) ) + ROM_LOAD( "b53-01.u1", 0xe0000, 0x20000, CRC(9800c54d) SHA1(761647177d621ac2cdd8b009876eed35809f3c92) ) + + ROM_REGION( 0x10000, "pal", 0 ) /* these are probably shared with extermination except for u35 */ + ROM_LOAD( "b06-12.pal16l8a.u26.jed", 0x00000, 0x01000, NO_DUMP) + ROM_LOAD( "b06-13.pal16l8a.u25.jed", 0x01000, 0x01000, NO_DUMP) + ROM_LOAD( "b53-12.pal16l8a.u35.jed", 0x02000, 0x01000, NO_DUMP) + ROM_LOAD( "b06-101.pal16l8a.u36.jed", 0x03000, 0x01000, NO_DUMP) ROM_END ROM_START( tnzso ) ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k + bankswitch areas for the first CPU */ - ROM_LOAD( "u32", 0x00000, 0x20000, CRC(edf3b39e) SHA1(be221c99e50795d569611dba454c3954a259a859) ) + ROM_LOAD( "b53-unknown.27c1001d.u32", 0x00000, 0x20000, CRC(edf3b39e) SHA1(be221c99e50795d569611dba454c3954a259a859) ) // ROM LABEL FOR THIS SET IS UNKNOWN ROM_REGION( 0x10000, "sub", 0 ) /* 64k for the second CPU */ - ROM_LOAD( "u38", 0x00000, 0x10000, CRC(60340d63) SHA1(12a26d19dc8e407e502f25617a5a4c9cea131ce2) ) + ROM_LOAD( "b53-unknown.27c512.u38", 0x00000, 0x10000, CRC(60340d63) SHA1(12a26d19dc8e407e502f25617a5a4c9cea131ce2) ) // ROM LABEL FOR THIS SET IS UNKNOWN ROM_REGION( 0x10000, "mcu", 0 ) /* M-Chip (i8742 internal ROM) */ ROM_LOAD( "b53-09.u46", 0x0000, 0x0800, CRC(a4bfce19) SHA1(9340862d5bdc1ad4799dc92cae9bce1428b47478) ) ROM_REGION( 0x100000, "gfx1", 0 ) /* ROMs taken from another set (the ones from this set were read incorrectly) */ - ROM_LOAD( "b53-08.8", 0x00000, 0x20000, CRC(c3519c2a) SHA1(30fe7946fbc95ab6b3ccb6944fb24bf47bf3d743) ) - ROM_LOAD( "b53-07.7", 0x20000, 0x20000, CRC(2bf199e8) SHA1(4ed73e4f00ae2f5f4028a0ea5ae3cd238863a370) ) - ROM_LOAD( "b53-06.6", 0x40000, 0x20000, CRC(92f35ed9) SHA1(5fdd8d6ddbb7be9887af3c8dea9ad3b58c4e86f9) ) - ROM_LOAD( "b53-05.5", 0x60000, 0x20000, CRC(edbb9581) SHA1(539396a01ca0b69455f000d446759b232530b542) ) - ROM_LOAD( "b53-04.4", 0x80000, 0x20000, CRC(59d2aef6) SHA1(b657b7603c3eb5f169000d38497ebb93f26f7832) ) - ROM_LOAD( "b53-03.3", 0xa0000, 0x20000, CRC(74acfb9b) SHA1(90b544ed7ede7565660bdd13c94c15c54423cda9) ) - ROM_LOAD( "b53-02.2", 0xc0000, 0x20000, CRC(095d0dc0) SHA1(ced2937d0594fa00ae344a4e3a3cba23772dc160) ) - ROM_LOAD( "b53-01.1", 0xe0000, 0x20000, CRC(9800c54d) SHA1(761647177d621ac2cdd8b009876eed35809f3c92) ) + ROM_LOAD( "b53-08.u8", 0x00000, 0x20000, CRC(c3519c2a) SHA1(30fe7946fbc95ab6b3ccb6944fb24bf47bf3d743) ) + ROM_LOAD( "b53-07.u7", 0x20000, 0x20000, CRC(2bf199e8) SHA1(4ed73e4f00ae2f5f4028a0ea5ae3cd238863a370) ) + ROM_LOAD( "b53-06.u6", 0x40000, 0x20000, CRC(92f35ed9) SHA1(5fdd8d6ddbb7be9887af3c8dea9ad3b58c4e86f9) ) + ROM_LOAD( "b53-05.u5", 0x60000, 0x20000, CRC(edbb9581) SHA1(539396a01ca0b69455f000d446759b232530b542) ) + ROM_LOAD( "b53-04.u4", 0x80000, 0x20000, CRC(59d2aef6) SHA1(b657b7603c3eb5f169000d38497ebb93f26f7832) ) + ROM_LOAD( "b53-03.u3", 0xa0000, 0x20000, CRC(74acfb9b) SHA1(90b544ed7ede7565660bdd13c94c15c54423cda9) ) + ROM_LOAD( "b53-02.u2", 0xc0000, 0x20000, CRC(095d0dc0) SHA1(ced2937d0594fa00ae344a4e3a3cba23772dc160) ) + ROM_LOAD( "b53-01.u1", 0xe0000, 0x20000, CRC(9800c54d) SHA1(761647177d621ac2cdd8b009876eed35809f3c92) ) ROM_REGION( 0x10000, "pal", 0 ) /* PALS not directly observed on this board but assumed to exist */ - /* these are marked b06 and so are probably shared with extermination */ - ROM_LOAD( "b06-12.pal16l8a.ic26.jed", 0x00000, 0x01000, NO_DUMP) - ROM_LOAD( "b06-13.pal16l8a.ic25.jed", 0x01000, 0x01000, NO_DUMP) - ROM_LOAD( "b06-14.pal16x8a.icxx.jed", 0x02000, 0x01000, NO_DUMP) // does this chip exist? + /* these are probably shared with extermination except for u35 */ + ROM_LOAD( "b06-12.pal16l8a.u26.jed", 0x00000, 0x01000, NO_DUMP) + ROM_LOAD( "b06-13.pal16l8a.u25.jed", 0x01000, 0x01000, NO_DUMP) + ROM_LOAD( "b53-12.pal16l8a.u35.jed", 0x02000, 0x01000, NO_DUMP) + ROM_LOAD( "b06-101.pal16l8a.u36.jed", 0x03000, 0x01000, NO_DUMP) ROM_END -ROM_START( tnzsop ) +ROM_START( tnzsop ) // prototype/location test version? ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k + bankswitch areas for the first CPU */ - ROM_LOAD( "ns_c-11.rom", 0x00000, 0x20000, CRC(3c1dae7b) SHA1(0004fccc171714c80565326f8690f9662c5b75d9) ) + ROM_LOAD( "ns_c-11.27c1001d.u32", 0x00000, 0x20000, CRC(3c1dae7b) SHA1(0004fccc171714c80565326f8690f9662c5b75d9) ) ROM_REGION( 0x10000, "sub", 0 ) /* 64k for the second CPU */ - ROM_LOAD( "ns_e-3.rom", 0x00000, 0x10000, CRC(c7662e96) SHA1(be28298bfde4e3867cfe75633ffb0f8611dbbd8b) ) + ROM_LOAD( "ns_e-3.27c512.u38", 0x00000, 0x10000, CRC(c7662e96) SHA1(be28298bfde4e3867cfe75633ffb0f8611dbbd8b) ) ROM_REGION( 0x10000, "mcu", 0 ) /* M-Chip (i8742 internal ROM) */ ROM_LOAD( "b53-09.u46", 0x0000, 0x0800, CRC(a4bfce19) SHA1(9340862d5bdc1ad4799dc92cae9bce1428b47478) ) ROM_REGION( 0x100000, "gfx1", 0 ) - ROM_LOAD( "ns_a13.rom", 0x00000, 0x20000, CRC(7e0bd5bb) SHA1(95dfb00ec915778e02d8bfa996735ab817191adc) ) - ROM_LOAD( "ns_a12.rom", 0x20000, 0x20000, CRC(95880726) SHA1(f4fdedd23e80a6ccf32f737ab4bc57f9fc0925be) ) - ROM_LOAD( "ns_a10.rom", 0x40000, 0x20000, CRC(2bc4c053) SHA1(cd7668a7733e5e80c2c566d0cf63c4310e5743b4) ) - ROM_LOAD( "ns_a08.rom", 0x60000, 0x20000, CRC(8ff8d88c) SHA1(31977e39ad048a077e9b5bd712ff66b14a466d27) ) - ROM_LOAD( "ns_a07.rom", 0x80000, 0x20000, CRC(291bcaca) SHA1(4f659a0cd2ff6b4ec04ab95ee8a670222c402c2b) ) - ROM_LOAD( "ns_a05.rom", 0xa0000, 0x20000, CRC(6e762e20) SHA1(66731fe4053b9c09bc9c95d10aba212db08b4636) ) - ROM_LOAD( "ns_a04.rom", 0xc0000, 0x20000, CRC(e1fd1b9d) SHA1(6027491b927c2ab9c77fbf8895da1abcfbe32d62) ) - ROM_LOAD( "ns_a02.rom", 0xe0000, 0x20000, CRC(2ab06bda) SHA1(2b208b564e55c258665e1f66b26fe14a6c68eb96) ) + ROM_LOAD( "ns_a13.rom.u8", 0x00000, 0x20000, CRC(7e0bd5bb) SHA1(95dfb00ec915778e02d8bfa996735ab817191adc) ) + ROM_LOAD( "ns_a12.rom.u7", 0x20000, 0x20000, CRC(95880726) SHA1(f4fdedd23e80a6ccf32f737ab4bc57f9fc0925be) ) + ROM_LOAD( "ns_a10.rom.u6", 0x40000, 0x20000, CRC(2bc4c053) SHA1(cd7668a7733e5e80c2c566d0cf63c4310e5743b4) ) + ROM_LOAD( "ns_a08.rom.u5", 0x60000, 0x20000, CRC(8ff8d88c) SHA1(31977e39ad048a077e9b5bd712ff66b14a466d27) ) + ROM_LOAD( "ns_a07.rom.u4", 0x80000, 0x20000, CRC(291bcaca) SHA1(4f659a0cd2ff6b4ec04ab95ee8a670222c402c2b) ) + ROM_LOAD( "ns_a05.rom.u3", 0xa0000, 0x20000, CRC(6e762e20) SHA1(66731fe4053b9c09bc9c95d10aba212db08b4636) ) + ROM_LOAD( "ns_a04.rom.u2", 0xc0000, 0x20000, CRC(e1fd1b9d) SHA1(6027491b927c2ab9c77fbf8895da1abcfbe32d62) ) + ROM_LOAD( "ns_a02.rom.u1", 0xe0000, 0x20000, CRC(2ab06bda) SHA1(2b208b564e55c258665e1f66b26fe14a6c68eb96) ) ROM_REGION( 0x10000, "pal", 0 ) /* PALS not directly observed on this board but assumed to exist */ - /* these are marked b06 and so are probably shared with extermination */ - ROM_LOAD( "b06-12.pal16l8a.ic26.jed", 0x00000, 0x01000, NO_DUMP) - ROM_LOAD( "b06-13.pal16l8a.ic25.jed", 0x01000, 0x01000, NO_DUMP) - ROM_LOAD( "b06-14.pal16x8a.icxx.jed", 0x02000, 0x01000, NO_DUMP) // does this chip exist? + /* these are probably shared with extermination except for u35 */ + ROM_LOAD( "b06-12.pal16l8a.u26.jed", 0x00000, 0x01000, NO_DUMP) + ROM_LOAD( "b06-13.pal16l8a.u25.jed", 0x01000, 0x01000, NO_DUMP) + ROM_LOAD( "b53-12.pal16l8a.u35.jed", 0x02000, 0x01000, NO_DUMP) // likely has a different name on the proto pcb... + ROM_LOAD( "b06-101.pal16l8a.u36.jed", 0x03000, 0x01000, NO_DUMP) ROM_END /* @@ -2613,6 +2643,7 @@ Taito, 1988 This PCB runs on Taito/Seta hardware and the exact same newer PCB as The New Zealand Story. As such, everything here also applies to The New Zealand Story. +Unlike the newer The New Zealand Story pcb, Kabuki Z lacks the daughterboard with the 3rd z80. PCB Layout ---------- @@ -2740,6 +2771,7 @@ GAME( 1988, chukataij, chukatai, tnzs, chukatau, tnzs_state, chukatai, RO GAME( 1988, tnzs, 0, tnzsb, tnzs, tnzs_state, tnzsb, ROT0, "Taito Corporation Japan", "The NewZealand Story (World, new version) (newer PCB)", MACHINE_SUPPORTS_SAVE ) GAME( 1988, tnzsj, tnzs, tnzsb, tnzsj, tnzs_state, tnzsb, ROT0, "Taito Corporation", "The NewZealand Story (Japan, new version) (newer PCB)", MACHINE_SUPPORTS_SAVE ) GAME( 1988, tnzsjo, tnzs, tnzs, tnzsjo, tnzs_state, tnzs, ROT0, "Taito Corporation", "The NewZealand Story (Japan, old version) (older PCB)", MACHINE_SUPPORTS_SAVE ) +GAME( 1988, tnzsuo, tnzs, tnzs, tnzsjo, tnzs_state, tnzs, ROT0, "Taito America Corporation", "The NewZealand Story (US, old version) (older PCB)", MACHINE_SUPPORTS_SAVE ) GAME( 1988, tnzso, tnzs, tnzs, tnzsop, tnzs_state, tnzs, ROT0, "Taito Corporation Japan", "The NewZealand Story (World, old version) (older PCB)", MACHINE_SUPPORTS_SAVE ) GAME( 1988, tnzsop, tnzs, tnzs, tnzsop, tnzs_state, tnzs, ROT0, "Taito Corporation Japan", "The NewZealand Story (World, prototype?) (older PCB)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/toaplan2.cpp b/src/mame/drivers/toaplan2.cpp index 084b7236212..d8d04c146d3 100644 --- a/src/mame/drivers/toaplan2.cpp +++ b/src/mame/drivers/toaplan2.cpp @@ -347,7 +347,15 @@ To Do / Unknowns: - Need to sort out the video status register. - Find out how exactly how sound CPU communication really works in bgaregga/batrider/bbakraid current emulation seems to work (plays all sounds), but there are still some unknown reads/writes - - Write a RTC core for uPD4992, needed by Othello Derby and Power Kick + +Notes on Power Kick coin inputs: +- The 10 yen input is "Key In" according to the bookkeeping screen, but is + an otherwise normal coin input with a counter and a lockout (sharing the + latter with the "medal" coin). +- The 100 yen input never adds any credits except in "Coin Function Check," + instead dispensing its value into the hopper immediately. + +To reset the NVRAM in Othello Derby, hold P1 Button 1 down while booting. *****************************************************************************/ @@ -356,12 +364,16 @@ To Do / Unknowns: #include "cpu/nec/v25.h" #include "cpu/z80/z80.h" #include "cpu/z180/z180.h" +#include "machine/nvram.h" #include "sound/ym2151.h" #include "sound/3812intf.h" #include "sound/ymz280b.h" #include "includes/toaplan2.h" #include "includes/toaplipt.h" +#define UNICODE_YEN "\xC2\xA5" +#define PWRKICK_HOPPER_PULSE 50 // time between hopper pulses in milliseconds (probably wrong) + /*************************************************************************** Initialisation handlers @@ -556,9 +568,17 @@ WRITE8_MEMBER(toaplan2_state::toaplan2_coin_w) WRITE8_MEMBER(toaplan2_state::pwrkick_coin_w) { - machine().bookkeeping().coin_counter_w(0, (data & 2) >> 1 ); - machine().bookkeeping().coin_counter_w(1, (data & 8) >> 3 ); - m_pwrkick_hopper = (data & 0x80) >> 7; + machine().bookkeeping().coin_counter_w(0, (data & 2) >> 1 ); // medal + machine().bookkeeping().coin_counter_w(1, (data & 8) >> 3 ); // 10 yen + machine().bookkeeping().coin_counter_w(2, (data & 1) ); // 100 yen + m_hopper->write(space, 0, data & 0x80); +} + +WRITE8_MEMBER(toaplan2_state::pwrkick_coin_lockout_w) +{ + machine().bookkeeping().coin_lockout_w(0, (data & 4) ? 0 : 1); + machine().bookkeeping().coin_lockout_w(1, (data & 4) ? 0 : 1); + machine().bookkeeping().coin_lockout_w(2, (data & 2) ? 0 : 1); } @@ -1182,7 +1202,8 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( pwrkick_68k_mem, AS_PROGRAM, 16, toaplan2_state ) AM_RANGE(0x000000, 0x07ffff) AM_ROM - AM_RANGE(0x100000, 0x10ffff) AM_RAM + AM_RANGE(0x100000, 0x103fff) AM_RAM AM_SHARE("nvram") // Only 10022C-10037B is actually saved as NVRAM + AM_RANGE(0x104000, 0x10ffff) AM_RAM AM_RANGE(0x200000, 0x20000f) AM_DEVREADWRITE8("rtc", upd4992_device, read, write, 0x00ff ) AM_RANGE(0x300000, 0x30000d) AM_DEVREADWRITE("gp9001", gp9001vdp_device, gp9001_vdp_r, gp9001_vdp_w) @@ -1197,13 +1218,14 @@ static ADDRESS_MAP_START( pwrkick_68k_mem, AS_PROGRAM, 16, toaplan2_state ) AM_RANGE(0x700018, 0x700019) AM_READ_PORT("DSWC") AM_RANGE(0x70001c, 0x70001d) AM_READ_PORT("SYS") AM_RANGE(0x700030, 0x700031) AM_WRITE(oki_bankswitch_w) - AM_RANGE(0x700034, 0x700035) AM_WRITE8(pwrkick_coin_w,0x00ff) - AM_RANGE(0x700038, 0x700039) AM_WRITENOP // lamps? + AM_RANGE(0x700034, 0x700035) AM_WRITE8(pwrkick_coin_w, 0x00ff) + AM_RANGE(0x700038, 0x700039) AM_WRITE8(pwrkick_coin_lockout_w, 0x00ff) ADDRESS_MAP_END static ADDRESS_MAP_START( othldrby_68k_mem, AS_PROGRAM, 16, toaplan2_state ) AM_RANGE(0x000000, 0x07ffff) AM_ROM - AM_RANGE(0x100000, 0x10ffff) AM_RAM + AM_RANGE(0x100000, 0x103fff) AM_RAM AM_SHARE("nvram") // Only 10331E-103401 is actually saved as NVRAM + AM_RANGE(0x104000, 0x10ffff) AM_RAM AM_RANGE(0x200000, 0x20000f) AM_DEVREADWRITE8("rtc", upd4992_device, read, write, 0x00ff ) AM_RANGE(0x300000, 0x30000d) AM_DEVREADWRITE("gp9001", gp9001vdp_device, gp9001_vdp_r, gp9001_vdp_w) @@ -2304,139 +2326,90 @@ static INPUT_PORTS_START( batsugun ) INPUT_PORTS_END -CUSTOM_INPUT_MEMBER(toaplan2_state::pwrkick_hopper_status_r) -{ - /* TODO: hopper mechanism */ - return machine().rand() & 1; - //return m_pwrkick_hopper & (machine().rand() & 1); -} - static INPUT_PORTS_START( pwrkick ) PORT_START("DSWA") - PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) + PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:!1,!2") PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x01, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) PORT_DIPSETTING( 0x03, DEF_STR( Very_Hard ) ) - PORT_DIPNAME( 0x1c, 0x00, "Payout" ) - PORT_DIPSETTING( 0x00, "1" ) - PORT_DIPSETTING( 0x04, "2" ) - PORT_DIPSETTING( 0x08, "3" ) - PORT_DIPSETTING( 0x0c, "4" ) - PORT_DIPSETTING( 0x10, "5" ) - PORT_DIPSETTING( 0x14, "6" ) - PORT_DIPSETTING( 0x18, "7" ) - PORT_DIPSETTING( 0x1c, "8" ) - PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) + PORT_DIPNAME( 0x5c, 0x00, "Payout" ) PORT_DIPLOCATION("SW1:!3,!4,!5,!7") + PORT_DIPSETTING( 0x00, "110" ) // Service mode displays values as 1-8, ignoring SW1:7 + PORT_DIPSETTING( 0x04, "105" ) + PORT_DIPSETTING( 0x08, "100" ) + PORT_DIPSETTING( 0x0c, "95" ) + PORT_DIPSETTING( 0x10, "90" ) + PORT_DIPSETTING( 0x14, "85" ) + PORT_DIPSETTING( 0x18, "80" ) + PORT_DIPSETTING( 0x1c, "75" ) + PORT_DIPSETTING( 0x40, "70" ) + PORT_DIPSETTING( 0x44, "65" ) + PORT_DIPSETTING( 0x48, "60" ) + PORT_DIPSETTING( 0x4c, "55" ) + PORT_DIPSETTING( 0x50, "50" ) + PORT_DIPSETTING( 0x54, "45" ) + PORT_DIPSETTING( 0x58, "40" ) + PORT_DIPSETTING( 0x5c, "35" ) + PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:!6") PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unused ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x00, "Diagnostic" ) + PORT_DIPNAME( 0x80, 0x00, "Diagnostic" ) PORT_DIPLOCATION("SW1:!8") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) PORT_START("DSWB") - PORT_DIPNAME( 0x03, 0x00, "Play Credit" ) - PORT_DIPSETTING( 0x00, "10 \xC2\xA5" ) - PORT_DIPSETTING( 0x01, "20 \xC2\xA5" ) - PORT_DIPSETTING( 0x02, "30 \xC2\xA5" ) - PORT_DIPSETTING( 0x03, "40 \xC2\xA5" ) - PORT_DIPNAME( 0x0c, 0x00, "Coin Exchange" ) + PORT_DIPNAME( 0x03, 0x00, "Play Credit" ) PORT_DIPLOCATION("SW2:!1,!2") + PORT_DIPSETTING( 0x00, UNICODE_YEN "10" ) + PORT_DIPSETTING( 0x01, UNICODE_YEN "20" ) + PORT_DIPSETTING( 0x02, UNICODE_YEN "30" ) + PORT_DIPSETTING( 0x03, UNICODE_YEN "40" ) + PORT_DIPNAME( 0x0c, 0x00, "Coin Exchange" ) PORT_DIPLOCATION("SW2:!3,!4") PORT_DIPSETTING( 0x00, "12" ) PORT_DIPSETTING( 0x04, "10" ) PORT_DIPSETTING( 0x08, "6" ) PORT_DIPSETTING( 0x0c, "5" ) - PORT_DIPNAME( 0x30, 0x00, "Game Mode" ) + PORT_DIPNAME( 0x30, 0x00, "Game Mode" ) PORT_DIPLOCATION("SW2:!5,!6") PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x10, "Shot" ) PORT_DIPSETTING( 0x20, "Auto" ) PORT_DIPSETTING( 0x30, "S-Manual" ) - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unused ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_DIPUNUSED_DIPLOC( 0x40, 0x00, "SW2:!7" ) + PORT_DIPUNUSED_DIPLOC( 0x80, 0x00, "SW2:!8" ) PORT_START("DSWC") - PORT_DIPNAME( 0x01, 0x00, "DSWC" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x01, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x02, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x04, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x10, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x20, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_DIPUNUSED_DIPLOC( 0x01, 0x00, "SW3:!1" ) + PORT_DIPUNUSED_DIPLOC( 0x02, 0x00, "SW3:!2" ) + PORT_DIPUNUSED_DIPLOC( 0x04, 0x00, "SW3:!3" ) + PORT_DIPUNUSED_DIPLOC( 0x08, 0x00, "SW3:!4" ) + PORT_DIPUNUSED_DIPLOC( 0x10, 0x00, "SW3:!5" ) + PORT_DIPUNUSED_DIPLOC( 0x20, 0x00, "SW3:!6" ) + PORT_DIPUNUSED_DIPLOC( 0x40, 0x00, "SW3:!7" ) + PORT_DIPUNUSED_DIPLOC( 0x80, 0x00, "SW3:!8" ) PORT_START("IN1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Left Button") PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Center Button") PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Right Button") - PORT_DIPNAME( 0x10, 0x00, "IN1" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x10, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x20, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("IN2") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_GAMBLE_KEYIN ) // 10 Yen - PORT_SERVICE( 0x02, IP_ACTIVE_HIGH ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_NAME("Coin 2 (" UNICODE_YEN "10)") + PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_HIGH ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Down Button") - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, toaplan2_state, pwrkick_hopper_status_r, nullptr) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SERVICE3 ) PORT_NAME("Memory Reset") - PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x20, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("hopper", ticket_dispenser_device, line_r) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_MEMORY_RESET ) + PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("SYS") - PORT_DIPNAME( 0x01, 0x00, "SYS" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x01, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x02, DEF_STR( On ) ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) // 100 Yen - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Bookkeeping") - PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x10, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x20, DEF_STR( On ) ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE4 ) PORT_NAME("Attendant Key") - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) + PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 ) PORT_NAME("Coin Exchange (" UNICODE_YEN "100)") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_GAMBLE_BOOK ) + PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_GAMBLE_SERVICE ) PORT_NAME("Attendant Key") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_NAME("Coin 1 (Medal)") + + // The specific "Payout" button shown on the test screen and diagnostic menu does not exist. INPUT_PORTS_END static INPUT_PORTS_START( othldrby ) @@ -3658,6 +3631,10 @@ static MACHINE_CONFIG_START( pwrkick, toaplan2_state ) MCFG_MACHINE_START_OVERRIDE(toaplan2_state,toaplan2) MCFG_UPD4992_ADD("rtc") + MCFG_NVRAM_ADD_0FILL("nvram") + + MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(PWRKICK_HOPPER_PULSE), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH) + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) @@ -3690,6 +3667,8 @@ static MACHINE_CONFIG_START( othldrby, toaplan2_state ) MCFG_MACHINE_START_OVERRIDE(toaplan2_state,toaplan2) MCFG_UPD4992_ADD("rtc") + MCFG_NVRAM_ADD_0FILL("nvram") + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) diff --git a/src/mame/drivers/toobin.cpp b/src/mame/drivers/toobin.cpp index f07cf0c4110..d35126e0033 100644 --- a/src/mame/drivers/toobin.cpp +++ b/src/mame/drivers/toobin.cpp @@ -86,22 +86,22 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, toobin_state ) AM_RANGE(0xc08000, 0xc097ff) AM_MIRROR(0x046000) AM_RAM_DEVWRITE("alpha", tilemap_device, write) AM_SHARE("alpha") AM_RANGE(0xc09800, 0xc09fff) AM_MIRROR(0x046000) AM_RAM AM_SHARE("mob") AM_RANGE(0xc10000, 0xc107ff) AM_MIRROR(0x047800) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") - AM_RANGE(0xba6000, 0xba6001) AM_MIRROR(0x4500fe) AM_READNOP /* who knows? read at controls time */ - AM_RANGE(0xba8000, 0xba8001) AM_MIRROR(0x4500fe) AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w) - AM_RANGE(0xba8100, 0xba8101) AM_MIRROR(0x4500fe) AM_DEVWRITE8("jsa", atari_jsa_i_device, main_command_w, 0x00ff) - AM_RANGE(0xba8300, 0xba8301) AM_MIRROR(0x45003e) AM_WRITE(intensity_w) - AM_RANGE(0xba8340, 0xba8341) AM_MIRROR(0x45003e) AM_WRITE(interrupt_scan_w) AM_SHARE("interrupt_scan") - AM_RANGE(0xba8380, 0xba8381) AM_MIRROR(0x45003e) AM_RAM_WRITE(slip_w) AM_SHARE("mob:slip") - AM_RANGE(0xba83c0, 0xba83c1) AM_MIRROR(0x45003e) AM_WRITE(scanline_int_ack_w) - AM_RANGE(0xba8400, 0xba8401) AM_MIRROR(0x4500fe) AM_DEVWRITE("jsa", atari_jsa_i_device, sound_reset_w) - AM_RANGE(0xba8500, 0xba8501) AM_MIRROR(0x4500fe) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) - AM_RANGE(0xba8600, 0xba8601) AM_MIRROR(0x4500fe) AM_WRITE(xscroll_w) AM_SHARE("xscroll") - AM_RANGE(0xba8700, 0xba8701) AM_MIRROR(0x4500fe) AM_WRITE(yscroll_w) AM_SHARE("yscroll") - AM_RANGE(0xba8800, 0xba8801) AM_MIRROR(0x4507fe) AM_READ_PORT("FF8800") - AM_RANGE(0xba9000, 0xba9001) AM_MIRROR(0x4507fe) AM_READ_PORT("FF9000") - AM_RANGE(0xba9800, 0xba9801) AM_MIRROR(0x4507fe) AM_DEVREAD8("jsa", atari_jsa_i_device, main_response_r, 0x00ff) - AM_RANGE(0xbaa000, 0xbaafff) AM_MIRROR(0x451000) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) - AM_RANGE(0xbac000, 0xbaffff) AM_MIRROR(0x450000) AM_RAM + AM_RANGE(0x826000, 0x826001) AM_MIRROR(0x4500fe) AM_READNOP /* who knows? read at controls time */ + AM_RANGE(0x828000, 0x828001) AM_MIRROR(0x4500fe) AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w) + AM_RANGE(0x828100, 0x828101) AM_MIRROR(0x4500fe) AM_DEVWRITE8("jsa", atari_jsa_i_device, main_command_w, 0x00ff) + AM_RANGE(0x828300, 0x828301) AM_MIRROR(0x45003e) AM_WRITE(intensity_w) + AM_RANGE(0x828340, 0x828341) AM_MIRROR(0x45003e) AM_WRITE(interrupt_scan_w) AM_SHARE("interrupt_scan") + AM_RANGE(0x828380, 0x828381) AM_MIRROR(0x45003e) AM_RAM_WRITE(slip_w) AM_SHARE("mob:slip") + AM_RANGE(0x8283c0, 0x8283c1) AM_MIRROR(0x45003e) AM_WRITE(scanline_int_ack_w) + AM_RANGE(0x828400, 0x828401) AM_MIRROR(0x4500fe) AM_DEVWRITE("jsa", atari_jsa_i_device, sound_reset_w) + AM_RANGE(0x828500, 0x828501) AM_MIRROR(0x4500fe) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0x828600, 0x828601) AM_MIRROR(0x4500fe) AM_WRITE(xscroll_w) AM_SHARE("xscroll") + AM_RANGE(0x828700, 0x828701) AM_MIRROR(0x4500fe) AM_WRITE(yscroll_w) AM_SHARE("yscroll") + AM_RANGE(0x828800, 0x828801) AM_MIRROR(0x4507fe) AM_READ_PORT("FF8800") + AM_RANGE(0x829000, 0x829001) AM_MIRROR(0x4507fe) AM_READ_PORT("FF9000") + AM_RANGE(0x829800, 0x829801) AM_MIRROR(0x4507fe) AM_DEVREAD8("jsa", atari_jsa_i_device, main_response_r, 0x00ff) + AM_RANGE(0x82a000, 0x82afff) AM_MIRROR(0x451000) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) + AM_RANGE(0x82c000, 0x82ffff) AM_MIRROR(0x450000) AM_RAM ADDRESS_MAP_END diff --git a/src/mame/drivers/topspeed.cpp b/src/mame/drivers/topspeed.cpp index db62ef16adf..bbbd8e41c2f 100644 --- a/src/mame/drivers/topspeed.cpp +++ b/src/mame/drivers/topspeed.cpp @@ -189,7 +189,7 @@ READ8_MEMBER(topspeed_state::input_bypass_r) { // Read port number UINT8 port = m_tc0220ioc->port_r(space, 0); - UINT16 steer = 0xff80 + read_safe(ioport("STEER"), 0); + UINT16 steer = 0xff80 + m_steer.read_safe(0); switch (port) { @@ -207,8 +207,8 @@ READ8_MEMBER(topspeed_state::input_bypass_r) 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[read_safe(ioport(tag), 0) & 7]; + ioport_port *port = ioport((const char *)param); + return retval[port != nullptr ? port->read() & 7 : 0]; } READ16_MEMBER(topspeed_state::motor_r) diff --git a/src/mame/drivers/triforce.cpp b/src/mame/drivers/triforce.cpp index 07fb15011b8..3cf4d22941f 100644 --- a/src/mame/drivers/triforce.cpp +++ b/src/mame/drivers/triforce.cpp @@ -30,35 +30,35 @@ Games on this system include.... |*| 2003 | F-Zero AX (Rev C) | Sega / Amusement Vision / Nintendo | GDROM | GDT-0004C | 317-0362-COM | 253-5508-0362 | |*| 2003 | F-Zero AX (Rev D) | Sega / Amusement Vision / Nintendo | GDROM | GDT-0004D | 317-0362-COM | 253-5508-0362 | |*| 2003 | F-Zero AX (Rev E) | Sega / Amusement Vision / Nintendo | GDROM | GDT-0004E | 317-0362-COM | 253-5508-0362 | -| | 2003 | The Key Of Avalon: The Wizard Master (server) | Sega / Hitmaker | GDROM | GDT-0005 | | | -| | 2003 | The Key Of Avalon: The Wizard Master (server) (Rev A) | Sega / Hitmaker | GDROM | GDT-0005A | | | -| | 2003 | The Key Of Avalon: The Wizard Master (server) (Rev B) | Sega / Hitmaker | GDROM | GDT-0005B | | | -|*| 2003 | The Key Of Avalon: The Wizard Master (server) (Rev C) | Sega / Hitmaker | GDROM | GDT-0005C | | | -| | 2003 | The Key Of Avalon: The Wizard Master (server) (Rev D) | Sega / Hitmaker | GDROM | GDT-0005D | | | -|*| 2003 | The Key Of Avalon: The Wizard Master (server) (Rev E) | Sega / Hitmaker | GDROM | GDT-0005E | | | -|*| 2003 | The Key Of Avalon: The Wizard Master (server) (Rev F) | Sega / Hitmaker | GDROM | GDT-0005F | | | -|*| 2003 | The Key Of Avalon: The Wizard Master (server) (Rev G) | Sega / Hitmaker | GDROM | GDT-0005G | | | -| | 2003 | The Key Of Avalon: The Wizard Master (client) | Sega / Hitmaker | GDROM | GDT-0006 | | | -| | 2003 | The Key Of Avalon: The Wizard Master (client) (Rev A) | Sega / Hitmaker | GDROM | GDT-0006A | | | -| | 2003 | The Key Of Avalon: The Wizard Master (client) (Rev B) | Sega / Hitmaker | GDROM | GDT-0006B | | | -| | 2003 | The Key Of Avalon: The Wizard Master (client) (Rev C) | Sega / Hitmaker | GDROM | GDT-0006C | | | -| | 2003 | The Key Of Avalon: The Wizard Master (client) (Rev D) | Sega / Hitmaker | GDROM | GDT-0006D | | | -|*| 2003 | The Key Of Avalon: The Wizard Master (client) (Rev E) | Sega / Hitmaker | GDROM | GDT-0006E | | | -|*| 2003 | The Key Of Avalon: The Wizard Master (client) (Rev F) | Sega / Hitmaker | GDROM | GDT-0006F | | | -|*| 2003 | The Key Of Avalon: The Wizard Master (client) (Rev G) | Sega / Hitmaker | GDROM | GDT-0006G | | | +| | 2003 | The Key Of Avalon: The Wizard Master (server) | Sega / Hitmaker | GDROM | GDT-0005 | 317-0355-JPN | 253-5508-0355J| +| | 2003 | The Key Of Avalon: The Wizard Master (server) (Rev A) | Sega / Hitmaker | GDROM | GDT-0005A | 317-0355-JPN | 253-5508-0355J| +| | 2003 | The Key Of Avalon: The Wizard Master (server) (Rev B) | Sega / Hitmaker | GDROM | GDT-0005B | 317-0355-JPN | 253-5508-0355J| +|*| 2003 | The Key Of Avalon: The Wizard Master (server) (Rev C) | Sega / Hitmaker | GDROM | GDT-0005C | 317-0355-JPN | 253-5508-0355J| +| | 2003 | The Key Of Avalon: The Wizard Master (server) (Rev D) | Sega / Hitmaker | GDROM | GDT-0005D | 317-0355-JPN | 253-5508-0355J| +|*| 2003 | The Key Of Avalon: The Wizard Master (server) (Rev E) | Sega / Hitmaker | GDROM | GDT-0005E | 317-0355-JPN | 253-5508-0355J| +|*| 2003 | The Key Of Avalon: The Wizard Master (server) (Rev F) | Sega / Hitmaker | GDROM | GDT-0005F | 317-0355-JPN | 253-5508-0355J| +|*| 2003 | The Key Of Avalon: The Wizard Master (server) (Rev G) | Sega / Hitmaker | GDROM | GDT-0005G | 317-0355-JPN | 253-5508-0355J| +| | 2003 | The Key Of Avalon: The Wizard Master (client) | Sega / Hitmaker | GDROM | GDT-0006 | 317-0355-JPN | 253-5508-0355J| +| | 2003 | The Key Of Avalon: The Wizard Master (client) (Rev A) | Sega / Hitmaker | GDROM | GDT-0006A | 317-0355-JPN | 253-5508-0355J| +| | 2003 | The Key Of Avalon: The Wizard Master (client) (Rev B) | Sega / Hitmaker | GDROM | GDT-0006B | 317-0355-JPN | 253-5508-0355J| +| | 2003 | The Key Of Avalon: The Wizard Master (client) (Rev C) | Sega / Hitmaker | GDROM | GDT-0006C | 317-0355-JPN | 253-5508-0355J| +| | 2003 | The Key Of Avalon: The Wizard Master (client) (Rev D) | Sega / Hitmaker | GDROM | GDT-0006D | 317-0355-JPN | 253-5508-0355J| +|*| 2003 | The Key Of Avalon: The Wizard Master (client) (Rev E) | Sega / Hitmaker | GDROM | GDT-0006E | 317-0355-JPN | 253-5508-0355J| +|*| 2003 | The Key Of Avalon: The Wizard Master (client) (Rev F) | Sega / Hitmaker | GDROM | GDT-0006F | 317-0355-JPN | 253-5508-0355J| +|*| 2003 | The Key Of Avalon: The Wizard Master (client) (Rev G) | Sega / Hitmaker | GDROM | GDT-0006G | 317-0355-JPN | 253-5508-0355J| | | 2003 | Gekitou Pro Yakyuu Mizushima Shinji All Stars | Sega / Wow Entertainment | GDROM | GDT-0008 | 317-0371-JPN | | | | 2003 | Gekitou Pro Yakyuu Mizushima Shinji All Stars (Rev A) | Sega / Wow Entertainment | GDROM | GDT-0008A | 317-0371-JPN | | |*| 2003 | Gekitou Pro Yakyuu Mizushima Shinji All Stars (Rev B) | Sega / Wow Entertainment | GDROM | GDT-0008B | 317-0371-JPN | | |*| 2003 | Gekitou Pro Yakyuu Mizushima Shinji All Stars (Rev C) | Sega / Wow Entertainment | GDROM | GDT-0008C | 317-0371-JPN | | -| | 2003 | The Key Of Avalon 1.10 | Sega / Hitmaker | GDROM | | | | -| | 2004 | The Key Of Avalon 1.??: ??? (server) | Sega / Hitmaker | GDROM | GDT-0009 | | | -|*| 2004 | The Key Of Avalon 1.20: Summon The New Monster (server) (Rev A) | Sega / Hitmaker | GDROM | GDT-0009A | | | -| | 2004 | The Key Of Avalon 1.??: ??? (server) (Rev B) | Sega / Hitmaker | GDROM | GDT-0009B | | | -|*| 2004 | The Key Of Avalon 1.30: Chaotic Sabbat (server) (Rev C) | Sega / Hitmaker | GDROM | GDT-0009C | | | -| | 2004 | The Key Of Avalon 1.??: ??? (client) | Sega / Hitmaker | GDROM | GDT-0010 | | | -|*| 2004 | The Key Of Avalon 1.20: Summon The New Monster (client) (Rev A) | Sega / Hitmaker | GDROM | GDT-0010A | | | -| | 2004 | The Key Of Avalon 1.??: ??? (client) (Rev B) | Sega / Hitmaker | GDROM | GDT-0010B | | | -|*| 2004 | The Key Of Avalon 1.30: Chaotic Sabbat (client) (Rev C) | Sega / Hitmaker | GDROM | GDT-0010C | | | +| | 2003 | The Key Of Avalon 1.10 | Sega / Hitmaker | GDROM | | 317-0355-JPN | 253-5508-0355J| +| | 2004 | The Key Of Avalon 1.??: ??? (server) | Sega / Hitmaker | GDROM | GDT-0009 | 317-0355-JPN | 253-5508-0355J| +|*| 2004 | The Key Of Avalon 1.20: Summon The New Monster (server) (Rev A) | Sega / Hitmaker | GDROM | GDT-0009A | 317-0355-JPN | 253-5508-0355J| +| | 2004 | The Key Of Avalon 1.??: ??? (server) (Rev B) | Sega / Hitmaker | GDROM | GDT-0009B | 317-0355-JPN | 253-5508-0355J| +|*| 2004 | The Key Of Avalon 1.30: Chaotic Sabbat (server) (Rev C) | Sega / Hitmaker | GDROM | GDT-0009C | 317-0355-JPN | 253-5508-0355J| +| | 2004 | The Key Of Avalon 1.??: ??? (client) | Sega / Hitmaker | GDROM | GDT-0010 | 317-0355-JPN | 253-5508-0355J| +|*| 2004 | The Key Of Avalon 1.20: Summon The New Monster (client) (Rev A) | Sega / Hitmaker | GDROM | GDT-0010A | 317-0355-JPN | 253-5508-0355J| +| | 2004 | The Key Of Avalon 1.??: ??? (client) (Rev B) | Sega / Hitmaker | GDROM | GDT-0010B | 317-0355-JPN | 253-5508-0355J| +|*| 2004 | The Key Of Avalon 1.30: Chaotic Sabbat (client) (Rev C) | Sega / Hitmaker | GDROM | GDT-0010C | 317-0355-JPN | 253-5508-0355J| |*| 2004 | Firmware Update | Sega | GDROM | GDT-0011 | 317-0371-JPN | | | | 2004 | Virtua Striker 2002 (Export) | Sega | GDROM | GDT-0012 | | | | | 2004 | Virtua Striker 4 (Japan) | Sega | GDROM | GDT-0013 | 317-0391-JPN | | @@ -75,13 +75,13 @@ 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 (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 (client) | Sega / Hitmaker | GDROM | GDT-0018 | | | -| | 2005 | The Key Of Avalon 2.5: War of the Key (client) (Rev A) | Sega / Hitmaker | GDROM | GDT-0018A | | | -| | 2005 | The Key Of Avalon 2.5: War of the Key (client) (Rev B) | Sega / Hitmaker | GDROM | GDT-0018B | | | -| | 2005 | The Key Of Avalon 2.5: War of the Key (server) | Sega / Hitmaker | GDROM | GDT-0019 | | | -| | 2005 | The Key Of Avalon 2.5: War of the Key (server) (Rev A) | Sega / Hitmaker | GDROM | GDT-0019A | | | -| | 2005 | The Key Of Avalon 2.5: War of the Key (server) (Rev B) | Sega / Hitmaker | GDROM | GDT-0019B | | | +|*| 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-0018 | | | +| | 2005 | The Key Of Avalon 2.5: War of the Key (server) (Rev A) | Sega / Hitmaker | GDROM | GDT-0018A | | | +|*| 2005 | The Key Of Avalon 2.5: War of the Key (server) (Rev B) | Sega / Hitmaker | GDROM | GDT-0018B | | | +| | 2005 | The Key Of Avalon 2.5: War of the Key (client) | Sega / Hitmaker | GDROM | GDT-0019 | | | +| | 2005 | The Key Of Avalon 2.5: War of the Key (client) (Rev A) | Sega / Hitmaker | GDROM | GDT-0019A | | | +|*| 2005 | The Key Of Avalon 2.5: War of the Key (client) (Rev B) | Sega / Hitmaker | GDROM | GDT-0019B | | | | | 2006 | Virtua Striker 4 Ver.2006 (Japan) | Sega | GDROM | GDT-0020 | | | | | 2006 | Virtua Striker 4 Ver.2006 (Japan) (Rev A) | Sega | GDROM | GDT-0020A | | | | | 2006 | Virtua Striker 4 Ver.2006 (Japan) (Rev B) | Sega | GDROM | GDT-0020B | | | @@ -91,11 +91,11 @@ 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 (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 | +|*| 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. - +! security PIC is not dumped PCB Layouts =========== @@ -685,7 +685,7 @@ ROM_START( avalonsc ) DISK_IMAGE_READONLY( "gdt-0005c", 0, SHA1(37b848ed131e8357ba57474f7c2aa6ab51b01781) ) ROM_REGION( 0x50, "pic", ROMREGION_ERASE) - ROM_LOAD("avalon.data", 0x00, 0x50, CRC(6c51e5d6) SHA1(84afef983f1f855fe8722f55baa8ea5121da9369) ) + ROM_LOAD("317-0355-jpn.data", 0x00, 0x50, CRC(9b9db9d8) SHA1(60aab36fcfd7a2850b2947effea70e44a06d1f78) ) ROM_END ROM_START( avalonse ) @@ -695,7 +695,7 @@ ROM_START( avalonse ) DISK_IMAGE_READONLY( "gdt-0005e", 0, SHA1(a888a045c323f374b53295404262a3bb80a533c0) ) ROM_REGION( 0x50, "pic", ROMREGION_ERASE) - ROM_LOAD("avalon.data", 0x00, 0x50, CRC(6c51e5d6) SHA1(84afef983f1f855fe8722f55baa8ea5121da9369) ) + ROM_LOAD("317-0355-jpn.data", 0x00, 0x50, CRC(9b9db9d8) SHA1(60aab36fcfd7a2850b2947effea70e44a06d1f78) ) ROM_END ROM_START( avalonsf ) @@ -705,7 +705,7 @@ ROM_START( avalonsf ) DISK_IMAGE_READONLY( "gdt-0005f", 0, SHA1(3752e406a5542a912f8b1ef48096ed30e7d28279) ) ROM_REGION( 0x50, "pic", ROMREGION_ERASE) - ROM_LOAD("avalon.data", 0x00, 0x50, CRC(6c51e5d6) SHA1(84afef983f1f855fe8722f55baa8ea5121da9369) ) + ROM_LOAD("317-0355-jpn.data", 0x00, 0x50, CRC(9b9db9d8) SHA1(60aab36fcfd7a2850b2947effea70e44a06d1f78) ) ROM_END ROM_START( avalons ) @@ -715,7 +715,7 @@ ROM_START( avalons ) DISK_IMAGE_READONLY( "gdt-0005g", 0, SHA1(f2dca7ecd6c07ff098ac91e353ffc3fd843054e3) ) ROM_REGION( 0x50, "pic", ROMREGION_ERASE) - ROM_LOAD("avalon.data", 0x00, 0x50, CRC(6c51e5d6) SHA1(84afef983f1f855fe8722f55baa8ea5121da9369) ) + ROM_LOAD("317-0355-jpn.data", 0x00, 0x50, CRC(9b9db9d8) SHA1(60aab36fcfd7a2850b2947effea70e44a06d1f78) ) ROM_END ROM_START( avalonce ) @@ -725,7 +725,7 @@ ROM_START( avalonce ) DISK_IMAGE_READONLY( "gdt-0006e", 0, SHA1(59aeb7d767d390b3ee7f079d3d1a31df3e92773b) ) ROM_REGION( 0x50, "pic", ROMREGION_ERASE) - ROM_LOAD("avalon.data", 0x00, 0x50, CRC(6c51e5d6) SHA1(84afef983f1f855fe8722f55baa8ea5121da9369) ) + ROM_LOAD("317-0355-jpn.data", 0x00, 0x50, CRC(9b9db9d8) SHA1(60aab36fcfd7a2850b2947effea70e44a06d1f78) ) ROM_END ROM_START( avaloncf ) @@ -735,7 +735,7 @@ ROM_START( avaloncf ) DISK_IMAGE_READONLY( "gdt-0006f", 0, SHA1(35c98e41095273326ac0c6fe633c3f6e8b328f63) ) ROM_REGION( 0x50, "pic", ROMREGION_ERASE) - ROM_LOAD("avalon.data", 0x00, 0x50, CRC(6c51e5d6) SHA1(84afef983f1f855fe8722f55baa8ea5121da9369) ) + ROM_LOAD("317-0355-jpn.data", 0x00, 0x50, CRC(9b9db9d8) SHA1(60aab36fcfd7a2850b2947effea70e44a06d1f78) ) ROM_END ROM_START( avalonc ) @@ -745,7 +745,7 @@ ROM_START( avalonc ) DISK_IMAGE_READONLY( "gdt-0006g", 0, SHA1(96e1db3f395152a62d0b344c350f38306ab1e0ae) ) ROM_REGION( 0x50, "pic", ROMREGION_ERASE) - ROM_LOAD("avalon.data", 0x00, 0x50, CRC(6c51e5d6) SHA1(84afef983f1f855fe8722f55baa8ea5121da9369) ) + ROM_LOAD("317-0355-jpn.data", 0x00, 0x50, CRC(9b9db9d8) SHA1(60aab36fcfd7a2850b2947effea70e44a06d1f78) ) ROM_END ROM_START( gekpuryb ) @@ -775,7 +775,7 @@ ROM_START( avalns12 ) DISK_IMAGE_READONLY( "gdt-0009a", 0, SHA1(abeb242cb7f55d003eb7ca6d42dccdb5d8080bf1) ) ROM_REGION( 0x50, "pic", ROMREGION_ERASE) - ROM_LOAD("avalon.data", 0x00, 0x50, CRC(6c51e5d6) SHA1(84afef983f1f855fe8722f55baa8ea5121da9369) ) + ROM_LOAD("317-0355-jpn.data", 0x00, 0x50, CRC(9b9db9d8) SHA1(60aab36fcfd7a2850b2947effea70e44a06d1f78) ) ROM_END ROM_START( avalns13 ) @@ -785,7 +785,7 @@ ROM_START( avalns13 ) DISK_IMAGE_READONLY( "gdt-0009c", 0, SHA1(b960815d85e255521fc26bd4a9e4b7e5c4469487) ) ROM_REGION( 0x50, "pic", ROMREGION_ERASE) - ROM_LOAD("avalon.data", 0x00, 0x50, CRC(6c51e5d6) SHA1(84afef983f1f855fe8722f55baa8ea5121da9369) ) + ROM_LOAD("317-0355-jpn.data", 0x00, 0x50, CRC(9b9db9d8) SHA1(60aab36fcfd7a2850b2947effea70e44a06d1f78) ) ROM_END ROM_START( avalnc12 ) @@ -795,7 +795,7 @@ ROM_START( avalnc12 ) DISK_IMAGE_READONLY( "gdt-0010a", 0, SHA1(a82f803a2097890c29e44ef30d97ad1fcf550435) ) ROM_REGION( 0x50, "pic", ROMREGION_ERASE) - ROM_LOAD("avalon.data", 0x00, 0x50, CRC(6c51e5d6) SHA1(84afef983f1f855fe8722f55baa8ea5121da9369) ) + ROM_LOAD("317-0355-jpn.data", 0x00, 0x50, CRC(9b9db9d8) SHA1(60aab36fcfd7a2850b2947effea70e44a06d1f78) ) ROM_END /* @@ -822,7 +822,7 @@ ROM_START( avalnc13 ) DISK_IMAGE_READONLY( "gdt-0010c", 0, SHA1(c7a3fdb467ccd03b5b9b9e8e290faabcbbc77546) ) ROM_REGION( 0x50, "pic", ROMREGION_ERASE) - ROM_LOAD("avalon.data", 0x00, 0x50, CRC(6c51e5d6) SHA1(84afef983f1f855fe8722f55baa8ea5121da9369) ) + ROM_LOAD("317-0355-jpn.data", 0x00, 0x50, CRC(9b9db9d8) SHA1(60aab36fcfd7a2850b2947effea70e44a06d1f78) ) ROM_END ROM_START( tfupdate ) @@ -913,7 +913,27 @@ ROM_START( avalon20 ) DISK_IMAGE_READONLY( "gdt-0017b", 0, BAD_DUMP SHA1(e2dd32c322ffcaf38b82275d2721b71bb3dfc1f2) ) ROM_REGION( 0x50, "pic", ROMREGION_ERASE) - ROM_LOAD("gdt-0017b.data", 0x00, 0x50, CRC(32cb46d4) SHA1(a58b9e03d57b317133d9b6c29e42852af8e77559) ) + ROM_LOAD("avalon2x.data", 0x00, 0x50, CRC(c5071ada) SHA1(70018180b917beec1b2c272f9125fa43fd1a7b00) ) +ROM_END + +ROM_START( avalns25 ) + TRIFORCE_BIOS + + DISK_REGION( "gdrom" ) + DISK_IMAGE_READONLY( "gdt-0018b", 0, SHA1(4cd10813e66b72021ca344886638025f979d40c0) ) + + ROM_REGION( 0x50, "pic", ROMREGION_ERASE) + ROM_LOAD("avalon2x.data", 0x00, 0x50, CRC(c5071ada) SHA1(70018180b917beec1b2c272f9125fa43fd1a7b00) ) +ROM_END + +ROM_START( avalnc25 ) + TRIFORCE_BIOS + + DISK_REGION( "gdrom" ) + DISK_IMAGE_READONLY( "gdt-0019b", 0, SHA1(7f978ec998a86ed9c36a495bfa72073c6d2bbe31) ) + + ROM_REGION( 0x50, "pic", ROMREGION_ERASE) + ROM_LOAD("avalon2x.data", 0x00, 0x50, CRC(c5071ada) SHA1(70018180b917beec1b2c272f9125fa43fd1a7b00) ) ROM_END ROM_START( vs42006 ) @@ -1079,12 +1099,12 @@ ROM_END // 0017 GAME( 2004, avalc20o, avalon20, triforcegd, triforce, driver_device, 0, ROT0, "Sega / Hitmaker", "The Key Of Avalon 2.0 - Eutaxy and Commandment (client) (GDT-0017)", MACHINE_IS_SKELETON ) // 0017A GAME( 2004, avalc20a, avalon20, triforcegd, triforce, driver_device, 0, ROT0, "Sega / Hitmaker", "The Key Of Avalon 2.0 - Eutaxy and Commandment (client) (Rev A) (GDT-0017A)", MACHINE_IS_SKELETON ) /* 0017B */ GAME( 2004, avalon20, triforce, triforcegd, triforce, driver_device, 0, ROT0, "Sega / Hitmaker", "The Key Of Avalon 2.0 - Eutaxy and Commandment (client) (Rev B) (GDT-0017B)", MACHINE_IS_SKELETON ) -// 0018 GAME( 2005, aval25co, aval25c, triforcegd, triforce, driver_device, 0, ROT0, "Sega / Hitmaker", "The Key Of Avalon 2.5 - War of the Key (client) (GDT-0018)", MACHINE_IS_SKELETON ) -// 0018A GAME( 2005, aval25ca, aval25c, triforcegd, triforce, driver_device, 0, ROT0, "Sega / Hitmaker", "The Key Of Avalon 2.5 - War of the Key (client) (Rev A) (GDT-0018A)", MACHINE_IS_SKELETON ) -// 0018B GAME( 2005, aval25c, triforce, triforcegd, triforce, driver_device, 0, ROT0, "Sega / Hitmaker", "The Key Of Avalon 2.5 - War of the Key (client) (Rev B) (GDT-0018B)", MACHINE_IS_SKELETON ) -// 0019 GAME( 2005, aval25so, aval25s, triforcegd, triforce, driver_device, 0, ROT0, "Sega / Hitmaker", "The Key Of Avalon 2.5 - War of the Key (server) (GDT-0019)", MACHINE_IS_SKELETON ) -// 0019A GAME( 2005, aval25sa, aval25s, triforcegd, triforce, driver_device, 0, ROT0, "Sega / Hitmaker", "The Key Of Avalon 2.5 - War of the Key (server) (Rev A) (GDT-0019A)", MACHINE_IS_SKELETON ) -// 0019B GAME( 2005, aval25s, triforce, triforcegd, triforce, driver_device, 0, ROT0, "Sega / Hitmaker", "The Key Of Avalon 2.5 - War of the Key (server) (Rev B) (GDT-0019B)", MACHINE_IS_SKELETON ) +// 0018 GAME( 2005, aval25co, aval25c, triforcegd, triforce, driver_device, 0, ROT0, "Sega / Hitmaker", "The Key Of Avalon 2.5 - War of the Key (server) (GDT-0018)", MACHINE_IS_SKELETON ) +// 0018A GAME( 2005, aval25ca, aval25c, triforcegd, triforce, driver_device, 0, ROT0, "Sega / Hitmaker", "The Key Of Avalon 2.5 - War of the Key (server) (Rev A) (GDT-0018A)", MACHINE_IS_SKELETON ) +/* 0018B */ GAME( 2005, avalns25, triforce, triforcegd, triforce, driver_device, 0, ROT0, "Sega / Hitmaker", "The Key Of Avalon 2.5 - War of the Key (server) (Rev B) (GDT-0018B)", MACHINE_IS_SKELETON ) +// 0019 GAME( 2005, aval25so, aval25s, triforcegd, triforce, driver_device, 0, ROT0, "Sega / Hitmaker", "The Key Of Avalon 2.5 - War of the Key (client) (GDT-0019)", MACHINE_IS_SKELETON ) +// 0019A GAME( 2005, aval25sa, aval25s, triforcegd, triforce, driver_device, 0, ROT0, "Sega / Hitmaker", "The Key Of Avalon 2.5 - War of the Key (client) (Rev A) (GDT-0019A)", MACHINE_IS_SKELETON ) +/* 0019B */ GAME( 2005, avalnc25, triforce, triforcegd, triforce, driver_device, 0, ROT0, "Sega / Hitmaker", "The Key Of Avalon 2.5 - War of the Key (client) (Rev B) (GDT-0019B)", MACHINE_IS_SKELETON ) // 0020 GAME( 2006, vs42k6o, vs42006, triforcegd, triforce, driver_device, 0, ROT0, "Sega", "Virtua Striker 4 Ver.2006 (Japan) (GDT-0020)", MACHINE_IS_SKELETON ) // 0020A GAME( 2006, vs42k6a, vs42006, triforcegd, triforce, driver_device, 0, ROT0, "Sega", "Virtua Striker 4 Ver.2006 (Japan) (Rev A) (GDT-0020A)", MACHINE_IS_SKELETON ) // 0020B GAME( 2006, vs42k6b, vs42006, triforcegd, triforce, driver_device, 0, ROT0, "Sega", "Virtua Striker 4 Ver.2006 (Japan) (Rev B) (GDT-0020B)", MACHINE_IS_SKELETON ) diff --git a/src/mame/drivers/uapce.cpp b/src/mame/drivers/uapce.cpp index 1868e615c02..14358a66aa1 100644 --- a/src/mame/drivers/uapce.cpp +++ b/src/mame/drivers/uapce.cpp @@ -276,7 +276,7 @@ static INPUT_PORTS_START( uapce ) PORT_DIPSETTING( 0x30, "12 minute Timed Play" ) PORT_DIPSETTING( 0x38, "20 minute Timed Play" ) PORT_DIPNAME( 0x40, 0x40, "Buy-In Feature" ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) diff --git a/src/mame/drivers/vegas.cpp b/src/mame/drivers/vegas.cpp index c45b7fa8b74..6dde2254705 100644 --- a/src/mame/drivers/vegas.cpp +++ b/src/mame/drivers/vegas.cpp @@ -666,13 +666,13 @@ WRITE32_MEMBER( vegas_state::timekeeper_w ) { if (m_cmos_unlocked) { - if ((mem_mask & 0x000000ff) != 0) + if (ACCESSING_BITS_0_7) m_timekeeper->write(space, offset * 4 + 0, data >> 0, 0xff); - if ((mem_mask & 0x0000ff00) != 0) + if (ACCESSING_BITS_8_15) m_timekeeper->write(space, offset * 4 + 1, data >> 8, 0xff); - if ((mem_mask & 0x00ff0000) != 0) + if (ACCESSING_BITS_16_23) m_timekeeper->write(space, offset * 4 + 2, data >> 16, 0xff); - if ((mem_mask & 0xff000000) != 0) + if (ACCESSING_BITS_24_31) m_timekeeper->write(space, offset * 4 + 3, data >> 24, 0xff); if (offset*4 >= 0x7ff0) if (LOG_TIMEKEEPER) logerror("timekeeper_w(%04X & %08X) = %08X\n", offset*4, mem_mask, data); @@ -686,13 +686,13 @@ WRITE32_MEMBER( vegas_state::timekeeper_w ) READ32_MEMBER( vegas_state::timekeeper_r ) { UINT32 result = 0xffffffff; - if ((mem_mask & 0x000000ff) != 0) + if (ACCESSING_BITS_0_7) result = (result & ~0x000000ff) | (m_timekeeper->read(space, offset * 4 + 0, 0xff) << 0); - if ((mem_mask & 0x0000ff00) != 0) + if (ACCESSING_BITS_8_15) result = (result & ~0x0000ff00) | (m_timekeeper->read(space, offset * 4 + 1, 0xff) << 8); - if ((mem_mask & 0x00ff0000) != 0) + if (ACCESSING_BITS_16_23) result = (result & ~0x00ff0000) | (m_timekeeper->read(space, offset * 4 + 2, 0xff) << 16); - if ((mem_mask & 0xff000000) != 0) + if (ACCESSING_BITS_24_31) result = (result & ~0xff000000) | (m_timekeeper->read(space, offset * 4 + 3, 0xff) << 24); if (offset*4 >= 0x7ff0) if (LOG_TIMEKEEPER) logerror("timekeeper_r(%04X & %08X) = %08X\n", offset*4, mem_mask, result); @@ -1484,7 +1484,7 @@ WRITE32_MEMBER( vegas_state::analog_port_w ) { if (data < 8 || data > 15) logerror("%08X:Unexpected analog port select = %08X\n", safe_pc(), data); - m_pending_analog_read = m_io_analog[data & 7] ? m_io_analog[data & 7]->read() : 0; + m_pending_analog_read = m_io_analog[data & 7].read_safe(0); } diff --git a/src/mame/drivers/vicdual.cpp b/src/mame/drivers/vicdual.cpp index 5dfa2543f75..746ca1883ee 100644 --- a/src/mame/drivers/vicdual.cpp +++ b/src/mame/drivers/vicdual.cpp @@ -191,7 +191,7 @@ CUSTOM_INPUT_MEMBER(vicdual_state::get_timer_value) int vicdual_state::is_cabinet_color() { - return ((m_color_bw ? m_color_bw->read() : 0) & 1) ? 0 : 1; + return (m_color_bw.read_safe(0) & 1) ? 0 : 1; } @@ -1303,7 +1303,7 @@ CUSTOM_INPUT_MEMBER(vicdual_state::fake_lives_r) /* and use d8 for the port */ int port = ((FPTR)param) >> 8 & 1; - return ((m_fake_lives[port] ? m_fake_lives[port]->read() : 0) & bit_mask) ? 0 : 1; + return (m_fake_lives[port].read_safe(0) & bit_mask) ? 0 : 1; } diff --git a/src/mame/drivers/vroulet.cpp b/src/mame/drivers/vroulet.cpp index dcbf7a37c29..1d7f9da46c8 100644 --- a/src/mame/drivers/vroulet.cpp +++ b/src/mame/drivers/vroulet.cpp @@ -167,7 +167,7 @@ static INPUT_PORTS_START( vroulet ) PORT_START("IN0") PORT_SERVICE( 0x01, IP_ACTIVE_LOW ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_TILT ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F1) PORT_NAME("Memory Reset") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("Reset Machine") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) diff --git a/src/mame/drivers/vt240.cpp b/src/mame/drivers/vt240.cpp index efb32a71fbd..fef82d47a19 100644 --- a/src/mame/drivers/vt240.cpp +++ b/src/mame/drivers/vt240.cpp @@ -239,8 +239,8 @@ WRITE8_MEMBER(vt240_state::duart_w) WRITE8_MEMBER(vt240_state::duartout_w) { - m_host->write_rts(BIT(data, 0) ? CLEAR_LINE : ASSERT_LINE); - m_host->write_dtr(BIT(data, 2) ? CLEAR_LINE : ASSERT_LINE); + m_host->write_rts(BIT(data, 0) ? ASSERT_LINE : CLEAR_LINE); + m_host->write_dtr(BIT(data, 2) ? ASSERT_LINE : CLEAR_LINE); m_maincpu->set_input_line(15, BIT(data, 4) ? CLEAR_LINE : ASSERT_LINE); m_maincpu->set_input_line(14, BIT(data, 5) ? CLEAR_LINE : ASSERT_LINE); m_maincpu->set_input_line(11, BIT(data, 6) ? CLEAR_LINE : ASSERT_LINE); diff --git a/src/mame/drivers/wangpc.cpp b/src/mame/drivers/wangpc.cpp index 59b7adf40f1..2b43d59b194 100644 --- a/src/mame/drivers/wangpc.cpp +++ b/src/mame/drivers/wangpc.cpp @@ -1109,8 +1109,8 @@ static MACHINE_CONFIG_START( wangpc, wangpc_state ) MCFG_PIT8253_CLK2(500000) MCFG_PIT8253_OUT2_HANDLER(WRITELINE(wangpc_state, pit2_w)) - MCFG_IM6402_ADD(IM6402_TAG, 0, 62500*16) // HACK for wangpckb in IM6402 derives clocks from data line - MCFG_IM6402_TRO_CALLBACK(DEVWRITELINE(WANGPC_KEYBOARD_TAG, wangpc_keyboard_device, write_rxd)) + MCFG_IM6402_ADD(IM6402_TAG, 62500*16, 62500*16) + MCFG_IM6402_TRO_CALLBACK(DEVWRITELINE(WANGPC_KEYBOARD_TAG, wangpc_keyboard_t, write_rxd)) MCFG_IM6402_DR_CALLBACK(WRITELINE(wangpc_state, uart_dr_w)) MCFG_IM6402_TBRE_CALLBACK(WRITELINE(wangpc_state, uart_tbre_w)) diff --git a/src/mame/drivers/warpwarp.cpp b/src/mame/drivers/warpwarp.cpp index 7bff85217f4..c3a05368098 100644 --- a/src/mame/drivers/warpwarp.cpp +++ b/src/mame/drivers/warpwarp.cpp @@ -158,7 +158,7 @@ READ8_MEMBER(warpwarp_state::geebee_in_r) int res; offset &= 3; - res = m_ports[offset] ? m_ports[offset]->read() : 0; + res = m_ports[offset].read_safe(0); if (offset == 3) { res = (flip_screen() & 1) ? m_in2->read() : m_in1->read(); // read player 2 input in cocktail mode diff --git a/src/mame/drivers/wgp.cpp b/src/mame/drivers/wgp.cpp index c3bd4a55069..a61cef74b61 100644 --- a/src/mame/drivers/wgp.cpp +++ b/src/mame/drivers/wgp.cpp @@ -517,12 +517,12 @@ WRITE16_MEMBER(wgp_state::rotate_port_w) READ16_MEMBER(wgp_state::wgp_adinput_r) { int steer = 0x40; - int fake = m_fake ? m_fake->read() : 0; + int fake = m_fake.read_safe(0); if (!(fake & 0x10)) /* Analogue steer (the real control method) */ { /* Reduce span to 0x80 */ - steer = ((m_steer ? m_steer->read() : 0) * 0x80) / 0x100; + steer = (m_steer.read_safe(0) * 0x80) / 0x100; } else /* Digital steer */ { @@ -567,7 +567,7 @@ READ16_MEMBER(wgp_state::wgp_adinput_r) } case 0x05: - return m_unknown ? m_unknown->read() : 0; /* unknown */ + return m_unknown.read_safe(0); /* unknown */ } logerror("CPU #0 PC %06x: warning - read unmapped a/d input offset %06x\n",space.device().safe_pc(),offset); diff --git a/src/mame/includes/8080bw.h b/src/mame/includes/8080bw.h index 25bffc62151..33a2997271d 100644 --- a/src/mame/includes/8080bw.h +++ b/src/mame/includes/8080bw.h @@ -27,7 +27,9 @@ public: m_eeprom(*this, "eeprom"), m_sn(*this, "snsnd"), m_screen(*this, "screen"), - m_palette(*this, "palette") + m_palette(*this, "palette"), + m_gunx(*this, "GUNX"), + m_guny(*this, "GUNY") { } /* devices/memory pointers */ @@ -41,6 +43,8 @@ public: optional_device m_palette; /* misc game specific */ + optional_ioport m_gunx; + optional_ioport m_guny; UINT8 m_color_map; UINT8 m_screen_red; UINT8 m_fleet_step; diff --git a/src/mame/includes/amiga.h b/src/mame/includes/amiga.h index 03c9829da3d..c5f88a08c75 100644 --- a/src/mame/includes/amiga.h +++ b/src/mame/includes/amiga.h @@ -347,8 +347,7 @@ public: m_potgo_port(*this, "potgo"), m_pot0dat_port(*this, "POT0DAT"), m_pot1dat_port(*this, "POT1DAT"), - m_p1joy_port(*this, "p1_joy"), - m_p2joy_port(*this, "p2_joy"), + m_joy_ports(*this, {"p1_joy", "p2_joy"}), m_p1_mouse_x(*this, "p1_mouse_x"), m_p1_mouse_y(*this, "p1_mouse_y"), m_p2_mouse_x(*this, "p2_mouse_x"), @@ -576,8 +575,7 @@ protected: optional_ioport m_potgo_port; optional_ioport m_pot0dat_port; optional_ioport m_pot1dat_port; - optional_ioport m_p1joy_port; - optional_ioport m_p2joy_port; + optional_ioport_array<2> m_joy_ports; optional_ioport m_p1_mouse_x; optional_ioport m_p1_mouse_y; optional_ioport m_p2_mouse_x; diff --git a/src/mame/includes/astrof.h b/src/mame/includes/astrof.h index f45a3681777..86577547d25 100644 --- a/src/mame/includes/astrof.h +++ b/src/mame/includes/astrof.h @@ -17,6 +17,7 @@ public: m_videoram(*this, "videoram"), m_astrof_color(*this, "astrof_color"), m_tomahawk_protection(*this, "tomahawk_prot"), + m_fake_port(*this, "FAKE"), m_maincpu(*this, "maincpu"), m_samples(*this, "samples"), m_sn(*this, "snsnd"), @@ -28,6 +29,7 @@ public: std::unique_ptr m_colorram; required_shared_ptr m_astrof_color; optional_shared_ptr m_tomahawk_protection; + optional_ioport m_fake_port; UINT8 m_astrof_palette_bank; UINT8 m_red_on; diff --git a/src/mame/includes/bbc.h b/src/mame/includes/bbc.h index f408a190f54..51b36c82948 100644 --- a/src/mame/includes/bbc.h +++ b/src/mame/includes/bbc.h @@ -102,7 +102,8 @@ public: m_via_system_irq(CLEAR_LINE), m_via_user_irq(CLEAR_LINE), m_acia_irq(CLEAR_LINE), - m_palette(*this, "palette") + m_palette(*this, "palette"), + m_bbcconfig(*this, "BBCCONFIG") { } DECLARE_FLOPPY_FORMATS(floppy_formats_bbc); @@ -445,6 +446,7 @@ public: // HACK FOR MC6845 void bbc_update_nmi(); unsigned int calculate_video_address(int ma,int ra); required_device m_palette; + optional_ioport m_bbcconfig; }; #endif /* BBC_H_ */ diff --git a/src/mame/includes/bfm_sc4.h b/src/mame/includes/bfm_sc4.h index def6c17254a..a3a49798ef0 100644 --- a/src/mame/includes/bfm_sc4.h +++ b/src/mame/includes/bfm_sc4.h @@ -133,18 +133,7 @@ public: m_reel4(*this, "reel4"), m_reel5(*this, "reel5"), m_reel6(*this, "reel6"), - m_io1(*this, "IN-0"), - m_io2(*this, "IN-1"), - m_io3(*this, "IN-2"), - m_io4(*this, "IN-3"), - m_io5(*this, "IN-4"), - m_io6(*this, "IN-5"), - m_io7(*this, "IN-6"), - m_io8(*this, "IN-7"), - m_io9(*this, "IN-8"), - m_io10(*this, "IN-9"), - m_io11(*this, "IN-10"), - m_io12(*this, "IN-11") + m_io_ports(*this, {"IN-0", "IN-1", "IN-2", "IN-3", "IN-4", "IN-5", "IN-6", "IN-7", "IN-8", "IN-9", "IN-10", "IN-11"}) { m_chk41addr = -1; m_dochk41 = false; @@ -630,18 +619,7 @@ public: protected: - required_ioport m_io1; - required_ioport m_io2; - required_ioport m_io3; - required_ioport m_io4; - required_ioport m_io5; - required_ioport m_io6; - required_ioport m_io7; - required_ioport m_io8; - required_ioport m_io9; - required_ioport m_io10; - required_ioport m_io11; - required_ioport m_io12; + optional_ioport_array<16> m_io_ports; }; class sc4_adder4_state : public sc4_state diff --git a/src/mame/includes/bwidow.h b/src/mame/includes/bwidow.h index 48c53e2c87c..bb4da41900b 100644 --- a/src/mame/includes/bwidow.h +++ b/src/mame/includes/bwidow.h @@ -13,7 +13,10 @@ class bwidow_state : public driver_device public: bwidow_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_maincpu(*this, "maincpu") { } + m_maincpu(*this, "maincpu"), + m_in3(*this, "IN3"), + m_in4(*this, "IN4"), + m_dsw2(*this, "DSW2") { } int m_lastdata; DECLARE_READ8_MEMBER(spacduel_IN3_r); @@ -23,6 +26,9 @@ public: DECLARE_WRITE8_MEMBER(irq_ack_w); DECLARE_CUSTOM_INPUT_MEMBER(clock_r); required_device m_maincpu; + optional_ioport m_in3; + optional_ioport m_in4; + optional_ioport m_dsw2; }; diff --git a/src/mame/includes/cclimber.h b/src/mame/includes/cclimber.h index ad49bef6f5f..d9c8f77e551 100644 --- a/src/mame/includes/cclimber.h +++ b/src/mame/includes/cclimber.h @@ -75,6 +75,7 @@ public: DECLARE_DRIVER_INIT(cannonb2); DECLARE_DRIVER_INIT(cannonb); DECLARE_DRIVER_INIT(dking); + DECLARE_DRIVER_INIT(rpatrol); DECLARE_MACHINE_RESET(cclimber); DECLARE_VIDEO_START(cclimber); DECLARE_PALETTE_INIT(cclimber); @@ -105,4 +106,5 @@ public: void cclimber_decode(const UINT8 convtable[8][16]); INTERRUPT_GEN_MEMBER(vblank_irq); + INTERRUPT_GEN_MEMBER(bagmanf_vblank_irq); }; diff --git a/src/mame/includes/cinemat.h b/src/mame/includes/cinemat.h index 6f860f51b29..f6c986aa1f9 100644 --- a/src/mame/includes/cinemat.h +++ b/src/mame/includes/cinemat.h @@ -20,7 +20,9 @@ public: m_samples(*this, "samples"), m_vector(*this, "vector"), m_screen(*this, "screen"), - m_rambase(*this, "rambase") { } + m_rambase(*this, "rambase"), + m_analog_x(*this, "ANALOGX"), + m_analog_y(*this, "ANALOGY") { } required_device m_maincpu; optional_device m_ay1; @@ -29,6 +31,9 @@ public: required_device m_screen; optional_shared_ptr m_rambase; + optional_ioport m_analog_x; + optional_ioport m_analog_y; + typedef void (cinemat_state::*sound_func)(UINT8 sound_val, UINT8 bits_changed); sound_func m_sound_handler; diff --git a/src/mame/includes/combatsc.h b/src/mame/includes/combatsc.h index 4247c19d75e..253ab5d8899 100644 --- a/src/mame/includes/combatsc.h +++ b/src/mame/includes/combatsc.h @@ -24,7 +24,10 @@ public: m_msm5205(*this, "msm5205"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), - m_soundlatch(*this, "soundlatch") { } + m_soundlatch(*this, "soundlatch"), + m_track_ports(*this, {"TRACK0_Y", "TRACK0_X", "TRACK1_Y", "TRACK1_X"}) + { + } /* memory pointers */ UINT8 * m_videoram; @@ -63,6 +66,8 @@ public: required_device m_palette; required_device m_soundlatch; + optional_ioport_array<4> m_track_ports; + DECLARE_WRITE8_MEMBER(combatsc_vreg_w); DECLARE_WRITE8_MEMBER(combatscb_sh_irqtrigger_w); DECLARE_READ8_MEMBER(combatscb_io_r); diff --git a/src/mame/includes/cosmic.h b/src/mame/includes/cosmic.h index 706b69befea..77d5dfa6f35 100644 --- a/src/mame/includes/cosmic.h +++ b/src/mame/includes/cosmic.h @@ -20,6 +20,8 @@ public: : driver_device(mconfig, type, tag), m_videoram(*this, "videoram"), m_spriteram(*this, "spriteram"), + m_in_ports(*this, {"IN0", "IN1", "IN2"}), + m_dsw(*this, "DSW"), m_maincpu(*this, "maincpu"), m_samples(*this, "samples"), m_dac(*this, "dac"), @@ -47,6 +49,8 @@ public: /* misc */ UINT32 m_pixel_clock; int m_ic_state; // for 9980 + optional_ioport_array<4> m_in_ports; + optional_ioport m_dsw; /* devices */ required_device m_maincpu; diff --git a/src/mame/includes/cosmicos.h b/src/mame/includes/cosmicos.h index d152bf22b85..f6cd99d98f1 100644 --- a/src/mame/includes/cosmicos.h +++ b/src/mame/includes/cosmicos.h @@ -50,10 +50,7 @@ public: m_speaker(*this, "speaker"), m_ram(*this, RAM_TAG), m_rom(*this, CDP1802_TAG), - m_y1(*this, "Y1"), - m_y2(*this, "Y2"), - m_y3(*this, "Y3"), - m_y4(*this, "Y4"), + m_key_row(*this, {"Y1", "Y2", "Y3", "Y4"}), m_io_data(*this, "DATA"), m_special(*this, "SPECIAL"), m_buttons(*this, "BUTTONS") @@ -66,10 +63,7 @@ public: required_device m_speaker; required_device m_ram; required_memory_region m_rom; - required_ioport m_y1; - required_ioport m_y2; - required_ioport m_y3; - required_ioport m_y4; + required_ioport_array<4> m_key_row; required_ioport m_io_data; required_ioport m_special; required_ioport m_buttons; @@ -127,7 +121,6 @@ public: int m_ram_disable; /* keyboard state */ - ioport_port* m_key_row[4]; UINT8 m_keylatch; /* display state */ diff --git a/src/mame/includes/darkmist.h b/src/mame/includes/darkmist.h index 224c1fc2ac6..c3804c97a26 100644 --- a/src/mame/includes/darkmist.h +++ b/src/mame/includes/darkmist.h @@ -47,6 +47,7 @@ public: DECLARE_PALETTE_INIT(darkmist); UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void decrypt_fgbgtiles(UINT8* rgn, int size); void decrypt_gfx(); void decrypt_snd(); diff --git a/src/mame/includes/djmain.h b/src/mame/includes/djmain.h index cbc65036a39..530a673bf95 100644 --- a/src/mame/includes/djmain.h +++ b/src/mame/includes/djmain.h @@ -16,7 +16,8 @@ public: m_k055555(*this, "k055555"), m_ata(*this, "ata"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") + m_palette(*this, "palette"), + m_turntable(*this, {"TT1", "TT2"}) { } @@ -75,4 +76,5 @@ public: required_device m_gfxdecode; required_device m_palette; K056832_CB_MEMBER(tile_callback); + optional_ioport_array<2> m_turntable; }; diff --git a/src/mame/includes/firetrk.h b/src/mame/includes/firetrk.h index f299184a87d..317f4648c77 100644 --- a/src/mame/includes/firetrk.h +++ b/src/mame/includes/firetrk.h @@ -52,7 +52,12 @@ public: m_drone_rot(*this, "drone_rot"), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), - m_palette(*this, "palette") + m_palette(*this, "palette"), + m_bit_0(*this, "BIT_0"), + m_bit_6(*this, "BIT_6"), + m_bit_7(*this, "BIT_7"), + m_dips(*this, {"DIP_0", "DIP_1"}), + m_steer(*this, {"STEER_1", "STEER_2"}) { } required_device m_maincpu; @@ -71,6 +76,12 @@ public: required_device m_screen; required_device m_palette; + optional_ioport m_bit_0; + optional_ioport m_bit_6; + optional_ioport m_bit_7; + required_ioport_array<2> m_dips; + optional_ioport_array<2> m_steer; + UINT8 m_in_service_mode; UINT32 m_dial[2]; UINT8 m_steer_dir[2]; diff --git a/src/mame/includes/fm7.h b/src/mame/includes/fm7.h index 4496b679b8b..929733ecce6 100644 --- a/src/mame/includes/fm7.h +++ b/src/mame/includes/fm7.h @@ -140,9 +140,7 @@ public: m_rom_ptr(*this, "init"), m_basic_ptr(*this, "fbasic"), m_kanji(*this, "kanji1"), - m_key1(*this, "key1"), - m_key2(*this, "key2"), - m_key3(*this, "key3"), + m_kb_ports(*this, {"key1", "key2", "key3"}), m_keymod(*this, "key_modifiers"), m_joy1(*this, "joy1"), m_joy2(*this, "joy2"), @@ -379,9 +377,7 @@ protected: int m_centronics_perror; optional_memory_region m_kanji; - required_ioport m_key1; - required_ioport m_key2; - required_ioport m_key3; + required_ioport_array<3> m_kb_ports; required_ioport m_keymod; required_ioport m_joy1; required_ioport m_joy2; diff --git a/src/mame/includes/fmtowns.h b/src/mame/includes/fmtowns.h index 1989b2ea3a9..37ef8f284ad 100644 --- a/src/mame/includes/fmtowns.h +++ b/src/mame/includes/fmtowns.h @@ -95,10 +95,7 @@ class towns_state : public driver_device m_nvram(*this, "nvram"), m_nvram16(*this, "nvram16"), m_ctrltype(*this, "ctrltype"), - m_key1(*this, "key1"), - m_key2(*this, "key2"), - m_key3(*this, "key3"), - m_key4(*this, "key4"), + m_kb_ports(*this, {"key1", "key2", "key3", "key4"}), m_joy1(*this, "joy1"), m_joy2(*this, "joy2"), m_joy1_ex(*this, "joy1_ex"), @@ -283,10 +280,7 @@ class towns_state : public driver_device UINT8 towns_cdrom_read_byte_software(); required_ioport m_ctrltype; - required_ioport m_key1; - required_ioport m_key2; - required_ioport m_key3; - required_ioport m_key4; + required_ioport_array<4> m_kb_ports; required_ioport m_joy1; required_ioport m_joy2; required_ioport m_joy1_ex; diff --git a/src/mame/includes/gaelco3d.h b/src/mame/includes/gaelco3d.h index 8aaf90e1dc9..6d735bd96fc 100644 --- a/src/mame/includes/gaelco3d.h +++ b/src/mame/includes/gaelco3d.h @@ -69,7 +69,9 @@ public: m_serial(*this, "serial"), m_screen(*this, "screen"), m_paletteram16(*this, "paletteram"), - m_paletteram32(*this, "paletteram") { } + m_paletteram32(*this, "paletteram"), + m_analog(*this, {"ANALOG0", "ANALOG1", "ANALOG2", "ANALOG3"}) + { } required_shared_ptr m_adsp_ram_base; required_shared_ptr m_m68k_ram_base; @@ -84,6 +86,7 @@ public: required_device m_screen; optional_shared_ptr m_paletteram16; optional_shared_ptr m_paletteram32; + optional_ioport_array<4> m_analog; UINT16 m_sound_data; UINT8 m_sound_status; diff --git a/src/mame/includes/galaxian.h b/src/mame/includes/galaxian.h index 2c9b6221ae9..f7b546289df 100644 --- a/src/mame/includes/galaxian.h +++ b/src/mame/includes/galaxian.h @@ -55,6 +55,8 @@ public: m_screen(*this, "screen"), m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch"), + m_fake_select(*this, "FAKE_SELECT"), + m_tenspot_game_dsw(*this, {"IN2_GAME0", "IN2_GAME1", "IN2_GAME2", "IN2_GAME3", "IN2_GAME4", "IN2_GAME5", "IN2_GAME6", "IN2_GAME7", "IN2_GAME8", "IN2_GAME9"}), m_spriteram(*this, "spriteram"), m_videoram(*this, "videoram"), m_decrypted_opcodes(*this, "decrypted_opcodes") { } @@ -76,6 +78,9 @@ public: required_device m_palette; optional_device m_soundlatch; + optional_ioport m_fake_select; + optional_ioport_array<10> m_tenspot_game_dsw; + required_shared_ptr m_spriteram; required_shared_ptr m_videoram; optional_shared_ptr m_decrypted_opcodes; diff --git a/src/mame/includes/gomoku.h b/src/mame/includes/gomoku.h index 375a08f7f5c..9afc41cc347 100644 --- a/src/mame/includes/gomoku.h +++ b/src/mame/includes/gomoku.h @@ -9,6 +9,7 @@ public: m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), m_bgram(*this, "bgram"), + m_inputs(*this, {"IN0", "IN1", "DSW", "UNUSED0", "UNUSED1", "UNUSED2", "UNUSED3", "UNUSED4"}), m_maincpu(*this, "maincpu"), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen") { } @@ -20,6 +21,7 @@ public: int m_bg_dispsw; tilemap_t *m_fg_tilemap; bitmap_ind16 m_bg_bitmap; + optional_ioport_array<8> m_inputs; DECLARE_READ8_MEMBER(input_port_r); DECLARE_WRITE8_MEMBER(gomoku_videoram_w); DECLARE_WRITE8_MEMBER(gomoku_colorram_w); diff --git a/src/mame/includes/gottlieb.h b/src/mame/includes/gottlieb.h index 8f539ff234f..9d6fbc364b8 100644 --- a/src/mame/includes/gottlieb.h +++ b/src/mame/includes/gottlieb.h @@ -49,7 +49,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), m_palette(*this, "palette"), - m_generic_paletteram_8(*this, "paletteram") + m_generic_paletteram_8(*this, "paletteram"), + m_track_x(*this, "TRACKX"), + m_track_y(*this, "TRACKY") { } // devices @@ -68,6 +70,9 @@ public: required_device m_palette; required_shared_ptr m_generic_paletteram_8; + optional_ioport m_track_x; + optional_ioport m_track_y; + UINT8 m_knocker_prev; UINT8 m_joystick_select; UINT8 m_track[2]; diff --git a/src/mame/includes/huebler.h b/src/mame/includes/huebler.h index bb6b4c29344..12c27b9b04d 100644 --- a/src/mame/includes/huebler.h +++ b/src/mame/includes/huebler.h @@ -30,22 +30,7 @@ public: m_kb_rom(*this, "keyboard"), m_char_rom(*this, "chargen"), m_video_ram(*this, "video_ram"), - 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"), - m_y8(*this, "Y8"), - m_y9(*this, "Y9"), - m_y10(*this, "Y10"), - m_y11(*this, "Y11"), - m_y12(*this, "Y12"), - m_y13(*this, "Y13"), - m_y14(*this, "Y14"), - m_y15(*this, "Y15"), + m_key_row(*this, {"Y0", "Y1", "Y2", "Y3", "Y4", "Y5", "Y6", "Y7", "Y8", "Y9", "Y10", "Y11", "Y12", "Y13", "Y14", "Y15"}), m_special(*this, "SPECIAL"), m_key_d6(0), m_key_d7(0), @@ -58,22 +43,7 @@ public: required_memory_region m_kb_rom; required_memory_region m_char_rom; required_shared_ptr m_video_ram; - 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_y8; - required_ioport m_y9; - required_ioport m_y10; - required_ioport m_y11; - required_ioport m_y12; - required_ioport m_y13; - required_ioport m_y14; - required_ioport m_y15; + required_ioport_array<16> m_key_row; required_ioport m_special; virtual void machine_start() override; @@ -86,7 +56,6 @@ public: void scan_keyboard(); // keyboard state - ioport_port* m_key_row[16]; int m_key_d6; int m_key_d7; int m_key_a4; diff --git a/src/mame/includes/jackal.h b/src/mame/includes/jackal.h index 0249cde4bbd..eb220b2c496 100644 --- a/src/mame/includes/jackal.h +++ b/src/mame/includes/jackal.h @@ -13,6 +13,7 @@ public: jackal_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_videoctrl(*this, "videoctrl"), + m_dials(*this, {"DIAL0", "DIAL1"}), m_mastercpu(*this, "master"), m_slavecpu(*this, "slave"), m_gfxdecode(*this, "gfxdecode"), @@ -29,6 +30,7 @@ public: int m_irq_enable; UINT8 *m_rambank; UINT8 *m_spritebank; + optional_ioport_array<2> m_dials; /* devices */ required_device m_mastercpu; diff --git a/src/mame/includes/laserbat.h b/src/mame/includes/laserbat.h index e3b130a109d..73d5246b567 100644 --- a/src/mame/includes/laserbat.h +++ b/src/mame/includes/laserbat.h @@ -23,11 +23,9 @@ public: laserbat_state_base(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) - , m_row0(*this, "ROW0") + , m_mux_ports(*this, {"ROW0", "ROW1", "SW1", "SW2"}) , m_row1(*this, "ROW1") , m_row2(*this, "ROW2") - , m_sw1(*this, "SW1") - , m_sw2(*this, "SW2") , m_maincpu(*this, "maincpu") , m_screen(*this, "screen") , m_palette(*this, "palette") @@ -93,11 +91,9 @@ protected: TIMER_CALLBACK_MEMBER(video_line); // input lines - required_ioport m_row0; + required_ioport_array<4> m_mux_ports; required_ioport m_row1; required_ioport m_row2; - required_ioport m_sw1; - required_ioport m_sw2; // main CPU device required_device m_maincpu; diff --git a/src/mame/includes/lisa.h b/src/mame/includes/lisa.h index f359191d605..b3a32f84a21 100644 --- a/src/mame/includes/lisa.h +++ b/src/mame/includes/lisa.h @@ -192,10 +192,6 @@ public: int m_videoROM_address; DECLARE_READ8_MEMBER(lisa_fdc_io_r); DECLARE_WRITE8_MEMBER(lisa_fdc_io_w); - DECLARE_READ8_MEMBER(lisa_fdc_r); - DECLARE_READ8_MEMBER(lisa210_fdc_r); - DECLARE_WRITE8_MEMBER(lisa_fdc_w); - DECLARE_WRITE8_MEMBER(lisa210_fdc_w); DECLARE_READ16_MEMBER(lisa_r); DECLARE_WRITE16_MEMBER(lisa_w); DECLARE_READ16_MEMBER(lisa_IO_r); diff --git a/src/mame/includes/mac.h b/src/mame/includes/mac.h index f68432b1088..dbbc3becfa2 100644 --- a/src/mame/includes/mac.h +++ b/src/mame/includes/mac.h @@ -208,13 +208,7 @@ public: m_mouse0(*this, "MOUSE0"), m_mouse1(*this, "MOUSE1"), m_mouse2(*this, "MOUSE2"), - m_key0(*this, "KEY0"), - m_key1(*this, "KEY1"), - m_key2(*this, "KEY2"), - m_key3(*this, "KEY3"), - m_key4(*this, "KEY4"), - m_key5(*this, "KEY5"), - m_key6(*this, "KEY6"), + m_keys(*this, {"KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5", "KEY6"}), m_montype(*this, "MONTYPE"), m_vram(*this,"vram"), m_vram16(*this,"vram16"), @@ -239,8 +233,8 @@ public: optional_device m_rtc; required_ioport m_mouse0, m_mouse1, m_mouse2; - required_ioport m_key0, m_key1, m_key2, m_key3, m_key4, m_key5; - optional_ioport m_key6, m_montype; + optional_ioport_array<7> m_keys; + optional_ioport m_montype; virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/maygay1b.h b/src/mame/includes/maygay1b.h index 873de3abe43..2f789443830 100644 --- a/src/mame/includes/maygay1b.h +++ b/src/mame/includes/maygay1b.h @@ -40,12 +40,7 @@ public: m_duart68681(*this, "duart68681"), m_sw1_port(*this, "SW1"), m_sw2_port(*this, "SW2"), - m_s2_port(*this, "STROBE2"), - m_s3_port(*this, "STROBE3"), - m_s4_port(*this, "STROBE4"), - m_s5_port(*this, "STROBE5"), - m_s6_port(*this, "STROBE6"), - m_s7_port(*this, "STROBE7"), + m_kbd_ports(*this, {"SW1", "STROBE2", "STROBE3", "STROBE4", "STROBE5", "STROBE6", "STROBE7", "SW2"}), m_bank1(*this, "bank1"), m_reel0(*this, "reel0"), m_reel1(*this, "reel1"), @@ -66,12 +61,7 @@ public: required_device m_duart68681; required_ioport m_sw1_port; required_ioport m_sw2_port; - required_ioport m_s2_port; - required_ioport m_s3_port; - required_ioport m_s4_port; - required_ioport m_s5_port; - required_ioport m_s6_port; - required_ioport m_s7_port; + required_ioport_array<8> m_kbd_ports; required_memory_bank m_bank1; required_device m_reel0; required_device m_reel1; diff --git a/src/mame/includes/megasys1.h b/src/mame/includes/megasys1.h index 1e52cfc056c..7e2d0c5ce32 100644 --- a/src/mame/includes/megasys1.h +++ b/src/mame/includes/megasys1.h @@ -104,14 +104,12 @@ public: DECLARE_WRITE16_MEMBER(protection_peekaboo_w); DECLARE_READ16_MEMBER(megasys1A_mcu_hs_r); DECLARE_WRITE16_MEMBER(megasys1A_mcu_hs_w); - DECLARE_READ16_MEMBER(edfbl_input_r); DECLARE_READ16_MEMBER(iganinju_mcu_hs_r); DECLARE_WRITE16_MEMBER(iganinju_mcu_hs_w); DECLARE_READ16_MEMBER(soldamj_spriteram16_r); DECLARE_WRITE16_MEMBER(soldamj_spriteram16_w); DECLARE_READ16_MEMBER(stdragon_mcu_hs_r); DECLARE_WRITE16_MEMBER(stdragon_mcu_hs_w); - DECLARE_READ16_MEMBER(monkelf_input_r); DECLARE_WRITE16_MEMBER(megasys1_scrollram_0_w); DECLARE_WRITE16_MEMBER(megasys1_scrollram_1_w); DECLARE_WRITE16_MEMBER(megasys1_scrollram_2_w); diff --git a/src/mame/includes/midvunit.h b/src/mame/includes/midvunit.h index f9502791f91..607f229b9ba 100644 --- a/src/mame/includes/midvunit.h +++ b/src/mame/includes/midvunit.h @@ -57,6 +57,7 @@ public: m_midvplus_misc(*this, "midvplus_misc"), m_videoram(*this, "videoram", 32), m_textureram(*this, "textureram") , + m_adc_ports(*this, {"WHEEL", "ACCEL", "BRAKE"}), m_maincpu(*this, "maincpu"), m_watchdog(*this, "watchdog"), m_screen(*this, "screen"), @@ -75,6 +76,8 @@ public: required_shared_ptr m_videoram; required_shared_ptr m_textureram; + optional_ioport_array<3> m_adc_ports; + UINT8 m_cmos_protected; UINT16 m_control_data; UINT8 m_adc_data; diff --git a/src/mame/includes/model2.h b/src/mame/includes/model2.h index 9319e6e2b35..bc89dbeab28 100644 --- a/src/mame/includes/model2.h +++ b/src/mame/includes/model2.h @@ -42,8 +42,11 @@ public: m_palette(*this, "palette"), m_scsp(*this, "scsp"), m_cryptdevice(*this, "315_5881"), - m_0229crypt(*this, "317_0229") - + m_0229crypt(*this, "317_0229"), + m_in0(*this, "IN0"), + m_gears(*this, "GEARS"), + m_analog_ports(*this, {"ANA0", "ANA1", "ANA2", "ANA3"}), + m_lightgun_ports(*this, {"P1_Y", "P1_X", "P2_Y", "P2_X"}) { } required_shared_ptr m_workram; @@ -73,6 +76,11 @@ public: optional_device m_cryptdevice; optional_device m_0229crypt; + required_ioport m_in0; + optional_ioport m_gears; + optional_ioport_array<4> m_analog_ports; + optional_ioport_array<4> m_lightgun_ports; + UINT32 m_intreq; UINT32 m_intena; UINT32 m_coproctl; diff --git a/src/mame/includes/model3.h b/src/mame/includes/model3.h index 24956b46159..f61cee2c1f9 100644 --- a/src/mame/includes/model3.h +++ b/src/mame/includes/model3.h @@ -59,6 +59,7 @@ public: m_scsp1(*this, "scsp1"), m_eeprom(*this, "eeprom"), m_screen(*this, "screen"), + m_adc_ports(*this, {"AN0", "AN1", "AN2", "AN3", "AN4", "AN5", "AN6", "AN7"}), m_work_ram(*this, "work_ram"), m_paletteram64(*this, "paletteram64"), m_dsbz80(*this, DSBZ80_TAG), @@ -78,6 +79,8 @@ public: required_device m_eeprom; required_device m_screen; + optional_ioport_array<8> m_adc_ports; + required_shared_ptr m_work_ram; required_shared_ptr m_paletteram64; optional_device m_dsbz80; // Z80-based MPEG Digital Sound Board diff --git a/src/mame/includes/mpu4.h b/src/mame/includes/mpu4.h index 834d2486fe7..c31c00beaab 100644 --- a/src/mame/includes/mpu4.h +++ b/src/mame/includes/mpu4.h @@ -105,12 +105,7 @@ public: m_pia6(*this, "pia_ic6"), m_pia7(*this, "pia_ic7"), m_pia8(*this, "pia_ic8"), - m_orange1_port(*this, "ORANGE1"), - m_orange2_port(*this, "ORANGE2"), - m_black1_port(*this, "BLACK1"), - m_black2_port(*this, "BLACK2"), - m_dil1_port(*this, "DIL1"), - m_dil2_port(*this, "DIL2"), + m_port_mux(*this, {"ORANGE1", "ORANGE2", "BLACK1", "BLACK2", "ORANGE1", "ORANGE2", "DIL1", "DIL2"}), m_aux1_port(*this, "AUX1"), m_aux2_port(*this, "AUX2"), m_bank1(*this, "bank1"), @@ -250,12 +245,7 @@ protected: optional_device m_pia6; optional_device m_pia7; optional_device m_pia8; - required_ioport m_orange1_port; - required_ioport m_orange2_port; - required_ioport m_black1_port; - required_ioport m_black2_port; - required_ioport m_dil1_port; - required_ioport m_dil2_port; + required_ioport_array<8> m_port_mux; required_ioport m_aux1_port; required_ioport m_aux2_port; optional_memory_bank m_bank1; diff --git a/src/mame/includes/msx.h b/src/mame/includes/msx.h index 777cb4f599b..0c55ee18768 100644 --- a/src/mame/includes/msx.h +++ b/src/mame/includes/msx.h @@ -131,12 +131,7 @@ public: , m_io_dsw(*this, "DSW") , m_io_mouse0(*this, "MOUSE0") , m_io_mouse1(*this, "MOUSE1") - , m_io_key0(*this, "KEY0") - , m_io_key1(*this, "KEY1") - , m_io_key2(*this, "KEY2") - , m_io_key3(*this, "KEY3") - , m_io_key4(*this, "KEY4") - , m_io_key5(*this, "KEY5") + , m_io_key(*this, {"KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5"}) , m_psg_b(0) , m_rtc_latch(0) , m_kanji_latch(0) @@ -228,12 +223,7 @@ private: required_ioport m_io_dsw; required_ioport m_io_mouse0; required_ioport m_io_mouse1; - required_ioport m_io_key0; - required_ioport m_io_key1; - required_ioport m_io_key2; - required_ioport m_io_key3; - required_ioport m_io_key4; - required_ioport m_io_key5; + required_ioport_array<6> m_io_key; /* PSG */ int m_psg_b; diff --git a/src/mame/includes/namcofl.h b/src/mame/includes/namcofl.h index eeb702ae58e..e0a49e4712a 100644 --- a/src/mame/includes/namcofl.h +++ b/src/mame/includes/namcofl.h @@ -26,11 +26,25 @@ public: m_maincpu(*this,"maincpu"), m_mcu(*this,"mcu"), m_c116(*this,"c116"), + m_in0(*this, "IN0"), + m_in1(*this, "IN1"), + m_in2(*this, "IN2"), + m_misc(*this, "MISC"), + m_accel(*this, "ACCEL"), + m_brake(*this, "BRAKE"), + m_wheel(*this, "WHEEL"), m_shareram(*this, "shareram") { } required_device m_maincpu; required_device m_mcu; required_device m_c116; + required_ioport m_in0; + required_ioport m_in1; + required_ioport m_in2; + required_ioport m_misc; + optional_ioport m_accel; + optional_ioport m_brake; + optional_ioport m_wheel; emu_timer *m_raster_interrupt_timer; std::unique_ptr m_workram; required_shared_ptr m_shareram; diff --git a/src/mame/includes/namconb1.h b/src/mame/includes/namconb1.h index 9aeb6ddc251..1d3296608b9 100644 --- a/src/mame/includes/namconb1.h +++ b/src/mame/includes/namconb1.h @@ -34,6 +34,15 @@ public: m_mcu(*this, "mcu"), m_c116(*this, "c116"), m_eeprom(*this, "eeprom"), + m_p1(*this, "P1"), + m_p2(*this, "P2"), + m_p3(*this, "P3"), + m_p4(*this, "P4"), + m_misc(*this, "MISC"), + m_light0_x(*this, "LIGHT0_X"), + m_light0_y(*this, "LIGHT0_Y"), + m_light1_x(*this, "LIGHT1_X"), + m_light1_y(*this, "LIGHT1_Y"), m_spritebank32(*this, "spritebank32"), m_tilebank32(*this, "tilebank32"), m_namconb_shareram(*this, "namconb_share") { } @@ -42,6 +51,15 @@ public: required_device m_mcu; required_device m_c116; required_device m_eeprom; + required_ioport m_p1; + required_ioport m_p2; + optional_ioport m_p3; + optional_ioport m_p4; + required_ioport m_misc; + optional_ioport m_light0_x; + optional_ioport m_light0_y; + optional_ioport m_light1_x; + optional_ioport m_light1_y; required_shared_ptr m_spritebank32; optional_shared_ptr m_tilebank32; required_shared_ptr m_namconb_shareram; diff --git a/src/mame/includes/namcos22.h b/src/mame/includes/namcos22.h index 28a01852fbf..8247f51dd4c 100644 --- a/src/mame/includes/namcos22.h +++ b/src/mame/includes/namcos22.h @@ -199,7 +199,11 @@ public: m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), m_palette(*this, "palette"), - m_adc_ports(*this, "ADC") + m_adc_ports(*this, "ADC"), + m_p1(*this, "P1"), + m_p2(*this, "P2"), + m_mcup5a(*this, "MCUP5A"), + m_mcup5b(*this, "MCUP5B") { } required_device m_maincpu; @@ -229,7 +233,10 @@ public: required_device m_screen; required_device m_palette; optional_ioport_array<8> m_adc_ports; - + optional_ioport m_p1; + optional_ioport m_p2; + optional_ioport m_mcup5a; + optional_ioport m_mcup5b; UINT8 m_syscontrol[0x20]; bool m_dsp_irq_enabled; diff --git a/src/mame/includes/segahang.h b/src/mame/includes/segahang.h index c0813a111fe..ee17b9e6f27 100644 --- a/src/mame/includes/segahang.h +++ b/src/mame/includes/segahang.h @@ -38,6 +38,7 @@ public: m_workram(*this, "workram"), m_sharrier_video(false), m_adc_select(0), + m_adc_ports(*this, {"ADC0", "ADC1", "ADC2", "ADC3"}), m_decrypted_opcodes(*this, "decrypted_opcodes") { } @@ -109,6 +110,7 @@ protected: // internal state UINT8 m_adc_select; + optional_ioport_array<4> m_adc_ports; bool m_shadow; optional_shared_ptr m_decrypted_opcodes; }; diff --git a/src/mame/includes/segas16a.h b/src/mame/includes/segas16a.h index ee1b003a686..fb9c0a7e762 100644 --- a/src/mame/includes/segas16a.h +++ b/src/mame/includes/segas16a.h @@ -50,7 +50,8 @@ public: m_last_buttons1(0), m_last_buttons2(0), m_read_port(0), - m_mj_input_num(0) + m_mj_input_num(0), + m_mj_inputs(*this, {"MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5"}) { } // PPI read/write callbacks @@ -160,4 +161,5 @@ protected: UINT8 m_last_buttons2; UINT8 m_read_port; UINT8 m_mj_input_num; + optional_ioport_array<6> m_mj_inputs; }; diff --git a/src/mame/includes/segas16b.h b/src/mame/includes/segas16b.h index f8f5bec0729..a16efee0cac 100644 --- a/src/mame/includes/segas16b.h +++ b/src/mame/includes/segas16b.h @@ -49,8 +49,12 @@ public: m_atomicp_sound_divisor(0), m_atomicp_sound_count(0), m_hwc_input_value(0), + m_hwc_monitor(*this, "MONITOR"), + m_hwc_left(*this, "LEFT"), + m_hwc_right(*this, "RIGHT"), m_mj_input_num(0), m_mj_last_val(0), + m_mj_inputs(*this, {"MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5"}), m_spritepalbase(0x400), m_gfxdecode(*this, "gfxdecode"), m_sound_decrypted_opcodes(*this, "sound_decrypted_opcodes"), @@ -216,8 +220,12 @@ protected: // game-specific state UINT8 m_atomicp_sound_count; UINT8 m_hwc_input_value; + optional_ioport m_hwc_monitor; + optional_ioport m_hwc_left; + optional_ioport m_hwc_right; UINT8 m_mj_input_num; UINT8 m_mj_last_val; + optional_ioport_array<6> m_mj_inputs; int m_spritepalbase; required_device m_gfxdecode; diff --git a/src/mame/includes/segas24.h b/src/mame/includes/segas24.h index 198e47886fd..2b2d2361bef 100644 --- a/src/mame/includes/segas24.h +++ b/src/mame/includes/segas24.h @@ -21,6 +21,16 @@ public: , m_generic_paletteram_16(*this, "paletteram") , m_romboard(*this, "romboard") , m_gground_hack_timer(nullptr) + , m_p1(*this, "P1") + , m_p2(*this, "P2") + , m_p3(*this, "P3") + , m_service(*this, "SERVICE") + , m_coinage(*this, "COINAGE") + , m_dsw(*this, "DSW") + , m_paddle(*this, "PADDLE") + , m_dials(*this, {"DIAL1", "DIAL2", "DIAL3", "DIAL4"}) + , m_pedals(*this, {"PEDAL1", "PEDAL2", "PEDAL3", "PEDAL4"}) + , m_mj_inputs(*this, {"MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5", "P1", "P2"}) { } @@ -147,4 +157,14 @@ public: // game specific TIMER_CALLBACK_MEMBER(gground_hack_timer_callback); emu_timer *m_gground_hack_timer; + required_ioport m_p1; + required_ioport m_p2; + optional_ioport m_p3; + required_ioport m_service; + required_ioport m_coinage; + required_ioport m_dsw; + optional_ioport m_paddle; + optional_ioport_array<4> m_dials; + optional_ioport_array<4> m_pedals; + optional_ioport_array<8> m_mj_inputs; }; diff --git a/src/mame/includes/segas32.h b/src/mame/includes/segas32.h index 32392914aad..0bd010089c8 100644 --- a/src/mame/includes/segas32.h +++ b/src/mame/includes/segas32.h @@ -25,6 +25,12 @@ public: required_shared_ptr m_system32_spriteram; optional_shared_ptr_array m_system32_paletteram; + optional_ioport_array<8> m_ports_a; + optional_ioport_array<8> m_ports_b; + optional_ioport_array<8> m_analog_ports; + optional_ioport_array<4> m_extra_ports; + optional_ioport_array<6> m_track_ports; + required_device m_maincpu; required_device m_soundcpu; optional_device m_multipcm; diff --git a/src/mame/includes/segaxbd.h b/src/mame/includes/segaxbd.h index 768d86595fc..cf05812e036 100644 --- a/src/mame/includes/segaxbd.h +++ b/src/mame/includes/segaxbd.h @@ -138,6 +138,8 @@ protected: UINT8 m_palette_hilight[32]; // RGB translations for hilighted pixels required_device m_screen; required_device m_palette; + optional_ioport_array<8> m_adc_ports; + optional_ioport_array<4> m_mux_ports; protected: virtual void device_start() override; diff --git a/src/mame/includes/seicross.h b/src/mame/includes/seicross.h index 77b8e5a6708..999afd71092 100644 --- a/src/mame/includes/seicross.h +++ b/src/mame/includes/seicross.h @@ -12,6 +12,7 @@ public: m_nvram(*this, "nvram"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), + m_debug_port(*this, "DEBUG"), m_spriteram(*this, "spriteram"), m_videoram(*this, "videoram"), m_row_scroll(*this, "row_scroll"), @@ -25,6 +26,8 @@ public: required_device m_gfxdecode; required_device m_palette; + optional_ioport m_debug_port; + required_shared_ptr m_spriteram; required_shared_ptr m_videoram; required_shared_ptr m_row_scroll; diff --git a/src/mame/includes/seta.h b/src/mame/includes/seta.h index b9a347e51d8..53f8b8142de 100644 --- a/src/mame/includes/seta.h +++ b/src/mame/includes/seta.h @@ -41,6 +41,19 @@ public: m_x1(*this, "x1snd"), m_soundlatch(*this, "soundlatch"), m_soundlatch2(*this, "soundlatch2"), + m_dsw(*this, "DSW"), + m_rot(*this, {"ROT1", "ROT2"}), + m_p1(*this, "P1"), + m_p2(*this, "P2"), + m_coins(*this, "COINS"), + m_extra_port(*this, "EXTRA"), + m_track1_x(*this, "TRACK1_X"), + m_track1_y(*this, "TRACK1_Y"), + m_track2_x(*this, "TRACK2_X"), + m_track2_y(*this, "TRACK2_Y"), + m_dsw1(*this, "DSW1"), + m_dsw2_3(*this, "DSW2_3"), + m_bet(*this, {"BET0", "BET1", "BET2", "BET3", "BET4"}), m_sharedram(*this,"sharedram"), m_workram(*this,"workram"), m_vregs(*this,"vregs"), @@ -64,6 +77,20 @@ public: optional_device m_soundlatch; optional_device m_soundlatch2; + optional_ioport m_dsw; + optional_ioport_array<2> m_rot; + optional_ioport m_p1; + optional_ioport m_p2; + optional_ioport m_coins; + optional_ioport m_extra_port; + optional_ioport m_track1_x; + optional_ioport m_track1_y; + optional_ioport m_track2_x; + optional_ioport m_track2_y; + optional_ioport m_dsw1; + optional_ioport m_dsw2_3; + optional_ioport_array<5> m_bet; + optional_shared_ptr m_sharedram; optional_shared_ptr m_workram; optional_shared_ptr m_vregs; diff --git a/src/mame/includes/ssv.h b/src/mame/includes/ssv.h index 611ff3b66ee..f9ad2d40728 100644 --- a/src/mame/includes/ssv.h +++ b/src/mame/includes/ssv.h @@ -22,10 +22,7 @@ public: m_gdfs_tmapscroll(*this, "gdfs_tmapscroll"), m_gdfs_st0020(*this, "st0020_spr"), m_input_sel(*this, "input_sel"), - m_io_gunx1(*this, "GUNX1"), - m_io_guny1(*this, "GUNY1"), - m_io_gunx2(*this, "GUNX2"), - m_io_guny2(*this, "GUNY2"), + m_io_gun(*this, {"GUNX1", "GUNY1", "GUNX2", "GUNY2"}), m_io_key0(*this, "KEY0"), m_io_key1(*this, "KEY1"), m_io_key2(*this, "KEY2"), @@ -153,10 +150,7 @@ public: void init_st010(); protected: - optional_ioport m_io_gunx1; - optional_ioport m_io_guny1; - optional_ioport m_io_gunx2; - optional_ioport m_io_guny2; + optional_ioport_array<4> m_io_gun; optional_ioport m_io_key0; optional_ioport m_io_key1; optional_ioport m_io_key2; diff --git a/src/mame/includes/starfire.h b/src/mame/includes/starfire.h index 66ed55ce031..a270cc8a29e 100644 --- a/src/mame/includes/starfire.h +++ b/src/mame/includes/starfire.h @@ -29,12 +29,14 @@ public: m_starfire_colorram(*this, "colorram"), m_starfire_videoram(*this, "videoram"), m_samples(*this, "samples"), + m_nmi(*this, "NMI"), m_maincpu(*this, "maincpu"), m_screen(*this, "screen") { } required_shared_ptr m_starfire_colorram; required_shared_ptr m_starfire_videoram; optional_device m_samples; + optional_ioport m_nmi; UINT8 m_prev_sound; UINT8 m_fireone_select; diff --git a/src/mame/includes/stfight.h b/src/mame/includes/stfight.h index 31af9a7ac2e..064ae984979 100644 --- a/src/mame/includes/stfight.h +++ b/src/mame/includes/stfight.h @@ -1,6 +1,8 @@ // license:BSD-3-Clause // copyright-holders:Mark McDougall #include "sound/msm5205.h" +#include "video/stfight_dev.h" +#include "video/airraid_dev.h" class stfight_state : public driver_device { @@ -16,28 +18,21 @@ public: m_audiocpu(*this, "audiocpu"), m_mcu(*this, "mcu"), m_msm(*this, "msm"), - m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), - m_text_char_ram(*this, "text_char_ram"), - m_text_attr_ram(*this, "text_attr_ram"), - m_tx_vram(*this, "tx_vram"), - m_vh_latch_ram(*this, "vh_latch_ram"), - m_sprite_ram(*this, "sprite_ram"), - m_decrypted_opcodes(*this, "decrypted_opcodes") { } + m_decrypted_opcodes(*this, "decrypted_opcodes"), + m_stfight_video(*this, "stfight_vid"), + m_airraid_video(*this, "airraid_vid") + { } required_device m_maincpu; required_device m_audiocpu; required_device m_mcu; required_device m_msm; - required_device m_gfxdecode; required_device m_palette; - optional_shared_ptr m_text_char_ram; - optional_shared_ptr m_text_attr_ram; - optional_shared_ptr m_tx_vram; - required_shared_ptr m_vh_latch_ram; - required_shared_ptr m_sprite_ram; optional_shared_ptr m_decrypted_opcodes; + optional_device m_stfight_video; + optional_device m_airraid_video; UINT8 *m_decrypt; UINT8 m_fm_data; @@ -49,10 +44,6 @@ public: UINT8 m_adpcm_reset; UINT8 m_coin_state; - tilemap_t *m_fg_tilemap; - tilemap_t *m_bg_tilemap; - tilemap_t *m_tx_tilemap; - int m_sprite_base; DECLARE_WRITE_LINE_MEMBER(stfight_adpcm_int); @@ -67,31 +58,15 @@ public: DECLARE_WRITE8_MEMBER(stfight_mcu_w); DECLARE_WRITE8_MEMBER(stfight_bank_w); - DECLARE_WRITE8_MEMBER(stfight_text_char_w); - DECLARE_WRITE8_MEMBER(stfight_text_attr_w); - DECLARE_WRITE8_MEMBER(stfight_sprite_bank_w); - DECLARE_WRITE8_MEMBER(stfight_vh_latch_w); - DECLARE_WRITE8_MEMBER(cshooter_text_w); + DECLARE_READ8_MEMBER(stfight_fm_r); - TILEMAP_MAPPER_MEMBER(fg_scan); - TILE_GET_INFO_MEMBER(get_fg_tile_info); - TILEMAP_MAPPER_MEMBER(bg_scan); - TILE_GET_INFO_MEMBER(get_bg_tile_info); - TILE_GET_INFO_MEMBER(get_tx_tile_info); - TILE_GET_INFO_MEMBER(get_cshooter_tx_tile_info); - DECLARE_VIDEO_START(stfight); - DECLARE_VIDEO_START(cshooter); virtual void machine_start() override; virtual void machine_reset() override; - DECLARE_PALETTE_INIT(stfight); - UINT32 screen_update_stfight(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_cshooter(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(stfight_vb_interrupt); - void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void cshooter_draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); /* MCU specifics diff --git a/src/mame/includes/taito_z.h b/src/mame/includes/taito_z.h index bfe949dd209..a10f8f12c0f 100644 --- a/src/mame/includes/taito_z.h +++ b/src/mame/includes/taito_z.h @@ -40,7 +40,7 @@ public: m_tc0510nio(*this, "tc0510nio"), m_tc0140syt(*this, "tc0140syt"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_steer(*this, "STEER") { } /* memory pointers */ required_shared_ptr m_spriteram; @@ -68,7 +68,7 @@ public: optional_device m_tc0510nio; optional_device m_tc0140syt; // bshark & spacegun miss the CPUs which shall use TC0140 required_device m_gfxdecode; - required_device m_palette; + optional_ioport m_steer; DECLARE_WRITE16_MEMBER(cpua_ctrl_w); DECLARE_WRITE16_MEMBER(bshark_cpua_ctrl_w); diff --git a/src/mame/includes/tmc1800.h b/src/mame/includes/tmc1800.h index 6e7c80c1c03..f34b0e8fe1a 100644 --- a/src/mame/includes/tmc1800.h +++ b/src/mame/includes/tmc1800.h @@ -111,26 +111,12 @@ public: : tmc1800_base_state(mconfig, type, tag), m_cti(*this, CDP1864_TAG), m_colorram(*this, "color_ram"), - 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") + m_key_row(*this, {"Y0", "Y1", "Y2", "Y3", "Y4", "Y5", "Y6", "Y7"}) { } required_device m_cti; optional_shared_ptr m_colorram; - 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_array<8> m_key_row; virtual void machine_start() override; virtual void machine_reset() override; @@ -157,7 +143,6 @@ public: UINT8 m_color; /* keyboard state */ - ioport_port* m_key_row[8]; int m_keylatch; }; diff --git a/src/mame/includes/tmc2000e.h b/src/mame/includes/tmc2000e.h index 29974e3a233..25d74ea3d22 100644 --- a/src/mame/includes/tmc2000e.h +++ b/src/mame/includes/tmc2000e.h @@ -28,14 +28,7 @@ public: m_cti(*this, CDP1864_TAG), m_cassette(*this, "cassette"), m_colorram(*this, "colorram"), - 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"), + m_key_row(*this, {"Y0", "Y1", "Y2", "Y3", "Y4", "Y5", "Y6", "Y7"}), m_run(*this, "RUN") { } @@ -43,14 +36,7 @@ public: required_device m_cti; required_device m_cassette; required_shared_ptr m_colorram; - 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_array<8> m_key_row; required_ioport m_run; virtual void machine_start() override; @@ -79,7 +65,6 @@ public: UINT8 m_color; /* keyboard state */ - ioport_port* m_key_row[8]; int m_keylatch; /* key latch */ int m_reset; /* reset activated */ }; diff --git a/src/mame/includes/tmc600.h b/src/mame/includes/tmc600.h index 9fa19ca227a..0a6056529c8 100644 --- a/src/mame/includes/tmc600.h +++ b/src/mame/includes/tmc600.h @@ -36,14 +36,7 @@ public: m_page_ram(*this, "page_ram"), m_color_ram(*this, "color_ram"), m_run(*this, "RUN"), - 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") + m_key_row(*this, {"Y0", "Y1", "Y2", "Y3", "Y4", "Y5", "Y6", "Y7"}) { } required_device m_maincpu; @@ -55,14 +48,7 @@ public: required_shared_ptr m_page_ram; optional_shared_ptr m_color_ram; required_ioport m_run; - 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_array<8> m_key_row; virtual void machine_start() override; @@ -86,7 +72,6 @@ public: int m_blink; // cursor blink // keyboard state - ioport_port* m_key_row[8]; int m_keylatch; // key latch TIMER_DEVICE_CALLBACK_MEMBER(blink_tick); diff --git a/src/mame/includes/toaplan2.h b/src/mame/includes/toaplan2.h index 1a7eb44e195..a4fbde58e80 100644 --- a/src/mame/includes/toaplan2.h +++ b/src/mame/includes/toaplan2.h @@ -12,6 +12,7 @@ #include "machine/eepromser.h" #include "machine/gen_latch.h" #include "machine/nmk112.h" +#include "machine/ticket.h" #include "machine/upd4992.h" #include "video/gp9001.h" #include "sound/okim6295.h" @@ -47,7 +48,8 @@ public: m_screen(*this, "screen"), m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch"), - m_soundlatch2(*this, "soundlatch2") { } + m_soundlatch2(*this, "soundlatch2"), + m_hopper(*this, "hopper") { } optional_shared_ptr m_shared_ram; // 8 bit RAM shared between 68K and sound CPU optional_shared_ptr m_shared_ram16; // Really 8 bit RAM connected to Z180 @@ -72,6 +74,7 @@ public: required_device m_palette; optional_device m_soundlatch; // batrider and bgaregga and batsugun optional_device m_soundlatch2; + optional_device m_hopper; UINT16 m_mcu_data; INT8 m_old_p1_paddle_h; /* For Ghox */ @@ -158,9 +161,8 @@ public: void create_tx_tilemap(int dx = 0, int dx_flipped = 0); void toaplan2_vblank_irq(int irq_line); - UINT8 m_pwrkick_hopper; - DECLARE_CUSTOM_INPUT_MEMBER(pwrkick_hopper_status_r); DECLARE_WRITE8_MEMBER(pwrkick_coin_w); + DECLARE_WRITE8_MEMBER(pwrkick_coin_lockout_w); DECLARE_WRITE_LINE_MEMBER(toaplan2_reset); protected: diff --git a/src/mame/includes/topspeed.h b/src/mame/includes/topspeed.h index 139543e69b6..9e8ed3f394d 100644 --- a/src/mame/includes/topspeed.h +++ b/src/mame/includes/topspeed.h @@ -33,7 +33,7 @@ public: m_filter2(*this, "filter2"), m_filter3(*this, "filter3"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_steer(*this, "STEER") { } required_shared_ptr m_spritemap; required_shared_ptr m_raster_ctrl; @@ -53,7 +53,7 @@ public: required_device m_filter2; required_device m_filter3; required_device m_gfxdecode; - required_device m_palette; + required_ioport m_steer; // Misc UINT16 m_cpua_ctrl; diff --git a/src/mame/includes/vectrex.h b/src/mame/includes/vectrex.h index a79b893a996..351e76c3f87 100644 --- a/src/mame/includes/vectrex.h +++ b/src/mame/includes/vectrex.h @@ -49,10 +49,7 @@ public: m_ay8912(*this, "ay8912"), m_vector(*this, "vector"), m_cart(*this, "cartslot"), - m_io_contr1x(*this, "CONTR1X"), - m_io_contr1y(*this, "CONTR1Y"), - m_io_contr2x(*this, "CONTR2X"), - m_io_contr2y(*this, "CONTR2Y"), + m_io_contr(*this, {"CONTR1X", "CONTR1Y", "CONTR2X", "CONTR2Y"}), m_io_buttons(*this, "BUTTONS"), m_io_3dconf(*this, "3DCONF"), m_io_lpenconf(*this, "LPENCONF"), @@ -133,10 +130,7 @@ protected: required_device m_ay8912; required_device m_vector; optional_device m_cart; - optional_ioport m_io_contr1x; - optional_ioport m_io_contr1y; - optional_ioport m_io_contr2x; - optional_ioport m_io_contr2y; + optional_ioport_array<4> m_io_contr; required_ioport m_io_buttons; required_ioport m_io_3dconf; required_ioport m_io_lpenconf; diff --git a/src/mame/machine/abc1600mac.cpp b/src/mame/machine/abc1600mac.cpp index 409bf5695b1..7b1dafec391 100644 --- a/src/mame/machine/abc1600mac.cpp +++ b/src/mame/machine/abc1600mac.cpp @@ -6,16 +6,6 @@ **********************************************************************/ -/* - - TODO: - - - segment/page RAM addresses are not correctly decoded, "sas/format/format" can't find the SASI interface because of this - forcetask0 1 t0 0 t1 0 t2 0 t3 0 - sega19 0 task 0 - sega 000 segd 00 pga 008 pgd 4058 virtual 02c730 (should be 004730) -*/ - #include "abc1600mac.h" @@ -25,6 +15,8 @@ //************************************************************************** #define LOG 0 +#define LOG_MAC 0 +#define LOG_DMA 0 #define A0 BIT(offset, 0) @@ -101,7 +93,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *abc1600_mac_device::device_rom_region() const +const tiny_rom_entry *abc1600_mac_device::device_rom_region() const { return ROM_NAME( abc1600_mac ); } @@ -116,15 +108,15 @@ const rom_entry *abc1600_mac_device::device_rom_region() const // abc1600_mac_device - constructor //------------------------------------------------- -abc1600_mac_device::abc1600_mac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, ABC1600_MAC, "ABC 1600 MAC", tag, owner, clock, "abc1600mac", __FILE__), - device_memory_interface(mconfig, *this), - m_space_config("program", ENDIANNESS_LITTLE, 8, 22, 0, *ADDRESS_MAP_NAME(program_map)), - m_rom(*this, "boot"), - m_segment_ram(*this, "segment_ram"), - m_page_ram(*this, "page_ram"), - m_watchdog(*this, "watchdog"), - m_task(0) +abc1600_mac_device::abc1600_mac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, ABC1600_MAC, "ABC 1600 MAC", tag, owner, clock, "abc1600mac", __FILE__), + device_memory_interface(mconfig, *this), + m_space_config("program", ENDIANNESS_LITTLE, 8, 22, 0, *ADDRESS_MAP_NAME(program_map)), + m_rom(*this, "boot"), + m_segment_ram(*this, "segment_ram"), + m_page_ram(*this, "page_ram"), + m_watchdog(*this, "watchdog"), + m_task(0) { } @@ -145,6 +137,7 @@ void abc1600_mac_device::device_start() // HACK fill segment RAM or abcenix won't boot memset(m_segment_ram, 0xcd, 0x400); + memset(m_page_ram, 0xcd, 0x400); // state saving save_item(NAME(m_ifc2)); @@ -241,6 +234,8 @@ offs_t abc1600_mac_device::translate_address(offs_t offset, int *nonx, int *wp) *nonx = PAGE_NONX; *wp = PAGE_WP; + if (LOG_MAC) logerror("%s MAC %05x:%06x (SEGA %03x SEGD %02x PGA %03x PGD %04x NONX %u WP %u)\n", machine().describe_context(), offset, virtual_offset, sega, segd, pga, m_page_ram[pga], *nonx, *wp); + return virtual_offset; } @@ -441,7 +436,7 @@ WRITE8_MEMBER( abc1600_mac_device::task_w ) m_task = data ^ 0xff; - if (LOG) logerror("%s: %06x Task %u BOOTE %u MAGIC %u\n", machine().describe_context(), offset, get_current_task(offset), BOOTE, MAGIC); + if (LOG) logerror("%s TASK %05x:%02x (TASK %u BOOTE %u MAGIC %u)\n", machine().describe_context(), offset, data, get_current_task(offset), BOOTE, MAGIC); } @@ -498,7 +493,7 @@ WRITE8_MEMBER( abc1600_mac_device::segment_w ) m_segment_ram[sega] = data & 0x7f; - if (LOG) logerror("%s: %06x Task %u Segment %03x : %02x\n", machine().describe_context(), offset, get_current_task(offset), sega, data); + if (LOG) logerror("%s SEGMENT %05x:%02x (SEGA %03x SEGD %02x)\n", machine().describe_context(), offset, data, sega, m_segment_ram[sega]); } @@ -603,7 +598,7 @@ WRITE8_MEMBER( abc1600_mac_device::page_w ) m_page_ram[pga] = ((data & 0xc3) << 8) | (m_page_ram[pga] & 0xff); } - if (LOG) logerror("%s: %06x Task %u Segment %03x Page %03x : %02x -> %04x\n", machine().describe_context(), offset, get_current_task(offset), sega, pga, data, m_page_ram[pga]); + if (LOG) logerror("%s PAGE %05x:%02x (SEGA %03x SEGD %02x PGA %03x PGD %04x)\n", machine().describe_context(), offset, data, sega, segd, pga, m_page_ram[pga]); } @@ -631,6 +626,8 @@ UINT8 abc1600_mac_device::dma_mreq_r(int index, UINT16 offset) { offs_t virtual_offset = get_dma_address(index, offset); + if (LOG_DMA)logerror("%s DMA R %04x:%06x\n", machine().describe_context(), offset, virtual_offset); + return space().read_byte(virtual_offset); } @@ -643,6 +640,8 @@ void abc1600_mac_device::dma_mreq_w(int index, UINT16 offset, UINT8 data) { offs_t virtual_offset = get_dma_address(index, offset); + if (LOG_DMA)logerror("%s DMA W %04x:%06x\n", machine().describe_context(), offset, virtual_offset); + space().write_byte(virtual_offset, data); } @@ -655,6 +654,8 @@ UINT8 abc1600_mac_device::dma_iorq_r(int index, UINT16 offset) { offs_t virtual_offset = 0x1fe000 | get_dma_address(index, offset); + if (LOG_DMA)logerror("%s DMA R %04x:%06x\n", machine().describe_context(), offset, virtual_offset); + return space().read_byte(virtual_offset); } @@ -667,6 +668,8 @@ void abc1600_mac_device::dma_iorq_w(int index, UINT16 offset, UINT8 data) { offs_t virtual_offset = 0x1fe000 | get_dma_address(index, offset); + if (LOG_DMA)logerror("%s DMA W %04x:%06x\n", machine().describe_context(), offset, virtual_offset); + space().write_byte(virtual_offset, data); } @@ -692,7 +695,7 @@ WRITE8_MEMBER( abc1600_mac_device::dmamap_w ) */ - if (LOG) logerror("DMAMAP %u %02x\n", offset & 7, data); + if (LOG_DMA) logerror("%s DMAMAP %u:%02x\n", machine().describe_context(), offset & 7, data); m_dmamap[offset & 7] = data; } diff --git a/src/mame/machine/abc1600mac.h b/src/mame/machine/abc1600mac.h index f0cdab229ee..207e3d9e5f2 100644 --- a/src/mame/machine/abc1600mac.h +++ b/src/mame/machine/abc1600mac.h @@ -50,7 +50,7 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; void set_cpu_tag(const char *cpu_tag) { m_cpu_tag = cpu_tag; } diff --git a/src/mame/machine/abc80kb.cpp b/src/mame/machine/abc80kb.cpp index dd9471f5ee4..c5d7e4dfeb0 100644 --- a/src/mame/machine/abc80kb.cpp +++ b/src/mame/machine/abc80kb.cpp @@ -104,7 +104,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *abc80_keyboard_device::device_rom_region() const +const tiny_rom_entry *abc80_keyboard_device::device_rom_region() const { return ROM_NAME( abc80_keyboard ); } diff --git a/src/mame/machine/abc80kb.h b/src/mame/machine/abc80kb.h index 7de08733a35..134d3f59e91 100644 --- a/src/mame/machine/abc80kb.h +++ b/src/mame/machine/abc80kb.h @@ -48,7 +48,7 @@ public: template static devcb_base &set_keydown_wr_callback(device_t &device, _Object object) { return downcast(device).m_write_keydown.set_callback(object); } // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/mame/machine/amiga.cpp b/src/mame/machine/amiga.cpp index b060f26aa24..3fab6018d37 100644 --- a/src/mame/machine/amiga.cpp +++ b/src/mame/machine/amiga.cpp @@ -262,7 +262,7 @@ TIMER_CALLBACK_MEMBER( amiga_state::scanline_callback ) m_cia_0->tod_w(0); } - if (m_potgo_port) + if (m_potgo_port.found()) { // pot counters (start counting at 7 (ntsc) or 8 (pal)) if (BIT(CUSTOM_REG(REG_POTGO), 0) && (scanline /2 ) > 7) @@ -380,33 +380,23 @@ TIMER_CALLBACK_MEMBER( amiga_state::amiga_irq_proc ) UINT16 amiga_state::joy0dat_r() { - if (m_input_device == nullptr) - return m_joy0dat_port ? m_joy0dat_port->read() : 0xffff; - - if (m_input_device->read() & 0x10) - return m_joy0dat_port ? m_joy0dat_port->read() : 0xffff; + if (!m_input_device.found() || (m_input_device->read() & 0x10)) + return m_joy0dat_port.read_safe(0xffff); else - return ((m_p1_mouse_y ? m_p1_mouse_y->read() : 0xff) << 8) | (m_p1_mouse_x? m_p1_mouse_x->read() : 0xff); + return (m_p1_mouse_y.read_safe(0xff) << 8) | m_p1_mouse_x.read_safe(0xff); } UINT16 amiga_state::joy1dat_r() { - if (m_input_device == nullptr) - return m_joy1dat_port ? m_joy1dat_port->read() : 0xffff; - - if (m_input_device->read() & 0x20) - return m_joy1dat_port ? m_joy1dat_port->read() : 0xffff; + if (!m_input_device.found() || m_input_device->read() & 0x20) + return m_joy1dat_port.read_safe(0xffff); else - return ((m_p2_mouse_y ? m_p2_mouse_y->read() : 0xff) << 8) | (m_p2_mouse_x ? m_p2_mouse_x->read() : 0xff); + return (m_p2_mouse_y.read_safe(0xff) << 8) | m_p2_mouse_x.read_safe(0xff); } CUSTOM_INPUT_MEMBER( amiga_state::amiga_joystick_convert ) { - ioport_port *ports[2] = { m_p1joy_port, m_p2joy_port }; - UINT8 bits = 0xff; - - if (ports[(int)(FPTR)param]) - bits = ports[(int)(FPTR)param]->read(); + UINT8 bits = m_joy_ports[(int)(FPTR)param].read_safe(0xff); int up = (bits >> 0) & 1; int down = (bits >> 1) & 1; @@ -1186,21 +1176,18 @@ READ16_MEMBER( amiga_state::custom_chip_r ) return CUSTOM_REG(REG_SERDATR); case REG_JOY0DAT: - if (m_joy0dat_port) + if (m_joy0dat_port.found()) return joy0dat_r(); case REG_JOY1DAT: - if (m_joy1dat_port) + if (m_joy1dat_port.found()) return joy1dat_r(); case REG_POTGOR: - if (m_potgo_port) - return m_potgo_port->read(); - else - return 0x5500; + return m_potgo_port.read_safe(0x5500); case REG_POT0DAT: - if (m_pot0dat_port) + if (m_pot0dat_port.found()) { return m_pot0dat_port->read(); } @@ -1215,7 +1202,7 @@ READ16_MEMBER( amiga_state::custom_chip_r ) } case REG_POT1DAT: - if (m_pot1dat_port) + if (m_pot1dat_port.found()) { return m_pot1dat_port->read(); } diff --git a/src/mame/machine/amigakbd.cpp b/src/mame/machine/amigakbd.cpp index ac297015deb..55f832310ac 100644 --- a/src/mame/machine/amigakbd.cpp +++ b/src/mame/machine/amigakbd.cpp @@ -75,7 +75,7 @@ ROM_START( mos6570_036 ) ROM_LOAD("328191-02.ic1", 0x000, 0x800, CRC(4a3fc332) SHA1(83b21d0c8b93fc9b9b3b287fde4ec8f3badac5a2)) ROM_END -const rom_entry *amigakbd_device::device_rom_region() const +const tiny_rom_entry *amigakbd_device::device_rom_region() const { return ROM_NAME( mos6570_036 ); } diff --git a/src/mame/machine/amigakbd.h b/src/mame/machine/amigakbd.h index ae7f7f633cb..1ae08514d97 100644 --- a/src/mame/machine/amigakbd.h +++ b/src/mame/machine/amigakbd.h @@ -71,7 +71,7 @@ public: protected: // device-level overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; virtual void device_start() override; diff --git a/src/mame/machine/amstrad.cpp b/src/mame/machine/amstrad.cpp index 72aa763864c..07c5d060fe9 100644 --- a/src/mame/machine/amstrad.cpp +++ b/src/mame/machine/amstrad.cpp @@ -1860,7 +1860,7 @@ READ8_MEMBER(amstrad_state::amstrad_cpc_io_r) // m6845_personality_t crtc_type; int page; -// crtc_type = read_safe(ioport("crtc"), 0); +// crtc_type = m_crtc.read_safe(0); // m6845_set_personality(crtc_type); if(m_aleste_mode & 0x04) @@ -2721,21 +2721,21 @@ READ8_MEMBER(amstrad_state::amstrad_psg_porta_read) if(m_aleste_mode == 0x08 && ( m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F ) == 10) return 0xff; - if (m_io_kbrow[m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F]) + if (m_io_kbrow[m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F].found()) { if(m_system_type != SYSTEM_GX4000) { - if(m_io_ctrltype && (m_io_ctrltype->read() == 1) && (m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F) == 9) + if (m_io_ctrltype.read_safe(0) == 1 && (m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F) == 9) { return m_amx_mouse_data; } - if(m_io_ctrltype && (m_io_ctrltype->read() == 2) && (m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F) == 9) + if (m_io_ctrltype.read_safe(0) == 2 && (m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F) == 9) { - return (m_io_kbrow[m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F] ? m_io_kbrow[m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F]->read() & 0x80 : 0) | 0x7f; + return (m_io_kbrow[m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F].read_safe(0) & 0x80) | 0x7f; } } - return m_io_kbrow[m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F] ? m_io_kbrow[m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F]->read() : 0; + return m_io_kbrow[m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F].read_safe(0); } return 0xFF; } @@ -2770,14 +2770,14 @@ IRQ_CALLBACK_MEMBER(amstrad_state::amstrad_cpu_acknowledge_int) if(m_system_type != SYSTEM_GX4000) { // update AMX mouse inputs (normally done every 1/300th of a second) - if(m_io_ctrltype && m_io_ctrltype->read() == 1) + if (m_io_ctrltype.read_safe(0) == 1) { static UINT8 prev_x,prev_y; UINT8 data_x, data_y; m_amx_mouse_data = 0x0f; - data_x = m_io_mouse1 ? m_io_mouse1->read() : 0; - data_y = m_io_mouse2 ? m_io_mouse2->read() : 0; + data_x = m_io_mouse1.read_safe(0); + data_y = m_io_mouse2.read_safe(0); if(data_x > prev_x) m_amx_mouse_data &= ~0x08; @@ -2787,11 +2787,11 @@ IRQ_CALLBACK_MEMBER(amstrad_state::amstrad_cpu_acknowledge_int) m_amx_mouse_data &= ~0x02; if(data_y < prev_y) m_amx_mouse_data &= ~0x01; - m_amx_mouse_data |= ((m_io_mouse3 ? m_io_mouse3->read() : 0) << 4); + m_amx_mouse_data |= (m_io_mouse3.read_safe(0) << 4); prev_x = data_x; prev_y = data_y; - m_amx_mouse_data |= ((m_io_kbrow[9] ? m_io_kbrow[9]->read() : 0) & 0x80); // DEL key + m_amx_mouse_data |= (m_io_kbrow[9].read_safe(0) & 0x80); // DEL key } } return 0xFF; diff --git a/src/mame/machine/apollo.cpp b/src/mame/machine/apollo.cpp index abd6f7c7622..8adf11a98c5 100644 --- a/src/mame/machine/apollo.cpp +++ b/src/mame/machine/apollo.cpp @@ -276,7 +276,7 @@ WRITE16_MEMBER(apollo_state::apollo_csr_control_register_w) } } - cpu_control_register = (cpu_control_register & ~mem_mask) | (data & mem_mask); + COMBINE_DATA(&cpu_control_register); output().set_value("internal_led_1", (cpu_control_register >> 15) & 1); output().set_value("internal_led_2", (cpu_control_register >> 14) & 1); diff --git a/src/mame/machine/apple2.cpp b/src/mame/machine/apple2.cpp index dd227dc5f93..b6c1b9ed651 100644 --- a/src/mame/machine/apple2.cpp +++ b/src/mame/machine/apple2.cpp @@ -1308,8 +1308,8 @@ void apple2_state::machine_reset() int apple2_state::a2_no_ctrl_reset() { - return (((m_kbrepeat != nullptr) && (m_resetdip == nullptr)) || - ((m_resetdip != nullptr) && !m_resetdip->read())); + return ((m_kbrepeat.found() && !m_resetdip.found()) || + (m_resetdip.found() && !m_resetdip->read())); } /* ----------------------------------------------------------------------- @@ -2438,8 +2438,8 @@ MACHINE_START_MEMBER(apple2_state,tk2000) int apple2_state::apple2_pressed_specialkey(UINT8 key) { - return ((m_kbspecial ? m_kbspecial->read() : 0) & key) - || ((m_joybuttons ? m_joybuttons->read() : 0) & key); + return (m_kbspecial.read_safe(0) & key) + || (m_joybuttons.read_safe(0) & key); } void apple2_state::apple2_refresh_delegates() diff --git a/src/mame/machine/apricotkb.cpp b/src/mame/machine/apricotkb.cpp index 6ceb0d6ba4d..8d40e726f40 100644 --- a/src/mame/machine/apricotkb.cpp +++ b/src/mame/machine/apricotkb.cpp @@ -39,7 +39,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *apricot_keyboard_device::device_rom_region() const +const tiny_rom_entry *apricot_keyboard_device::device_rom_region() const { return ROM_NAME( apricot_keyboard ); } diff --git a/src/mame/machine/apricotkb.h b/src/mame/machine/apricotkb.h index 01f5a7f451f..ddc3d6cdde1 100644 --- a/src/mame/machine/apricotkb.h +++ b/src/mame/machine/apricotkb.h @@ -47,7 +47,7 @@ public: template static devcb_base &set_txd_wr_callback(device_t &device, _Object object) { return downcast(device).m_write_txd.set_callback(object); } // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/mame/machine/at.cpp b/src/mame/machine/at.cpp index 8096b50e289..14508efb797 100644 --- a/src/mame/machine/at.cpp +++ b/src/mame/machine/at.cpp @@ -12,6 +12,7 @@ #include "machine/at_keybc.h" #include "bus/pc_kbd/pc_kbdc.h" #include "sound/dac.h" +#include "softlist_dev.h" #define LOG_PORT80 0 diff --git a/src/mame/machine/atari400.cpp b/src/mame/machine/atari400.cpp index 907e65b22f5..a2bf49f3b0d 100644 --- a/src/mame/machine/atari400.cpp +++ b/src/mame/machine/atari400.cpp @@ -98,15 +98,15 @@ POKEY_KEYBOARD_CB_MEMBER(atari_common_state::a800_keyboard) { case pokey_device::POK_KEY_BREAK: /* special case ... */ - ret |= ((m_keyboard[0] && m_keyboard[0]->read() & 0x08) ? 0x02 : 0x00); + ret |= ((m_keyboard[0].read_safe(0x00) & 0x08) ? 0x02 : 0x00); break; case pokey_device::POK_KEY_CTRL: /* CTRL */ - ret |= ((m_fake && m_fake->read() & 0x02) ? 0x02 : 0x00); + ret |= ((m_fake.read_safe(0x00) & 0x02) ? 0x02 : 0x00); break; case pokey_device::POK_KEY_SHIFT: /* SHIFT */ - ret |= ((m_fake && m_fake->read() & 0x01) ? 0x02 : 0x00); + ret |= ((m_fake.read_safe(0x00) & 0x01) ? 0x02 : 0x00); break; } @@ -115,7 +115,7 @@ POKEY_KEYBOARD_CB_MEMBER(atari_common_state::a800_keyboard) return ret; /* decode regular key */ - ipt = m_keyboard[k543210 >> 3] ? m_keyboard[k543210 >> 3]->read() : 0; + ipt = m_keyboard[k543210 >> 3].read_safe(0); if (ipt & (1 << (k543210 & 0x07))) ret |= 0x01; @@ -162,7 +162,7 @@ POKEY_KEYBOARD_CB_MEMBER(atari_common_state::a5200_keypads) { case pokey_device::POK_KEY_BREAK: /* special case ... */ - ret |= ((m_keypad[0] && m_keypad[0]->read() & 0x01) ? 0x02 : 0x00); + ret |= ((m_keypad[0].read_safe(0x00) & 0x01) ? 0x02 : 0x00); break; case pokey_device::POK_KEY_CTRL: break; @@ -184,7 +184,7 @@ POKEY_KEYBOARD_CB_MEMBER(atari_common_state::a5200_keypads) if (k543210 == 0) return ret; - ipt = m_keypad[k543210 >> 2] ? m_keypad[k543210 >> 2]->read() : 0; + ipt = m_keypad[k543210 >> 2].read_safe(0); if (ipt & (1 << (k543210 & 0x03))) ret |= 0x01; diff --git a/src/mame/machine/bbc.cpp b/src/mame/machine/bbc.cpp index abde109215c..522fffad39c 100644 --- a/src/mame/machine/bbc.cpp +++ b/src/mame/machine/bbc.cpp @@ -1747,9 +1747,9 @@ MACHINE_START_MEMBER(bbc_state, bbca) MACHINE_RESET_MEMBER(bbc_state, bbca) { - m_monitortype = read_safe(ioport("BBCCONFIG"), 0) & 0x03; - m_Speech = read_safe(ioport("BBCCONFIG"), 0) & 0x04; - m_SWRAMtype = read_safe(ioport("BBCCONFIG"), 0) & 0x18; + m_monitortype = m_bbcconfig.read_safe(0) & 0x03; + m_Speech = m_bbcconfig.read_safe(0) & 0x04; + m_SWRAMtype = m_bbcconfig.read_safe(0) & 0x18; UINT8 *RAM = m_region_maincpu->base(); @@ -1782,9 +1782,9 @@ MACHINE_START_MEMBER(bbc_state, bbcb) MACHINE_RESET_MEMBER(bbc_state, bbcb) { - m_monitortype = read_safe(ioport("BBCCONFIG"), 0) & 0x03; - m_Speech = read_safe(ioport("BBCCONFIG"), 1) & 0x04; - m_SWRAMtype = read_safe(ioport("BBCCONFIG"), 0) & 0x18; + m_monitortype = m_bbcconfig.read_safe(0) & 0x03; + m_Speech = m_bbcconfig.read_safe(1) & 0x04; + m_SWRAMtype = m_bbcconfig.read_safe(0) & 0x18; UINT8 *RAM = m_region_maincpu->base(); @@ -1823,8 +1823,8 @@ MACHINE_START_MEMBER(bbc_state, bbcbp) MACHINE_RESET_MEMBER(bbc_state, bbcbp) { - m_monitortype = read_safe(ioport("BBCCONFIG"), 0) & 0x03; - m_Speech = read_safe(ioport("BBCCONFIG"), 1) & 0x04; + m_monitortype = m_bbcconfig.read_safe(0) & 0x03; + m_Speech = m_bbcconfig.read_safe(1) & 0x04; m_SWRAMtype = 0; m_bank1->set_base(m_region_maincpu->base()); @@ -1855,7 +1855,7 @@ MACHINE_START_MEMBER(bbc_state, bbcm) MACHINE_RESET_MEMBER(bbc_state, bbcm) { - m_monitortype = read_safe(ioport("BBCCONFIG"), 0) & 0x03; + m_monitortype = m_bbcconfig.read_safe(0) & 0x03; m_Speech = 0; m_SWRAMtype = 0; diff --git a/src/mame/machine/bebox.cpp b/src/mame/machine/bebox.cpp index d5f99d9d0a7..c13fa303c8b 100644 --- a/src/mame/machine/bebox.cpp +++ b/src/mame/machine/bebox.cpp @@ -622,28 +622,28 @@ READ64_MEMBER(bebox_state::scsi53c810_r ) { int reg = offset*8; UINT64 r = 0; - if (!(mem_mask & U64(0xff00000000000000))) { + if (!ACCESSING_BITS_56_63) { r |= (UINT64)m_lsi53c810->lsi53c810_reg_r(reg+0) << 56; } - if (!(mem_mask & U64(0x00ff000000000000))) { + if (!ACCESSING_BITS_48_55) { r |= (UINT64)m_lsi53c810->lsi53c810_reg_r(reg+1) << 48; } - if (!(mem_mask & U64(0x0000ff0000000000))) { + if (!ACCESSING_BITS_40_47) { r |= (UINT64)m_lsi53c810->lsi53c810_reg_r(reg+2) << 40; } - if (!(mem_mask & U64(0x000000ff00000000))) { + if (!ACCESSING_BITS_32_39) { r |= (UINT64)m_lsi53c810->lsi53c810_reg_r(reg+3) << 32; } - if (!(mem_mask & U64(0x00000000ff000000))) { + if (!ACCESSING_BITS_24_31) { r |= (UINT64)m_lsi53c810->lsi53c810_reg_r(reg+4) << 24; } - if (!(mem_mask & U64(0x0000000000ff0000))) { + if (!ACCESSING_BITS_16_23) { r |= (UINT64)m_lsi53c810->lsi53c810_reg_r(reg+5) << 16; } - if (!(mem_mask & U64(0x000000000000ff00))) { + if (!ACCESSING_BITS_8_15) { r |= (UINT64)m_lsi53c810->lsi53c810_reg_r(reg+6) << 8; } - if (!(mem_mask & U64(0x00000000000000ff))) { + if (!ACCESSING_BITS_0_7) { r |= (UINT64)m_lsi53c810->lsi53c810_reg_r(reg+7) << 0; } @@ -654,28 +654,28 @@ READ64_MEMBER(bebox_state::scsi53c810_r ) WRITE64_MEMBER(bebox_state::scsi53c810_w ) { int reg = offset*8; - if (!(mem_mask & U64(0xff00000000000000))) { + if (!ACCESSING_BITS_56_63) { m_lsi53c810->lsi53c810_reg_w(reg+0, data >> 56); } - if (!(mem_mask & U64(0x00ff000000000000))) { + if (!ACCESSING_BITS_48_55) { m_lsi53c810->lsi53c810_reg_w(reg+1, data >> 48); } - if (!(mem_mask & U64(0x0000ff0000000000))) { + if (!ACCESSING_BITS_40_47) { m_lsi53c810->lsi53c810_reg_w(reg+2, data >> 40); } - if (!(mem_mask & U64(0x000000ff00000000))) { + if (!ACCESSING_BITS_32_39) { m_lsi53c810->lsi53c810_reg_w(reg+3, data >> 32); } - if (!(mem_mask & U64(0x00000000ff000000))) { + if (!ACCESSING_BITS_24_31) { m_lsi53c810->lsi53c810_reg_w(reg+4, data >> 24); } - if (!(mem_mask & U64(0x0000000000ff0000))) { + if (!ACCESSING_BITS_16_23) { m_lsi53c810->lsi53c810_reg_w(reg+5, data >> 16); } - if (!(mem_mask & U64(0x000000000000ff00))) { + if (!ACCESSING_BITS_8_15) { m_lsi53c810->lsi53c810_reg_w(reg+6, data >> 8); } - if (!(mem_mask & U64(0x00000000000000ff))) { + if (!ACCESSING_BITS_0_7) { m_lsi53c810->lsi53c810_reg_w(reg+7, data >> 0); } } diff --git a/src/mame/machine/beta.cpp b/src/mame/machine/beta.cpp index 4c1afc59f64..52f1500f884 100644 --- a/src/mame/machine/beta.cpp +++ b/src/mame/machine/beta.cpp @@ -290,7 +290,7 @@ machine_config_constructor beta_disk_device::device_mconfig_additions() const // the device's ROM definitions //------------------------------------------------- -const rom_entry *beta_disk_device::device_rom_region() const +const tiny_rom_entry *beta_disk_device::device_rom_region() const { return ROM_NAME(beta_disk ); } diff --git a/src/mame/machine/beta.h b/src/mame/machine/beta.h index af5b2132e14..8aa23e21c35 100644 --- a/src/mame/machine/beta.h +++ b/src/mame/machine/beta.h @@ -46,7 +46,7 @@ protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; private: diff --git a/src/mame/machine/coco.cpp b/src/mame/machine/coco.cpp index 71686d9d757..fca8a67d2cf 100644 --- a/src/mame/machine/coco.cpp +++ b/src/mame/machine/coco.cpp @@ -1172,7 +1172,7 @@ WRITE8_MEMBER( coco_state::ff60_write ) READ8_MEMBER( coco_state::ff40_read ) { - if (offset >= 1 && offset <= 2 && m_beckerportconfig && m_beckerportconfig->read() == 1) + if (offset >= 1 && offset <= 2 && m_beckerportconfig.read_safe(0) == 1) { return m_beckerport->read(space, offset-1, mem_mask); } @@ -1188,7 +1188,7 @@ READ8_MEMBER( coco_state::ff40_read ) WRITE8_MEMBER( coco_state::ff40_write ) { - if (offset >= 1 && offset <= 2 && m_beckerportconfig && m_beckerportconfig->read() == 1) + if (offset >= 1 && offset <= 2 && m_beckerportconfig.read_safe(0) == 1) { return m_beckerport->write(space, offset-1, data, mem_mask); } diff --git a/src/mame/machine/compiskb.cpp b/src/mame/machine/compiskb.cpp index 91709ad925e..a7d0e0f895f 100644 --- a/src/mame/machine/compiskb.cpp +++ b/src/mame/machine/compiskb.cpp @@ -40,7 +40,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *compis_keyboard_device::device_rom_region() const +const tiny_rom_entry *compis_keyboard_device::device_rom_region() const { return ROM_NAME( compis_keyboard ); } diff --git a/src/mame/machine/compiskb.h b/src/mame/machine/compiskb.h index 64a71c1b405..caf649c585b 100644 --- a/src/mame/machine/compiskb.h +++ b/src/mame/machine/compiskb.h @@ -42,7 +42,7 @@ public: template static devcb_base &set_out_tx_handler(device_t &device, _Object object) { return downcast(device).m_out_tx_handler.set_callback(object); } // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/mame/machine/cuda.cpp b/src/mame/machine/cuda.cpp index fc79fc6b32e..b42b8ee11f3 100644 --- a/src/mame/machine/cuda.cpp +++ b/src/mame/machine/cuda.cpp @@ -99,7 +99,7 @@ machine_config_constructor cuda_device::device_mconfig_additions() const return MACHINE_CONFIG_NAME( cuda ); } -const rom_entry *cuda_device::device_rom_region() const +const tiny_rom_entry *cuda_device::device_rom_region() const { return ROM_NAME( cuda ); } diff --git a/src/mame/machine/cuda.h b/src/mame/machine/cuda.h index 3623200e7ab..a236acffc94 100644 --- a/src/mame/machine/cuda.h +++ b/src/mame/machine/cuda.h @@ -109,7 +109,7 @@ protected: virtual void device_start() override; virtual void device_reset() override; virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; required_device m_maincpu; diff --git a/src/mame/machine/cybiko.cpp b/src/mame/machine/cybiko.cpp index c4ce31ec36c..bd28cdfd9ee 100644 --- a/src/mame/machine/cybiko.cpp +++ b/src/mame/machine/cybiko.cpp @@ -103,7 +103,7 @@ int cybiko_state::cybiko_key_r( offs_t offset, int mem_mask) UINT16 data = 0xFFFF; for (UINT8 i = 0; i < 15; i++) { - if (m_input[i] && !BIT(offset, i)) + if (m_input[i].found() && !BIT(offset, i)) data &= ~m_input[i]->read(); } if (data != 0xFFFF) diff --git a/src/mame/machine/dc.cpp b/src/mame/machine/dc.cpp index 913567116b7..e74d9757967 100644 --- a/src/mame/machine/dc.cpp +++ b/src/mame/machine/dc.cpp @@ -271,7 +271,7 @@ int dc_state::decode_reg3216_64(UINT32 offset, UINT64 mem_mask, UINT64 *shift) //machine().debug_break(); } - if (mem_mask & U64(0x0000ffff00000000)) + if (ACCESSING_BITS_32_47) { reg++; *shift = 32; diff --git a/src/mame/machine/dec_lk201.cpp b/src/mame/machine/dec_lk201.cpp index 0ba3d6a0fdc..94fb9533ec0 100644 --- a/src/mame/machine/dec_lk201.cpp +++ b/src/mame/machine/dec_lk201.cpp @@ -226,7 +226,7 @@ machine_config_constructor lk201_device::device_mconfig_additions() const return MACHINE_CONFIG_NAME( lk201 ); } -const rom_entry *lk201_device::device_rom_region() const +const tiny_rom_entry *lk201_device::device_rom_region() const { return ROM_NAME( lk201 ); } diff --git a/src/mame/machine/dec_lk201.h b/src/mame/machine/dec_lk201.h index 3185a0a139f..87b61ad3af6 100644 --- a/src/mame/machine/dec_lk201.h +++ b/src/mame/machine/dec_lk201.h @@ -66,7 +66,7 @@ public: protected: // device-level overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; virtual void device_start() override; virtual void device_reset() override; diff --git a/src/mame/machine/dmv_keyb.cpp b/src/mame/machine/dmv_keyb.cpp index 1fe0f2f8f43..4f4c3d618e1 100644 --- a/src/mame/machine/dmv_keyb.cpp +++ b/src/mame/machine/dmv_keyb.cpp @@ -249,7 +249,7 @@ machine_config_constructor dmv_keyboard_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *dmv_keyboard_device::device_rom_region() const +const tiny_rom_entry *dmv_keyboard_device::device_rom_region() const { return ROM_NAME( dmv_keyboard ); } diff --git a/src/mame/machine/dmv_keyb.h b/src/mame/machine/dmv_keyb.h index 0f42fef728a..e83e6957641 100644 --- a/src/mame/machine/dmv_keyb.h +++ b/src/mame/machine/dmv_keyb.h @@ -37,7 +37,7 @@ public: dmv_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/mame/machine/egret.cpp b/src/mame/machine/egret.cpp index 736cdfd3471..9a211847e52 100644 --- a/src/mame/machine/egret.cpp +++ b/src/mame/machine/egret.cpp @@ -98,7 +98,7 @@ machine_config_constructor egret_device::device_mconfig_additions() const return MACHINE_CONFIG_NAME( egret ); } -const rom_entry *egret_device::device_rom_region() const +const tiny_rom_entry *egret_device::device_rom_region() const { return ROM_NAME( egret ); } diff --git a/src/mame/machine/egret.h b/src/mame/machine/egret.h index f9b881cd540..75f8e1888ed 100644 --- a/src/mame/machine/egret.h +++ b/src/mame/machine/egret.h @@ -108,7 +108,7 @@ protected: virtual void device_start() override; virtual void device_reset() override; virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; required_device m_maincpu; diff --git a/src/mame/machine/harddriv.cpp b/src/mame/machine/harddriv.cpp index 5d8dc40966b..50b3124e585 100644 --- a/src/mame/machine/harddriv.cpp +++ b/src/mame/machine/harddriv.cpp @@ -220,7 +220,7 @@ READ16_MEMBER( harddriv_state::hd68k_port0_r ) */ screen_device &scr = m_gsp->screen(); - int temp = ((m_sw1 ? m_sw1->read() : 0xff) << 8) | m_in0->read(); + int temp = (m_sw1.read_safe(0xff) << 8) | m_in0->read(); if (get_hblank(scr)) temp ^= 0x0002; temp ^= 0x0018; /* both EOCs always high for now */ return temp; @@ -270,7 +270,7 @@ READ16_MEMBER( harddriv_state::hda68k_port1_r ) READ16_MEMBER( harddriv_state::hdc68k_wheel_r ) { /* grab the new wheel value and upconvert to 12 bits */ - UINT16 new_wheel = (m_12badc[0] ? m_12badc[0]->read() : 0xffff) << 4; + UINT16 new_wheel = m_12badc[0].read_safe(0xffff) << 4; /* hack to display the wheel position */ if (space.machine().input().code_pressed(KEYCODE_LSHIFT)) @@ -321,14 +321,14 @@ WRITE16_MEMBER( harddriv_state::hd68k_adc_control_w ) if (m_adc_control & 0x08) { m_adc8_select = m_adc_control & 0x07; - m_adc8_data = m_8badc[m_adc8_select] ? m_8badc[m_adc8_select]->read() : 0xffff; + m_adc8_data = m_8badc[m_adc8_select].read_safe(0xffff); } /* handle a write to the 12-bit ADC address select */ if (m_adc_control & 0x40) { m_adc12_select = (m_adc_control >> 4) & 0x03; - m_adc12_data = (m_12badc[m_adc12_select] ? m_12badc[m_adc12_select]->read() : 0xffff) << 4; + m_adc12_data = m_12badc[m_adc12_select].read_safe(0xffff) << 4; } /* bit 7 selects which byte of the 12 bit data to read */ diff --git a/src/mame/machine/ie15_kbd.cpp b/src/mame/machine/ie15_kbd.cpp index f98eb316092..fdc4be941c8 100644 --- a/src/mame/machine/ie15_kbd.cpp +++ b/src/mame/machine/ie15_kbd.cpp @@ -141,7 +141,7 @@ ROM_START( ie15_keyboard ) ROM_LOAD( "15bbb.rt5", 0x000, 0x200, CRC(e6a4226e) SHA1(0ee46f5be1b01fa917a6d483bb51463106ae441f) ) ROM_END -const rom_entry *ie15_keyboard_device::device_rom_region() const +const tiny_rom_entry *ie15_keyboard_device::device_rom_region() const { return ROM_NAME( ie15_keyboard ); } diff --git a/src/mame/machine/ie15_kbd.h b/src/mame/machine/ie15_kbd.h index 42eca22403d..adf2a32f5af 100644 --- a/src/mame/machine/ie15_kbd.h +++ b/src/mame/machine/ie15_kbd.h @@ -49,7 +49,7 @@ public: virtual ioport_constructor device_input_ports() const override; virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: required_ioport m_io_kbd0; diff --git a/src/mame/machine/isbc_215g.cpp b/src/mame/machine/isbc_215g.cpp index e49818ee4d6..8cc1c937dda 100644 --- a/src/mame/machine/isbc_215g.cpp +++ b/src/mame/machine/isbc_215g.cpp @@ -377,7 +377,7 @@ ROM_START( isbc_215g ) ROM_LOAD16_BYTE( "174581.002.bin", 0x0001, 0x2000, CRC(6190fa67) SHA1(295dd4e75f699aaf93227cc4876cee8accae383a)) ROM_END -const rom_entry *isbc_215g_device::device_rom_region() const +const tiny_rom_entry *isbc_215g_device::device_rom_region() const { return ROM_NAME( isbc_215g ); } diff --git a/src/mame/machine/isbc_215g.h b/src/mame/machine/isbc_215g.h index 86c795d0306..85e1fee40b9 100644 --- a/src/mame/machine/isbc_215g.h +++ b/src/mame/machine/isbc_215g.h @@ -15,7 +15,7 @@ public: isbc_215g_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); virtual machine_config_constructor device_mconfig_additions() const override; - const rom_entry *device_rom_region() const override; + const tiny_rom_entry *device_rom_region() const override; DECLARE_WRITE8_MEMBER(write); DECLARE_READ16_MEMBER(io_r); diff --git a/src/mame/machine/jvs13551.cpp b/src/mame/machine/jvs13551.cpp index be82ed40bb8..261f311d796 100644 --- a/src/mame/machine/jvs13551.cpp +++ b/src/mame/machine/jvs13551.cpp @@ -35,7 +35,7 @@ ROM_START( jvs13551 ) ROM_LOAD( "315-6215.bin", 0x0000, 0x8000, CRC(d7c97e40) SHA1(b1ae8db332f869c4fdbbae15967baeca0bc7f57d)) ROM_END -const rom_entry *sega_837_13551::device_rom_region() const +const tiny_rom_entry *sega_837_13551::device_rom_region() const { return ROM_NAME(jvs13551); } diff --git a/src/mame/machine/jvs13551.h b/src/mame/machine/jvs13551.h index 2a84e9b9d24..566ecfa2a63 100644 --- a/src/mame/machine/jvs13551.h +++ b/src/mame/machine/jvs13551.h @@ -29,7 +29,7 @@ public: sega_837_13551(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); static void static_set_port_tag(device_t &device, int port, const char *tag); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; DECLARE_WRITE_LINE_MEMBER(jvs13551_coin_1_w); DECLARE_WRITE_LINE_MEMBER(jvs13551_coin_2_w); diff --git a/src/mame/machine/k573dio.cpp b/src/mame/machine/k573dio.cpp index 672aa2fa209..99194a721c4 100644 --- a/src/mame/machine/k573dio.cpp +++ b/src/mame/machine/k573dio.cpp @@ -131,7 +131,7 @@ ROM_START( k573dio ) ROM_LOAD( "digital-id.bin", 0x000000, 0x000008, CRC(2b977f4d) SHA1(2b108a56653f91cb3351718c45dfcf979bc35ef1) ) ROM_END -const rom_entry *k573dio_device::device_rom_region() const +const tiny_rom_entry *k573dio_device::device_rom_region() const { return ROM_NAME(k573dio); } diff --git a/src/mame/machine/k573dio.h b/src/mame/machine/k573dio.h index 9762536b072..8815b1fccfd 100644 --- a/src/mame/machine/k573dio.h +++ b/src/mame/machine/k573dio.h @@ -66,7 +66,7 @@ public: protected: virtual void device_start() override; virtual void device_reset() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; diff --git a/src/mame/machine/k573mcr.cpp b/src/mame/machine/k573mcr.cpp index a9866370176..1b5842cfab6 100644 --- a/src/mame/machine/k573mcr.cpp +++ b/src/mame/machine/k573mcr.cpp @@ -25,7 +25,7 @@ ROM_START( k573mcr ) ROM_LOAD( "885a01.bin", 0x000000, 0x080000, CRC(e22d093f) SHA1(927f62f63b5caa7899392decacd12fea0e6fdbea) ) ROM_END -const rom_entry *k573mcr_device::device_rom_region() const +const tiny_rom_entry *k573mcr_device::device_rom_region() const { return ROM_NAME( k573mcr ); } diff --git a/src/mame/machine/k573mcr.h b/src/mame/machine/k573mcr.h index 4241bc33f96..23517200cfc 100644 --- a/src/mame/machine/k573mcr.h +++ b/src/mame/machine/k573mcr.h @@ -22,7 +22,7 @@ public: protected: virtual void device_start() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; #endif diff --git a/src/mame/machine/k573msu.cpp b/src/mame/machine/k573msu.cpp index b3c38ab95d9..df494d62bb8 100644 --- a/src/mame/machine/k573msu.cpp +++ b/src/mame/machine/k573msu.cpp @@ -88,7 +88,7 @@ ROM_START( k573msu ) ROM_LOAD( "m48t58y.6t", 0x000000, 0x002000, CRC(609ef020) SHA1(71b87c8b25b9613b4d4511c53d0a3a3aacf1499d) ) ROM_END -const rom_entry *k573msu_device::device_rom_region() const +const tiny_rom_entry *k573msu_device::device_rom_region() const { return ROM_NAME( k573msu ); } diff --git a/src/mame/machine/k573msu.h b/src/mame/machine/k573msu.h index 3d4940039a9..6e584100ece 100644 --- a/src/mame/machine/k573msu.h +++ b/src/mame/machine/k573msu.h @@ -22,7 +22,7 @@ public: protected: virtual void device_start() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; #endif diff --git a/src/mame/machine/k573npu.cpp b/src/mame/machine/k573npu.cpp index f79494d7b56..a935745bc7a 100644 --- a/src/mame/machine/k573npu.cpp +++ b/src/mame/machine/k573npu.cpp @@ -85,7 +85,7 @@ ROM_START( k573npu ) ROM_LOAD( "29f400.24e", 0x000000, 0x080000, CRC(8dcf294b) SHA1(efac79e18db22c30886463ec1bc448187da7a95a) ) ROM_END -const rom_entry *k573npu_device::device_rom_region() const +const tiny_rom_entry *k573npu_device::device_rom_region() const { return ROM_NAME( k573npu ); } diff --git a/src/mame/machine/k573npu.h b/src/mame/machine/k573npu.h index 13c4d598216..7c28760821b 100644 --- a/src/mame/machine/k573npu.h +++ b/src/mame/machine/k573npu.h @@ -22,7 +22,7 @@ public: protected: virtual void device_start() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; #endif diff --git a/src/mame/machine/k7659kb.cpp b/src/mame/machine/k7659kb.cpp index 5b46d8a9814..4201b221213 100644 --- a/src/mame/machine/k7659kb.cpp +++ b/src/mame/machine/k7659kb.cpp @@ -39,7 +39,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *k7659_keyboard_device::device_rom_region() const +const tiny_rom_entry *k7659_keyboard_device::device_rom_region() const { return ROM_NAME( k7659_keyboard ); } diff --git a/src/mame/machine/k7659kb.h b/src/mame/machine/k7659kb.h index c18031b61bf..ecb54acdd22 100644 --- a/src/mame/machine/k7659kb.h +++ b/src/mame/machine/k7659kb.h @@ -46,7 +46,7 @@ public: k7659_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/mame/machine/km035.cpp b/src/mame/machine/km035.cpp index dcef3bfa3b0..a76117940f8 100644 --- a/src/mame/machine/km035.cpp +++ b/src/mame/machine/km035.cpp @@ -81,7 +81,7 @@ machine_config_constructor km035_device::device_mconfig_additions() const return MACHINE_CONFIG_NAME( km035 ); } -const rom_entry *km035_device::device_rom_region() const +const tiny_rom_entry *km035_device::device_rom_region() const { return ROM_NAME( km035 ); } diff --git a/src/mame/machine/km035.h b/src/mame/machine/km035.h index d7ec021926b..c165730936e 100644 --- a/src/mame/machine/km035.h +++ b/src/mame/machine/km035.h @@ -53,7 +53,7 @@ public: protected: // device-level overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; virtual void device_start() override; virtual void device_reset() override; diff --git a/src/mame/machine/lisa.cpp b/src/mame/machine/lisa.cpp index 2e0cf3de51f..94b05e25270 100644 --- a/src/mame/machine/lisa.cpp +++ b/src/mame/machine/lisa.cpp @@ -1221,66 +1221,6 @@ WRITE8_MEMBER(lisa_state::lisa_fdc_io_w) } } -READ8_MEMBER(lisa_state::lisa_fdc_r) -{ - if (! (offset & 0x1000)) - { - if (! (offset & 0x0800)) - if (! (offset & 0x0400)) - return m_fdc_ram[offset & 0x03ff]; - else - return lisa_fdc_io_r(space, offset & 0x03ff); - else - return 0; /* ??? */ - } - else - return m_fdc_rom[offset & 0x0fff]; -} - -READ8_MEMBER(lisa_state::lisa210_fdc_r) -{ - if (! (offset & 0x1000)) - { - if (! (offset & 0x0400)) - if (! (offset & 0x0800)) - return m_fdc_ram[offset & 0x03ff]; - else - return lisa_fdc_io_r(space, offset & 0x03ff); - else - return 0; /* ??? */ - } - else - return m_fdc_rom[offset & 0x0fff]; -} - -WRITE8_MEMBER(lisa_state::lisa_fdc_w) -{ - if (! (offset & 0x1000)) - { - if (! (offset & 0x0800)) - { - if (! (offset & 0x0400)) - m_fdc_ram[offset & 0x03ff] = data; - else - lisa_fdc_io_w(space, offset & 0x03ff, data); - } - } -} - -WRITE8_MEMBER(lisa_state::lisa210_fdc_w) -{ - if (! (offset & 0x1000)) - { - if (! (offset & 0x0400)) - { - if (! (offset & 0x0800)) - m_fdc_ram[offset & 0x03ff] = data; - else - lisa_fdc_io_w(space, offset & 0x03ff, data); - } - } -} - READ16_MEMBER(lisa_state::lisa_r) { int answer=0; diff --git a/src/mame/machine/m1comm.cpp b/src/mame/machine/m1comm.cpp index 8498ec9b4ea..a395c5885cb 100644 --- a/src/mame/machine/m1comm.cpp +++ b/src/mame/machine/m1comm.cpp @@ -77,7 +77,7 @@ static ADDRESS_MAP_START( m1comm_io, AS_IO, 8, m1comm_device ) AM_RANGE(0x20, 0x2F) AM_READWRITE(dma_reg_r, dma_reg_w) AM_RANGE(0x40, 0x40) AM_READWRITE(syn_r, syn_w) AM_RANGE(0x60, 0x60) AM_READWRITE(zfg_r, zfg_w) - AM_RANGE(0xFFFF, 0xFFFF) AM_RAM + AM_RANGE(0xFF, 0xFF) AM_RAM ADDRESS_MAP_END MACHINE_CONFIG_FRAGMENT( m1comm ) @@ -111,7 +111,7 @@ machine_config_constructor m1comm_device::device_mconfig_additions() const // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *m1comm_device::device_rom_region() const +const tiny_rom_entry *m1comm_device::device_rom_region() const { return ROM_NAME( m1comm ); } diff --git a/src/mame/machine/m1comm.h b/src/mame/machine/m1comm.h index 366ad62a455..915e7ee671d 100644 --- a/src/mame/machine/m1comm.h +++ b/src/mame/machine/m1comm.h @@ -63,7 +63,7 @@ protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; private: UINT8 m_shared[0x1000]; // 2x 2k = 4k; model1 accesses this with 16bit data and 11bit address (A0 to A10) diff --git a/src/mame/machine/m20_8086.cpp b/src/mame/machine/m20_8086.cpp index 5c817b17edf..4acbce756c2 100644 --- a/src/mame/machine/m20_8086.cpp +++ b/src/mame/machine/m20_8086.cpp @@ -37,7 +37,7 @@ ROM_START( m20_8086 ) ROM_END -const rom_entry *m20_8086_device::device_rom_region() const +const tiny_rom_entry *m20_8086_device::device_rom_region() const { return ROM_NAME( m20_8086 ); } diff --git a/src/mame/machine/m20_8086.h b/src/mame/machine/m20_8086.h index 1f2cc041d69..125d5fe7ed9 100644 --- a/src/mame/machine/m20_8086.h +++ b/src/mame/machine/m20_8086.h @@ -12,7 +12,7 @@ class m20_8086_device : public device_t public: m20_8086_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_READ16_MEMBER(z8000_io_r); diff --git a/src/mame/machine/m24_kbd.cpp b/src/mame/machine/m24_kbd.cpp index 5cc05a95b16..f98da2dd409 100644 --- a/src/mame/machine/m24_kbd.cpp +++ b/src/mame/machine/m24_kbd.cpp @@ -10,7 +10,7 @@ ROM_START( m24_keyboard ) ROM_END -const rom_entry *m24_keyboard_device::device_rom_region() const +const tiny_rom_entry *m24_keyboard_device::device_rom_region() const { return ROM_NAME( m24_keyboard ); } diff --git a/src/mame/machine/m24_kbd.h b/src/mame/machine/m24_kbd.h index 489d094929e..d9e18434af3 100644 --- a/src/mame/machine/m24_kbd.h +++ b/src/mame/machine/m24_kbd.h @@ -16,7 +16,7 @@ public: template static devcb_base &set_out_data_handler(device_t &device, _Object object) { return downcast(device).m_out_data.set_callback(object); } - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/mame/machine/m24_z8000.cpp b/src/mame/machine/m24_z8000.cpp index 35454177960..29d4001fb8b 100644 --- a/src/mame/machine/m24_z8000.cpp +++ b/src/mame/machine/m24_z8000.cpp @@ -34,7 +34,7 @@ ROM_START( m24_z8000 ) ROM_END -const rom_entry *m24_z8000_device::device_rom_region() const +const tiny_rom_entry *m24_z8000_device::device_rom_region() const { return ROM_NAME( m24_z8000 ); } diff --git a/src/mame/machine/m24_z8000.h b/src/mame/machine/m24_z8000.h index 283bd301ac9..4b265f84f14 100644 --- a/src/mame/machine/m24_z8000.h +++ b/src/mame/machine/m24_z8000.h @@ -17,7 +17,7 @@ class m24_z8000_device : public device_t public: m24_z8000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; template static devcb_base &set_halt_callback(device_t &device, _Object object) { return downcast(device).m_halt_out.set_callback(object); } diff --git a/src/mame/machine/m3comm.cpp b/src/mame/machine/m3comm.cpp index 4671375eea9..bcacd9e2b04 100644 --- a/src/mame/machine/m3comm.cpp +++ b/src/mame/machine/m3comm.cpp @@ -318,10 +318,10 @@ WRITE16_MEMBER(m3comm_device::ioregs_w) send_size = (send_size >> 8) | (data << 8); break; case 0x88 / 2: - m_status0 = (m_status0 & ~mem_mask) | (data & mem_mask); + COMBINE_DATA(&m_status0); break; case 0x8A / 2: - m_status1 = (m_status1 & ~mem_mask) | (data & mem_mask); + COMBINE_DATA(&m_status1); break; case 0xC0 / 2: m_commcpu->set_input_line(INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE); diff --git a/src/mame/machine/mac.cpp b/src/mame/machine/mac.cpp index eb245a52b67..6c50b1df13b 100644 --- a/src/mame/machine/mac.cpp +++ b/src/mame/machine/mac.cpp @@ -538,7 +538,6 @@ int mac_state::scan_keyboard() int i, j; int keybuf = 0; int keycode; - ioport_port *ports[7] = { m_key0, m_key1, m_key2, m_key3, m_key4, m_key5, m_key6 }; if (m_keycode_buf_index) { @@ -547,7 +546,7 @@ int mac_state::scan_keyboard() for (i=0; i<7; i++) { - keybuf = ports[i]->read(); + keybuf = m_keys[i]->read(); if (keybuf != m_key_matrix[i]) { diff --git a/src/mame/machine/macadb.cpp b/src/mame/machine/macadb.cpp index 22f0acabf27..dae12965a75 100644 --- a/src/mame/machine/macadb.cpp +++ b/src/mame/machine/macadb.cpp @@ -78,14 +78,13 @@ static const char *const adb_statenames[4] = { "NEW", "EVEN", "ODD", "IDLE" }; int mac_state::adb_pollkbd(int update) { int i, j, keybuf, report, codes[2], result; - ioport_port *ports[6] = { m_key0, m_key1, m_key2, m_key3, m_key4, m_key5 }; codes[0] = codes[1] = 0xff; // key up report = result = 0; for (i = 0; i < 6; i++) { - keybuf = ports[i]->read(); + keybuf = m_keys[i]->read(); // any changes in this row? if ((keybuf != m_key_matrix[i]) && (report < 2)) diff --git a/src/mame/machine/mackbd.cpp b/src/mame/machine/mackbd.cpp index 7244b16866f..56e55940aa5 100644 --- a/src/mame/machine/mackbd.cpp +++ b/src/mame/machine/mackbd.cpp @@ -191,7 +191,7 @@ machine_config_constructor mackbd_device::device_mconfig_additions() const return MACHINE_CONFIG_NAME( mackbd ); } -const rom_entry *mackbd_device::device_rom_region() const +const tiny_rom_entry *mackbd_device::device_rom_region() const { return ROM_NAME( mackbd ); } diff --git a/src/mame/machine/mackbd.h b/src/mame/machine/mackbd.h index 946d549c0cb..338dabff258 100644 --- a/src/mame/machine/mackbd.h +++ b/src/mame/machine/mackbd.h @@ -59,7 +59,7 @@ protected: virtual void device_start() override; virtual void device_reset() override; virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; required_device m_maincpu; diff --git a/src/mame/machine/megadriv.cpp b/src/mame/machine/megadriv.cpp index 2c0707d5587..17a20fde8cc 100644 --- a/src/mame/machine/megadriv.cpp +++ b/src/mame/machine/megadriv.cpp @@ -1066,7 +1066,7 @@ DRIVER_INIT_MEMBER(md_base_state, megadrie) void md_base_state::screen_eof_megadriv(screen_device &screen, bool state) { - if (m_io_reset && m_io_reset->read() & 0x01) + if (m_io_reset.read_safe(0) & 0x01) m_maincpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE); // rising edge diff --git a/src/mame/machine/micro3d.cpp b/src/mame/machine/micro3d.cpp index 7ebf9c58e07..5b0ac44f06f 100644 --- a/src/mame/machine/micro3d.cpp +++ b/src/mame/machine/micro3d.cpp @@ -467,16 +467,16 @@ WRITE32_MEMBER(micro3d_state::micro3d_mac2_w) READ16_MEMBER(micro3d_state::micro3d_encoder_h_r) { - UINT16 x_encoder = m_joystick_x ? m_joystick_x->read() : 0; - UINT16 y_encoder = m_joystick_y ? m_joystick_y->read() : 0; + UINT16 x_encoder = m_joystick_x.read_safe(0); + UINT16 y_encoder = m_joystick_y.read_safe(0); return (y_encoder & 0xf00) | ((x_encoder & 0xf00) >> 8); } READ16_MEMBER(micro3d_state::micro3d_encoder_l_r) { - UINT16 x_encoder = m_joystick_x ? m_joystick_x->read() : 0; - UINT16 y_encoder = m_joystick_y ? m_joystick_y->read() : 0; + UINT16 x_encoder = m_joystick_x.read_safe(0); + UINT16 y_encoder = m_joystick_y.read_safe(0); return ((y_encoder & 0xff) << 8) | (x_encoder & 0xff); } @@ -485,7 +485,7 @@ TIMER_CALLBACK_MEMBER(micro3d_state::adc_done_callback) { switch (param) { - case 0: m_adc_val = m_throttle ? m_throttle->read() : 0; + case 0: m_adc_val = m_throttle.read_safe(0); break; case 1: m_adc_val = (UINT8)((255.0/100.0) * m_volume->read() + 0.5); break; diff --git a/src/mame/machine/microdrv.h b/src/mame/machine/microdrv.h index 5e1547b9dc5..e7d98d8e838 100644 --- a/src/mame/machine/microdrv.h +++ b/src/mame/machine/microdrv.h @@ -13,6 +13,7 @@ #ifndef __MICRODRV__ #define __MICRODRV__ +#include "softlist_dev.h" //************************************************************************** diff --git a/src/mame/machine/mie.cpp b/src/mame/machine/mie.cpp index 55bac6f038f..c0c95483e77 100644 --- a/src/mame/machine/mie.cpp +++ b/src/mame/machine/mie.cpp @@ -77,7 +77,7 @@ void mie_device::static_set_jvs_name(device_t &device, const char *name) mie.jvs_name = name; } -const rom_entry *mie_device::device_rom_region() const +const tiny_rom_entry *mie_device::device_rom_region() const { return ROM_NAME(mie); } diff --git a/src/mame/machine/mie.h b/src/mame/machine/mie.h index fa50c4d5756..f03e20be65d 100644 --- a/src/mame/machine/mie.h +++ b/src/mame/machine/mie.h @@ -34,7 +34,7 @@ public: static void static_set_jvs_name(device_t &device, const char *name); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; DECLARE_READ8_MEMBER(control_r); diff --git a/src/mame/machine/mm1kb.cpp b/src/mame/machine/mm1kb.cpp index 88faf286961..e4d88bb8587 100644 --- a/src/mame/machine/mm1kb.cpp +++ b/src/mame/machine/mm1kb.cpp @@ -31,7 +31,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *mm1_keyboard_t::device_rom_region() const +const tiny_rom_entry *mm1_keyboard_t::device_rom_region() const { return ROM_NAME( mm1_keyboard ); } diff --git a/src/mame/machine/mm1kb.h b/src/mame/machine/mm1kb.h index 594608696b3..cd9acc98d11 100644 --- a/src/mame/machine/mm1kb.h +++ b/src/mame/machine/mm1kb.h @@ -40,7 +40,7 @@ public: template static devcb_base &set_kbst_wr_callback(device_t &device, _Object object) { return downcast(device).m_write_kbst.set_callback(object); } // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/mame/machine/ms7004.cpp b/src/mame/machine/ms7004.cpp index 5de44785bc3..1e5cca40e0a 100644 --- a/src/mame/machine/ms7004.cpp +++ b/src/mame/machine/ms7004.cpp @@ -79,7 +79,7 @@ machine_config_constructor ms7004_device::device_mconfig_additions() const return MACHINE_CONFIG_NAME( ms7004 ); } -const rom_entry *ms7004_device::device_rom_region() const +const tiny_rom_entry *ms7004_device::device_rom_region() const { return ROM_NAME( ms7004 ); } @@ -316,8 +316,8 @@ INPUT_PORTS_START( ms7004 ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Num 0") PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) PORT_START("KBD0") // vertical row 15 - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F17") //PORT_CODE(KEYCODE_F17) PORT_CHAR(UCHAR_MAMEKEY(F17)) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F18") //PORT_CODE(KEYCODE_F18) PORT_CHAR(UCHAR_MAMEKEY(F18)) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F17") PORT_CODE(KEYCODE_F17) PORT_CHAR(UCHAR_MAMEKEY(F17)) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F18") PORT_CODE(KEYCODE_F18) PORT_CHAR(UCHAR_MAMEKEY(F18)) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PF2") PORT_CODE(KEYCODE_SLASH_PAD) PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD)) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PF3") PORT_CODE(KEYCODE_ASTERISK) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Num 8") PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) @@ -326,8 +326,8 @@ INPUT_PORTS_START( ms7004 ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Num 3") PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) PORT_START("KBD4") // vertical row 16 - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F19") //PORT_CODE(KEYCODE_F19) PORT_CHAR(UCHAR_MAMEKEY(F19)) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F20") //PORT_CODE(KEYCODE_F20) PORT_CHAR(UCHAR_MAMEKEY(F20)) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F19") PORT_CODE(KEYCODE_F19) PORT_CHAR(UCHAR_MAMEKEY(F19)) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F20") PORT_CODE(KEYCODE_F20) PORT_CHAR(UCHAR_MAMEKEY(F20)) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PF4") PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD)) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Num 9") PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Num ,") PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD)) @@ -375,7 +375,8 @@ ms7004_device::ms7004_device(const machine_config &mconfig, const char *tag, dev m_kbd13(*this, "KBD13"), m_kbd14(*this, "KBD14"), m_kbd15(*this, "KBD15"), - m_tx_handler(*this) + m_tx_handler(*this), + m_rts_handler(*this) { } @@ -386,6 +387,7 @@ ms7004_device::ms7004_device(const machine_config &mconfig, const char *tag, dev void ms7004_device::device_start() { m_tx_handler.resolve_safe(); + m_rts_handler.resolve_safe(); } @@ -395,9 +397,15 @@ void ms7004_device::device_start() void ms7004_device::device_reset() { + m_rts_handler(0); } +WRITE_LINE_MEMBER( ms7004_device::write_rxd ) +{ + DBG_LOG(1,0,("write_rxd %d\n", state)); +} + //------------------------------------------------- // p1_w - //------------------------------------------------- @@ -441,7 +449,7 @@ WRITE8_MEMBER( ms7004_device::p2_w ) 6 LED "Caps" 7 LED "Hold" */ - DBG_LOG(2,0,( "%s: p2_w %02x = col %d\n", tag(), data, data&15)); + DBG_LOG(2,0,( "p2_w %02x = col %d\n", data, data&15)); m_p2 = data; m_i8243->i8243_p2_w(space, offset, data); @@ -456,8 +464,8 @@ WRITE8_MEMBER( ms7004_device::i8243_port_w ) { int sense = 0; - DBG_LOG(2,0,( "%s: 8243 port %d data %02xH\n", - tag(), offset + 4, data)); + DBG_LOG(2,0,( "8243 port %d data %02xH\n", + offset + 4, data)); if (data) { switch(offset << 4 | data) { @@ -480,8 +488,8 @@ WRITE8_MEMBER( ms7004_device::i8243_port_w ) } m_keylatch = BIT(sense, (m_p1 & 7)); if (m_keylatch) - DBG_LOG(1,0,( "%s: row %d col %02x t1 %d\n", - tag(), (m_p1 & 7), (offset << 4 | data), m_keylatch)); + DBG_LOG(1,0,( "row %d col %02x t1 %d\n", + (m_p1 & 7), (offset << 4 | data), m_keylatch)); } } diff --git a/src/mame/machine/ms7004.h b/src/mame/machine/ms7004.h index 1ceca1b46b6..ef9e9608d25 100644 --- a/src/mame/machine/ms7004.h +++ b/src/mame/machine/ms7004.h @@ -22,6 +22,9 @@ #define MCFG_MS7004_TX_HANDLER(_cb) \ devcb = &ms7004_device::set_tx_handler(*device, DEVCB_##_cb); +#define MCFG_MS7004_RTS_HANDLER(_cb) \ + devcb = &ms7004_device::set_rts_handler(*device, DEVCB_##_cb); + //************************************************************************** // TYPE DEFINITIONS @@ -36,16 +39,19 @@ public: ms7004_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); template static devcb_base &set_tx_handler(device_t &device, _Object wr) { return downcast(device).m_tx_handler.set_callback(wr); } + template static devcb_base &set_rts_handler(device_t &device, _Object wr) { return downcast(device).m_rts_handler.set_callback(wr); } DECLARE_WRITE8_MEMBER( p1_w ); DECLARE_WRITE8_MEMBER( p2_w ); DECLARE_READ8_MEMBER( t1_r ); DECLARE_WRITE8_MEMBER( i8243_port_w ); + DECLARE_WRITE_LINE_MEMBER( write_rxd ); + protected: // device-level overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; virtual void device_start() override; virtual void device_reset() override; @@ -77,6 +83,7 @@ private: UINT8 m_p2; devcb_write_line m_tx_handler; + devcb_write_line m_rts_handler; }; // device type definition diff --git a/src/mame/machine/msx.cpp b/src/mame/machine/msx.cpp index f94d8541665..0936a2b94f4 100644 --- a/src/mame/machine/msx.cpp +++ b/src/mame/machine/msx.cpp @@ -361,12 +361,11 @@ READ8_MEMBER( msx_state::msx_ppi_port_b_r ) { UINT8 result = 0xff; int row, data; - ioport_port *keynames[] = { m_io_key0, m_io_key1, m_io_key2, m_io_key3, m_io_key4, m_io_key5 }; row = m_keylatch; if (row <= 10) { - data = keynames[row / 2]->read(); + data = m_io_key[row / 2]->read(); if (BIT(row, 0)) data >>= 8; diff --git a/src/mame/machine/n64.cpp b/src/mame/machine/n64.cpp index df66c953d9b..3feebf44431 100644 --- a/src/mame/machine/n64.cpp +++ b/src/mame/machine/n64.cpp @@ -2682,19 +2682,19 @@ READ32_MEMBER( n64_periphs::pif_ram_r ) WRITE32_MEMBER( n64_periphs::pif_ram_w ) { - if( mem_mask & 0xff000000 ) + if( ACCESSING_BITS_24_31 ) { pif_ram[offset*4+0] = ( data >> 24 ) & 0x000000ff; } - if( mem_mask & 0x00ff0000 ) + if( ACCESSING_BITS_16_23 ) { pif_ram[offset*4+1] = ( data >> 16 ) & 0x000000ff; } - if( mem_mask & 0x0000ff00 ) + if( ACCESSING_BITS_8_15 ) { pif_ram[offset*4+2] = ( data >> 8 ) & 0x000000ff; } - if( mem_mask & 0x000000ff ) + if( ACCESSING_BITS_0_7 ) { pif_ram[offset*4+3] = ( data >> 0 ) & 0x000000ff; } diff --git a/src/mame/machine/namco50.cpp b/src/mame/machine/namco50.cpp index 8967806295a..21b592fa99c 100644 --- a/src/mame/machine/namco50.cpp +++ b/src/mame/machine/namco50.cpp @@ -275,7 +275,7 @@ machine_config_constructor namco_50xx_device::device_mconfig_additions() const // the device's ROM definitions //------------------------------------------------- -const rom_entry *namco_50xx_device::device_rom_region() const +const tiny_rom_entry *namco_50xx_device::device_rom_region() const { return ROM_NAME(namco_50xx ); } diff --git a/src/mame/machine/namco50.h b/src/mame/machine/namco50.h index 320e785fafa..dcf41eab22b 100644 --- a/src/mame/machine/namco50.h +++ b/src/mame/machine/namco50.h @@ -27,7 +27,7 @@ public: protected: // device-level overrides virtual void device_start() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; TIMER_CALLBACK_MEMBER( latch_callback ); diff --git a/src/mame/machine/namco51.cpp b/src/mame/machine/namco51.cpp index 2cd77ab69b5..8cfe739ad70 100644 --- a/src/mame/machine/namco51.cpp +++ b/src/mame/machine/namco51.cpp @@ -419,7 +419,7 @@ machine_config_constructor namco_51xx_device::device_mconfig_additions() const // the device's ROM definitions //------------------------------------------------- -const rom_entry *namco_51xx_device::device_rom_region() const +const tiny_rom_entry *namco_51xx_device::device_rom_region() const { return ROM_NAME(namco_51xx ); } diff --git a/src/mame/machine/namco51.h b/src/mame/machine/namco51.h index 22c7e4e2cdc..2b46b3b8392 100644 --- a/src/mame/machine/namco51.h +++ b/src/mame/machine/namco51.h @@ -47,7 +47,7 @@ protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; private: // internal state diff --git a/src/mame/machine/namco53.cpp b/src/mame/machine/namco53.cpp index e5e809ec465..e94b9a867ec 100644 --- a/src/mame/machine/namco53.cpp +++ b/src/mame/machine/namco53.cpp @@ -189,7 +189,7 @@ machine_config_constructor namco_53xx_device::device_mconfig_additions() const // the device's ROM definitions //------------------------------------------------- -const rom_entry *namco_53xx_device::device_rom_region() const +const tiny_rom_entry *namco_53xx_device::device_rom_region() const { return ROM_NAME(namco_53xx ); } diff --git a/src/mame/machine/namco53.h b/src/mame/machine/namco53.h index 66b60c8c80f..d74d335a6ed 100644 --- a/src/mame/machine/namco53.h +++ b/src/mame/machine/namco53.h @@ -51,7 +51,7 @@ public: protected: // device-level overrides virtual void device_start() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; TIMER_CALLBACK_MEMBER( irq_clear ); diff --git a/src/mame/machine/namco62.cpp b/src/mame/machine/namco62.cpp index de6e6067972..99a7f647ef8 100644 --- a/src/mame/machine/namco62.cpp +++ b/src/mame/machine/namco62.cpp @@ -88,7 +88,7 @@ machine_config_constructor namco_62xx_device::device_mconfig_additions() const // the device's ROM definitions //------------------------------------------------- -const rom_entry *namco_62xx_device::device_rom_region() const +const tiny_rom_entry *namco_62xx_device::device_rom_region() const { return ROM_NAME(namco_62xx ); } diff --git a/src/mame/machine/namco62.h b/src/mame/machine/namco62.h index 323c751c789..196866683c2 100644 --- a/src/mame/machine/namco62.h +++ b/src/mame/machine/namco62.h @@ -42,7 +42,7 @@ public: protected: // device-level overrides virtual void device_start() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; private: diff --git a/src/mame/machine/namcomcu.cpp b/src/mame/machine/namcomcu.cpp index 82495680f51..803e1e53b58 100644 --- a/src/mame/machine/namcomcu.cpp +++ b/src/mame/machine/namcomcu.cpp @@ -78,27 +78,27 @@ namco_c76_device::namco_c76_device(const machine_config &mconfig, const char *ta { } -const rom_entry *namco_c69_device::device_rom_region() const +const tiny_rom_entry *namco_c69_device::device_rom_region() const { return ROM_NAME(c69); } -const rom_entry *namco_c70_device::device_rom_region() const +const tiny_rom_entry *namco_c70_device::device_rom_region() const { return ROM_NAME(c70); } -const rom_entry *namco_c74_device::device_rom_region() const +const tiny_rom_entry *namco_c74_device::device_rom_region() const { return ROM_NAME(c74); } -const rom_entry *namco_c75_device::device_rom_region() const +const tiny_rom_entry *namco_c75_device::device_rom_region() const { return ROM_NAME(c75); } -const rom_entry *namco_c76_device::device_rom_region() const +const tiny_rom_entry *namco_c76_device::device_rom_region() const { return ROM_NAME(c76); } diff --git a/src/mame/machine/namcomcu.h b/src/mame/machine/namcomcu.h index e4daf70a020..be4c4ab088e 100644 --- a/src/mame/machine/namcomcu.h +++ b/src/mame/machine/namcomcu.h @@ -13,7 +13,7 @@ class namco_c69_device : public m37702m2_device public: namco_c69_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); protected: - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -22,7 +22,7 @@ class namco_c70_device : public m37702m2_device public: namco_c70_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); protected: - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -31,7 +31,7 @@ class namco_c74_device : public m37702m2_device public: namco_c74_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); protected: - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -40,7 +40,7 @@ class namco_c75_device : public m37702m2_device public: namco_c75_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); protected: - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -49,7 +49,7 @@ class namco_c76_device : public m37702m2_device public: namco_c76_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); protected: - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; }; diff --git a/src/mame/machine/naomi.cpp b/src/mame/machine/naomi.cpp index b91c3889839..a95a6302306 100644 --- a/src/mame/machine/naomi.cpp +++ b/src/mame/machine/naomi.cpp @@ -228,7 +228,11 @@ CUSTOM_INPUT_MEMBER(naomi_state::naomi_mp_r) for (int i = 0x80; i >= 0x08; i >>= 1) { if (m_mp_mux & i) - retval |= read_safe(ioport(tagptr), 0); + { + ioport_port *port = ioport(tagptr); + if (port != nullptr) + retval |= port->read(); + } tagptr += strlen(tagptr) + 1; } return retval; diff --git a/src/mame/machine/nmk004.cpp b/src/mame/machine/nmk004.cpp index 18526bd6723..3ff6d37c69f 100644 --- a/src/mame/machine/nmk004.cpp +++ b/src/mame/machine/nmk004.cpp @@ -124,7 +124,7 @@ machine_config_constructor nmk004_device::device_mconfig_additions() const // device_rom_region - return a pointer to the // the device's ROM definitions //------------------------------------------------- -const rom_entry *nmk004_device::device_rom_region() const +const tiny_rom_entry *nmk004_device::device_rom_region() const { return ROM_NAME(nmk004 ); } diff --git a/src/mame/machine/nmk004.h b/src/mame/machine/nmk004.h index e10866db2fd..d0cbc0e7319 100644 --- a/src/mame/machine/nmk004.h +++ b/src/mame/machine/nmk004.h @@ -37,7 +37,7 @@ public: protected: // device-level overrides virtual void device_start() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; diff --git a/src/mame/machine/pc1512kb.cpp b/src/mame/machine/pc1512kb.cpp index 262d253d31b..494c15bcd77 100644 --- a/src/mame/machine/pc1512kb.cpp +++ b/src/mame/machine/pc1512kb.cpp @@ -39,7 +39,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *pc1512_keyboard_device::device_rom_region() const +const tiny_rom_entry *pc1512_keyboard_device::device_rom_region() const { return ROM_NAME( pc1512_keyboard ); } diff --git a/src/mame/machine/pc1512kb.h b/src/mame/machine/pc1512kb.h index d27d4b200e0..69243e87953 100644 --- a/src/mame/machine/pc1512kb.h +++ b/src/mame/machine/pc1512kb.h @@ -53,7 +53,7 @@ public: template static devcb_base &set_data_wr_callback(device_t &device, _Object object) { return downcast(device).m_write_data.set_callback(object); } // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/mame/machine/pc9801_118.cpp b/src/mame/machine/pc9801_118.cpp index adac1a4ea0b..c5cf627e423 100644 --- a/src/mame/machine/pc9801_118.cpp +++ b/src/mame/machine/pc9801_118.cpp @@ -104,7 +104,7 @@ ROM_START( pc9801_118 ) ROM_REGION( 0x100000, "opn3", ROMREGION_ERASE00 ) ROM_END -const rom_entry *pc9801_118_device::device_rom_region() const +const tiny_rom_entry *pc9801_118_device::device_rom_region() const { return ROM_NAME( pc9801_118 ); } diff --git a/src/mame/machine/pc9801_118.h b/src/mame/machine/pc9801_118.h index fb009163cf0..40575a839f7 100644 --- a/src/mame/machine/pc9801_118.h +++ b/src/mame/machine/pc9801_118.h @@ -42,7 +42,7 @@ public: // required_device m_maincpu; required_device m_opn3; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides virtual void device_validity_check(validity_checker &valid) const override; diff --git a/src/mame/machine/pc9801_86.cpp b/src/mame/machine/pc9801_86.cpp index 8dd0af5a1cf..b0580a67c70 100644 --- a/src/mame/machine/pc9801_86.cpp +++ b/src/mame/machine/pc9801_86.cpp @@ -77,7 +77,7 @@ ROM_START( pc9801_86 ) ROM_REGION( 0x100000, "opna", ROMREGION_ERASE00 ) ROM_END -const rom_entry *pc9801_86_device::device_rom_region() const +const tiny_rom_entry *pc9801_86_device::device_rom_region() const { return ROM_NAME( pc9801_86 ); } diff --git a/src/mame/machine/pc9801_86.h b/src/mame/machine/pc9801_86.h index 36e109e2eee..9597760b85e 100644 --- a/src/mame/machine/pc9801_86.h +++ b/src/mame/machine/pc9801_86.h @@ -41,7 +41,7 @@ public: DECLARE_READ8_MEMBER(pcm_r); DECLARE_WRITE8_MEMBER(pcm_w); DECLARE_WRITE_LINE_MEMBER(sound_irq); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; protected: // device-level overrides virtual void device_validity_check(validity_checker &valid) const override; diff --git a/src/mame/machine/pcd_kbd.cpp b/src/mame/machine/pcd_kbd.cpp index 4c1aa9f0ea5..25c7eabb981 100644 --- a/src/mame/machine/pcd_kbd.cpp +++ b/src/mame/machine/pcd_kbd.cpp @@ -12,7 +12,7 @@ ROM_START( pcd_keyboard ) ROM_END -const rom_entry *pcd_keyboard_device::device_rom_region() const +const tiny_rom_entry *pcd_keyboard_device::device_rom_region() const { return ROM_NAME( pcd_keyboard ); } diff --git a/src/mame/machine/pcd_kbd.h b/src/mame/machine/pcd_kbd.h index 921abdb2454..833f83fec64 100644 --- a/src/mame/machine/pcd_kbd.h +++ b/src/mame/machine/pcd_kbd.h @@ -17,7 +17,7 @@ public: template static devcb_base &set_out_tx_handler(device_t &device, _Object object) { return downcast(device).m_out_tx_handler.set_callback(object); } - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/mame/machine/psion_pack.h b/src/mame/machine/psion_pack.h index 1c0cd8189d8..f0358844e93 100644 --- a/src/mame/machine/psion_pack.h +++ b/src/mame/machine/psion_pack.h @@ -9,6 +9,8 @@ #ifndef __PSION_PACK_H__ #define __PSION_PACK_H__ +#include "softlist_dev.h" + /*************************************************************************** TYPE DEFINITIONS diff --git a/src/mame/machine/psxcd.cpp b/src/mame/machine/psxcd.cpp index 320c5624c31..dd653525dfa 100644 --- a/src/mame/machine/psxcd.cpp +++ b/src/mame/machine/psxcd.cpp @@ -1322,7 +1322,7 @@ ROM_START( psxcd ) ROMX_LOAD( "sc430920.s19", 0x0000, 0xb195, CRC(8380a5a2) SHA1(6fe45fd6fb96b12a25a45f39b5efd0be5e3f3e86), ROM_BIOS(16) ) ROM_END -const rom_entry *psxcd_device::device_rom_region() const +const tiny_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 1c6c57d0295..4049cdf1d3a 100644 --- a/src/mame/machine/psxcd.h +++ b/src/mame/machine/psxcd.h @@ -37,7 +37,7 @@ protected: virtual void device_stop() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; private: void write_command(UINT8 byte); diff --git a/src/mame/machine/segas32.cpp b/src/mame/machine/segas32.cpp index da3efbbafb6..f2124c8c996 100644 --- a/src/mame/machine/segas32.cpp +++ b/src/mame/machine/segas32.cpp @@ -104,7 +104,7 @@ WRITE16_MEMBER(segas32_state::sonic_level_load_protection) { UINT16 level; //Perform write - m_system32_workram[CLEARED_LEVELS / 2] = (data & mem_mask) | (m_system32_workram[CLEARED_LEVELS / 2] & ~mem_mask); + COMBINE_DATA(&m_system32_workram[CLEARED_LEVELS / 2]); //Refresh current level if (m_system32_workram[CLEARED_LEVELS / 2] == 0) diff --git a/src/mame/machine/sms.cpp b/src/mame/machine/sms.cpp index 9b25b4017f4..094a8aaa721 100644 --- a/src/mame/machine/sms.cpp +++ b/src/mame/machine/sms.cpp @@ -252,7 +252,7 @@ WRITE_LINE_MEMBER(sms_state::sms_pause_callback) WRITE_LINE_MEMBER(sms_state::sms_csync_callback) { - if ( m_port_rapid ) + if (m_port_rapid.found()) { UINT8 rapid_previous_mode = m_rapid_mode; @@ -345,7 +345,7 @@ READ8_MEMBER(sms_state::sms_input_port_dc_r) m_port_dc_reg &= ~0x20 | ((m_io_ctrl_reg & 0x10) << 1); } - if ( m_port_rapid ) + if (m_port_rapid.found()) { // Check if Rapid Fire is enabled for Button 1 if (m_rapid_mode & 0x01) @@ -391,7 +391,7 @@ READ8_MEMBER(sms_state::sms_input_port_dd_r) } // Reset Button - if ( m_port_reset ) + if (m_port_reset.found()) { m_port_dd_reg &= ~0x10 | (m_port_reset->read() & 0x01) << 4; } @@ -440,7 +440,7 @@ READ8_MEMBER(sms_state::sms_input_port_dd_r) } } - if ( m_port_rapid ) + if (m_port_rapid.found()) { // Check if Rapid Fire is enabled for Button 1 if (m_rapid_mode & 0x04) @@ -1054,7 +1054,7 @@ MACHINE_START_MEMBER(sms_state,sms) save_item(NAME(m_smsj_audio_control)); } - if (m_port_rapid) + if (m_port_rapid.found()) { save_item(NAME(m_csync_counter)); save_item(NAME(m_rapid_mode)); @@ -1111,7 +1111,7 @@ MACHINE_RESET_MEMBER(sms_state,sms) m_smsj_audio_control = 0x00; } - if (m_port_rapid) + if (m_port_rapid.found()) { m_csync_counter = 0; m_rapid_mode = 0x00; diff --git a/src/mame/machine/stfight.cpp b/src/mame/machine/stfight.cpp index 2ffe2d57a95..0f88a0801ec 100644 --- a/src/mame/machine/stfight.cpp +++ b/src/mame/machine/stfight.cpp @@ -82,7 +82,6 @@ void stfight_state::machine_start() save_item(NAME(m_adpcm_nibble)); save_item(NAME(m_adpcm_reset)); save_item(NAME(m_coin_state)); - save_item(NAME(m_sprite_base)); save_item(NAME(m_portA_out)); save_item(NAME(m_portA_in)); save_item(NAME(m_portB_out)); @@ -94,6 +93,7 @@ void stfight_state::machine_start() save_item(NAME(m_ddrC)); } + void stfight_state::machine_reset() { m_fm_data = 0; diff --git a/src/mame/machine/stvprot.cpp b/src/mame/machine/stvprot.cpp index d71f6219a04..26d48e8dfd8 100644 --- a/src/mame/machine/stvprot.cpp +++ b/src/mame/machine/stvprot.cpp @@ -70,8 +70,8 @@ WRITE32_MEMBER ( stv_state::common_prot_w ) } else if(offset == 2) { - if (mem_mask&0xffff0000) m_cryptdevice->set_addr_low(data >> 16); - if (mem_mask&0x0000ffff) m_cryptdevice->set_addr_high(data&0xffff); + if (ACCESSING_BITS_16_31) m_cryptdevice->set_addr_low(data >> 16); + if (ACCESSING_BITS_0_15) m_cryptdevice->set_addr_high(data&0xffff); } else if(offset == 3) diff --git a/src/mame/machine/tandy2kb.cpp b/src/mame/machine/tandy2kb.cpp index 6e0b08351e7..a57374b80f5 100644 --- a/src/mame/machine/tandy2kb.cpp +++ b/src/mame/machine/tandy2kb.cpp @@ -40,7 +40,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *tandy2k_keyboard_device::device_rom_region() const +const tiny_rom_entry *tandy2k_keyboard_device::device_rom_region() const { return ROM_NAME( tandy2k_keyboard ); } diff --git a/src/mame/machine/tandy2kb.h b/src/mame/machine/tandy2kb.h index aa27aa3b782..ed9c354cba5 100644 --- a/src/mame/machine/tandy2kb.h +++ b/src/mame/machine/tandy2kb.h @@ -52,7 +52,7 @@ public: template static devcb_base &set_data_wr_callback(device_t &device, _Object object) { return downcast(device).m_write_data.set_callback(object); } // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/mame/machine/tnzs.cpp b/src/mame/machine/tnzs.cpp index 175d20568c0..e3892a657b4 100644 --- a/src/mame/machine/tnzs.cpp +++ b/src/mame/machine/tnzs.cpp @@ -84,8 +84,7 @@ READ8_MEMBER(tnzs_state::arknoid2_sh_f000_r) { // logerror("PC %04x: read input %04x\n", space.device().safe_pc(), 0xf000 + offset); - ioport_port *port = (offset / 2) ? m_an2 : m_an1; - int val = port ? port->read() : 0; + int val = ((offset / 2) ? m_an2 : m_an1).read_safe(0); if (offset & 1) return ((val >> 8) & 0xff); diff --git a/src/mame/machine/trs80m2kb.cpp b/src/mame/machine/trs80m2kb.cpp index d098a56ae88..d007f4f49fa 100644 --- a/src/mame/machine/trs80m2kb.cpp +++ b/src/mame/machine/trs80m2kb.cpp @@ -40,7 +40,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *trs80m2_keyboard_device::device_rom_region() const +const tiny_rom_entry *trs80m2_keyboard_device::device_rom_region() const { return ROM_NAME( trs80m2_keyboard ); } diff --git a/src/mame/machine/trs80m2kb.h b/src/mame/machine/trs80m2kb.h index 72a815bcbf4..d5bb62c337f 100644 --- a/src/mame/machine/trs80m2kb.h +++ b/src/mame/machine/trs80m2kb.h @@ -49,7 +49,7 @@ public: template static devcb_base &set_clock_wr_callback(device_t &device, _Object object) { return downcast(device).m_write_clock.set_callback(object); } // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/mame/machine/v1050kb.cpp b/src/mame/machine/v1050kb.cpp index d1f06bcdf30..3c5259d7f0e 100644 --- a/src/mame/machine/v1050kb.cpp +++ b/src/mame/machine/v1050kb.cpp @@ -41,7 +41,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *v1050_keyboard_device::device_rom_region() const +const tiny_rom_entry *v1050_keyboard_device::device_rom_region() const { return ROM_NAME( v1050_keyboard ); } diff --git a/src/mame/machine/v1050kb.h b/src/mame/machine/v1050kb.h index dd646c40b04..50c02cc630e 100644 --- a/src/mame/machine/v1050kb.h +++ b/src/mame/machine/v1050kb.h @@ -41,7 +41,7 @@ public: template static devcb_base &set_out_tx_handler(device_t &device, _Object object) { return downcast(device).m_out_tx_handler.set_callback(object); } // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/mame/machine/vectrex.cpp b/src/mame/machine/vectrex.cpp index c2f909fd4a3..9a9cdaf66b9 100644 --- a/src/mame/machine/vectrex.cpp +++ b/src/mame/machine/vectrex.cpp @@ -183,10 +183,7 @@ WRITE_LINE_MEMBER(vectrex_state::vectrex_via_irq) READ8_MEMBER(vectrex_state::vectrex_via_pb_r) { - int pot; - ioport_port *io_port[4] = { m_io_contr1x, m_io_contr1y, m_io_contr2x, m_io_contr2y }; - - pot = io_port[(m_via_out[PORTB] & 0x6) >> 1]->read() - 0x80; + int pot = m_io_contr[(m_via_out[PORTB] & 0x6) >> 1]->read() - 0x80; if (pot > (signed char)m_via_out[PORTA]) m_via_out[PORTB] |= 0x20; diff --git a/src/mame/machine/victor9k_fdc.cpp b/src/mame/machine/victor9k_fdc.cpp index 19f989890fa..157df8edc7c 100644 --- a/src/mame/machine/victor9k_fdc.cpp +++ b/src/mame/machine/victor9k_fdc.cpp @@ -101,7 +101,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *victor_9000_fdc_t::device_rom_region() const +const tiny_rom_entry *victor_9000_fdc_t::device_rom_region() const { return ROM_NAME( victor_9000_fdc ); } diff --git a/src/mame/machine/victor9k_fdc.h b/src/mame/machine/victor9k_fdc.h index b3613af3bb8..d40d3a7a877 100644 --- a/src/mame/machine/victor9k_fdc.h +++ b/src/mame/machine/victor9k_fdc.h @@ -94,7 +94,7 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; private: diff --git a/src/mame/machine/victor9kb.cpp b/src/mame/machine/victor9kb.cpp index b2d77129919..ec0eaa4229e 100644 --- a/src/mame/machine/victor9kb.cpp +++ b/src/mame/machine/victor9kb.cpp @@ -369,7 +369,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *victor_9000_keyboard_t::device_rom_region() const +const tiny_rom_entry *victor_9000_keyboard_t::device_rom_region() const { return ROM_NAME( victor9k_keyboard ); } diff --git a/src/mame/machine/victor9kb.h b/src/mame/machine/victor9kb.h index 47511113fe7..8d1570fb776 100644 --- a/src/mame/machine/victor9kb.h +++ b/src/mame/machine/victor9kb.h @@ -44,7 +44,7 @@ public: template static devcb_base &set_kbdata_cb(device_t &device, _Object object) { return downcast(device).m_kbdata_cb.set_callback(object); } // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/mame/machine/wangpckb.cpp b/src/mame/machine/wangpckb.cpp index d31877824f7..bd636b2eadd 100644 --- a/src/mame/machine/wangpckb.cpp +++ b/src/mame/machine/wangpckb.cpp @@ -68,7 +68,7 @@ Notes: // DEVICE DEFINITIONS //************************************************************************** -const device_type WANGPC_KEYBOARD = &device_creator; +const device_type WANGPC_KEYBOARD = &device_creator; @@ -86,7 +86,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *wangpc_keyboard_device::device_rom_region() const +const tiny_rom_entry *wangpc_keyboard_t::device_rom_region() const { return ROM_NAME( wangpc_keyboard ); } @@ -96,7 +96,7 @@ const rom_entry *wangpc_keyboard_device::device_rom_region() const // ADDRESS_MAP( wangpc_keyboard_io ) //------------------------------------------------- -static ADDRESS_MAP_START( wangpc_keyboard_io, AS_IO, 8, wangpc_keyboard_device ) +static ADDRESS_MAP_START( wangpc_keyboard_io, AS_IO, 8, wangpc_keyboard_t ) //AM_RANGE(0x0000, 0xfeff) AM_READNOP AM_RANGE(0x47, 0x58) AM_MIRROR(0xff00) AM_READNOP AM_RANGE(0x00, 0x00) AM_MIRROR(0xff00) AM_DEVWRITE(SN76496_TAG, sn76496_device, write) @@ -113,8 +113,8 @@ ADDRESS_MAP_END static MACHINE_CONFIG_FRAGMENT( wangpc_keyboard ) MCFG_CPU_ADD(I8051_TAG, I8051, XTAL_4MHz) MCFG_CPU_IO_MAP(wangpc_keyboard_io) - MCFG_MCS51_SERIAL_TX_CB(WRITE8(wangpc_keyboard_device, mcs51_tx_callback)) - MCFG_MCS51_SERIAL_RX_CB(READ8(wangpc_keyboard_device, mcs51_rx_callback)) + MCFG_MCS51_SERIAL_TX_CB(WRITE8(wangpc_keyboard_t, mcs51_tx_callback)) + MCFG_MCS51_SERIAL_RX_CB(READ8(wangpc_keyboard_t, mcs51_rx_callback)) // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") @@ -128,7 +128,7 @@ MACHINE_CONFIG_END // machine configurations //------------------------------------------------- -machine_config_constructor wangpc_keyboard_device::device_mconfig_additions() const +machine_config_constructor wangpc_keyboard_t::device_mconfig_additions() const { return MACHINE_CONFIG_NAME( wangpc_keyboard ); } @@ -357,7 +357,7 @@ INPUT_PORTS_END // input_ports - device-specific input ports //------------------------------------------------- -ioport_constructor wangpc_keyboard_device::device_input_ports() const +ioport_constructor wangpc_keyboard_t::device_input_ports() const { return INPUT_PORTS_NAME( wangpc_keyboard ); } @@ -369,30 +369,30 @@ ioport_constructor wangpc_keyboard_device::device_input_ports() const //************************************************************************** //------------------------------------------------- -// wangpc_keyboard_device - constructor +// wangpc_keyboard_t - constructor //------------------------------------------------- -wangpc_keyboard_device::wangpc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, WANGPC_KEYBOARD, "Wang PC Keyboard", tag, owner, clock, "wangpckb", __FILE__), - device_serial_interface(mconfig, *this), - m_maincpu(*this, I8051_TAG), - 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"), - m_y8(*this, "Y8"), - m_y9(*this, "Y9"), - m_ya(*this, "YA"), - m_yb(*this, "YB"), - m_yc(*this, "YC"), - m_yd(*this, "YD"), - m_ye(*this, "YE"), - m_yf(*this, "YF"), - m_txd_handler(*this) +wangpc_keyboard_t::wangpc_keyboard_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, WANGPC_KEYBOARD, "Wang PC Keyboard", tag, owner, clock, "wangpckb", __FILE__), + device_serial_interface(mconfig, *this), + m_maincpu(*this, I8051_TAG), + 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"), + m_y8(*this, "Y8"), + m_y9(*this, "Y9"), + m_ya(*this, "YA"), + m_yb(*this, "YB"), + m_yc(*this, "YC"), + m_yd(*this, "YD"), + m_ye(*this, "YE"), + m_yf(*this, "YF"), + m_txd_handler(*this) { } @@ -401,11 +401,14 @@ wangpc_keyboard_device::wangpc_keyboard_device(const machine_config &mconfig, co // device_start - device-specific startup //------------------------------------------------- -void wangpc_keyboard_device::device_start() +void wangpc_keyboard_t::device_start() { m_txd_handler.resolve_safe(); set_data_frame(1, 8, PARITY_NONE, STOP_BITS_2); + + set_rcv_rate(62500); + //set_tra_rate(62500); } @@ -413,30 +416,84 @@ void wangpc_keyboard_device::device_start() // device_reset - device-specific reset //------------------------------------------------- -void wangpc_keyboard_device::device_reset() +void wangpc_keyboard_t::device_reset() { - transmit_register_reset(); receive_register_reset(); + transmit_register_reset(); m_txd_handler(1); } +//------------------------------------------------- +// device_timer - handler timer events +//------------------------------------------------- + +void wangpc_keyboard_t::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +{ + device_serial_interface::device_timer(timer, id, param, ptr); +} + + +//------------------------------------------------- +// tra_callback - +//------------------------------------------------- + +void wangpc_keyboard_t::tra_callback() +{ + int bit = transmit_register_get_data_bit(); + + if (LOG) logerror("KB '%s' Transmit Bit %u\n", tag(), bit); + + m_txd_handler(transmit_register_get_data_bit()); +} + + +//------------------------------------------------- +// tra_complete - +//------------------------------------------------- + +void wangpc_keyboard_t::tra_complete() +{ +} + + +//------------------------------------------------- +// rcv_callback - +//------------------------------------------------- + +void wangpc_keyboard_t::rcv_callback() +{ + if (LOG) logerror("KB '%s' Receive Bit %u\n", tag(), m_rxd); + + receive_register_update_bit(m_rxd); +} + + +//------------------------------------------------- +// rcv_complete - +//------------------------------------------------- + +void wangpc_keyboard_t::rcv_complete() +{ + receive_register_extract(); + + if (LOG) logerror("KB '%s' Receive Data %02x\n", tag(), get_received_char()); + + m_maincpu->set_input_line(MCS51_RX_LINE, ASSERT_LINE); + m_maincpu->set_input_line(MCS51_RX_LINE, CLEAR_LINE); +} + + //------------------------------------------------- // write_rxd - //------------------------------------------------- -WRITE_LINE_MEMBER(wangpc_keyboard_device::write_rxd) +WRITE_LINE_MEMBER(wangpc_keyboard_t::write_rxd) { - receive_register_update_bit(state); + m_rxd = state; - if (is_receive_register_full()) - { - m_maincpu->set_input_line(MCS51_RX_LINE, ASSERT_LINE); - receive_register_extract(); - - if (LOG) logerror("Wang PC keyboard receive data %02x\n", get_received_char()); - } + device_serial_interface::rx_w(state); } @@ -444,8 +501,10 @@ WRITE_LINE_MEMBER(wangpc_keyboard_device::write_rxd) // mcs51_rx_callback - //------------------------------------------------- -READ8_MEMBER(wangpc_keyboard_device::mcs51_rx_callback) +READ8_MEMBER(wangpc_keyboard_t::mcs51_rx_callback) { + if (LOG) logerror("KB '%s' CPU Receive Data %02x\n", tag(), get_received_char()); + return get_received_char(); } @@ -454,9 +513,9 @@ READ8_MEMBER(wangpc_keyboard_device::mcs51_rx_callback) // mcs51_tx_callback - //------------------------------------------------- -WRITE8_MEMBER(wangpc_keyboard_device::mcs51_tx_callback) +WRITE8_MEMBER(wangpc_keyboard_t::mcs51_tx_callback) { - if (LOG) logerror("Wang PC keyboard transmit data %02x\n", data); + if (LOG) logerror("KB '%s' CPU Transmit Data %02x\n", tag(), data); transmit_register_setup(data); @@ -472,7 +531,7 @@ WRITE8_MEMBER(wangpc_keyboard_device::mcs51_tx_callback) // kb_p1_r - //------------------------------------------------- -READ8_MEMBER( wangpc_keyboard_device::kb_p1_r ) +READ8_MEMBER( wangpc_keyboard_t::kb_p1_r ) { UINT8 data = 0xff; @@ -504,7 +563,7 @@ READ8_MEMBER( wangpc_keyboard_device::kb_p1_r ) // kb_p1_w - //------------------------------------------------- -WRITE8_MEMBER( wangpc_keyboard_device::kb_p1_w ) +WRITE8_MEMBER( wangpc_keyboard_t::kb_p1_w ) { /* @@ -526,7 +585,7 @@ WRITE8_MEMBER( wangpc_keyboard_device::kb_p1_w ) machine().output().set_led_value(i, !BIT(data, i)); } - if (LOG) logerror("P1 %02x\n", data); + //if (LOG) logerror("P1 %02x\n", data); } @@ -534,7 +593,7 @@ WRITE8_MEMBER( wangpc_keyboard_device::kb_p1_w ) // kb_p2_w - //------------------------------------------------- -WRITE8_MEMBER( wangpc_keyboard_device::kb_p2_w ) +WRITE8_MEMBER( wangpc_keyboard_t::kb_p2_w ) { /* @@ -553,7 +612,7 @@ WRITE8_MEMBER( wangpc_keyboard_device::kb_p2_w ) m_y = data & 0x0f; - if (LOG) logerror("P2 %02x\n", data); + //if (LOG) logerror("P2 %02x\n", data); } @@ -561,7 +620,7 @@ WRITE8_MEMBER( wangpc_keyboard_device::kb_p2_w ) // kb_p3_w - //------------------------------------------------- -WRITE8_MEMBER( wangpc_keyboard_device::kb_p3_w ) +WRITE8_MEMBER( wangpc_keyboard_t::kb_p3_w ) { /* @@ -578,5 +637,5 @@ WRITE8_MEMBER( wangpc_keyboard_device::kb_p3_w ) */ - if (LOG) logerror("P3 %02x\n", data); + //if (LOG) logerror("P3 %02x\n", data); } diff --git a/src/mame/machine/wangpckb.h b/src/mame/machine/wangpckb.h index e253685966a..0ae9065abe5 100644 --- a/src/mame/machine/wangpckb.h +++ b/src/mame/machine/wangpckb.h @@ -34,26 +34,26 @@ MCFG_DEVICE_ADD(WANGPC_KEYBOARD_TAG, WANGPC_KEYBOARD, 0) #define MCFG_WANGPCKB_TXD_HANDLER(_devcb) \ - devcb = &wangpc_keyboard_device::set_txd_handler(*device, DEVCB_##_devcb); + devcb = &wangpc_keyboard_t::set_txd_handler(*device, DEVCB_##_devcb); //************************************************************************** // TYPE DEFINITIONS //************************************************************************** -// ======================> wangpc_keyboard_device +// ======================> wangpc_keyboard_t -class wangpc_keyboard_device : public device_t, - public device_serial_interface +class wangpc_keyboard_t : public device_t, + public device_serial_interface { public: // construction/destruction - wangpc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + wangpc_keyboard_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - template static devcb_base &set_txd_handler(device_t &device, _Object object) { return downcast(device).m_txd_handler.set_callback(object); } + template static devcb_base &set_txd_handler(device_t &device, _Object object) { return downcast(device).m_txd_handler.set_callback(object); } // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; @@ -65,15 +65,20 @@ public: DECLARE_WRITE8_MEMBER( kb_p2_w ); DECLARE_WRITE8_MEMBER( kb_p3_w ); - DECLARE_READ8_MEMBER(mcs51_rx_callback); - DECLARE_WRITE8_MEMBER(mcs51_tx_callback); + DECLARE_READ8_MEMBER( mcs51_rx_callback ); + DECLARE_WRITE8_MEMBER( mcs51_tx_callback ); protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; // device_serial_interface overrides + virtual void tra_callback() override; + virtual void tra_complete() override; + virtual void rcv_callback() override; + virtual void rcv_complete() override; private: required_device m_maincpu; @@ -96,6 +101,7 @@ private: devcb_write_line m_txd_handler; UINT8 m_y; + int m_rxd; }; diff --git a/src/mame/machine/x820kb.cpp b/src/mame/machine/x820kb.cpp index 115e8591e4a..98f75efa559 100644 --- a/src/mame/machine/x820kb.cpp +++ b/src/mame/machine/x820kb.cpp @@ -73,7 +73,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *xerox_820_keyboard_t::device_rom_region() const +const tiny_rom_entry *xerox_820_keyboard_t::device_rom_region() const { return ROM_NAME( xerox_820_keyboard ); } diff --git a/src/mame/machine/x820kb.h b/src/mame/machine/x820kb.h index ca678203545..effc7819726 100644 --- a/src/mame/machine/x820kb.h +++ b/src/mame/machine/x820kb.h @@ -40,7 +40,7 @@ public: template static devcb_base &set_kbstb_wr_callback(device_t &device, _Object object) { return downcast(device).m_kbstb_cb.set_callback(object); } // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 3cd222328b4..07582df5d80 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -1223,7 +1223,6 @@ apple2gsr0 // Sep 1986 Apple IIgs ROM00 apple2gsr0p // June 19, 1986 Apple IIgs ROM00 prototype apple2gsr0p2 // March 10, 1986 Apple IIgs ROM00 prototype apple2gsr1 // Sep 1987 Apple IIgs ROM01 -apple2gsr3lp // ??? 1989 Apple IIgs ROM03 late? prototype apple2gsr3p // ??? 198? Apple IIgs ROM03 prototype @source:apple3.cpp @@ -9364,7 +9363,8 @@ ollie // 2004.03 Ollie King outr2 // 2003.12 Outrun 2 (Rev A) outr2st // 2004.12 Outrun 2 Special Tours (Rev A) scg06nt // 2005.12 Sega Golf Club 2006: Next Tours (Rev A) -vcop3 // 2003.02.26 Virtua Cop 3 (Rev A) +vcop3a // 2003.02.26 Virtua Cop 3 (Rev A) +vcop3 // 2003.05.21 Virtua Cop 3 (Rev B) wangmid // 2004.07 Wangan Midnight Maximum Tune (export) (Rev B) wangmid2 // 2005.10 Wangan Midnight Maximum Tune 2 (Export) (Rev A) wangmid2j // 2005.04 Wangan Midnight Maximum Tune 2 (Japan) @@ -10286,9 +10286,9 @@ psattack // 2004 Uniana topbladv // 2002 Sonokong. Top Blade V trivrus // 2009 AGT. Trivia R Us -@source:cshooter.cpp +@source:airraid.cpp airraid // (c) 1987 Seibu Kaihatsu -cshootere // (c) 1987 JKH (bootleg) +cshooter // (c) 1987 JKH (bootleg) @source:csplayh5.cpp bikiniko // (c) 1999 @@ -11179,7 +11179,6 @@ dvk_kcgd // @source:dvk_ksm.cpp dvk_ksm // -dvk_ksm01 // @source:dwarfd.cpp dwarfd // (c) 198? Electro-Sports @@ -22679,6 +22678,7 @@ m4vivalv__5 // m4vivalv__6 // m4vivalv__7 // m4vivalv__8 // +m4vivalv__9 // m4vivalv__a // m4vivalv__b // m4vivalv__c // @@ -25949,7 +25949,6 @@ m4vegast__s // m4vegast__t // m4vegast__u // m4vegast__v // -m4vegast__w // m4vegast__x // m4vivaes // Viva Espana (Barcrest) m4vivaes__0 // @@ -25964,7 +25963,6 @@ m4vivaes__8 // m4vivaes__9 // m4vivaes__a // m4vivaes__aa // -m4vivaes__ab // m4vivaes__ac // m4vivaes__ad // m4vivaes__ae // @@ -25979,6 +25977,7 @@ m4vivaes__am // m4vivaes__an // m4vivaes__ao // m4vivaes__ap // +m4vivaes__aq // m4vivaes__b // m4vivaes__c // m4vivaes__d // @@ -27472,7 +27471,8 @@ gaiapols // GX123 (c) 1993 (Europe) gaiapolsj // GX123 (c) 1993 (Japan) gaiapolsu // GX123 (c) 1993 (US) metamrph // GX224 (c) 1993 (Europe) -metamrpha // GX224 (c) 1993 (Europe) - Alternate +metamrpha // GX224 (c) 1993 (Asia) +metamrphe // GX224 (c) 1993 (Europe) - Alternate metamrphj // GX224 (c) 1993 (Japan) metamrphu // GX224 (c) 1993 (US) mmaulers // GX170 (c) 1993 (Europe) @@ -33864,7 +33864,7 @@ st_ohla // st_vulkn // @source:stfight.cpp -cshooter // (c) 1987 Taito +cshootert // (c) 1987 Taito empcity // (c) 1986 Seibu Kaihatsu (bootleg?) empcityi // (c) 1986 Seibu Kaihatsu (Eurobed license) empcityj // (c) 1986 Taito Corporation (Japan) @@ -35385,11 +35385,12 @@ kageki // B35 (c) 1988 Taito America Corporation + Roms kagekih // B35 (c) 1992 (hack) kagekij // B35 (c) 1988 Taito Corporation (Japan) plumppop // A98 (c) 1987 Taito Corporation (Japan) -tnzs // B53 (c) 1988 Taito Corporation Japan (World) (new logo) -tnzsj // B53 (c) 1988 Taito Corporation (Japan) (new logo) -tnzsjo // B53 (c) 1988 Taito Corporation (Japan) (new logo) -tnzso // B53 (c) 1988 Taito Corporation Japan (World) (old logo) -tnzsop // B53?(c) 1988 Taito Corporation Japan (World) (old logo) +tnzs // B53 (c) 1988 Taito Corporation Japan (World) (new pcb) +tnzsj // B53 (c) 1988 Taito Corporation (Japan) (new pcb) +tnzsjo // B53 (c) 1988 Taito Corporation (Japan) (old pcb) +tnzsuo // B53 (c) 1988 Taito America Corporation (US) (old pcb) +tnzso // B53 (c) 1988 Taito Corporation Japan (World) (old pcb) +tnzsop // B53?(c) 1988 Taito Corporation Japan (World?) (old pcb, prototype) @source:toaplan1.cpp demonwld // TP-O16 (c) 1990 Toaplan (+ Taito license when set to Japan) @@ -35577,7 +35578,7 @@ avalnc12 // 2004.03 The Key Of Avalon 1.20 - Summon The N avalnc13 // 2004.06.08 The Key Of Avalon 1.30 - Chaotic Sabbat (client) (Rev C) avalns12 // 2004.03 The Key Of Avalon 1.20 - Summon The New Monsters (server) (Rev A) avalns13 // 2004.06.08 The Key Of Avalon 1.30 - Chaotic Sabbat (server) (Rev C) -avalon20 // 2004.11.02 The Key Of Avalon 2 - Eutaxy Commandment (client) (Rev B) +avalon20 // 2004.11.02 The Key Of Avalon 2.0 - Eutaxy Commandment (client) (Rev B) avalonc // 2003.11 The Key Of Avalon: The Wizard Master (client) (Rev G) avalonce // 2003.08 The Key Of Avalon: The Wizard Master (client) (Rev E) avaloncf // 2003.09 The Key Of Avalon: The Wizard Master (client) (Rev F) @@ -35585,6 +35586,8 @@ avalons // 2003.11 The Key Of Avalon: The Wizard Master 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) avalonsf // 2003.09 The Key Of Avalon: The Wizard Master (server) (Rev F) +avalns25 // 2005.08 The Key Of Avalon 2.5 - War of the Key (server) (Rev B) +avalnc25 // 2005.08 The Key Of Avalon 2.5 - War of the Key (client) (Rev B) fzeroax // 2003.12 F-Zero AX (Rev E) fzeroaxc // 2003.06.11 F-Zero AX (Rev C) gekpurya // 2003.10 Gekitou Pro Yakyuu Mizushima Shinji All Stars vs. Pro Yakyuu (Rev C) diff --git a/src/mame/video/abc1600.cpp b/src/mame/video/abc1600.cpp index 2c947d5772a..8450c153fd7 100644 --- a/src/mame/video/abc1600.cpp +++ b/src/mame/video/abc1600.cpp @@ -55,27 +55,33 @@ DEVICE_ADDRESS_MAP_START( crtc_map, 8, abc1600_mover_device ) AM_RANGE(0x01, 0x01) AM_MIRROR(0xfe) AM_DEVREADWRITE(SY6845E_TAG, mc6845_device, register_r, register_w) ADDRESS_MAP_END -DEVICE_ADDRESS_MAP_START( io_map, 8, abc1600_mover_device ) - AM_RANGE(0x000, 0x000) AM_MIRROR(0xff) AM_READ(iord0_r) - AM_RANGE(0x000, 0x000) AM_MIRROR(0xf8) AM_WRITE(ldsx_hb_w) - AM_RANGE(0x001, 0x001) AM_MIRROR(0xf8) AM_WRITE(ldsx_lb_w) - AM_RANGE(0x002, 0x002) AM_MIRROR(0xf8) AM_WRITE(ldsy_hb_w) - AM_RANGE(0x003, 0x003) AM_MIRROR(0xf8) AM_WRITE(ldsy_lb_w) - AM_RANGE(0x004, 0x004) AM_MIRROR(0xf8) AM_WRITE(ldtx_hb_w) - AM_RANGE(0x005, 0x005) AM_MIRROR(0xf8) AM_WRITE(ldtx_lb_w) - AM_RANGE(0x006, 0x006) AM_MIRROR(0xf8) AM_WRITE(ldty_hb_w) - AM_RANGE(0x007, 0x007) AM_MIRROR(0xf8) AM_WRITE(ldty_lb_w) - AM_RANGE(0x100, 0x100) AM_MIRROR(0xf8) AM_WRITE(ldfx_hb_w) - AM_RANGE(0x101, 0x101) AM_MIRROR(0xf8) AM_WRITE(ldfx_lb_w) - AM_RANGE(0x102, 0x102) AM_MIRROR(0xf8) AM_WRITE(ldfy_hb_w) - AM_RANGE(0x103, 0x103) AM_MIRROR(0xf8) AM_WRITE(ldfy_lb_w) - AM_RANGE(0x105, 0x105) AM_MIRROR(0xf8) AM_WRITE(wrml_w) - AM_RANGE(0x107, 0x107) AM_MIRROR(0xf8) AM_WRITE(wrdl_w) - AM_RANGE(0x200, 0x200) AM_MIRROR(0xf8) AM_WRITE(wrmask_strobe_hb_w) - AM_RANGE(0x201, 0x201) AM_MIRROR(0xf8) AM_WRITE(wrmask_strobe_lb_w) - AM_RANGE(0x202, 0x202) AM_MIRROR(0xf8) AM_WRITE(enable_clocks_w) - AM_RANGE(0x203, 0x203) AM_MIRROR(0xf8) AM_WRITE(flag_strobe_w) - AM_RANGE(0x204, 0x204) AM_MIRROR(0xf8) AM_WRITE(endisp_w) +DEVICE_ADDRESS_MAP_START( iowr0_map, 8, abc1600_mover_device ) + AM_RANGE(0x00, 0x00) AM_MIRROR(0xff) AM_READ(iord0_r) + AM_RANGE(0x00, 0x00) AM_MIRROR(0xf8) AM_WRITE(ldsx_hb_w) + AM_RANGE(0x01, 0x01) AM_MIRROR(0xf8) AM_WRITE(ldsx_lb_w) + AM_RANGE(0x02, 0x02) AM_MIRROR(0xf8) AM_WRITE(ldsy_hb_w) + AM_RANGE(0x03, 0x03) AM_MIRROR(0xf8) AM_WRITE(ldsy_lb_w) + AM_RANGE(0x04, 0x04) AM_MIRROR(0xf8) AM_WRITE(ldtx_hb_w) + AM_RANGE(0x05, 0x05) AM_MIRROR(0xf8) AM_WRITE(ldtx_lb_w) + AM_RANGE(0x06, 0x06) AM_MIRROR(0xf8) AM_WRITE(ldty_hb_w) + AM_RANGE(0x07, 0x07) AM_MIRROR(0xf8) AM_WRITE(ldty_lb_w) +ADDRESS_MAP_END + +DEVICE_ADDRESS_MAP_START( iowr1_map, 8, abc1600_mover_device ) + AM_RANGE(0x00, 0x00) AM_MIRROR(0xf8) AM_WRITE(ldfx_hb_w) + AM_RANGE(0x01, 0x01) AM_MIRROR(0xf8) AM_WRITE(ldfx_lb_w) + AM_RANGE(0x02, 0x02) AM_MIRROR(0xf8) AM_WRITE(ldfy_hb_w) + AM_RANGE(0x03, 0x03) AM_MIRROR(0xf8) AM_WRITE(ldfy_lb_w) + AM_RANGE(0x05, 0x05) AM_MIRROR(0xf8) AM_WRITE(wrml_w) + AM_RANGE(0x07, 0x07) AM_MIRROR(0xf8) AM_WRITE(wrdl_w) +ADDRESS_MAP_END + +DEVICE_ADDRESS_MAP_START( iowr2_map, 8, abc1600_mover_device ) + AM_RANGE(0x00, 0x00) AM_MIRROR(0xf8) AM_WRITE(wrmask_strobe_hb_w) + AM_RANGE(0x01, 0x01) AM_MIRROR(0xf8) AM_WRITE(wrmask_strobe_lb_w) + AM_RANGE(0x02, 0x02) AM_MIRROR(0xf8) AM_WRITE(enable_clocks_w) + AM_RANGE(0x03, 0x03) AM_MIRROR(0xf8) AM_WRITE(flag_strobe_w) + AM_RANGE(0x04, 0x04) AM_MIRROR(0xf8) AM_WRITE(endisp_w) ADDRESS_MAP_END @@ -109,7 +115,7 @@ ROM_END // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *abc1600_mover_device::device_rom_region() const +const tiny_rom_entry *abc1600_mover_device::device_rom_region() const { return ROM_NAME( abc1600_mover ); } diff --git a/src/mame/video/abc1600.h b/src/mame/video/abc1600.h index a3f356dd2e5..497ec12c890 100644 --- a/src/mame/video/abc1600.h +++ b/src/mame/video/abc1600.h @@ -42,12 +42,14 @@ public: abc1600_mover_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual DECLARE_ADDRESS_MAP(vram_map, 8); virtual DECLARE_ADDRESS_MAP(crtc_map, 8); - virtual DECLARE_ADDRESS_MAP(io_map, 8); + virtual DECLARE_ADDRESS_MAP(iowr0_map, 8); + virtual DECLARE_ADDRESS_MAP(iowr1_map, 8); + virtual DECLARE_ADDRESS_MAP(iowr2_map, 8); UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/mame/video/airraid_dev.cpp b/src/mame/video/airraid_dev.cpp new file mode 100644 index 00000000000..a52bf9159af --- /dev/null +++ b/src/mame/video/airraid_dev.cpp @@ -0,0 +1,261 @@ +// license:BSD-3-Clause +// copyright-holders:Tomasz Slanina, Angelo Salese, hap, David Haywood + +/* There are 2 versions of the Air Raid / Cross Shooter hardware, one has everything integrated on a single PCB + the other is a Air Raid specific video PCB used with the Street Fight motherboard, there could be differences. + + This is very similar to Dark Mist */ + +#include "emu.h" +#include "airraid_dev.h" + +extern const device_type AIRRAID_VIDEO = &device_creator; + +airraid_video_device::airraid_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, AIRRAID_VIDEO, "Seibu Air Raid Video", tag, owner, clock, "airraid_vid", __FILE__), + m_gfxdecode(*this, "gfxdecode"), + m_palette(*this, "^palette"), + m_screen(*this, "screen"), + m_tx_clut(*this, "tx_clut"), + m_fg_clut(*this, "fg_clut"), + m_bg_clut(*this, "bg_clut"), + m_spr_clut(*this, "spr_clut"), + m_fgmap(*this, "fg_map"), + m_bgmap(*this, "bg_map"), + m_sprite_ram(*this, "^sprite_ram"), + m_txram(*this,"^txram"), + m_vregs(*this,"^vregs"), + m_hw(0x09) +{ +} + +static const gfx_layout charlayout = +{ + 8,8, /* 8*8 characters */ + RGN_FRAC(1,1), /* 512 characters */ + 2, /* 4 bits per pixel */ + { 0,4 }, + { 8,9,10,11,0,1,2,3 }, + { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 }, + 128*1 +}; + +static const gfx_layout char16layout = +{ + 16,16, /* 8*8 characters */ + RGN_FRAC(1,1), /* 512 characters */ + 4, /* 4 bits per pixel */ + { 0,4,8,12 }, + { 0,1,2,3, 16,17,18,19, 512+0,512+1,512+2,512+3, 512+16,512+17,512+18,512+19}, + { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, 8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 }, + 32*32 +}; + +static GFXDECODE_START( cshooter ) + GFXDECODE_ENTRY( "tx_gfx", 0, charlayout, 0, 16 ) + GFXDECODE_ENTRY( "spr_gfx", 0, char16layout, 0, 16 ) + GFXDECODE_ENTRY( "bg_gfx", 0, char16layout, 0, 16 ) + GFXDECODE_ENTRY( "fg_gfx", 0, char16layout, 0, 16 ) +GFXDECODE_END + +static MACHINE_CONFIG_FRAGMENT( airraid_vid ) + + /* video hardware */ + MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_REFRESH_RATE(60) + MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) + MCFG_SCREEN_SIZE(256, 256) + MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 16, 256-1-16) + MCFG_SCREEN_UPDATE_DRIVER(airraid_video_device, screen_update_airraid) + MCFG_SCREEN_PALETTE("^palette") + + MCFG_GFXDECODE_ADD("gfxdecode", "^palette", cshooter) + +MACHINE_CONFIG_END + +machine_config_constructor airraid_video_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( airraid_vid ); +} + +void airraid_video_device::device_start() +{ + save_item(NAME(m_hw)); + + // there might actually be 4 banks of 2048 x 16 tilemaps in here as the upper scroll bits are with the rom banking. + m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(airraid_video_device::get_bg_tile_info),this),tilemap_mapper_delegate(FUNC(airraid_video_device::bg_scan),this),16,16,2048, 64); + + // which could in turn mean this is actually 256 x 128, not 256 x 512 +// m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(airraid_video_device::get_fg_tile_info),this),tilemap_mapper_delegate(FUNC(airraid_video_device::fg_scan),this),16,16,256, 512); + m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(airraid_video_device::get_fg_tile_info),this),tilemap_mapper_delegate(FUNC(airraid_video_device::fg_scan),this),16,16,256, 128); + + m_tx_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(airraid_video_device::get_cstx_tile_info),this),TILEMAP_SCAN_ROWS, 8,8,32,32); + +// m_fg_tilemap->set_transparent_pen(0); +// m_tx_tilemap->set_transparent_pen(0); + + // we do manual mixing using a temp bitmap + m_screen->register_screen_bitmap(m_temp_bitmap); +} + +void airraid_video_device::device_reset() +{ +} + +TILEMAP_MAPPER_MEMBER(airraid_video_device::bg_scan) +{ + return ((row&0xf) * 0x10) + (col&0xf) + (((col&0x7f0) >> 4)*0x100) + ((row & 0x30)>>4) * 0x8000; +} + +TILEMAP_MAPPER_MEMBER(airraid_video_device::fg_scan) +{ + return ((row&0xf) * 0x10) + (col&0xf) + (((col&0x0f0) >> 4)*0x100) + ((row & 0x1f0)>>4) * 0x1000; +} + + +TILE_GET_INFO_MEMBER(airraid_video_device::get_bg_tile_info) +{ + int tile = m_bgmap[(tile_index*2)+1] & 0xff; + int attr = m_bgmap[(tile_index*2)+0] & 0xff; + + tile |= (attr & 0x70) << 4; + + SET_TILE_INFO_MEMBER(2, + tile, + attr&0xf, + 0); +} + +TILE_GET_INFO_MEMBER(airraid_video_device::get_fg_tile_info) +{ + int tile = m_fgmap[(tile_index*2)+1] & 0xff; + int attr = m_fgmap[(tile_index*2)+0] & 0xff; + + tile |= (attr & 0x70) << 4; + + SET_TILE_INFO_MEMBER(3, + tile, + attr&0xf, + 0); +} + +TILE_GET_INFO_MEMBER(airraid_video_device::get_cstx_tile_info) +{ + int code = (m_txram[tile_index*2]); + int attr = (m_txram[tile_index*2+1]); + int color = attr & 0xf; + + SET_TILE_INFO_MEMBER(0, (code << 1) | ((attr & 0x20) >> 5), color, 0); +} + + + +void airraid_video_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + for (int i = 0x200 - 4; i >= 0 ; i -= 4) + { + if (m_sprite_ram[i+1]&0x80) + continue; + + UINT16 tile = (m_sprite_ram[i]); + tile |= (m_sprite_ram[i + 1] & 0x70) << 4; + + UINT16 col = (m_sprite_ram[i+1] & 0x0f); + //col |= (m_sprite_ram[i+1] & 0x80)<<3; + + m_gfxdecode->gfx(1)->transpen(bitmap,cliprect, tile,col, 0, 0, m_sprite_ram[i+3],m_sprite_ram[i+2],0); + } +} + + +#define DISPLAY_SPR 1 +#define DISPLAY_FG 2 +#define DISPLAY_BG 4 +#define DISPLAY_TXT 8 +#define DM_GETSCROLL(n) (((m_vregs[(n)]<<1)&0xff) + ((m_vregs[(n)]&0x80)?1:0) +( ((m_vregs[(n)-1]<<4) | (m_vregs[(n)-1]<<12) )&0xff00)) + +void airraid_video_device::mix_layer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8* clut, int base) +{ + for (int y = cliprect.min_y; y <= cliprect.max_y; y++) + { + UINT16 *dest = &bitmap.pix16(y); + UINT16 *src = &m_temp_bitmap.pix16(y); + for (int x = cliprect.min_x; x <= cliprect.max_x; x++) + { + UINT8 pix = src[x] & 0xff; + UINT8 real = clut[pix]; + + if (!(real & 0x40)) + { + dest[x] = (real & 0x3f) + base; + } + } + } +} + + +UINT32 airraid_video_device::screen_update_airraid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + UINT16 bgscrolly = DM_GETSCROLL(0x6); + // this is more likely to be 'bank' than scroll, like NMK16 + bgscrolly += ((m_hw & 0xc0) >> 6) * 256; + + m_bg_tilemap->set_scrollx(0, DM_GETSCROLL(0x2)); + m_bg_tilemap->set_scrolly(0, bgscrolly); + m_fg_tilemap->set_scrollx(0, DM_GETSCROLL(0xa)); + m_fg_tilemap->set_scrolly(0, DM_GETSCROLL(0xe)); + + // draw screen + bitmap.fill(0x80, cliprect); // temp + +// m_temp_bitmap.fill(0x00, cliprect); + + if ((m_hw & DISPLAY_BG) == 0x00) + { + m_bg_tilemap->draw(screen, m_temp_bitmap, cliprect, 0, 0); + mix_layer(screen, bitmap, cliprect, m_bg_clut, 0x80); + } + + if ((m_hw & DISPLAY_FG) == 0x00) + { + m_fg_tilemap->draw(screen, m_temp_bitmap, cliprect, 0, 0); + mix_layer(screen, bitmap, cliprect, m_fg_clut, 0x00); + } + + if (m_hw & DISPLAY_SPR) + { + m_temp_bitmap.fill(0x00, cliprect); + draw_sprites(m_temp_bitmap, cliprect); // technically this should draw manually because 0x40 in the prom is transparency and our code just assumes it to be 0. + mix_layer(screen, bitmap, cliprect, m_spr_clut, 0x40); + } + + if (m_hw & DISPLAY_TXT) + { + m_tx_tilemap->draw(screen, m_temp_bitmap, cliprect, 0, 0); + mix_layer(screen, bitmap, cliprect, m_tx_clut, 0xc0); + } + + + return 0; +} + +// public functions + +WRITE8_MEMBER(airraid_video_device::txram_w) +{ + m_txram[offset] = data; + m_tx_tilemap->mark_tile_dirty(offset/2); +} + +WRITE8_MEMBER(airraid_video_device::vregs_w) +{ + m_vregs[offset] = data; + + if ((offset != 0x2) && (offset != 0x01) && (offset != 0xa) && (offset != 0x09) && (offset != 0xe) && (offset != 0x0d) ) + printf("vregs_w %02x: %02x\n", offset, data); +} + +void airraid_video_device::layer_enable_w(UINT8 enable) +{ + m_hw = enable; +} diff --git a/src/mame/video/airraid_dev.h b/src/mame/video/airraid_dev.h new file mode 100644 index 00000000000..6962b3bbf22 --- /dev/null +++ b/src/mame/video/airraid_dev.h @@ -0,0 +1,75 @@ +// license:BSD-3-Clause +// copyright-holders:Tomasz Slanina, Angelo Salese, hap, David Haywood + +#pragma once + +#ifndef __AIRRAID_VIDEO__ +#define __AIRRAID_VIDEO__ + + + +extern const device_type AIRRAID_VIDEO; + +#define MCFG_AIRRAID_VIDEO_ADD(_tag) \ + MCFG_DEVICE_ADD(_tag, AIRRAID_VIDEO, 0) + + +class airraid_video_device : public device_t +/* public device_video_interface */ +{ +public: + // construction/destruction + airraid_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + DECLARE_WRITE8_MEMBER(txram_w); + DECLARE_WRITE8_MEMBER(vregs_w); + void layer_enable_w(UINT8 enable); + + UINT32 screen_update_airraid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + +protected: + virtual machine_config_constructor device_mconfig_additions() const override; + virtual void device_start() override; + virtual void device_reset() override; + +private: + // devices + required_device m_gfxdecode; + required_device m_palette; + required_device m_screen; + + // region pointers + required_region_ptr m_tx_clut; + required_region_ptr m_fg_clut; + required_region_ptr m_bg_clut; + required_region_ptr m_spr_clut; + required_region_ptr m_fgmap; + required_region_ptr m_bgmap; + + // memory pointers + required_shared_ptr m_sprite_ram; + required_shared_ptr m_txram; + required_shared_ptr m_vregs; + + // tilemaps + tilemap_t *m_bg_tilemap; + tilemap_t *m_fg_tilemap; + tilemap_t *m_tx_tilemap; + + TILEMAP_MAPPER_MEMBER(bg_scan); + TILEMAP_MAPPER_MEMBER(fg_scan); + + TILE_GET_INFO_MEMBER(get_bg_tile_info); + TILE_GET_INFO_MEMBER(get_fg_tile_info); + TILE_GET_INFO_MEMBER(get_cstx_tile_info); + + // internal variables + UINT16 m_hw; + + // rendering / mixing + bitmap_ind16 m_temp_bitmap; + void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); + void mix_layer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8* clut, int base); +}; + +#endif diff --git a/src/mame/video/amiga.cpp b/src/mame/video/amiga.cpp index d049cc2e165..c12716afe7c 100644 --- a/src/mame/video/amiga.cpp +++ b/src/mame/video/amiga.cpp @@ -150,7 +150,7 @@ UINT32 amiga_state::amiga_gethvpos() { amiga_state *state = this; UINT32 hvpos = (m_last_scanline << 8) | (m_screen->hpos() >> 2); - UINT32 latchedpos = m_hvpos ? m_hvpos->read() : 0; + UINT32 latchedpos = m_hvpos.read_safe(0); /* if there's no latched position, or if we are in the active display area */ /* but before the latching point, return the live HV position */ diff --git a/src/mame/video/antic.cpp b/src/mame/video/antic.cpp index 45743a2113a..c474674f6e3 100644 --- a/src/mame/video/antic.cpp +++ b/src/mame/video/antic.cpp @@ -1391,7 +1391,7 @@ void antic_device::render(address_space &space, int param1, int param2, int para ************************************************************************/ UINT32 antic_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - UINT32 new_tv_artifacts = m_artifacts ? m_artifacts->read() : 0; + UINT32 new_tv_artifacts = m_artifacts.read_safe(0); copybitmap(bitmap, *m_bitmap, 0, 0, 0, 0, cliprect); if (m_tv_artifacts != new_tv_artifacts) @@ -2084,7 +2084,7 @@ void antic_device::generic_interrupt(int button_count) if( m_scanline == VBL_START ) { /* specify buttons relevant to this Atari variant */ - m_gtia->button_interrupt(button_count, m_djoy_b ? m_djoy_b->read() : 0); + m_gtia->button_interrupt(button_count, m_djoy_b.read_safe(0)); /* do nothing new for the rest of the frame */ m_modelines = m_screen->height() - VBL_START; diff --git a/src/mame/video/apple2.cpp b/src/mame/video/apple2.cpp index b56ac22ea38..4cb105d4afd 100644 --- a/src/mame/video/apple2.cpp +++ b/src/mame/video/apple2.cpp @@ -101,7 +101,7 @@ inline void apple2_state::apple2_plot_text_character(bitmap_ind16 &bitmap, int x const UINT8 *chardata; UINT16 color; - if (m_sysconfig != nullptr) + if (m_sysconfig.found()) { switch (m_sysconfig->read() & 0x03) { @@ -289,12 +289,7 @@ void apple2_state::apple2_hires_draw(bitmap_ind16 &bitmap, const rectangle &clip UINT16 *p; UINT32 w; UINT16 *artifact_map_ptr; - int mon_type = 0; - - if (m_sysconfig != nullptr) - { - mon_type = m_sysconfig->read() & 0x03; - } + int mon_type = m_sysconfig.read_safe(0) & 0x03; /* sanity checks */ if (beginrow < cliprect.min_y) diff --git a/src/mame/video/astrocde.cpp b/src/mame/video/astrocde.cpp index 302f9444d56..644caf24c3a 100644 --- a/src/mame/video/astrocde.cpp +++ b/src/mame/video/astrocde.cpp @@ -490,51 +490,51 @@ READ8_MEMBER(astrocde_state::astrocade_data_chip_register_r) break; case 0x10: /* player 1 handle */ - result = m_p1handle? m_p1handle->read() : 0xff; + result = m_p1handle.read_safe(0xff); break; case 0x11: /* player 2 handle */ - result = m_p2handle? m_p2handle->read() : 0xff; + result = m_p2handle.read_safe(0xff); break; case 0x12: /* player 3 handle */ - result = m_p3handle? m_p3handle->read() : 0xff; + result = m_p3handle.read_safe(0xff); break; case 0x13: /* player 4 handle */ - result = m_p4handle? m_p4handle->read() : 0xff; + result = m_p4handle.read_safe(0xff); break; case 0x14: /* keypad column 0 */ - result = m_keypad0 ? m_keypad0->read() : 0xff; + result = m_keypad0.read_safe(0xff); break; case 0x15: /* keypad column 1 */ - result = m_keypad1 ? m_keypad1->read() : 0xff; + result = m_keypad1.read_safe(0xff); break; case 0x16: /* keypad column 2 */ - result = m_keypad2 ? m_keypad2->read() : 0xff; + result = m_keypad2.read_safe(0xff); break; case 0x17: /* keypad column 3 */ - result = m_keypad3 ? m_keypad3->read() : 0xff; + result = m_keypad3.read_safe(0xff); break; case 0x1c: /* player 1 knob */ - result = m_p1_knob ? m_p1_knob->read() : 0xff; + result = m_p1_knob.read_safe(0xff); break; case 0x1d: /* player 2 knob */ - result = m_p2_knob ? m_p2_knob->read() : 0xff; + result = m_p2_knob.read_safe(0xff); break; case 0x1e: /* player 3 knob */ - result = m_p3_knob ? m_p3_knob->read() : 0xff; + result = m_p3_knob.read_safe(0xff); break; case 0x1f: /* player 4 knob */ - result = m_p4_knob ? m_p4_knob->read() : 0xff; + result = m_p4_knob.read_safe(0xff); break; } diff --git a/src/mame/video/cclimber.cpp b/src/mame/video/cclimber.cpp index b0c16ca12e3..21f24aae2e4 100644 --- a/src/mame/video/cclimber.cpp +++ b/src/mame/video/cclimber.cpp @@ -2,7 +2,7 @@ // copyright-holders:Nicola Salmoria /*************************************************************************** - cclimber.c + cclimber.cpp Functions to emulate the video hardware of the machine. diff --git a/src/mame/video/chihiro.cpp b/src/mame/video/chihiro.cpp index dfe867e78cc..4fea75339c1 100644 --- a/src/mame/video/chihiro.cpp +++ b/src/mame/video/chihiro.cpp @@ -4657,6 +4657,9 @@ WRITE32_MEMBER(nv2a_renderer::geforce_w) ((*dmaput == 0x045cd000) && (*dmaget == 0x07f4d000)) || // only for scg06nt ((*dmaput == 0x0494c000) && (*dmaget == 0x07f4d000)) || // only for wangmid ((*dmaput == 0x05acd000) && (*dmaget == 0x07f4d000)) || // only for ghostsqu + ((*dmaput == 0x0574d000) && (*dmaget == 0x07f4d000)) || // only for mj2c + ((*dmaput == 0x07ca3000) && (*dmaget == 0x07f4d000)) || // only for hotd3 + ((*dmaput == 0x063cd000) && (*dmaget == 0x07f4d000)) || // only for vcop3 ((*dmaput == 0x07dca000) && (*dmaget == 0x07f4d000))) // only for crtaxihr { *dmaget = *dmaput; diff --git a/src/mame/video/darkmist.cpp b/src/mame/video/darkmist.cpp index e50fdf3ea1a..a494934a9bc 100644 --- a/src/mame/video/darkmist.cpp +++ b/src/mame/video/darkmist.cpp @@ -17,8 +17,9 @@ TILE_GET_INFO_MEMBER(darkmist_state::get_bgtile_info) { int code,attr,pal; - code=memregion("user1")->base()[tile_index]; /* TTTTTTTT */ - attr=memregion("user2")->base()[tile_index]; /* -PPP--TT - FIXED BITS (0xxx00xx) */ + code=memregion("bg_map")->base()[tile_index*2]; /* TTTTTTTT */ + attr=memregion("bg_map")->base()[(tile_index*2)+1]; /* -PPP--TT - FIXED BITS (0xxx00xx) */ + code+=(attr&3)<<8; pal=(attr>>4); @@ -32,17 +33,15 @@ TILE_GET_INFO_MEMBER(darkmist_state::get_fgtile_info) { int code,attr,pal; - code=memregion("user3")->base()[tile_index]; /* TTTTTTTT */ - attr=memregion("user4")->base()[tile_index]; /* -PPP--TT - FIXED BITS (0xxx00xx) */ - pal=attr>>4; + code = memregion("fg_map")->base()[tile_index*2]; /* TTTTTTTT */ + attr = memregion("fg_map")->base()[(tile_index*2)+1]; /* -PPP--TT - FIXED BITS (0xxx00xx) */ code+=(attr&3)<<8; - - code+=0x400; + pal=attr>>4; pal+=16; - SET_TILE_INFO_MEMBER(1, + SET_TILE_INFO_MEMBER(2, code, pal, 0); @@ -68,19 +67,31 @@ TILE_GET_INFO_MEMBER(darkmist_state::get_txttile_info) PALETTE_INIT_MEMBER(darkmist_state, darkmist) { - const UINT8 *color_prom = memregion("proms")->base(); + const UINT8 *bg_clut = memregion("bg_clut")->base(); + const UINT8 *fg_clut = memregion("fg_clut")->base(); + const UINT8 *spr_clut = memregion("spr_clut")->base(); + const UINT8 *tx_clut = memregion("tx_clut")->base(); palette.set_indirect_color(0x100, rgb_t::black); for (int i = 0; i < 0x400; i++) { int ctabentry; + UINT8 clut = 0; - if (color_prom[i] & 0x40) + switch (i & 0x300) + { + case 0x000: clut = bg_clut[i&0xff]; break; + case 0x100: clut = fg_clut[i&0xff]; break; + case 0x200: clut = spr_clut[i&0xff]; break; + case 0x300: clut = tx_clut[i&0xff]; break; + } + + if (clut & 0x40) // 0x40 indicates non-transparent ctabentry = 0x100; else { - ctabentry = (color_prom[i] & 0x3f); + ctabentry = (clut & 0x3f); switch (i & 0x300) { @@ -156,7 +167,7 @@ UINT32 darkmist_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap palette+=32; - m_gfxdecode->gfx(2)->transpen( + m_gfxdecode->gfx(3)->transpen( bitmap,cliprect, tile, palette, diff --git a/src/mame/video/gic.cpp b/src/mame/video/gic.cpp index 6adcea87227..e37213f9602 100644 --- a/src/mame/video/gic.cpp +++ b/src/mame/video/gic.cpp @@ -105,7 +105,7 @@ gic_device::gic_device(const machine_config &mconfig, device_type type, const ch { } -const rom_entry *gic_device::device_rom_region() const +const tiny_rom_entry *gic_device::device_rom_region() const { //there is only one... how do I get rid of this? return ROM_NAME( gic_font ); diff --git a/src/mame/video/gic.h b/src/mame/video/gic.h index 3babca9fec8..cd8d945e3fd 100644 --- a/src/mame/video/gic.h +++ b/src/mame/video/gic.h @@ -85,7 +85,7 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; // optional information overrides - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; // device_sound_interface overrides virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override; diff --git a/src/mame/video/itech8.cpp b/src/mame/video/itech8.cpp index 8920c8c423f..25adbfcda8d 100644 --- a/src/mame/video/itech8.cpp +++ b/src/mame/video/itech8.cpp @@ -436,7 +436,7 @@ READ8_MEMBER(itech8_state::blitter_r) /* a read from offsets 12-15 return input port values */ if (offset >= 12 && offset <= 15) - result = m_an[offset - 12] ? m_an[offset - 12]->read() : 0; + result = m_an[offset - 12].read_safe(0); return result; } diff --git a/src/mame/video/jaguar.cpp b/src/mame/video/jaguar.cpp index 15a016389bb..29c5ce1b50c 100644 --- a/src/mame/video/jaguar.cpp +++ b/src/mame/video/jaguar.cpp @@ -543,7 +543,7 @@ READ32_MEMBER( jaguar_state::blitter_r ) WRITE32_MEMBER( jaguar_state::blitter_w ) { COMBINE_DATA(&m_blitter_regs[offset]); - if ((offset == B_CMD) && (mem_mask & 0x0000ffff)) + if ((offset == B_CMD) && ACCESSING_BITS_0_15) { m_blitter_status = 0; int inner_count = m_blitter_regs[B_COUNT] & 0xffff; diff --git a/src/mame/video/kaneko_tmap.cpp b/src/mame/video/kaneko_tmap.cpp index 634753975c0..6a7e0fd5000 100644 --- a/src/mame/video/kaneko_tmap.cpp +++ b/src/mame/video/kaneko_tmap.cpp @@ -315,7 +315,7 @@ WRITE16_MEMBER( kaneko_view2_tilemap_device::kaneko_tmap_regs_w ) /* some weird logic needed for Gals Panic on the EXPRO02 board */ WRITE16_MEMBER(kaneko_view2_tilemap_device::galsnew_vram_0_tilebank_w) { - if (mem_mask & 0x00ff) + if (ACCESSING_BITS_0_7) { int val = (data & 0x00ff)<<8; @@ -329,7 +329,7 @@ WRITE16_MEMBER(kaneko_view2_tilemap_device::galsnew_vram_0_tilebank_w) WRITE16_MEMBER(kaneko_view2_tilemap_device::galsnew_vram_1_tilebank_w) { - if (mem_mask & 0x00ff) + if (ACCESSING_BITS_0_7) { int val = (data & 0x00ff)<<8; diff --git a/src/mame/video/lethalj.cpp b/src/mame/video/lethalj.cpp index ae40525e276..ca38bab3b56 100644 --- a/src/mame/video/lethalj.cpp +++ b/src/mame/video/lethalj.cpp @@ -30,13 +30,13 @@ inline void lethalj_state::get_crosshair_xy(int player, int *x, int *y) if (player) { - *x = (((m_light1_x ? m_light1_x->read() : 0) & 0xff) * width) / 255; - *y = (((m_light1_y ? m_light1_y->read() : 0) & 0xff) * height) / 255; + *x = ((m_light1_x.read_safe(0) & 0xff) * width) / 255; + *y = ((m_light1_y.read_safe(0) & 0xff) * height) / 255; } else { - *x = (((m_light0_x ? m_light0_x->read() : 0) & 0xff) * width) / 255; - *y = (((m_light0_y ? m_light0_y->read() : 0) & 0xff) * height) / 255; + *x = ((m_light0_x.read_safe(0) & 0xff) * width) / 255; + *y = ((m_light0_y.read_safe(0) & 0xff) * height) / 255; } } diff --git a/src/mame/video/mac.cpp b/src/mame/video/mac.cpp index e3b7fb31c53..7802e6b65bb 100644 --- a/src/mame/video/mac.cpp +++ b/src/mame/video/mac.cpp @@ -245,14 +245,8 @@ VIDEO_RESET_MEMBER(mac_state,macrbv) visarea.min_x = 0; visarea.min_y = 0; view = 0; - if (m_montype) - { - m_rbv_montype = m_montype->read(); - } - else - { - m_rbv_montype = 2; - } + + m_rbv_montype = m_montype.read_safe(2); switch (m_rbv_montype) { case 1: // 15" portrait display @@ -309,7 +303,7 @@ VIDEO_RESET_MEMBER(mac_state,macsonora) visarea.min_x = 0; visarea.min_y = 0; - m_rbv_montype = m_montype ? m_montype->read() : 2; + m_rbv_montype = m_montype.read_safe(2); switch (m_rbv_montype) { case 1: // 15" portrait display diff --git a/src/mame/video/pcd.cpp b/src/mame/video/pcd.cpp index b192fd62ad2..4d75ab88e29 100644 --- a/src/mame/video/pcd.cpp +++ b/src/mame/video/pcd.cpp @@ -42,7 +42,7 @@ ROM_START( pcd_video ) ROM_LOAD("s36361-d321-v1.bin", 0x000, 0x400, CRC(69baeb2a) SHA1(98b9cd0f38c51b4988a3aed0efcf004bedd115ff)) ROM_END -const rom_entry *pcd_video_device::device_rom_region() const +const tiny_rom_entry *pcd_video_device::device_rom_region() const { return ROM_NAME( pcd_video ); } @@ -56,7 +56,7 @@ ROM_START( pcx_video ) ROM_LOAD("d39-graka.bin", 0x4000, 0x2000, CRC(02920e25) SHA1(145a6648d75c1dc4788f9bc7790281ef7e8f8426)) ROM_END -const rom_entry *pcx_video_device::device_rom_region() const +const tiny_rom_entry *pcx_video_device::device_rom_region() const { return ROM_NAME( pcx_video ); } diff --git a/src/mame/video/pcd.h b/src/mame/video/pcd.h index 32637fac992..8976776d4d1 100644 --- a/src/mame/video/pcd.h +++ b/src/mame/video/pcd.h @@ -42,7 +42,7 @@ public: DECLARE_WRITE8_MEMBER(p2_w); TIMER_DEVICE_CALLBACK_MEMBER(mouse_timer); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; SCN2674_DRAW_CHARACTER_MEMBER(display_pixels); @@ -93,7 +93,7 @@ public: DECLARE_READ8_MEMBER(unk_r); DECLARE_WRITE8_MEMBER(p1_w); - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual machine_config_constructor device_mconfig_additions() const override; SCN2674_DRAW_CHARACTER_MEMBER(display_pixels); protected: diff --git a/src/mame/video/stfight.cpp b/src/mame/video/stfight.cpp deleted file mode 100644 index c5b4d715579..00000000000 --- a/src/mame/video/stfight.cpp +++ /dev/null @@ -1,359 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Mark McDougall -/*************************************************************************** - - video.c - - Functions to emulate the video hardware of the machine. - -***************************************************************************/ - -#include "emu.h" -#include "includes/stfight.h" - - -/* - Graphics ROM Format - =================== - - Each tile is 8x8 pixels - Each composite tile is 2x2 tiles, 16x16 pixels - Each screen is 32x32 composite tiles, 64x64 tiles, 256x256 pixels - Each layer is a 4-plane bitmap 8x16 screens, 2048x4096 pixels - - There are 4x256=1024 composite tiles defined for each layer - - Each layer is mapped using 2 bytes/composite tile - - one byte for the tile - - one byte for the tile bank, attribute - - b7,b5 tile bank (0-3) - - Each pixel is 4 bits = 16 colours. - - */ - -PALETTE_INIT_MEMBER(stfight_state, stfight) -{ - const UINT8 *color_prom = memregion("proms")->base(); - int i; - - /* text uses colors 0xc0-0xcf */ - for (i = 0; i < 0x40; i++) - { - UINT8 ctabentry = (color_prom[i] & 0x0f) | 0xc0; - palette.set_pen_indirect(i, ctabentry); - } - - /* fg uses colors 0x40-0x7f */ - for (i = 0x40; i < 0x140; i++) - { - UINT8 ctabentry = (color_prom[i + 0x1c0] & 0x0f) | ((color_prom[i + 0x0c0] & 0x03) << 4) | 0x40; - palette.set_pen_indirect(i, ctabentry); - } - - /* bg uses colors 0-0x3f */ - for (i = 0x140; i < 0x240; i++) - { - UINT8 ctabentry = (color_prom[i + 0x2c0] & 0x0f) | ((color_prom[i + 0x1c0] & 0x03) << 4); - palette.set_pen_indirect(i, ctabentry); - } - - /* bg uses colors 0x80-0xbf */ - for (i = 0x240; i < 0x340; i++) - { - UINT8 ctabentry = (color_prom[i + 0x3c0] & 0x0f) | ((color_prom[i + 0x2c0] & 0x03) << 4) | 0x80; - palette.set_pen_indirect(i, ctabentry); - } -} - - - -/*************************************************************************** - - Callbacks for the TileMap code - -***************************************************************************/ - -TILEMAP_MAPPER_MEMBER(stfight_state::fg_scan) -{ - /* logical (col,row) -> memory offset */ - return (col & 0x0f) + ((row & 0x0f) << 4) + ((col & 0x70) << 4) + ((row & 0xf0) << 7); -} - -TILE_GET_INFO_MEMBER(stfight_state::get_fg_tile_info) -{ - UINT8 *fgMap = memregion("gfx5")->base(); - int attr,tile_base; - - attr = fgMap[0x8000+tile_index]; - tile_base = ((attr & 0x80) << 2) | ((attr & 0x20) << 3); - - SET_TILE_INFO_MEMBER(1, - tile_base + fgMap[tile_index], - attr & 0x07, - 0); -} - -TILEMAP_MAPPER_MEMBER(stfight_state::bg_scan) -{ - /* logical (col,row) -> memory offset */ - return ((col & 0x0e) >> 1) + ((row & 0x0f) << 3) + ((col & 0x70) << 3) + - ((row & 0x80) << 3) + ((row & 0x10) << 7) + ((col & 0x01) << 12) + - ((row & 0x60) << 8); -} - -TILE_GET_INFO_MEMBER(stfight_state::get_bg_tile_info) -{ - UINT8 *bgMap = memregion("gfx6")->base(); - int attr,tile_bank,tile_base; - - attr = bgMap[0x8000+tile_index]; - tile_bank = (attr & 0x20) >> 5; - tile_base = (attr & 0x80) << 1; - - SET_TILE_INFO_MEMBER(2+tile_bank, - tile_base + bgMap[tile_index], - attr & 0x07, - 0); -} - -TILE_GET_INFO_MEMBER(stfight_state::get_tx_tile_info) -{ - UINT8 attr = m_text_attr_ram[tile_index]; - int color = attr & 0x0f; - - tileinfo.group = color; - - SET_TILE_INFO_MEMBER(0, - m_text_char_ram[tile_index] + ((attr & 0x80) << 1), - attr & 0x0f, - TILE_FLIPYX((attr & 0x60) >> 5)); -} - -TILE_GET_INFO_MEMBER(stfight_state::get_cshooter_tx_tile_info) -{ - UINT8 tile = m_tx_vram[tile_index*2]; - UINT8 attr = m_tx_vram[tile_index*2+1]; - int color = attr & 0x0f; - - tileinfo.group = color; - - SET_TILE_INFO_MEMBER(0, - (tile << 1) | ((attr & 0x20) >> 5), - attr & 0x0f, - /*TILE_FLIPYX((attr & 0x60) >> 5)*/0); -} - - -/*************************************************************************** - - Start the video hardware emulation. - -***************************************************************************/ - -VIDEO_START_MEMBER(stfight_state,stfight) -{ - m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(stfight_state::get_bg_tile_info),this),tilemap_mapper_delegate(FUNC(stfight_state::bg_scan),this),16,16,128,256); - m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(stfight_state::get_fg_tile_info),this),tilemap_mapper_delegate(FUNC(stfight_state::fg_scan),this),16,16,128,256); - m_tx_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(stfight_state::get_tx_tile_info),this),TILEMAP_SCAN_ROWS, 8,8,32,32); - - m_fg_tilemap->set_transparent_pen(0x0f); - m_tx_tilemap->configure_groups(*m_gfxdecode->gfx(0), 0xcf); -} - -VIDEO_START_MEMBER(stfight_state,cshooter) -{ - m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(stfight_state::get_bg_tile_info),this),tilemap_mapper_delegate(FUNC(stfight_state::bg_scan),this),16,16,128,256); - m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(stfight_state::get_fg_tile_info),this),tilemap_mapper_delegate(FUNC(stfight_state::fg_scan),this),16,16,128,256); - m_tx_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(stfight_state::get_cshooter_tx_tile_info),this),TILEMAP_SCAN_ROWS, 8,8,32,32); - - m_fg_tilemap->set_transparent_pen(0x0f); - m_tx_tilemap->configure_groups(*m_gfxdecode->gfx(0), 0xcf); -} - - - -/*************************************************************************** - - Memory handlers - -***************************************************************************/ - -WRITE8_MEMBER(stfight_state::stfight_text_char_w) -{ - m_text_char_ram[offset] = data; - m_tx_tilemap->mark_tile_dirty(offset); -} - -WRITE8_MEMBER(stfight_state::stfight_text_attr_w) -{ - m_text_attr_ram[offset] = data; - m_tx_tilemap->mark_tile_dirty(offset); -} - -WRITE8_MEMBER(stfight_state::cshooter_text_w) -{ - m_tx_vram[offset] = data; - m_tx_tilemap->mark_tile_dirty(offset/2); -} - - -WRITE8_MEMBER(stfight_state::stfight_sprite_bank_w) -{ - m_sprite_base = ( ( data & 0x04 ) << 7 ) | - ( ( data & 0x01 ) << 8 ); -} - -WRITE8_MEMBER(stfight_state::stfight_vh_latch_w) -{ - int scroll; - - - m_vh_latch_ram[offset] = data; - - switch( offset ) - { - case 0x00: - case 0x01: - scroll = (m_vh_latch_ram[1] << 8) | m_vh_latch_ram[0]; - m_fg_tilemap->set_scrollx(0,scroll); - break; - - case 0x02: - case 0x03: - scroll = (m_vh_latch_ram[3] << 8) | m_vh_latch_ram[2]; - m_fg_tilemap->set_scrolly(0,scroll); - break; - - case 0x04: - case 0x05: - scroll = (m_vh_latch_ram[5] << 8) | m_vh_latch_ram[4]; - m_bg_tilemap->set_scrollx(0,scroll); - break; - - case 0x06: - case 0x08: - scroll = (m_vh_latch_ram[8] << 8) | m_vh_latch_ram[6]; - m_bg_tilemap->set_scrolly(0,scroll); - break; - - case 0x07: - m_tx_tilemap->enable(data & 0x80); - /* 0x40 = sprites */ - m_bg_tilemap->enable(data & 0x20); - m_fg_tilemap->enable(data & 0x10); - flip_screen_set(data & 0x01); - break; - } -} - -/*************************************************************************** - - Display refresh - -***************************************************************************/ - -void stfight_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - int offs,sx,sy; - - for (offs = 0;offs < 4096;offs += 32) - { - int code; - int attr = m_sprite_ram[offs+1]; - int flipx = attr & 0x10; - int color = attr & 0x0f; - int pri = (attr & 0x20) >> 5; - - sy = m_sprite_ram[offs+2]; - sx = m_sprite_ram[offs+3]; - - // non-active sprites have zero y coordinate value - if( sy > 0 ) - { - // sprites which wrap onto/off the screen have - // a sign extension bit in the sprite attribute - if( sx >= 0xf0 ) - { - if (attr & 0x80) - sx -= 0x100; - } - - if (flip_screen()) - { - sx = 240 - sx; - sy = 240 - sy; - flipx = !flipx; - } - - code = m_sprite_base + m_sprite_ram[offs]; - - m_gfxdecode->gfx(4)->prio_transpen(bitmap,cliprect, - code, - color, - flipx,flip_screen(), - sx,sy, - screen.priority(), - pri ? 0x02 : 0,0x0f); - } - } -} - - -UINT32 stfight_state::screen_update_stfight(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - screen.priority().fill(0, cliprect); - - bitmap.fill(0, cliprect); /* in case m_bg_tilemap is disabled */ - m_bg_tilemap->draw(screen, bitmap, cliprect, 0,0); - m_fg_tilemap->draw(screen, bitmap, cliprect, 0,1); - - /* Draw sprites (may be obscured by foreground layer) */ - if (m_vh_latch_ram[0x07] & 0x40) - draw_sprites(screen,bitmap,cliprect); - - m_tx_tilemap->draw(screen, bitmap, cliprect, 0,0); - return 0; -} - -void stfight_state::cshooter_draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - for (int i = m_sprite_ram.bytes() - 4; i >= 0 ; i -= 4) - { - if (m_sprite_ram[i+1]&0x80) - continue; - - int attr = m_sprite_ram[i+1]; - int flipx = attr & 0x10; - int color = attr & 0x0f; - int pri = (attr & 0x20) >> 5; - - /* BCD debug code, to be removed in the end */ - UINT8 tile_low = (m_sprite_ram[i]&0x0f); - UINT8 tile_high = ((m_sprite_ram[i]&0xf0)>>4); - - tile_low += (tile_low > 0x9) ? 0x37 : 0x30; - tile_high += (tile_high > 0x9) ? 0x37 : 0x30; - - m_gfxdecode->gfx(0)->prio_transpen(bitmap,cliprect, tile_high << 1, color, flipx, 0, m_sprite_ram[i+3],m_sprite_ram[i+2],screen.priority(),pri ? 0x02 : 0,0x00); - m_gfxdecode->gfx(0)->prio_transpen(bitmap,cliprect, tile_high << 1, color, flipx, 0, m_sprite_ram[i+3]+8,m_sprite_ram[i+2],screen.priority(),pri ? 0x02 : 0,0x00); - m_gfxdecode->gfx(0)->prio_transpen(bitmap,cliprect, tile_low << 1, color, flipx, 0, m_sprite_ram[i+3]+8,m_sprite_ram[i+2]+8,screen.priority(),pri ? 0x02 : 0,0x00); - m_gfxdecode->gfx(0)->prio_transpen(bitmap,cliprect, tile_low << 1, color, flipx, 0, m_sprite_ram[i+3],m_sprite_ram[i+2]+8,screen.priority(),pri ? 0x02 : 0,0x00); - } -} - -UINT32 stfight_state::screen_update_cshooter(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - screen.priority().fill(0, cliprect); - - bitmap.fill(0, cliprect); /* in case m_bg_tilemap is disabled */ - m_bg_tilemap->draw(screen, bitmap, cliprect, 0,0); - m_fg_tilemap->draw(screen, bitmap, cliprect, 0,1); - - /* Draw sprites (may be obscured by foreground layer) */ -// if (m_vh_latch_ram[0x07] & 0x40) - cshooter_draw_sprites(screen,bitmap,cliprect); - - m_tx_tilemap->draw(screen, bitmap, cliprect, 0,0); - return 0; -} diff --git a/src/mame/video/stfight_dev.cpp b/src/mame/video/stfight_dev.cpp new file mode 100644 index 00000000000..29c0e2d1816 --- /dev/null +++ b/src/mame/video/stfight_dev.cpp @@ -0,0 +1,387 @@ +// license:BSD-3-Clause +// copyright-holders:Mark McDougall, David Haywood + +// The Street Fight video appears to be 4 layers, very similar to Dark Mist and Air Raid, but at least without the CLUT transparency handling? +// which are presumably handled by the SEI0100BU chips on the other games (with the GFX inside the modules on Air Raid) + +#include "emu.h" +#include "stfight_dev.h" + + + +extern const device_type STFIGHT_VIDEO = &device_creator; + + +stfight_video_device::stfight_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, STFIGHT_VIDEO, "Seibu Street Fight Video", tag, owner, clock, "stfight_vid", __FILE__), + m_gfxdecode(*this, "gfxdecode"), + m_palette(*this,"^palette"), + m_screen(*this, "screen"), + m_tx_clut(*this, "tx_clut"), + m_fg_clut(*this, "fg_clut"), + m_bg_clut(*this, "bg_clut"), + m_spr_clut(*this, "spr_clut"), + m_fgmap(*this,"fg_map"), + m_bgmap(*this,"bg_map"), + m_vregs(*this,"^vregs"), + m_sprite_ram(*this, "^sprite_ram"), + m_txram(*this, "^txram") +{ +} + +/* text-layer characters */ +static const gfx_layout charlayout = +{ + 8,8, /* 8*8 pixels */ + 512, /* 512 characters */ + 2, /* 2 bits per pixel */ + { 4, 0 }, + { 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3 }, + { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 }, + 8*16 /* every char takes 16 consecutive bytes */ +}; + +/* foreground tiles */ +static const gfx_layout fglayout = +{ + 16,16, /* 16*16 pixels */ + 1024, /* 1024 tiles */ + 4, /* 4 bits per pixel */ + { 64*1024*8+0, 64*1024*8+4, 0, 4 }, + { 0, 1, 2, 3, + 8, 9, 10, 11, + 32*8+0, 32*8+1, 32*8+ 2, 32*8+ 3, + 32*8+8, 32*8+9, 32*8+10, 32*8+11 }, + { 0*8, 2*8, 4*8, 6*8, + 8*8, 10*8, 12*8, 14*8, + 16*8, 18*8, 20*8, 22*8, + 24*8, 26*8, 28*8, 30*8 }, + 64*8 /* every char takes 64 consecutive bytes */ +}; + +/* + * The background tiles are interleaved in banks of 2 + * - so we need to create two separate layout structs + * to handle them properly with tilemaps + */ + +/* background tiles */ +static const gfx_layout bglayout = +{ + 16,16, /* 16*16 pixels */ + 512, /* 512 tiles */ + 4, /* 4 bits per pixel */ + { 64*1024*8+4, 64*1024*8+0, 4, 0 }, + { 0, 1, 2, 3, + 8, 9, 10, 11, + 64*8+0, 64*8+1, 64*8+ 2, 64*8+ 3, + 64*8+8, 64*8+9, 64*8+10, 64*8+11 }, + { 0*8, 2*8, 4*8, 6*8, + 8*8, 10*8, 12*8, 14*8, + 16*8, 18*8, 20*8, 22*8, + 24*8, 26*8, 28*8, 30*8 }, + 128*8 /* every tile takes 64/128 consecutive bytes */ +}; + +/* sprites */ +static const gfx_layout spritelayout = +{ + 16,16, /* 16*16 pixels */ + 1024, /* 1024 sprites */ + 4, /* 4 bits per pixel */ + { 64*1024*8+0, 64*1024*8+4, 0, 4 }, + { 0, 1, 2, 3, + 8, 9, 10, 11, + 32*8+0, 32*8+1, 32*8+ 2, 32*8+ 3, + 32*8+8, 32*8+9, 32*8+10, 32*8+11 }, + { 0*8, 2*8, 4*8, 6*8, + 8*8, 10*8, 12*8, 14*8, + 16*8, 18*8, 20*8, 22*8, + 24*8, 26*8, 28*8, 30*8 }, + 64*8 /* every sprite takes 64 consecutive bytes */ +}; + +static GFXDECODE_START( stfight ) + GFXDECODE_ENTRY( "tx_gfx", 0x0000, charlayout, 0, 16 ) + GFXDECODE_ENTRY( "fg_gfx", 0x0000, fglayout, 0, 16 ) + GFXDECODE_ENTRY( "bg_gfx", 0x0000, bglayout, 0, 16 ) + GFXDECODE_ENTRY( "bg_gfx", 0x0020, bglayout, 0, 16 ) + GFXDECODE_ENTRY( "spr_gfx", 0x0000, spritelayout, 0, 32 ) +GFXDECODE_END + +static MACHINE_CONFIG_FRAGMENT( stfight_vid ) + /* video hardware */ + MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_REFRESH_RATE(60) + MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) + 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(stfight_video_device, screen_update_stfight) + MCFG_SCREEN_PALETTE("^palette") + + MCFG_GFXDECODE_ADD("gfxdecode", "^palette", stfight) +MACHINE_CONFIG_END + +machine_config_constructor stfight_video_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( stfight_vid ); +} + +/* + Graphics ROM Format + =================== + + Each tile is 8x8 pixels + Each composite tile is 2x2 tiles, 16x16 pixels + Each screen is 32x32 composite tiles, 64x64 tiles, 256x256 pixels + Each layer is a 4-plane bitmap 8x16 screens, 2048x4096 pixels + + There are 4x256=1024 composite tiles defined for each layer + + Each layer is mapped using 2 bytes/composite tile + - one byte for the tile + - one byte for the tile bank, attribute + - b7,b5 tile bank (0-3) + + Each pixel is 4 bits = 16 colours. + + */ + +TILEMAP_MAPPER_MEMBER(stfight_video_device::fg_scan) +{ + /* logical (col,row) -> memory offset */ + return (col & 0x0f) + ((row & 0x0f) << 4) + ((col & 0x70) << 4) + ((row & 0xf0) << 7); +} + +TILE_GET_INFO_MEMBER(stfight_video_device::get_fg_tile_info) +{ + int attr,tile_base; + + attr = m_fgmap[0x8000+tile_index]; + tile_base = ((attr & 0x80) << 2) | ((attr & 0x20) << 3); + + SET_TILE_INFO_MEMBER(1, + tile_base + m_fgmap[tile_index], + attr & 0x07, + 0); +} + +TILEMAP_MAPPER_MEMBER(stfight_video_device::bg_scan) +{ + /* logical (col,row) -> memory offset */ + return ((col & 0x0e) >> 1) + ((row & 0x0f) << 3) + ((col & 0x70) << 3) + + ((row & 0x80) << 3) + ((row & 0x10) << 7) + ((col & 0x01) << 12) + + ((row & 0x60) << 8); +} + +TILE_GET_INFO_MEMBER(stfight_video_device::get_bg_tile_info) +{ + int attr,tile_bank,tile_base; + + attr = m_bgmap[0x8000+tile_index]; + tile_bank = (attr & 0x20) >> 5; + tile_base = (attr & 0x80) << 1; + + SET_TILE_INFO_MEMBER(2+tile_bank, + tile_base + m_bgmap[tile_index], + attr & 0x07, + 0); +} + +TILE_GET_INFO_MEMBER(stfight_video_device::get_tx_tile_info) +{ + UINT8 attr = m_txram[tile_index+0x400]; + int color = attr & 0x0f; + + tileinfo.group = color; + + SET_TILE_INFO_MEMBER(0, + m_txram[tile_index] + ((attr & 0x80) << 1), + attr & 0x0f, + TILE_FLIPYX((attr & 0x60) >> 5)); +} + +void stfight_video_device::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + int offs, sx, sy; + + for (offs = 4096 - 32;offs >= 0;offs -= 32) + { + int code; + int attr = m_sprite_ram[offs + 1]; + int flipx = attr & 0x10; + int color = attr & 0x0f; + color |= (attr & 0x20) >> 1; // mix in priority bit + + sy = m_sprite_ram[offs + 2]; + sx = m_sprite_ram[offs + 3]; + + // non-active sprites have zero y coordinate value + if (sy > 0) + { + // sprites which wrap onto/off the screen have + // a sign extension bit in the sprite attribute + if (sx >= 0xf0) + { + if (attr & 0x80) + sx -= 0x100; + } + + /* + if (flip_screen()) + { + sx = 240 - sx; + sy = 240 - sy; + flipx = !flipx; + } + */ + + code = m_sprite_base + m_sprite_ram[offs]; + + m_gfxdecode->gfx(4)->transpen(bitmap, cliprect, + code, + color, + flipx, 0/*flip_screen()*/, + sx, sy, + 0x0f); + } + } +} + + +UINT32 stfight_video_device::screen_update_stfight(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + bitmap.fill(0, cliprect); /* in case m_bg_tilemap is disabled */ + + m_temp_sprite_bitmap.fill(-1, cliprect); + draw_sprites(screen, m_temp_sprite_bitmap, cliprect); + + m_temp_bitmap.fill(-1, cliprect); + m_bg_tilemap->draw(screen, m_temp_bitmap, cliprect, 0, 0); + mix_txlayer(screen, bitmap, m_temp_bitmap, cliprect, m_bg_clut, 0x00, 0x00, 0x00, false); + + if (m_vregs[0x07] & 0x40) mix_txlayer(screen, bitmap, m_temp_sprite_bitmap, cliprect, m_spr_clut, 0x80, 0x100, 0x100, false); // low priority sprites + + m_temp_bitmap.fill(-1, cliprect); + m_fg_tilemap->draw(screen, m_temp_bitmap, cliprect, 0, 0); + mix_txlayer(screen, bitmap, m_temp_bitmap, cliprect, m_fg_clut, 0x40, 0x00, 0x00, false); + + if (m_vregs[0x07] & 0x40) mix_txlayer(screen, bitmap, m_temp_sprite_bitmap, cliprect, m_spr_clut, 0x80, 0x100, 0x000, false); // high priority sprites + + m_temp_bitmap.fill(-1, cliprect); + m_tx_tilemap->draw(screen, m_temp_bitmap, cliprect, 0, 0); + mix_txlayer(screen, bitmap, m_temp_bitmap, cliprect, m_tx_clut, 0xc0, 0x00, 0x00, true); + // + return 0; +} + + +void stfight_video_device::mix_txlayer(screen_device &screen, bitmap_ind16 &bitmap, bitmap_ind16 &bitmap2, const rectangle &cliprect, UINT8* clut, int base, int mask, int condition, bool realcheck) +{ + for (int y = cliprect.min_y; y <= cliprect.max_y; y++) + { + UINT16 *dest = &bitmap.pix16(y); + UINT16 *src = &bitmap2.pix16(y); + for (int x = cliprect.min_x; x <= cliprect.max_x; x++) + { + if (src[x] == -1) + continue; + + if ((src[x] & mask) == condition) + { + UINT8 pix = src[x] & 0xff; + UINT8 real = clut[pix]; + + if (realcheck) // the text layer transparency appears to be 0xf *after* lookup + { + if ((real & 0x0f) != 0x0f) + { + dest[x] = (real & 0x3f) + base; + } + } + else if ((src[x] & 0xf) != 0xf) // other layers it's pre-lookup + { + dest[x] = (real & 0x3f) + base; + } + } + } + } +} + +void stfight_video_device::device_start() +{ + if(!m_gfxdecode->started()) + throw device_missing_dependencies(); + + save_item(NAME(m_sprite_base)); + + m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(stfight_video_device::get_bg_tile_info),this),tilemap_mapper_delegate(FUNC(stfight_video_device::bg_scan),this),16,16,128,256); + m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(stfight_video_device::get_fg_tile_info),this),tilemap_mapper_delegate(FUNC(stfight_video_device::fg_scan),this),16,16,128,256); + m_tx_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(stfight_video_device::get_tx_tile_info),this),TILEMAP_SCAN_ROWS, 8,8,32,32); + + // we do manual mixing using a temp bitmap + m_screen->register_screen_bitmap(m_temp_sprite_bitmap); + m_screen->register_screen_bitmap(m_temp_bitmap); +} + +void stfight_video_device::device_reset() +{ +} + +// public functions + +WRITE8_MEMBER(stfight_video_device::stfight_text_char_w) +{ + m_txram[offset] = data; + m_tx_tilemap->mark_tile_dirty(offset&0x3ff); +} + + +WRITE8_MEMBER(stfight_video_device::stfight_sprite_bank_w) +{ + m_sprite_base = ( ( data & 0x04 ) << 7 ) | + ( ( data & 0x01 ) << 8 ); +} + +WRITE8_MEMBER(stfight_video_device::stfight_vh_latch_w) +{ + int scroll; + + + m_vregs[offset] = data; + + switch( offset ) + { + case 0x00: + case 0x01: + scroll = (m_vregs[1] << 8) | m_vregs[0]; + m_fg_tilemap->set_scrollx(0,scroll); + break; + + case 0x02: + case 0x03: + scroll = (m_vregs[3] << 8) | m_vregs[2]; + m_fg_tilemap->set_scrolly(0,scroll); + break; + + case 0x04: + case 0x05: + scroll = (m_vregs[5] << 8) | m_vregs[4]; + m_bg_tilemap->set_scrollx(0,scroll); + break; + + case 0x06: + case 0x08: + scroll = (m_vregs[8] << 8) | m_vregs[6]; + m_bg_tilemap->set_scrolly(0,scroll); + break; + + case 0x07: + m_tx_tilemap->enable(data & 0x80); + /* 0x40 = sprites */ + m_bg_tilemap->enable(data & 0x20); + m_fg_tilemap->enable(data & 0x10); + //flip_screen_set(data & 0x01); + break; + } +} diff --git a/src/mame/video/stfight_dev.h b/src/mame/video/stfight_dev.h new file mode 100644 index 00000000000..a36c4dd4273 --- /dev/null +++ b/src/mame/video/stfight_dev.h @@ -0,0 +1,76 @@ +// license:BSD-3-Clause +// copyright-holders:Mark McDougall, David Haywood + +#pragma once + +#ifndef __STFIGHT_VIDEO__ +#define __STFIGHT_VIDEO__ + + + +extern const device_type STFIGHT_VIDEO; + +#define MCFG_STFIGHT_VIDEO_ADD(_tag) \ + MCFG_DEVICE_ADD(_tag, STFIGHT_VIDEO, 0) + + +class stfight_video_device : public device_t +{ +public: + // construction/destruction + stfight_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + + DECLARE_WRITE8_MEMBER(stfight_text_char_w); + DECLARE_WRITE8_MEMBER(stfight_sprite_bank_w); + DECLARE_WRITE8_MEMBER(stfight_vh_latch_w); + + UINT32 screen_update_stfight(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + +protected: + virtual machine_config_constructor device_mconfig_additions() const override; + virtual void device_start() override; + virtual void device_reset() override; + +private: + // devices + required_device m_gfxdecode; + required_device m_palette; + required_device m_screen; + + // region pointers + required_region_ptr m_tx_clut; + required_region_ptr m_fg_clut; + required_region_ptr m_bg_clut; + required_region_ptr m_spr_clut; + required_region_ptr m_fgmap; + required_region_ptr m_bgmap; + + // memory pointers + required_shared_ptr m_vregs; + required_shared_ptr m_sprite_ram; + required_shared_ptr m_txram; + + // tilemaps + tilemap_t *m_fg_tilemap; + tilemap_t *m_bg_tilemap; + tilemap_t *m_tx_tilemap; + + TILEMAP_MAPPER_MEMBER(fg_scan); + TILEMAP_MAPPER_MEMBER(bg_scan); + + TILE_GET_INFO_MEMBER(get_fg_tile_info); + TILE_GET_INFO_MEMBER(get_bg_tile_info); + TILE_GET_INFO_MEMBER(get_tx_tile_info); + + // internal variables + int m_sprite_base; + + // rendering / mixing + bitmap_ind16 m_temp_bitmap; + bitmap_ind16 m_temp_sprite_bitmap; + void mix_txlayer(screen_device &screen, bitmap_ind16 &bitmap, bitmap_ind16 &bitmap2, const rectangle &cliprect, UINT8* clut, int base, int mask, int condition, bool realcheck); + void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); +}; + +#endif diff --git a/src/mame/video/stic.cpp b/src/mame/video/stic.cpp index b73881e4d3e..a98a6609e31 100644 --- a/src/mame/video/stic.cpp +++ b/src/mame/video/stic.cpp @@ -130,7 +130,7 @@ ROM_START( stic_grom ) ROM_LOAD( "ro-3-9503-003.u21", 0, 0x0800, CRC(683a4158) SHA1(f9608bb4ad1cfe3640d02844c7ad8e0bcd974917)) ROM_END -const rom_entry *stic_device::device_rom_region() const +const tiny_rom_entry *stic_device::device_rom_region() const { return ROM_NAME( stic_grom ); } diff --git a/src/mame/video/stic.h b/src/mame/video/stic.h index 41d39a3790d..2569e09c3c7 100644 --- a/src/mame/video/stic.h +++ b/src/mame/video/stic.h @@ -493,7 +493,7 @@ public: // device-level overrides virtual void device_start() override; - virtual const rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_reset() override; void screenrefresh(); diff --git a/src/osd/modules/input/input_sdlcommon.cpp b/src/osd/modules/input/input_sdlcommon.cpp index 479e5975666..4abcbd0251c 100644 --- a/src/osd/modules/input/input_sdlcommon.cpp +++ b/src/osd/modules/input/input_sdlcommon.cpp @@ -255,6 +255,14 @@ void sdl_osd_interface::customize_input_type_list(simple_list entry.defseq(SEQ_TYPE_STANDARD).set(KEYCODE_TAB, input_seq::not_code, KEYCODE_LALT, input_seq::not_code, KEYCODE_RALT); break; +#if defined(__APPLE__) && defined(__MACH__) + // 78-key Apple MacBook & Bluetooth keyboards have no right control key + case IPT_MAHJONG_SCORE: + if (entry.player() == 0) + entry.defseq(SEQ_TYPE_STANDARD).set(KEYCODE_SLASH); + break; +#endif + // leave everything else alone default: break; diff --git a/src/osd/modules/sound/xaudio2_sound.cpp b/src/osd/modules/sound/xaudio2_sound.cpp index dc14acff64d..1da4794501b 100644 --- a/src/osd/modules/sound/xaudio2_sound.cpp +++ b/src/osd/modules/sound/xaudio2_sound.cpp @@ -45,6 +45,7 @@ #define INITIAL_BUFFER_COUNT 4 #define SUBMIT_FREQUENCY_TARGET_MS 20 +#define RESAMPLE_TOLERANCE 1.20f //============================================================ // Macros @@ -494,7 +495,7 @@ void sound_xaudio2::create_buffers(const WAVEFORMATEX &format) // buffer size is equal to the bytes we need to hold in memory per X tenths of a second where X is audio_latency float audio_latency_in_seconds = m_audio_latency / 10.0f; UINT32 format_bytes_per_second = format.nSamplesPerSec * format.nBlockAlign; - UINT32 total_buffer_size = format_bytes_per_second * audio_latency_in_seconds; + UINT32 total_buffer_size = format_bytes_per_second * audio_latency_in_seconds * RESAMPLE_TOLERANCE; // We want to be able to submit buffers every X milliseconds // I want to divide these up into "packets" so figure out how many buffers we need @@ -595,10 +596,6 @@ void sound_xaudio2::submit_needed() XAUDIO2_VOICE_STATE state; m_sourceVoice->GetState(&state, XAUDIO2_VOICE_NOSAMPLESPLAYED); - // If we have a buffer on the queue, no reason to submit - if (state.BuffersQueued >= 1) - return; - std::lock_guard lock(m_buffer_lock); // Roll the buffer diff --git a/src/tools/srcclean.cpp b/src/tools/srcclean.cpp index 53377cbffe7..0e08fa57c52 100644 --- a/src/tools/srcclean.cpp +++ b/src/tools/srcclean.cpp @@ -768,7 +768,11 @@ void cleaner_base::handle_codepoint(unicode_char cp) class text_cleaner : public cleaner_base { public: - using cleaner_base::cleaner_base; + template + text_cleaner(OutputIt &&output, newline newline_mode, unsigned tab_width) + : cleaner_base(std::forward(output), newline_mode, tab_width) + { + } private: virtual void process_characters(unicode_char const *begin, unicode_char const *end) override @@ -1464,24 +1468,6 @@ bool is_xml_extension(char const *ext) int main(int argc, char *argv[]) { -#if 0 - int removed_tabs = 0; - int added_tabs = 0; - int removed_spaces = 0; - int removed_continuations = 0; - int removed_newlines = 0; - int dst = 0; - bool in_multiline_comment = false; - bool in_singleline_comment = false; - int indent_multiline_comment = 0; - int in_c_string = FALSE; - int hichars = 0; - int bytes; - int col = 0; - int escape = 0; - const int tab_size = 4; -#endif - bool keep_backup(false); bool dry_run(false); #if defined(WIN32)