much happenings in this fucked up world

This commit is contained in:
Persephone Bubblegum-Holidy 2025-05-05 18:16:52 -07:00
parent 29fc81ef37
commit 2f6d3b7b5b
55 changed files with 1067 additions and 52 deletions

2
.gitignore vendored
View file

@ -2,3 +2,5 @@
*/*/obj/
*/bin/
*/obj/
*/*/*/bin/
*/*/*/obj/

View file

@ -3,10 +3,10 @@
#include <Servo.h>
#include <string.h>
Servo servoChannel[11];
byte onDegrees[19] = { 45, 0, 0, 0, 0, 0, 0, 45, 135, 135, 90 , 90, 90, 90 , 90 , 90, 0, 0, 0 };
byte offDegrees[19] = { 0, 0, 0, 0, 0, 0, 0, 90, 90 , 90 , 180, 0 , 0 , 180, 180, 0 , 0, 0, 0 };
byte mapping[19] = { 0, 0, 0, 0, 0, 0, 0, 2 , 2 , 1 , 6 , 3 , 4 , 7 , 8 , 5 , 0, 0, 0 };
Servo servoChannel[11]; // mouth earL earR eyelidL eyelidR eyeL eyeR headR headL headUp armUpL armUpR elbowR elbowL armTwistL armTwistR bodyTwistR bodyTwistL bodyLean
byte onDegrees[19] = { 45, 0, 0, 0, 0, 0, 0, 45, 135, 135, 90, 90, 90, 90, 90, 90, 0, 0, 0 };
byte offDegrees[19] = { 0, 0, 0, 0, 0, 0, 0, 90, 90, 90, 180, 0, 0, 180, 180, 0 , 0, 0, 0 };
byte mapping[19] = { 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 6, 3, 4, 7, 8, 5, 0, 0, 0 };
int byte1 = 0;
int byte2 = 0;

View file

@ -0,0 +1,18 @@
// tp1sm
#include <Servo.h>
Servo servoChannel;
void setup()
{
servoChannel.attach(2);
}
void loop()
{
servoChannel.write(0);
delay(1000);
servoChannel.write(180);
delay(1000);
}

238
Bit Mappings.md Normal file
View file

