View Issue Details

IDProjectCategoryView StatusLast Update
04952Cyberpunksslavepublic2026-07-10 15:39
ReporterSolo Kazuki Assigned ToJOTD  
PriorityhighSeverityfeatureReproducibilityN/A
Status assignedResolutionopen 
Project InfoCyberpunks (Core Design)
http://www.whdload.de/games/Cyberpunks.html
Summary04952: Switching items with Rev/FFD?
DescriptionHello

Cyberpunks have already nice CD32 joypad support, but currently to switch items You must disable in-game control for a while. Adding additionally prev/next item on rev/ffd could solve this problem.
TagsCD32 Controls, support 2nd fire button, support 3rd fire button
MachineA1200
CPU68EC020
CPUSpeed14
ChipSetAGA
GFXCardNone
ChipMem2 MB
FastMem8 MB
WorkbenchOS 3.0
KickROM39 - Kick 3.0
KickSoftNone
WHDLoad18.6
imported

Activities

Solo Kazuki

Solo Kazuki

2022-01-04 16:33

reporter   note ~10850

Bump?
Solo Kazuki

Solo Kazuki

2022-01-04 16:35

reporter   note ~10851

Also red/blue/yellow could be 1st/2nd/3rd.
Solo Kazuki

Solo Kazuki

2022-06-15 16:36

reporter   note ~11440

Bump?
ztronzo

ztronzo

2026-07-09 01:05

reporter   note ~15067

maybe this could help

PL_PS $00006dd2,FKeyInventoryDispatch ; F1/F5/F9 cycle item in focus - F2/F6/F10 activate item in focus

; add also

        Include "FKeyInventory.s"








----------------------- additional debug information ------------------------

00014F3E.b= Player in focus

00014F3E 0001 0101 = player in focus followed by weapon lock per player

Item inventory
Player 1-3, 4 items each, 1 byte each
00014F42 004B 5355 5000 0000 0000 0000
         ^Player 1 ^Player 2 ^Player 3

The following will change item in focus but needs extra code to show, check my attachment "FKeyInventory.s" which shows a refined method of doing this using JSR with original game code routines

Player 1 - item inventory in focus 00014F96.l 00 to 03
00014722 04b9 0000 0001 0001 4f96 sub.l #$00000001,$00014f96
000148c6 06b9 0000 0001 0001 4f96 add.l #$00000001,$00014f96

Player 2 - item inventory in focus 00014f9a.l 00 to 03
00014798 04b9 0000 0001 0001 4f9a sub.l #$00000001,$00014f9a
00014940 06b9 0000 0001 0001 4f9a add.l #$00000001,$00014f9a

Player 3 - item inventory in focus 00014f9e.l 00 to 03
00014804 04b9 0000 0001 0001 4f9e sub.l #$00000001,$00014f9e
000149b0 06b9 0000 0001 0001 4f9e add.l #$00000001,$00014f9e
FKeyInventory.s (4,748 bytes)   
;-------------------------------------------------------
; FKeyInventory.s
;
; Independent per-player inventory cycle/activate control,
; separate from the existing keyboard menu at $144b2.
;
;   F1  = P1 cycle item (forward, wraps 3 -> 0)
;   F2  = P1 activate/use focused item
;   F5  = P2 cycle item (forward, wraps 3 -> 0)
;   F6  = P2 activate/use focused item
;   F9  = P3 cycle item (forward, wraps 3 -> 0)
;   F10 = P3 activate/use focused item
;
; Patched in at $00006dd2, replacing the call to $000144b2.
;
; Each key switches on-screen focus ($00014F3E) to its own player,
; then jsr's directly into the real vanilla dispatch routines:
;
;   $000148B2 - vanilla "Right arrow" dispatch (cycle forward,
;               correct coordinate/index update). NOTE: the
;               vanilla code clamps at slot 3 rather than
;               wrapping - so when a player is already at slot 3,
;               we skip this call and instead reset the slot
;               index and its coordinate pair directly to the
;               confirmed slot-0 values (taken from the vanilla
;               decrement-past-0 branches), then call the same
;               redraw routine ($00014A12) the vanilla code
;               itself calls after any slot change.
;   $00014AFC - vanilla "Enter" dispatch (builds up the focused
;               item's address and calls the real "use item"
;               routine).
;-------------------------------------------------------

FKeyInventoryDispatch
		bsr     FKeyInventoryControl
		jsr     $000144b2			; original keyboard-menu routine, unchanged
		rts

FKeyInventoryControl

; ----- F1: P1 cycle, wraps 3->0 (scancode $50) -----
		lea     $00007093,a0
		lea     FKeyShadowP1Cycle(pc),a1
		move.b  ($50,a0),d0
		move.b  (a1),d1
		move.b  d0,(a1)
		tst.b   d1
		bne.s   .P1CycleDone
		tst.b   d0
		beq.s   .P1CycleDone
		clr.b   $00014F3E			; focus P1
		cmp.l   #3,$00014F96
		bne.s   .P1CycleNormal
		clr.l   $00014F96			; already at last slot -> wrap to 0
		move.l  #$00000008,$00014F66	; confirmed P1 slot-0 X coordinate
		move.l  #$000000A0,$00014F6A	; confirmed P1 slot-0 Y coordinate
		jsr     $00014A12			; trigger the same redraw vanilla code uses
		bra.s   .P1CycleDone
.P1CycleNormal	jsr     $000148B2			; vanilla right-arrow dispatch (normal step)
.P1CycleDone

