Not just the OSD keyboard, my real backslash key is also pressing backspace. You can't do your classic DOS commands like "cd\" without a working backspace key.
It's a US keyboard (happens to be a laptop). I've already named the scancodes and VK codes in the parent post. Browser is Firefox.
Backslash works fine if you have chosen to emulate the PC or PC XT. For PCJr, no keystroke appears at all (it does not act as backspace). For Tandy 1000, it acts as backspace. You get the same result whether you use the real backslash key or the backslash key from the on-screen keyboard.
Thanks. This should be fixed for Tandy 1000 now. On PCjr there is no backslash key, you have to type a backspace using alt + /, so I will need to define a macro that does that for you.
The Tandy 1000 will need its own OSD since the tandy keyboard differs from the Model F in significant ways. You'll notice that if you type shift-backslash on the current model-F based OSD you'll get a 7 instead of the expected |. Because backslash is on numpad 7 on the Tandy.
its just ppl trying to be different from their boring parents. wish i had enough karma to flag them too but i keep getting downvoted into oblivion for making fun of written in rust posts
I am not the OP of this post, but they're just using my github description. when I first wrote it, Rust was a novel choice for an emulator, and it helped people find examples of emulators written in Rust.
believe it or not I didn't tailor it for the HN meta
I believe a true engineer should love problems not only languages. But it seems like majority of Rust devs only love the language and try to convert all the problems into Rust problems.
If you have problems in C/C++? Write Rust.
If you have problems in Python? Use Rust.
If you have an issue with your product? Rewrite it in Rust.
Is your company in pinch? Launch a new product in Rust.
If you burn your finger while you’re cooking? Write Rust.
If you have a mental problem? Read a Rust book.
You don’t have a girl friend? You have Rust next to you.
If you hate yourself? Writing Rust will solve your life problems.
they're planned at some point. I need to write a utility or custom controller rig with a pico that can step the head on an MFM drive in patterns i can record, then model stepping to cylinder in the hard disk controller.
DOS has the 'keyb' utility and 'keyboard.sys' to support different layouts, using various code pages.
If you have a CGA card, you're stuck with the code page of the ROM your card came with, which in most cases was code page 437, although a few variants were made.
EGA/VGA had software fonts so other code pages could be loaded.
For not well off geeks you could just solder a bunch of resistors together and get vastly better sound than from the crappy PC speaker and there were games that supported it and I wrote some software for it (which unfortunately is gone I think). I had a lot of just having this on the pc in the house.
"Not long after its introduction, Creative Labs introduced its competing Sound Blaster card. The Sound Blaster was fully compatible with AdLib's hardware, and it also implemented two key features absent from the AdLib: a PCM audio channel and a game port. With additional features and better marketing, the Sound Blaster quickly overshadowed AdLib as the de facto standard in PC gaming audio. AdLib's slow response, the AdLib Gold, did not sell well enough to sustain the company."
"cross-platform" and Rust, as advertised in the current title/link label, is incompatible for sure. Can't get that to run on my older OS X machine nor my Amiga. :)
This comment is itself a meta comment but here we go I guess...How is it possible that half the comments in this thread are about the title itself? It’s not even a made-up title, it’s taken straight from the project’s README...I keep seeing people complaining almost aggressively that others are touting Rust as a useful tool (which, to me personally, it certainly is). Does someone have a financial stake in opposing Rust’s development, or what?
(This post will be downvoted and flagged by Rust cultists and Rust people with financial stakes.)
More like, if a submission has "written in Rust" in it, the Rust cultists and non-human bots will automatically upvote it.
There are definitely financial stakes at play, but financially interested Rust advocates are by far the worst of the bunch regarding behavior, apart from the Rust cult, which by lightyears is the worst of any programming language, with their organized social media manipulation and harassment and murderous ways. The Rust Foundation and others in the Rust community inherited and evolved their fundraising approach from Mozilla, and the Rust Foundation actively gives money to people whose primary job is to "promote" Rust, instead of purely giving it to developers to develop on compilers, tools, infrastructure and related technical topics. Other really bad offenders include, perhaps surprisingly, the Ada vendors, user pjmlp might be leading the charge there. Ada vendors still long for the days where they had a monopoly mandated by the US government.
Mojo got a billion dollar investment, but they seem to be focused on not shilling their language, but actually making a genuinely excellent language, though I have not tried it myself. As an example, it seems to handle temporary lifetime extension way better than Rust, C++ and Zig, with its explicit destructors among other features.
For languages like Scala and C++, they are way too embroiled in internal infighting to do much of anything. Funnily enough, one side of C++ is dominated by Rust cultists. C++ has an ISO standard, and is very complex, meaning some of the main proponents there are educators and book writers, though they generally seem focused inwards. No one really likes C++, it is too old and has very significant issues, but it can have practical value in some cases. Its ISO standard also hinders any party from gaining complete control of it, though its design and development has already been sabotaged from the inside, and it counts against C++ that it has failed to prevent that much sabotage. Rust is also facing sabotage from the inside, but this seems to be more due to tragedy of the commons, where proposal makers consider it more important for their proposals to become part of the Rust language (and the proposal maker in question getting prestige) than for the Rust language to improve, something that many languages suffer from. The Rust community might also in several cases be too afraid of their own cultists to say no to proposals or to criticize proposals properly. "Democratization" in Rust has been interpreted by some as that there should be no or barely any requirements and expectations for language changes. The lies and dishonesty of the Rust community and cult only worsens this issue.
Zig has anti-LLM activists, but they do not seem numerous nor all that active.
C has barely anyone, just some WG14 committee members and other interested people, the language is too old, too widespread, too minimalistic and too foundational either way.
Java, C#, Kotlin, Typescript, Go, Python, and many others, all have their niches, and the ecosystems of the garbage-collected languages seem to function decently. The systems languages, on the other hand, all seem to have significant technical or practical issues in some regards or another, and being the foundation of lots of other technology, they can both be strategically important and possibly more difficult to directly make money from regarding developing and designing the given languages. I wonder how Mojo's Modular is planning to make money, perhaps strategic control? Systems languages have a lot of room for improvement still. Mojo is an interesting entry, but it is still very young and untested.
Apart from cults and financial stakes of companies, organizations and individuals, there are some people from small or failing/failed language communities that are embittered about their languages failing/having failed or not being larger. This is especia...
Rust's user community is toxic and unbearable. That's enough to explain the widespread resentment against it. Their fanboys are annoying. CommonLisp used to have a similar community problem.
I write Rust code. I don’t mind it. But the truth is, I use very little of the language.
I visit the Discord, and I see all the crazy overcomplicated shit these people are writing.
If I had to try and make heads or tails of some of that shit I’d go crazy.
I actually think some of it is actual trolling by Rust itself.
And yes, the people are toxic. It’s like they really believe C and C++ and everyone else did literally everything wrong. And some of their justifications are seriously weak sauce.
And remember, I like Rust. At least the parts I use. But it’s easily going to eclipse C++ in complexity if it continues the way it has been operating.
Yup, definitely the Rust users who are toxic. Totally not the people going into every thread about Rust to tell everyone about how toxic Rust users are. Nope.
But it is true, you see way more comments complaining about "the toxic Rust community" than said toxic community itself. At some point it just becomes annoying and tiring...
As you presumably know, for most programmers the choice of a programming language is entirely pragmatic. Tooling and community play as much a role as the language itself. When people point out flaws, in this case warn about the community, they're not doing it for that community but mostly as a heads up for other people. In this case, the community gives wrong signals, leading to novices wasting efforts on Rust for projects for which the language is not well suited. There used to be other languages with such problems and the same advice was helpful. It's not a personal thing.
You didn't talk about this thread in your previous posts, you talked generally about the community just like I did. However, to answer your question: Yes, I've spotted some, and they are rather annoying.
Yeah, I love Rust as a language but I engage with the community as little as possible. They are not pleasant to be around. Language is dope though, I really enjoy it.
When I started writing MartyPC over four years ago, writing an emulator in Rust was still somewhat novel. The development of the 'egui' immediate-mode graphics framework made it possible to make one with an advanced interactive debugger.
By mentioning Rust people have been able to more easily find MartyPC as an example of how (or how not to) write an emulator in Rust.
Perhaps the tag as outlived its usefulness, especially if people find it pompous or something. I'm not trying to be Rust cultist, I swear.
besides the fact that it was written in rust, rust happens to be a really nice language to write emulators, you don't have to think much about threading and not much abut memory management, rust makes that easy => you can concentrate on your pixels. Moreover LLM grasp it very well so that you can get a bit more spare time for your emulator-side-project.
It was very long since I wrote any sort of C++ and using rust was pretty refreshing.
Second "besides": marty's PC may not have a lot of breadth in terms of supported hardware, but it gets the accuracy totally right. It's a very special kind of achievement.
(I'm not a rust fanboy :-) I just appreciate the language for writing my emulator)
One of the amazing things about this project is that the author built physical harnesses for real early CPUs so that he could build test suites against the real hardware and ensure the emulation is 100% correct, down to every timing and quirk of the original hardware.
To add on top this, the author wrote multiple blog posts on their setup [0, 1, 2]. The project itself is hosted at https://github.com/dbalsom/arduinoX86
It is insane because IBM wanted a wireless keyboard. If you're not familiar with the PCjr keyboard, it has two IR transmitters (they are electrically the same, just having two gives you a better transmission path). The PCjr system has an IR receiver.
Now, a normal keyboard cable is a standard two-wire serial protocol with clock and data. Being wireless, you have no clock, so you have to synchronize clocks, or have clock recovery built into the protocol. The PCjr does the former, using the 8253 timer chip.
The keyboard has no way of knowing if the system has received a keystroke, so the system must receive every keystroke - they can't be stored in a fifo, they can't be resent if the CPU missed it.
This rules out the possibility of using system interrupts - so when you type a key on the CPU and the IR receiver gets the start bit - the NMI line is raised, the 8253 is programmed to time the clock bursts from the IR receiver, and the CPU reads out every bit of the scancode.
The PCjr also famously has no DMA, so things like floppy drive transfers are both extremely slow and somewhat unreliable - the IBM floppy controller is somewhat additionally weird is that they disable interrupts as well. The only way the PCjr knows what the controller is doing is by polling its status register, and there is enough ambiguity that it sets a 555 timer that will reset the FDC and start everything over if things time out.
The combination of these two decisions means its inadvisable to type while your floppy drive is transferring data
yes, swipe up to show a keyboard. this currently only supports the 5150/5160 completely as it is a Model F keyboard and the Tandy/Jr have some differences.
105 comments
[ 0.18 ms ] story [ 14.5 ms ] threadJavascript says it's keycode 220 (also 0xDC) or key "\"
Furthermore, I had Tandy 1000 as the selected machine, that machine might need VK_OEM_102 (0xE2) or scancode 0x56 as the backslash key.
I have to make all new pixel-art for a Tandy 1000 keyboard and PCjr keyboard. Fun
Backslash works fine if you have chosen to emulate the PC or PC XT. For PCJr, no keystroke appears at all (it does not act as backspace). For Tandy 1000, it acts as backspace. You get the same result whether you use the real backslash key or the backslash key from the on-screen keyboard.
The Tandy 1000 will need its own OSD since the tandy keyboard differs from the Model F in significant ways. You'll notice that if you type shift-backslash on the current model-F based OSD you'll get a 7 instead of the expected |. Because backslash is on numpad 7 on the Tandy.
Dealing with this stuff is tons of fun
[1] Physical location of a key https://w3c.github.io/uievents/#keys-codevalues
[2] Mapping of a key https://w3c.github.io/uievents/#keys-keyvalues
The naming is terrible and I have to look it up every single time
believe it or not I didn't tailor it for the HN meta
but I see your point.
There was a time for CoffeeScript, PureScript, Elm, Ruby and whatever else you can think of.
Naturally Lisp has to have monthly entries.
/s
(To clarify: I like Rust. I use it every day. But this is going too far.)
If you have problems in C/C++? Write Rust.
If you have problems in Python? Use Rust.
If you have an issue with your product? Rewrite it in Rust.
Is your company in pinch? Launch a new product in Rust.
If you burn your finger while you’re cooking? Write Rust.
If you have a mental problem? Read a Rust book.
You don’t have a girl friend? You have Rust next to you.
If you hate yourself? Writing Rust will solve your life problems.
/s
Are you using DVORAK? If you are willing to help, please open a Github issue with some info about your keyboard, and I'll build support for it.
If you have a CGA card, you're stuck with the code page of the ROM your card came with, which in most cases was code page 437, although a few variants were made.
EGA/VGA had software fonts so other code pages could be loaded.
https://github.com/necroware/silly-sound-bastard
From Wikipedia,
"Not long after its introduction, Creative Labs introduced its competing Sound Blaster card. The Sound Blaster was fully compatible with AdLib's hardware, and it also implemented two key features absent from the AdLib: a PCM audio channel and a game port. With additional features and better marketing, the Sound Blaster quickly overshadowed AdLib as the de facto standard in PC gaming audio. AdLib's slow response, the AdLib Gold, did not sell well enough to sustain the company."
I've heard the comments here loud and clear :) You all don't think Rust is novel anymore and I should lose that bit.
More like, if a submission has "written in Rust" in it, the Rust cultists and non-human bots will automatically upvote it.
There are definitely financial stakes at play, but financially interested Rust advocates are by far the worst of the bunch regarding behavior, apart from the Rust cult, which by lightyears is the worst of any programming language, with their organized social media manipulation and harassment and murderous ways. The Rust Foundation and others in the Rust community inherited and evolved their fundraising approach from Mozilla, and the Rust Foundation actively gives money to people whose primary job is to "promote" Rust, instead of purely giving it to developers to develop on compilers, tools, infrastructure and related technical topics. Other really bad offenders include, perhaps surprisingly, the Ada vendors, user pjmlp might be leading the charge there. Ada vendors still long for the days where they had a monopoly mandated by the US government.
Mojo got a billion dollar investment, but they seem to be focused on not shilling their language, but actually making a genuinely excellent language, though I have not tried it myself. As an example, it seems to handle temporary lifetime extension way better than Rust, C++ and Zig, with its explicit destructors among other features.
For languages like Scala and C++, they are way too embroiled in internal infighting to do much of anything. Funnily enough, one side of C++ is dominated by Rust cultists. C++ has an ISO standard, and is very complex, meaning some of the main proponents there are educators and book writers, though they generally seem focused inwards. No one really likes C++, it is too old and has very significant issues, but it can have practical value in some cases. Its ISO standard also hinders any party from gaining complete control of it, though its design and development has already been sabotaged from the inside, and it counts against C++ that it has failed to prevent that much sabotage. Rust is also facing sabotage from the inside, but this seems to be more due to tragedy of the commons, where proposal makers consider it more important for their proposals to become part of the Rust language (and the proposal maker in question getting prestige) than for the Rust language to improve, something that many languages suffer from. The Rust community might also in several cases be too afraid of their own cultists to say no to proposals or to criticize proposals properly. "Democratization" in Rust has been interpreted by some as that there should be no or barely any requirements and expectations for language changes. The lies and dishonesty of the Rust community and cult only worsens this issue.
Zig has anti-LLM activists, but they do not seem numerous nor all that active.
C has barely anyone, just some WG14 committee members and other interested people, the language is too old, too widespread, too minimalistic and too foundational either way.
Java, C#, Kotlin, Typescript, Go, Python, and many others, all have their niches, and the ecosystems of the garbage-collected languages seem to function decently. The systems languages, on the other hand, all seem to have significant technical or practical issues in some regards or another, and being the foundation of lots of other technology, they can both be strategically important and possibly more difficult to directly make money from regarding developing and designing the given languages. I wonder how Mojo's Modular is planning to make money, perhaps strategic control? Systems languages have a lot of room for improvement still. Mojo is an interesting entry, but it is still very young and untested.
Apart from cults and financial stakes of companies, organizations and individuals, there are some people from small or failing/failed language communities that are embittered about their languages failing/having failed or not being larger. This is especia...
I visit the Discord, and I see all the crazy overcomplicated shit these people are writing.
If I had to try and make heads or tails of some of that shit I’d go crazy.
I actually think some of it is actual trolling by Rust itself.
And yes, the people are toxic. It’s like they really believe C and C++ and everyone else did literally everything wrong. And some of their justifications are seriously weak sauce.
And remember, I like Rust. At least the parts I use. But it’s easily going to eclipse C++ in complexity if it continues the way it has been operating.
It's exactly this kind of straw man I was talking about. Aggressive and butthurt about the slightest criticism; that's not normal.
I’m amused by the implication of human bots.
What?
By mentioning Rust people have been able to more easily find MartyPC as an example of how (or how not to) write an emulator in Rust.
Perhaps the tag as outlived its usefulness, especially if people find it pompous or something. I'm not trying to be Rust cultist, I swear.
It was very long since I wrote any sort of C++ and using rust was pretty refreshing.
Second "besides": marty's PC may not have a lot of breadth in terms of supported hardware, but it gets the accuracy totally right. It's a very special kind of achievement.
(I'm not a rust fanboy :-) I just appreciate the language for writing my emulator)
I was trying to Run Back To The Future, so I figured I'd call my emulator either Marty or McFly.
Unfortunately I found out about the FM Towns later, so I renamed it from Marty to MartyPC so you could google "MartyPC Emulator" properly.
[0]: https://martypc.blogspot.com/2023/06/hardware-validating-emu...
[1]: https://martypc.blogspot.com/2023/05/exploring-dma-on-ibm-pc...
[2]: https://martypc.blogspot.com/2023/10/bus-sniffing-ibm-5150.h...
It is insane because IBM wanted a wireless keyboard. If you're not familiar with the PCjr keyboard, it has two IR transmitters (they are electrically the same, just having two gives you a better transmission path). The PCjr system has an IR receiver.
Now, a normal keyboard cable is a standard two-wire serial protocol with clock and data. Being wireless, you have no clock, so you have to synchronize clocks, or have clock recovery built into the protocol. The PCjr does the former, using the 8253 timer chip.
The keyboard has no way of knowing if the system has received a keystroke, so the system must receive every keystroke - they can't be stored in a fifo, they can't be resent if the CPU missed it.
This rules out the possibility of using system interrupts - so when you type a key on the CPU and the IR receiver gets the start bit - the NMI line is raised, the 8253 is programmed to time the clock bursts from the IR receiver, and the CPU reads out every bit of the scancode.
In software.
The combination of these two decisions means its inadvisable to type while your floppy drive is transferring data
But honestly I wanted to learn the Rust programming language and I thought writing an emulator was a good a project to learn as any.
I have been working on a emulator in C++ in collaboration with a friend, it is also cycle-accurate. It is called XTCE-Blue.