@ -0,0 +1,238 @@
# PINKCONNECTION2 Bit Mappings
This information was sourced from Cheese-E-Pedia, the Showbiz Pizza Cyberstar Install Manual, and the Chuck E. Cheese 2-Stage Install Manual.
## RAE/3 stage
### Rolfe Dewolfe & Earl Schmerle/Chuck E. Cheese
| Movement Name | UST Single Character Bit | UST Full Stage Bit | RR Engine Bit | Greybox Bit | R12 Bit | R12 Inverted |
| --------------- | ------------------------ | ------------------ | ------------- | ----------- | ------------ | ------------ |
| Mouth | 1 | 1 | 1 | 1-1 | TB1 1-2 H1 | No |
| Left Ear | 2 | 2 | 9 | 1-9 | | |
| Right Ear | 3 | 3 | 10 | 1-10 | | |
| Left Eyelid | 4 | 4 | 2 | 1-2 | TB1 11-12 H1 | Yes |
| Right Eyelid | 5 | 5 | 3 | 1-3 | | |
| Eyes Left | 6 | 6 | 4 | 1-4 | TB1 15-16 H1 | No |
| Eyes Right | 7 | 7 | 5 | 1-5 | TB1 9-10 H1 | No |
| Head Left | 8 | 8 | 6 | 1-6 | TB1 3-4 H1 | No |
| Head Right | 9 | 9 | 7 | 1-7 | TB1 5-6 H1 | No |
| Head Up | 10 | 10 | 8 | 1-8 | TB1 7-8 H1 | Yes |
| Left Arm Up | 11 | 11 | 11 | 1-11 | | |
| Left Arm Twist | 12 | 12 | 12 | 1-12 | | |
| Left Elbow | 13 | 13 | 13 | 1-13 | | |
| Right Arm Up | 14 | 14 | 17 | 1-17 | | |
| Right Arm Twist | 15 | 15 | 18 | 1-18 | | |
| Right Elbow | 16 | 16 | 19 | 1-19 | TB1 13-14 H1 | No |
| Body Left | 17 | 17 | 14 | 1-14 | | |
| Body Right | 18 | 18 | 15 | 1-15 | | |
| Body Lean | 19 | 19 | 16 | 1-16 | | |
| Earl Head Tilt | 20 | 20 | 20 | 1-20 | | |
| Earl Mouth | 21 | 21 | 36 | 1-36 | | |
| Earl Eyebrow | 22 | 22 | 37 | 1-37 | | |
Earl's movements were removed during Concept Unification.
### Mitzi Mozzarella/Helen Henny
| Movement Name | UST Single Character Bit | UST Full Stage Bit | RR Engine Bit | Greybox Bit | R12 Bit | R12 Inverted |
| --------------- | ------------------------ | ------------------ | ------------- | ----------- | ------------ | ------------ |
| Mouth | 1 | 23 | 185 | 2-35 | TB1 1-2 H5 | No |
| Left Ear | 2 | 24 | 176 | 2-26 | | |
| Right Ear | 3 | 25 | 177 | 2-27 | | |
| Left Eyelid | 4 | 26 | 181 | 2-31 | TB1 11-12 H5 | Yes |
| Right Eyelid | 5 | 27 | 182 | 2-32 | | |
| Eyes Left | 6 | 28 | 183 | 2-33 | TB1 15-16 H5 | No |
| Eyes Right | 7 | 29 | 184 | 2-34 | TB1 9-10 H5 | No |
| Head Left | 8 | 30 | 178 | 2-28 | TB1 3-4 H5 | No |
| Head Right | 9 | 31 | 179 | 2-29 | TB1 5-6 H5 | No |
| Head Up | 10 | 32 | 180 | 2-30 | TB1 7-8 H5 | Yes |
| Left Arm Up | 11 | 33 | 173 | 2-23 | | |
| Left Arm Twist | 12 | 34 | 175 | 2-25 | | |
| Left Elbow | 13 | 35 | 174 | 2-24 | | |
| Right Arm Up | 14 | 36 | 168 | 2-18 | | |
| Right Arm Twist | 15 | 37 | 170 | 2-20 | | |
| Right Elbow | 16 | 38 | 169 | 2-19 | TB1 13-14 H5 | No |
| Body Left | 17 | 39 | 186 | 2-36 | | |
| Body Right | 18 | 40 | 187 | 2-37 | | |
| Body Lean | 19 | 41 | 188 | 2-38 | | |
No movements were removed during Concept Unification.
### Fatz Geronimo/Mr. Munch
| Movement Name | UST Single Character Bit | UST Full Stage Bit | RR Engine Bit | Greybox Bit | R12 Bit | R12 Inverted |
| --------------- | ------------------------ | ------------------ | ------------- | ----------- | ------------ | ------------ |
| Mouth | 1 | 42 | 45 | 1-45 | TB1 1-2 H4 | No |
| Left Eyelid | 2 | 43 | 41 | 1-41 | TB1 11-12 H4 | Yes |
| Right Eyelid | 3 | 44 | 42 | 1-42 | | |
| Eyes Left | 4 | 45 | 43 | 1-43 | TB1 15-16 H4 | No |
| Eyes Right | 5 | 46 | 44 | 1-44 | TB1 9-10 H4 | No |
| Head Left | 6 | 47 | 54 | 1-54 | TB1 3-4 H4 | No |
| Head Right | 7 | 48 | 55 | 1-55 | TB1 5-6 H4 | No |
| Head Tilt Left | 8 | 49 | 51 | 1-51 | | |
| Head Tilt Right | 9 | 50 | 52 | 1-52 | | |
| Head Up | 10 | 51 | 53 | 1-53 | | |
| Left Arm Swing | 11 | 52 | 57 | 1-57 | | |
| Left Elbow | 12 | 53 | 59 | 1-59 | TB1 7-8 H4 | Yes |
| Right Arm Swing | 13 | 54 | 58 | 1-58 | TB1 13-14 H4 | Yes |
| Right Elbow | 14 | 55 | 60 | 1-60 | | |
| Foot Tap | 15 | 56 | 61 | 1-61 | | |
| Body Lean | 16 | 57 | 62 | 1-62 | | |
No movements were removed during Concept Unification.
### Beach Bear/Jasper T. Jowls
| Movement Name | UST Single Character Bit | UST Full Stage Bit | RR Engine Bit | Greybox Bit | R12 Bit | R12 Inverted |
| --------------- | ------------------------ | ------------------ | ------------- | ----------- | ------------------------- | ------------ |
| Mouth | 1 | 58 | 166 | 2-16 | TB1 1-2 H2 | No |
| Left Eyelid | 2 | 59 | 151 | 2-1 | TB1 11-12 H2 | Yes |
| Right Eyelid | 3 | 60 | 152 | 2-2 | | |
| Eyes Cross | 4 | 61 | 153 | 2-3 | | |
| Head Left | 5 | 62 | 156 | 2-6 | TB1 3-4 H2 & TB1 15-16 H2 | No |
| Head Right | 6 | 63 | 157 | 2-7 | TB1 5-6 H2 & TB1 9-10 H2 | No |
| Head Up | 7 | 64 | 158 | 2-8 | TB1 7-8 H2 | Yes |
| Right Arm Raise | 8 | 65 | 161 | 2-11 | | |
| Right Arm Twist | 9 | 66 | 162 | 2-12 | | |
| Right Elbow | 10 | 67 | 163 | 2-13 | TB1 13-14 H2 | No |
| Right Wrist | 11 | 68 | 164 | 2-14 | | |
| Left Hand Slide | 12 | 69 | 154 | 2-4 | | |
| Guitar Raise | 13 | 70 | 155 | 2-5 | | |
| Left Leg Kick | 14 | 71 | 159 | 2-9 | | |
| Right Leg Kick | 15 | 72 | 160 | 2-10 | | |
| Body Lean | 16 | 73 | 165 | 2-15 | | |
No movements were removed during Concept Unification.
### Dook Larue/Pasqually
| Movement Name | UST Single Character Bit | UST Full Stage Bit | RR Engine Bit | Greybox Bit | R12 Bit | R12 Inverted |
| --------------- | ------------------------ | ------------------ | ------------- | ----------- | ------------ | ------------ |
| Mouth | 1 | 74 | 30 | 1-30 | TB1 1-2 H3 | No |
| Left Ear | 2 | 75 | 23 | 1-23 | | |
| Right Ear | 3 | 76 | 24 | 1-24 | | |
| Left Eyelid | 4 | 77 | 26 | 1-26 | TB1 11-12 H3 | Yes |
| Right Eyelid | 5 | 78 | 27 | 1-27 | | |
| Eyes Left | 6 | 79 | 28 | 1-28 | TB1 15-16 H3 | No |
| Eyes Right | 7 | 80 | 29 | 1-29 | TB1 9-10 H3 | No |
| Head Left | 8 | 81 | 25 | 1-25 | TB1 3-4 H3 | No |
| Head Right | 9 | 82 | 21 | 1-21 | TB1 5-6 H3 | No |
| Head Up | 10 | 83 | 22 | 1-22 | | |
| Left Arm Swing | 11 | 84 | 33 | 1-33 | | |
| Left Elbow | 12 | 85 | 35 | 1-35 | TB1 7-8 H3 | Yes |
| Right Arm Swing | 13 | 86 | 34 | 1-34 | | |
| Right Elbow | 14 | 87 | 31 | 1-31 | TB1 13-14 H3 | Yes |
| Hi-Hat | 15 | 88 | 32 | 1-32 | | |
| Kick Drum | 16 | 89 | 63 | 1-63 | | |
| Body Lean | 17 | 90 | 64 | 1-64 | | |
Ear movements and Kick Drum were removed during Concept Unification.
### Billy Bob
| Movement Name | UST Single Character Bit | UST Full Stage Bit | RR Engine Bit | Greybox Bit |
| --------------- | ------------------------ | ------------------ | ------------- | ----------- |
| Mouth | 1 | 91 | 196 | 2-46 |
| Left Eyelid | 2 | 92 | 197 | 2-47 |
| Right Eyelid | 3 | 93 | 198 | 2-48 |
| Eyes Left | 4 | 94 | 199 | 2-49 |
| Eyes Right | 5 | 95 | 200 | 2-50 |
| Head Left | 6 | 96 | 201 | 2-51 |
| Head Right | 7 | 97 | 202 | 2-52 |
| Head Tilt Left | 8 | 98 | 203 | 2-53 |
| Head Tilt Right | 9 | 99 | 204 | 2-54 |
| Head Up | 10 | 100 | 205 | 2-55 |
| Right Arm Raise | 11 | 101 | 206 | 2-56 |
| Right Arm Twist | 12 | 102 | 207 | 2-57 |
| Right Elbow | 13 | 103 | 208 | 2-58 |
| Right Wrist | 14 | 104 | 209 | 2-59 |
| Left Hand Slide | 15 | 105 | 189 | 2-39 |
| Guitar Raise | 16 | 106 | 190 | 2-40 |
| Foot Tap | 17 | 107 | 194 | 2-44 |
| Body Left | 18 | 108 | 211 | 2-61 |
| Body Right | 19 | 109 | 212 | 2-62 |
| Body Lean | 20 | 110 | 213 | 2-63 |
Entire bot was removed during Concept Unification.
### Looney Bird/Pizzacam
| Movement Name | UST Single Character Bit | UST Full Stage Bit | RR Engine Bit | Greybox Bit |
| --------------- | ------------------------ | ------------------ | ------------- | ----------- |
| Mouth | 1 | 111 | 167 | 2-17 |
| Left Eyelid | 2 | 112 | 191 | 2-41 |
| Right Eyelid | 3 | 113 | 192 | 2-42 |
| Eyes Cross | 4 | 114 | 193 | 2-43 |
| Head Left | 5 | 115 | 171 | 2-21 |
| Raise | 6 | 116 | 172 | 2-22 |
| Hands | 7 | 117 | 48 | 1-48 |
Hand movement was removed during Concept Unification.
## R12 (Road/1-Stage/2-Stage)
### Chuck E. Cheese
| Movement Name | UST Single Character Bit | UST Full Stage Bit | RR Engine Bit | CCS Bit |
| ------------- | ------------------------ | ------------------ | ------------- | ------------ |
| Mouth | 1 | 1 | 1 | TB1 1-2 H1 |
| Head Left | 2 | 2 | 2 | TB1 3-4 H1 |
| Head Right | 3 | 3 | 3 | TB1 5-6 H1 |
| Head Up | 4 | 4 | 4 | TB1 7-8 H1 |
| Eyes Left | 5 | 5 | 8 | TB1 15-16 H1 |
| Eyes Right | 6 | 6 | 5 | TB1 9-10 H1 |
| Eyelids | 7 | 7 | 6 | TB1 11-12 H1 |
| Right Arm | 8 | 8 | 7 | TB1 13-14 H1 |
### Helen Henny/Guest Star
| Movement Name | UST Single Character Bit | UST Full Stage Bit | RR Engine Bit | CCS Bit |
| ------------- | ------------------------ | ------------------ | ------------- | ------------ |
| Mouth | 1 | 9 | 65 | TB1 1-2 H5 |
| Head Left | 2 | 10 | 66 | TB1 3-4 H5 |
| Head Right | 3 | 11 | 67 | TB1 5-6 H5 |
| Head Up | 4 | 12 | 68 | TB1 7-8 H5 |
| Eyes Left | 5 | 13 | 72 | TB1 15-16 H5 |
| Eyes Right | 6 | 14 | 69 | TB1 9-10 H5 |
| Eyelids | 7 | 15 | 70 | TB1 11-12 H5 |
| Right Arm | 8 | 16 | 71 | TB1 13-14 H5 |
### Mr. Munch
| Movement Name | UST Single Character Bit | UST Full Stage Bit | RR Engine Bit | CCS Bit |
| ------------- | ------------------------ | ------------------ | ------------- | ------------ |
| Mouth | 1 | 17 | 49 | TB1 1-2 H4 |
| Head Left | 2 | 18 | 50 | TB1 3-4 H4 |
| Head Right | 3 | 19 | 51 | TB1 5-6 H4 |
| Eyes Left | 4 | 20 | 56 | TB1 15-16 H4 |
| Eyes Right | 5 | 21 | 53 | TB1 9-10 H4 |
| Eyelids | 6 | 22 | 54 | TB1 11-12 H4 |
| Right Arm | 7 | 23 | 55 | TB1 13-14 H4 |
| Left Arm | 8 | 24 | 52 | TB1 7-8 H4 |
### Jasper T. Jowls
| Movement Name | UST Single Character Bit | UST Full Stage Bit | RR Engine Bit | CCS Bit |
| ------------- | ------------------------ | ------------------ | ------------- | ------------ |
| Mouth | 1 | 25 | 17 | TB1 1-2 H2 |
| Head Left | 2 | 26 | 18 | TB1 3-4 H2 |
| Head Right | 3 | 27 | 19 | TB1 5-6 H2 |
| Head Up | 4 | 28 | 20 | TB1 7-8 H2 |
| Eyes Left | 5 | 29 | 24 | TB1 15-16 H2 |
| Eyes Right | 6 | 30 | 21 | TB1 9-10 H2 |
| Eyelids | 7 | 31 | 22 | TB1 11-12 H2 |
| Strum | 8 | 32 | 23 | TB1 13-14 H2 |
### Pasqually
| Movement Name | UST Single Character Bit | UST Full Stage Bit | RR Engine Bit | CCS Bit |
| ------------- | ------------------------ | ------------------ | ------------- | ------------ |
| Mouth | 1 | 33 | 33 | TB1 1-2 H3 |
| Head Left | 2 | 34 | 34 | TB1 3-4 H3 |
| Head Right | 3 | 35 | 35 | TB1 5-6 H3 |
| Eyes Left | 4 | 36 | 40 | TB1 15-16 H3 |
| Eyes Right | 5 | 37 | 37 | TB1 9-10 H3 |
| Eyelids | 6 | 38 | 38 | TB1 11-12 H3 |
| Right Arm | 7 | 39 | 39 | TB1 13-14 H3 |
| Left Arm | 8 | 40 | 36 | TB1 7-8 H3 |