; ----- F2: P1 activate (scancode $51) -----
		lea     $00007093,a0
		lea     FKeyShadowP1Activate(pc),a1
		move.b  ($51,a0),d0
		move.b  (a1),d1
		move.b  d0,(a1)
		tst.b   d1
		bne.s   .P1ActivateDone
		tst.b   d0
		beq.s   .P1ActivateDone
		clr.b   $00014F3E			; focus P1
		jsr     $00014AFC			; vanilla enter dispatch
.P1ActivateDone

; ----- F5: P2 cycle, wraps 3->0 (scancode $54) -----
		lea     $00007093,a0
		lea     FKeyShadowP2Cycle(pc),a1
		move.b  ($54,a0),d0
		move.b  (a1),d1
		move.b  d0,(a1)
		tst.b   d1
		bne.s   .P2CycleDone
		tst.b   d0
		beq.s   .P2CycleDone
		move.b  #1,$00014F3E		; focus P2
		cmp.l   #3,$00014F9A
		bne.s   .P2CycleNormal
		clr.l   $00014F9A
		move.l  #$00000014,$00014F76	; confirmed P2 slot-0 X coordinate
		move.l  #$000000A0,$00014F7A	; confirmed P2 slot-0 Y coordinate
		jsr     $00014A12
		bra.s   .P2CycleDone
.P2CycleNormal	jsr     $000148B2
.P2CycleDone

; ----- F6: P2 activate (scancode $55) -----
		lea     $00007093,a0
		lea     FKeyShadowP2Activate(pc),a1
		move.b  ($55,a0),d0
		move.b  (a1),d1
		move.b  d0,(a1)
		tst.b   d1
		bne.s   .P2ActivateDone
		tst.b   d0
		beq.s   .P2ActivateDone
		move.b  #1,$00014F3E		; focus P2
		jsr     $00014AFC
.P2ActivateDone

; ----- F9: P3 cycle, wraps 3->0 (scancode $58) -----
		lea     $00007093,a0
		lea     FKeyShadowP3Cycle(pc),a1
		move.b  ($58,a0),d0
		move.b  (a1),d1
		move.b  d0,(a1)
		tst.b   d1
		bne.s   .P3CycleDone
		tst.b   d0
		beq.s   .P3CycleDone
		move.b  #2,$00014F3E		; focus P3
		cmp.l   #3,$00014F9E
		bne.s   .P3CycleNormal
		clr.l   $00014F9E
		move.l  #$00000020,$00014F86	; confirmed P3 slot-0 X coordinate
		move.l  #$000000A0,$00014F8A	; confirmed P3 slot-0 Y coordinate
		jsr     $00014A12
		bra.s   .P3CycleDone
.P3CycleNormal	jsr     $000148B2
.P3CycleDone

; ----- F10: P3 activate (scancode $59) -----
		lea     $00007093,a0
		lea     FKeyShadowP3Activate(pc),a1
		move.b  ($59,a0),d0
		move.b  (a1),d1
		move.b  d0,(a1)
		tst.b   d1
		bne.s   .P3ActivateDone
		tst.b   d0
		beq.s   .P3ActivateDone
		move.b  #2,$00014F3E		; focus P3
		jsr     $00014AFC
.P3ActivateDone
		rts

; Debounce shadow state - one byte per key, tracks "was this key
; already down last frame" so each action fires once per press,
; not every frame the key is held.
FKeyShadowP1Cycle	dc.b	0
FKeyShadowP1Activate	dc.b	0
FKeyShadowP2Cycle	dc.b	0
FKeyShadowP2Activate	dc.b	0
FKeyShadowP3Cycle	dc.b	0
FKeyShadowP3Activate	dc.b	0
		even
FKeyInventory.s (4,748 bytes)   
ztronzo

ztronzo

2026-07-09 01:07

reporter   note ~15068

Will need to change the Quit-key to something else since I use F10 for the above
ztronzo

ztronzo

2026-07-10 15:38

reporter   note ~15073

After completing the game, it gave some info on how to enable the built-in cheat-mode.. and I see that some keys I use with my keyboard shortcuts may conflict with this
F1 to F5
1 to 4
A,S,D,Z,X,C,R,G,B, and Left-Shift
ztronzo

ztronzo

2026-07-10 15:39

reporter   note ~15074

After completing the game, it gave some info on how to enable the built-in cheat-mode.. and I see that some keys I use with my keyboard shortcuts may conflict with this
F1 to F5
1 to 4
A,S,D,Z,X,C,R,G,B, and Left-Shift
image.png (85,704 bytes)   
image.png (85,704 bytes)   

Issue History

Date Modified Username Field Change
2021-01-13 20:30 Solo Kazuki New Issue
2021-05-02 10:51 Psygore Assigned To => JOTD
2021-05-02 10:51 Psygore Status new => assigned
2022-01-04 16:33 Solo Kazuki Note Added: 0010850
2022-01-04 16:34 Solo Kazuki Tag Attached: CD32 Controls
2022-01-04 16:35 Solo Kazuki Note Added: 0010851
2022-01-04 16:35 Solo Kazuki Tag Attached: support 2nd fire button
2022-01-04 16:35 Solo Kazuki Tag Attached: support 3rd fire button
2022-06-15 16:36 Solo Kazuki Note Added: 0011440
2026-07-09 01:05 ztronzo Note Added: 15067
2026-07-09 01:05 ztronzo File Added: FKeyInventory.s
2026-07-09 01:07 ztronzo Note Added: 15068
2026-07-10 15:38 ztronzo Note Added: 15073
2026-07-10 15:39 ztronzo Note Added: 15074
2026-07-10 15:39 ztronzo File Added: image.png