カテゴリ 重要度 ステータス 解決状況 登録日時 最終更新
DIP/入力最小認証済み未処理2008-02-09 21:392008-02-09 21:39
 
テスターTriggerFin担当者 ソースtehkan/senjyo.cpp
バージョン0.36b16発生バージョン修正バージョン
修正コミットプルリク
フラグバグかもね旧BugIDbaluba36b16gra
セット baluba
セット詳細
baluba - バルバルークの伝説 (日本版)
 
概 要DIP設定をカクテルモードにすると両プレイヤーがP2の操作を使わなければいけない。
詳 細With cabinet dipswitch set to "Upright", both players use Player1 controls. With dip set to "Cocktail", both players use Player2 controls.

Updated by stephh in 0.107u3: When it's possible to remove (or at least update) inputs or Dip Switches bugs which are in MAME for ages, it's sometimes better having a look at a DASM file to try to spot what's wrong ...

Details:
From the Z80 game code :


[u]Part 1[/u] (before the game begins)

[code]
BEGIN:
3009: CD A9 03      call $03A9
300C: CD C4 32      call $32C4
300F: CD C0 35      call $35C0
3012: CD C2 34      call $34C2
3015: 21 00 80      ld   hl,$8000
3018: CB 46         bit  0,(hl)
301A: 28 ED         jr   z,$3009
301C: AF            xor  a
301D: 32 3D 80      ld   ($803D),a
3020: CB 66         bit  4,(hl)
3022: 20 1C         jr   nz,$3040
3024: CB E6         set  4,(hl)
3026: AF            xor  a
3027: 32 3E 80      ld   ($803E),a
302A: 21 02 80      ld   hl,$8002
302D: CB E6         set  4,(hl)
302F: CD A9 03      call $03A9
3032: 21 02 80      ld   hl,$8002
3035: CB EE         set  5,(hl)
3037: CD A9 03      call $03A9
303A: CD 83 34      call $3483
303D: CD A9 03      call $03A9
3040: CD E8 30      call $30E8
3043: 3A 1C 80      ld   a,($801C)    check IN2
3046: E6 0C         and  $0C          isolate START buttons
3048: 28 BF         jr   z,$3009      go to BEGIN if none are pressed
304A: 21 00 80      ld   hl,$8000
304D: CB 5F         bit  3,a          check which start button is pressed
304F: 28 0B         jr   z,$305C      if START1 is pressed go to CONTINUE
3051: 4F            ld   c,a
3052: 3A 18 80      ld   a,($8018)    check number of credits
3055: FE 02         cp   $02          are there 2 credits ?
3057: 79            ld   a,c
3058: 38 AF         jr   c,$3009      go to BEGIN if less than 2 credits
305A: CB CE         set  1,(hl)       set bit 1 of 0x8000 to tell it's a 2 players game
CONTINUE:
305C: CB FE         set  7,(hl)
[/code]

[u]Part 2[/u] (when you are playing)

[code]
BEGIN:
0137: 3A 00 D0      ld   a,($D000)    read player 1 inputs
013A: 21 00 80      ld   hl,$8000     
013D: CB 4E         bit  1,(hl)       check number of players
013F: 28 0B         jr   z,$014C      go to CONTINUE if it's a 1 player game
0141: 21 04 D0      ld   hl,$D004     
0144: 4E            ld   c,(hl)       load DSW0
0145: CB 71         bit  6,c          check "Cabinet" Dip Switch
0147: 20 03         jr   nz,$014C     go to CONTINUE if "Upright"
0149: 3A 01 D0      ld   a,($D001)    read player 2 inputs
CONTINUE:
014C: 32 20 80      ld   ($8020),a
[/code]

So, this is not a bug according to the current memory mapping, but I think, if it fits the schematics I don't understand, that you could have, for this game ONLY, specific read/write handlers at 0xd000 and 0xd001 to handle which joystick to select according to the state of the screen (flipped or not) ... There is something similar in machine/arkanoid.c and vidhrdw/arkanoid.c to handle which paddle to select ...

I now hope that a Dev will have a look at the driver and the schematics to fix this bug or to tell it can be removed ...
再現手順 
追加情報 
 
添付ファイル