17
Future Goals.md Normal file
View file

@ -0,0 +1,17 @@
# Future Goals
## PC2Converter
- .SHW (ProgramBlue) input format
- .3ST/.R12/.C&R (APS) input format
- Biphase (Pianocorder and Cyberstar) from tape input format (unlikely)
- Studio C from Floppy Disk input format
- UST Full Stage to Single Character Stripper
## PC2Player
- Make the program.
## Firmwares
- Send controlling computer information about the number of outputs and which character it is set up for

1
Legacy Tools/README.md Normal file
View file

@ -0,0 +1 @@
# It is recommended that you do not use these, as they do not work with the latest version of the firmware

View file

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\PC2Converter\PC2Converter.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Eto.Platform.Gtk" Version="2.9.0" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,14 @@
using System;
using Eto.Forms;
namespace PC2Converter.Gtk
{
class Program
{
[STAThread]
public static void Main(string[] args)
{
new Application(Eto.Platforms.Gtk).Run(new MainForm());
}
}
}

Binary file not shown.

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>PC2Converter</string>
<key>CFBundleIdentifier</key>
<string>com.example.PC2Converter</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>CFBundleIconFile</key>
<string>Icon.icns</string>
</dict>
</plist>

View file

@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
<RuntimeIdentifiers>osx-x64;osx-arm64</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\PC2Converter\PC2Converter.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Eto.Platform.Mac64" Version="2.9.0" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,14 @@
using System;
using Eto.Forms;
namespace PC2Converter.Mac
{
class Program
{
[STAThread]
public static void Main(string[] args)
{
new Application(Eto.Platforms.Mac64).Run(new MainForm());
}
}
}

