-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Amiga and C=128? #9
Comments
your work is really great. Do you think you will add Amiga and 128?
Thanks
And CPC 6128 :-)
|
They are all within the scope of this project, and I've already thought about adding them. However, adding a new computer is a lot of work:
Help on any of that (or any other part of the app, including documentation) would be most welcome. Currently, I'm the only one working on this project. |
Hi, I presume it's a very time consuming work. |
You're looking for a photo that is straight from the top, ideally 3000-4000 pixels wide. Also, you need permission to use the photo: either it's distributed under Creative Commons or similar (Wikipedia is a good source for this), it's your own photo, or you ask the photographer for permission to use it in an open source emulator. Make sure the edges of the keyboard are straight and parallel to the edges of the image. I use Lightroom on iPad to straighten the image (with the Geometry tool), other programs should have similar tools. Then you trim it so there is a border about half a key wide. If there are multiple blocks of keys, bring them closer together so the gap is also about half a key wide (e. .g the function keys on C64). Cut out the case, making the regions transparent. If there is writing on the case (e. g. ZX Spectrum), leave that there (best to make a flood color selection of the case color and cut that). I have a German C128, if you want to start there, I can send you a photo. |
Yes, send it to me and I will do my best. Regards |
Here you go. I already straightened it. The gaps between the key blocks are small enough, you can leave them as they are. Also, could you please fill in the pixel measurements below:
The rest should hopefully be self explanatory, if not feel free to ask. For measurements at the edge of a key block, use the edge between the removed case and the remaining black background. For measurements between keys, use the middle between the top of the key caps.
thanks, |
Please restore the vertical space between the top row of keys (dark grey) and the rest. Otherwise it looks great. Here some examples of the values I mean, measured in your picture; hope this makes things clearer: rows: [237, 414, ...]
left: 59,
right: 2739,
controlRight: 298,
... |
Here it is: ` "C128 DE": Keyboard(c128WithImageName: "Commodore 128 DE Keyboard", ` |
Thank you, this looks great. |
If you want some other keyboards and have pictures, I can help! |
To avoid misunderstandings: this will need a different set of measurements than the C128 keyboard. Looking at what we measured for C128 should give you a good idea what we will need here. If you have any questions, feel free to ask. If you want to, you can contact me per email. My address is [email protected]. |
I am working on it now |
|
Great, thanks. There are just a few measurements missing: Also, these two are unnecessary (Alt and Amiga keys have the same width): The next two steps are writing the actual init function and the key to symbol mapping. Would you be willing to tackle those as well? The init function is in Emulator/Keyboard.swift. c128WithImageName is a good place to start, they have a similar layout. Key names are defined in Emulator/Key.swift; feel free to add new ones if none of the existing fits. CapsLock is the only toggle key. This defines the hit zones of each key, grouped into rows (all keys with the same top and bottom edges), and within that into spans (adjacent keys of the same width). Double high keys are simply included in both rows. The symbol mapping is in Emulator/KeyboardSymbols.swift. Again c128 should be a good starting point. This maps keys from the Amiga keyboard to keys on the hardware keyboard connected to the iPad. If you're not sure which key to map to, just add a comment with the key name (so we see that it's not mapped yet). |
“Amiga DE": Keyboard(AmigaWithImageName: "Commodore Amiga DE Keyboard",
rows: [173,274,364,458,554,646],
left: 36,
right: 1475,
controlRight: 150,
leftShiftLeft: 47,
leftShiftRight: 196,
rightShiftLeft: 1218,
rightShiftRight: 1470,
spaceLeft: 338,
spaceRight: 1163,
leftAltLeft: 113,
rightAltRight: 1405,
keypadLeft: 1830,
keypadRight: 2213,
keypad0Right: 2019,
functionRowTop: 34,
functionRowBottom: 142,
functionBlock1Left: 174,
functionBlock1Right: 756,
functionBlock2Left: 794,
functionBlock2Right: 1380,
tildeRight: 172,
tabRight: 223,
returnUpperLeft:1326,
returnLowerLeft:1355,
cursorLeft: 1508,
cursorRight: 1794,
escapeRight: 140),
|
Let me know if I did the latest keys correctly, I also tried to modify Key.swift, but it's the first time I use github... |
The following measurements are unnecessary: Otherwise they look great. If you don't want to use git/GitHub, just download the raw version of the files and send me the edited versions (via email is probably best). Your changes should be easy enough for me to integrate. |
I also cannot understand why I input with the "code" option on github, and they are not formatted :-( |
For multi-line code, use triple backtick followed by the language used (swift in our case): ```swift func foo() -> Bar { return Bar() } ``` produces func foo() -> Bar {
return Bar()
} |
your work is really great. Do you think you will add Amiga and 128?
Thanks
The text was updated successfully, but these errors were encountered: