Skip to content

Commit

Permalink
Add support for virtual controller for Intellivision in Bliss
Browse files Browse the repository at this point in the history
  • Loading branch information
proskd authored and JoeMatt committed Oct 25, 2024
1 parent 646945c commit c18d7ae
Show file tree
Hide file tree
Showing 3 changed files with 285 additions and 44 deletions.
116 changes: 113 additions & 3 deletions PVCoreLoader/Sources/PVCoreLoader/Resources/systems.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6503,7 +6503,7 @@
<key>PVControlType</key>
<string>PVButtonGroup</string>
<key>PVControlSize</key>
<string>{320,180}</string>
<string>{320,350}</string>
<key>PVGroupedButtons</key>
<array>
<dict>
Expand All @@ -6512,7 +6512,7 @@
<key>PVControlTitle</key>
<string>L</string>
<key>PVControlFrame</key>
<string>{{8,24},{60,60}}</string>
<string>{{8,16},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
Expand All @@ -6522,10 +6522,120 @@
<key>PVControlTitle</key>
<string>R</string>
<key>PVControlFrame</key>
<string>{{96,16},{60,60}}</string>
<string>{{70,16},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>T</string>
<key>PVControlFrame</key>
<string>{{156,16},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>1</string>
<key>PVControlFrame</key>
<string>{{8,80},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>2</string>
<key>PVControlFrame</key>
<string>{{70,80},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>3</string>
<key>PVControlFrame</key>
<string>{{156,80},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>4</string>
<key>PVControlFrame</key>
<string>{{8,150},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>5</string>
<key>PVControlFrame</key>
<string>{{70,150},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>6</string>
<key>PVControlFrame</key>
<string>{{156,150},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>7</string>
<key>PVControlFrame</key>
<string>{{8,220},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>8</string>
<key>PVControlFrame</key>
<string>{{70,220},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>9</string>
<key>PVControlFrame</key>
<string>{{156,220},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>0</string>
<key>PVControlFrame</key>
<string>{{70,290},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
</array>
</dict>
<dict>
Expand Down
172 changes: 141 additions & 31 deletions PVLibrary/Sources/PVLibrary/Resources/systems.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6499,48 +6499,158 @@
</array>
<key>PVControlLayout</key>
<array>
<dict>
<key>PVControlType</key>
<string>PVButtonGroup</string>
<key>PVControlSize</key>
<string>{180,180}</string>
<key>PVGroupedButtons</key>
<array>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>L</string>
<key>PVControlFrame</key>
<string>{{8,24},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>R</string>
<key>PVControlFrame</key>
<string>{{76,16},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
</array>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButtonGroup</string>
<key>PVControlSize</key>
<string>{320,350}</string>
<key>PVGroupedButtons</key>
<array>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>L</string>
<key>PVControlFrame</key>
<string>{{8,16},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>R</string>
<key>PVControlFrame</key>
<string>{{70,16},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>T</string>
<key>PVControlFrame</key>
<string>{{156,16},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>1</string>
<key>PVControlFrame</key>
<string>{{8,80},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>2</string>
<key>PVControlFrame</key>
<string>{{70,80},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>3</string>
<key>PVControlFrame</key>
<string>{{156,80},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>4</string>
<key>PVControlFrame</key>
<string>{{8,150},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>5</string>
<key>PVControlFrame</key>
<string>{{70,150},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>6</string>
<key>PVControlFrame</key>
<string>{{156,150},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>7</string>
<key>PVControlFrame</key>
<string>{{8,220},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>8</string>
<key>PVControlFrame</key>
<string>{{70,220},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>9</string>
<key>PVControlFrame</key>
<string>{{156,220},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>0</string>
<key>PVControlFrame</key>
<string>{{70,290},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
</array>
</dict>
<dict>
<key>PVControlType</key>
<string>PVStartButton</string>
<key>PVControlTitle</key>
<string>Pause</string>
<string>Enter</string>
<key>PVControlSize</key>
<string>{62,22}</string>
</dict>
<dict>
<key>PVControlType</key>
<string>PVSelectButton</string>
<key>PVControlTitle</key>
<string>Option</string>
<string>Clear</string>
<key>PVControlSize</key>
<string>{62,22}</string>
</dict>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,38 @@ final class PVIntellivisionControllerViewController: PVControllerViewController<
guard let button = $0 as? JSButton, let title = button.titleLabel?.text else {
return
}
// if title == "Fire" || title == "" {
// button.buttonTag = .fire1
// } else if title == "Select" {
// button.buttonTag = .select
// } else if title == "Reset" {
// button.buttonTag = .reset
// }

if button.titleLabel?.text == "L" {
button.buttonTag = .bottomLeftAction
} else if (button.titleLabel?.text == "R") {
button.buttonTag = .bottomRightAction
} else if (button.titleLabel?.text == "T") {
button.buttonTag = .topAction
} else if button.titleLabel?.text == "1" {
button.buttonTag = .button1
} else if (button.titleLabel?.text == "2") {
button.buttonTag = .button2
} else if (button.titleLabel?.text == "3") {
button.buttonTag = .button3
} else if button.titleLabel?.text == "4" {
button.buttonTag = .button4
} else if (button.titleLabel?.text == "5") {
button.buttonTag = .button5
} else if (button.titleLabel?.text == "6") {
button.buttonTag = .button6
} else if button.titleLabel?.text == "7" {
button.buttonTag = .button7
} else if (button.titleLabel?.text == "8") {
button.buttonTag = .button8
} else if (button.titleLabel?.text == "9") {
button.buttonTag = .button9
} else if (button.titleLabel?.text == "0") {
button.buttonTag = .button9
}
}
//
// startButton?.buttonTag = .reset
// selectButton?.buttonTag = .select

selectButton?.buttonTag = .clear
startButton?.buttonTag = .enter
}

override func dPad(_: JSDPad, didPress direction: JSDPadDirection) {
Expand Down

0 comments on commit c18d7ae

Please sign in to comment.