View file

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\PC2Converter\PC2Converter.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Eto.Platform.Wpf" Version="2.9.0" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,14 @@
using System;
using Eto.Forms;
namespace PC2Converter.Wpf
{
class Program
{
[STAThread]
public static void Main(string[] args)
{
new Application(Eto.Platforms.Wpf).Run(new MainForm());
}
}
}

View file

@ -0,0 +1,448 @@
using System;
using System.Collections;
using System.IO;
using Eto.Forms;
using Eto.Drawing;
namespace PC2Converter
{
public partial class MainForm : Form
{
DropDown InputTypeSelector = new DropDown();
DropDown OutputTypeSelector = new DropDown();
DropDown CharacterSelector = new DropDown();
TextBox FilePathTextBox = new TextBox();
Button BrowseFileButton = new Button { Text = "Browse", Width = 100 };
Button ConvertButton = new Button { Text = "Convert", Width = 100 };
string[] InputTypes = { "RSHW File (RR Engine)", "CSHW File (RR Engine)", "SSHW File (RR Engine)" };
string[] RSHWOutputTypes = { "UST 32 Bits (Single Bot RAE/3st)", "UST 8 Bits (Single Bot Cybers Rosetta)", "UST 256 Bits (Full RAE/3st)" , "UST 256 Bits (Full Cybers Rosetta)" };
string[] CSHWOutputTypes = { "UST 8 Bits (Single Bot Cybers)", "UST 256 Bits (Full Cybers)" };
string[] SSHWOutputTypes = { "UST 32 Bits (Single Bot Studio C)", "UST 256 Bits (Full Studio C)" };
string[] RAE3stCharacters = { "Rolfe/Chuck E.", "Mitzi/Helen", "Fatz/Munch", "Beach Bear/Jasper", "Dook/Pasqually", "Billy Bob", "Looney Bird/PizzaCam"};
string[] CyberCharacters = { "Chuck E.", "Helen/Guest Star", "Munch", "Jasper", "Pasqually" };
string[] StudioCCharacters = { "Chuck E." };
int[][] SC_CyberBitMapR12 =
{
/* chuck */ new int[]{ 1, 2, 3, 4, 8, 5, 6, 7 },
/* helen */ new int[]{ 65, 66, 67, 68, 72, 69, 70, 71 },
/* munch */ new int[]{ 49, 50, 51, 56, 53, 54, 55, 52 },
/* jasper */ new int[]{ 17, 18, 19, 20, 24, 21, 22, 23 },
/* pasqually */ new int[]{ 33, 34, 35, 40, 37, 38, 39, 36 }
};
int[][] SC_CyberBitMapRosetta =
{
/* chuck */ new int[]{ 1, 6, 7, 8, 4, 5, 2, 19 },
/* helen */ new int[]{ 185, 178, 179, 180, 183, 184, 181, 169 },
/* munch */ new int[]{ 45, 54, 55, 43, 44, 41, 58, 59 },
/* jasper */ new int[]{ 166, 156, 157, 158, 156, 157, 151, 163 },
/* pasqually */ new int[]{ 30, 25, 21, 28, 29, 26, 31, 35 }
};
int[] CyberRosettaInvertedBits = { 2, 8, 181, 169, 41, 59, 58, 151, 158, 26, 35, 31 };
int[][] SC_RAE3stBitMap =
{
/* rolfe/chuck */ new int[]{ 1, 9, 10, 2, 3, 4, 5, 6, 7, 8, 11, 12, 13, 17, 18, 19, 14, 15, 16, 20, 36, 37 },
/* mitzi/helen */ new int[]{ 185, 176, 177, 181, 182, 183, 184, 178, 179, 180, 173, 175, 174, 168, 170, 169, 186, 187, 188 },
/* fatz/munch */ new int[]{ 45, 41, 42, 43, 44, 54, 55, 51, 52, 53, 57, 59, 58, 60, 61, 62 },
/* beach bear/jasper */ new int[]{ 166, 151, 152, 153, 156, 157, 158, 161, 162, 163, 164, 154, 155, 159, 160, 165 },
/* dook/pasqually */ new int[]{ 30, 23, 24, 26, 27, 28, 29, 25, 21, 22, 33, 35, 34, 31, 32, 63, 64 },
/* billy bob */ new int[]{ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 189, 190, 194, 211, 212, 213 },
/* looney/pizzacam */ new int[]{ 167, 191, 192, 193, 171, 172, 48 }
};
int[][] SC_StudioCBitMap =
{
/* chuck e. */ new int[]{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 }
};
bool FullStage = false;
const int USTVersion = 1;
public MainForm()
{
Title = "PinkConnection2 Showtape Converter";
Size = new Size(512, 384);
Maximizable = false;
Resizable = false;
BrowseFileButton.Command = new Command((sender, e) => { Event_BrowseFileButton(); });
ConvertButton.Command = new Command((sender, e) => { Event_ConvertFileButton(); });
InputTypeSelector.SelectedValueChanged += (sender, e) => Event_ChangeInputType();
OutputTypeSelector.SelectedValueChanged += (sender, e) => Event_ChangeOutputType();
foreach (string s in InputTypes)
{
InputTypeSelector.Items.Add(s);
}
Content = BuildLayout();
}
DynamicLayout BuildLayout()
{
DynamicLayout layout = new DynamicLayout { DefaultSpacing = new Size(10, 10), DefaultPadding = new Padding(5, 5, 5, 5) };
layout.BeginVertical();
layout.BeginHorizontal();
layout.Add(new Label { Text = "Input Format" });
layout.EndHorizontal();
layout.BeginHorizontal();
layout.Add(InputTypeSelector, true);
layout.EndHorizontal();
layout.BeginHorizontal();
layout.Add(new Label { Text = "Output Type" });
layout.EndHorizontal();
layout.BeginHorizontal();
layout.Add(OutputTypeSelector, true);
layout.EndHorizontal();
layout.BeginHorizontal();
layout.Add(new Label { Text = "Character" });
layout.EndHorizontal();
layout.BeginHorizontal();
layout.Add(CharacterSelector, true);
layout.EndHorizontal();
layout.EndVertical();
layout.BeginVertical();
layout.BeginHorizontal();
layout.Add(new Label { Text = "File to convert" });
layout.EndHorizontal();
layout.BeginHorizontal();
layout.Add(FilePathTextBox, true);
layout.Add(BrowseFileButton);
layout.EndHorizontal();
layout.EndVertical();
layout.BeginVertical();
layout.BeginHorizontal();
layout.Add(null, true);
layout.Add(ConvertButton);
layout.EndHorizontal();
layout.EndVertical();
layout.BeginVertical();
layout.Add(null, true);
layout.EndVertical();
return layout;
}
string MakeHeader(string showName, string outputType, string character)
{
string headerOut = $"UST,{USTVersion.ToString()},{showName.Replace(",", "_").Replace(";", "_")},";
bool fullStage = false;
switch (outputType)
{
case "UST 32 Bits (Single Bot RAE/3st)":
headerOut += "32,";
headerOut += "Rockafire Explosion/3-Stage (Single Character),";
break;
case "UST 8 Bits (Single Bot Cybers Rosetta)":
headerOut += "8,";
headerOut += "Cyberamics (Single Character),";
break;
case "UST 256 Bits (Full RAE/3st)":
headerOut += "256,";
headerOut += "Rockafire Explosion/3-Stage (Full Stage),";
fullStage = true;
break;
case "UST 256 Bits (Full Cybers Rosetta)":
headerOut += "256,";
headerOut += "Cyberamics (Full Stage),";
fullStage = true;
break;
case "UST 8 Bits (Single Bot Cybers)":
headerOut += "8,";
headerOut += "Cyberamics (Single Character),";
break;
case "UST 256 Bits (Full Cybers)":
headerOut += "256,";
headerOut += "Cyberamics (Full Stage),";
fullStage = true;
break;
case "UST 32 Bits (Single Bot Studio C)":
headerOut += "32,";
headerOut += "Studio C (Single Character),";
break;
case "UST 256 Bits (Full Studio C)":
headerOut += "256,";
headerOut += "Studio C (Full Stage),";
fullStage = true;
break;
}
if (fullStage) headerOut += "N/A,";
else headerOut += character + ";";
return headerOut;
}
void Event_ChangeInputType()
{
switch(InputTypeSelector.SelectedIndex)
{
case 0:
OutputTypeSelector.Items.Clear();
CharacterSelector.Items.Clear();
foreach (string s in RSHWOutputTypes)
{
OutputTypeSelector.Items.Add(s);
}
break;
case 1:
OutputTypeSelector.Items.Clear();
CharacterSelector.Items.Clear();
foreach (string s in CSHWOutputTypes)
{
OutputTypeSelector.Items.Add(s);
}
break;
case 2:
OutputTypeSelector.Items.Clear();
CharacterSelector.Items.Clear();
foreach (string s in SSHWOutputTypes)
{
OutputTypeSelector.Items.Add(s);
}
break;
}
}
void Event_ChangeOutputType()
{
switch(InputTypeSelector.SelectedIndex)
{
case 0:
switch(OutputTypeSelector.SelectedIndex)
{
case 0:
CharacterSelector.Items.Clear();
foreach (string s in RAE3stCharacters)
{
CharacterSelector.Items.Add(s);
}
CharacterSelector.Enabled = true;
FullStage = false;
break;
case 1:
CharacterSelector.Items.Clear();
foreach (string s in CyberCharacters)
{
CharacterSelector.Items.Add(s);
}
CharacterSelector.Enabled = true;
FullStage = false;
break;
case 2:
CharacterSelector.Items.Clear();
CharacterSelector.Enabled = false;
FullStage = true;
break;
case 3:
CharacterSelector.Items.Clear();
CharacterSelector.Enabled = false;
FullStage = true;
break;
}
break;
case 1:
switch(OutputTypeSelector.SelectedIndex)
{
case 0:
CharacterSelector.Items.Clear();
foreach (string s in CyberCharacters)
{
CharacterSelector.Items.Add(s);
}
CharacterSelector.Enabled = true;
FullStage = false;
break;
case 1:
CharacterSelector.Items.Clear();
CharacterSelector.Enabled = false;
FullStage = true;
break;
}
break;
case 2:
switch(OutputTypeSelector.SelectedIndex)
{
case 0:
CharacterSelector.Items.Clear();
foreach (string s in StudioCCharacters)
{
CharacterSelector.Items.Add(s);
}
CharacterSelector.Enabled = true;
FullStage = false;
break;
case 1:
CharacterSelector.Items.Clear();
CharacterSelector.Enabled = false;
FullStage = true;
break;
}
break;
}
}
void Event_BrowseFileButton()
{
OpenFileDialog fileDialog = new OpenFileDialog();
string[] showFiles = { ".rshw", ".cshw", ".sshw" };
string[] allFiles = { ".*" };
fileDialog.Filters.Add(new FileFilter("Show Files (.rshw, .cshw, .sshw)", showFiles));
fileDialog.Filters.Add(new FileFilter("All Files", allFiles));
fileDialog.Title = "Select Show File.";
fileDialog.ShowDialog(this);
if (File.Exists(fileDialog.FileName)) FilePathTextBox.Text = fileDialog.FileName;
}
void Event_ConvertFileButton()
{
// safeties
if (InputTypeSelector.SelectedIndex == -1)
{
MessageBox.Show("Fatal: You must select an input type.");
return;
}
if (OutputTypeSelector.SelectedIndex == -1)
{
MessageBox.Show("Fatal: You must select an output type.");
return;
}
if (CharacterSelector.SelectedIndex == -1 && !FullStage)
{
MessageBox.Show("Fatal: You must select a character.");
return;
}
if (FilePathTextBox.Text.Trim() == "")
{
MessageBox.Show("Fatal: You must select an input file.");
return;
}
if (!File.Exists(FilePathTextBox.Text.Trim()))
{
MessageBox.Show("Fatal: Specified input file does not exist.");
return;
}
if (FullStage)
{
MessageBox.Show("Fatal: Full Stage mode is not supported at this time.");
return;
}
SaveFileDialog fileDialog = new SaveFileDialog();
fileDialog.Filters.Add(new FileFilter("UST Files (.ust)", new string[]{".ust"}));
fileDialog.Title = "Select Show File.";
fileDialog.ShowDialog(this);
if (fileDialog.FileName.Trim() == "") return;
string outFilePath = fileDialog.FileName;
// now its actually time to start doing some shit
string inputType = InputTypeSelector.SelectedKey;
string outputType = OutputTypeSelector.SelectedKey;
string filePath = FilePathTextBox.Text.Trim();
if (inputType == "RSHW File (RR Engine)" || inputType == "CSHW File (RR Engine)" || inputType == "SSHW File (RR Engine)")
{
// at some point there should be a warning displayed if the input type does not match the file extension but i dont feel like doing that right now
// rshw time
RSHWFile file = RSHWLoader.Load(filePath);
if (file.signalData == null)
{
MessageBox.Show("Fatal: This file contains no signal data.");
return;
}
if (file.audioData == null)
{
MessageBox.Show("Fatal: This file contains no audio data.");
return;
}
List<BitArray> rshwBits = new List<BitArray>();
int countlength = 0;
if (file.signalData[0] != 0)
{
countlength = 1;
BitArray bit = new BitArray(300);
rshwBits.Add(bit);
}
for (int i = 0; i < file.signalData.Length; i++)
{
if (file.signalData[i] == 0)
{
countlength += 1;
BitArray bit = new BitArray(300);
rshwBits.Add(bit);
}
else
{
rshwBits[countlength - 1].Set(file.signalData[i], true);
}
}
// pick which target bits to use and how many bytes the output should be
int bitsCount = 0;
int[] targetBits = { 0 };
switch (outputType)
{
case "UST 32 Bits (Single Bot RAE/3st)":
bitsCount = 32;
targetBits = SC_RAE3stBitMap[Array.IndexOf(RAE3stCharacters, CharacterSelector.SelectedKey)];
break;
case "UST 8 Bits (Single Bot Cybers Rosetta)":
bitsCount = 8;
targetBits = SC_CyberBitMapRosetta[Array.IndexOf(CyberCharacters, CharacterSelector.SelectedKey)];
break;
case "UST 256 Bits (Full RAE/3st)":
bitsCount = 256;
break;
case "UST 256 Bits (Full Cybers Rosetta)":
bitsCount = 256;
break;
case "UST 8 Bits (Single Bot Cybers)":
bitsCount = 8;
targetBits = SC_CyberBitMapR12[Array.IndexOf(CyberCharacters, CharacterSelector.SelectedKey)];
break;
case "UST 256 Bits (Full Cybers)":
bitsCount = 256;
break;
case "UST 32 Bits (Single Bot Studio C)":
bitsCount = 32;
targetBits = SC_StudioCBitMap[Array.IndexOf(StudioCCharacters, CharacterSelector.SelectedKey)];
break;
case "UST 256 Bits (Full Studio C)":
bitsCount = 256;
break;
}
List<string> writeOut = new List<string>();
foreach (BitArray bits in rshwBits)
{
int frameByte = 0;
for (int i = 0; i < targetBits.Length; i++)
{
if (bits.Get(targetBits[i])) frameByte += 1 << i;
}
writeOut.Add(frameByte.ToString($"X{(bitsCount/4).ToString()}"));
}
File.WriteAllText(outFilePath, MakeHeader(Path.GetFileNameWithoutExtension(outFilePath), outputType, CharacterSelector.SelectedKey)+String.Join(",", writeOut.ToArray())+";"+Convert.ToBase64String(file.audioData));
}
MessageBox.Show("Conversion complete!");
}
}
}

View file

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Eto.Forms" Version="2.9.0" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,31 @@
using System.IO;
using System.Reflection;
using System.Runtime.Serialization.Formatters.Binary;
sealed class AntiUnityBinder : System.Runtime.Serialization.SerializationBinder
{
public override Type BindToType(string assemblyName, string typeName)
{
return Type.GetType(String.Format("RSHWFile, " + Assembly.GetExecutingAssembly().FullName));
}
}
[System.Serializable]
public class RSHWFile
{
public byte[]? audioData { get; set; }
public int[]? signalData { get; set; }
public byte[]? videoData { get; set; }
}
public class RSHWLoader
{
public static RSHWFile Load(string path)
{
BinaryFormatter formatter = new BinaryFormatter();
formatter.Binder = new AntiUnityBinder();
FileStream stream = File.OpenRead(path);
return (RSHWFile)formatter.Deserialize(stream);
}
}

View file

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\PC2Player\PC2Player.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Eto.Platform.Gtk" Version="2.9.0" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,14 @@
using System;
using Eto.Forms;
namespace PC2Player.Gtk
{
class Program
{
[STAThread]
public static void Main(string[] args)
{
new Application(Eto.Platforms.Gtk).Run(new MainForm());
}
}
}

Binary file not shown.

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>PC2Player</string>
<key>CFBundleIdentifier</key>
<string>com.example.PC2Player</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>CFBundleIconFile</key>
<string>Icon.icns</string>
</dict>
</plist>

View file

@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifiers>osx-x64;osx-arm64</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\PC2Player\PC2Player.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Eto.Platform.Mac64" Version="2.9.0" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,14 @@
using System;
using Eto.Forms;
namespace PC2Player.Mac
{
class Program
{
[STAThread]
public static void Main(string[] args)
{
new Application(Eto.Platforms.Mac64).Run(new MainForm());
}
}
}

View file

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\PC2Player\PC2Player.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Eto.Platform.Wpf" Version="2.9.0" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,14 @@
using System;
using Eto.Forms;
namespace PC2Player.Wpf
{
class Program
{
[STAThread]
public static void Main(string[] args)
{
new Application(Eto.Platforms.Wpf).Run(new MainForm());
}
}
}

View file

@ -0,0 +1,57 @@
using System;
using Eto.Forms;
using Eto.Drawing;
namespace PC2Player
{
public partial class MainForm : Form
{
public MainForm()
{
Title = "My Eto Form";
MinimumSize = new Size(200, 200);
Content = new StackLayout
{
Padding = 10,
Items =
{
"Hello World!",
// add more controls here
}
};
// create a few commands that can be used for the menu and toolbar
var clickMe = new Command { MenuText = "Click Me!", ToolBarText = "Click Me!" };
clickMe.Executed += (sender, e) => MessageBox.Show(this, "I was clicked!");
var quitCommand = new Command { MenuText = "Quit", Shortcut = Application.Instance.CommonModifier | Keys.Q };
quitCommand.Executed += (sender, e) => Application.Instance.Quit();
var aboutCommand = new Command { MenuText = "About..." };
aboutCommand.Executed += (sender, e) => new AboutDialog().ShowDialog(this);
// create menu
Menu = new MenuBar
{
Items =
{
// File submenu
new SubMenuItem { Text = "&File", Items = { clickMe } },
// new SubMenuItem { Text = "&Edit", Items = { /* commands/items */ } },
// new SubMenuItem { Text = "&View", Items = { /* commands/items */ } },
},
ApplicationItems =
{
// application (OS X) or file menu (others)
new ButtonMenuItem { Text = "&Preferences..." },
},
QuitItem = quitCommand,
AboutItem = aboutCommand
};
// create toolbar
ToolBar = new ToolBar { Items = { clickMe } };
}
}
}

View file

@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Eto.Forms" Version="2.9.0" />
</ItemGroup>
</Project>

View file

@ -1,48 +0,0 @@
// tp1sm
#include <Servo.h>
Servo servoChannel[11];
void setup()
{
servoChannel[0].attach(2);
servoChannel[1].attach(3);
servoChannel[2].attach(4);
servoChannel[3].attach(5);
servoChannel[4].attach(6);
servoChannel[5].attach(7);
servoChannel[6].attach(8);
servoChannel[7].attach(9);
servoChannel[8].attach(10);
//servoChannel[10].attach(5);
}
void loop()
{
servoChannel[0].write(0);
servoChannel[1].write(90);
servoChannel[2].write(90);
servoChannel[3].write(0);
servoChannel[4].write(0);
servoChannel[5].write(0);
servoChannel[6].write(180);
servoChannel[7].write(180);
servoChannel[8].write(180);
//servoChannel[10].write(160);
delay(500);
servoChannel[2].write(45);
//servoChannel[10].write(120);
delay(500);
servoChannel[0].write(45);
servoChannel[1].write(135);
servoChannel[2].write(135);
servoChannel[3].write(90);
servoChannel[4].write(90);
servoChannel[5].write(90);
servoChannel[6].write(90);
servoChannel[7].write(90);
servoChannel[8].write(90);
//servoChannel[10].write(135);
delay(1000);
}