4 ms·
DOSbox already flies on a Raspberry Pi. I think this is one of those instances where the technology in question (DOS) is so old that it makes more sense to solv
by hnlmorg 5y ago
DOSbox already flies on a Raspberry Pi. I think this is one of those instances where the technology in question (DOS) is so old that it makes more sense to solve it in software than it does in hardware.
- Koshkin 5y ago> is so old Indeed - looks like the older the software, the more efficient it is.
- hnlmorg 5y agoThat's a fun comment people like to quote but as someone who's been writing software since the DOS days, I can tell you it's not really true. - Older software might run less efficiently on newer hardware because they don't support newer hardware (eg CPU opcodes) and thus perform the same calculations in software. This is most visibly true with games that are software rendered in DOS rather than hardware rendered. - Older software might not take advantage of smarter algorithms that have been discovered more recently. This is best observed in the modern demo scene - Older software might run faster but that might simply because they don't support modern requirements (eg cryptography, memory protection, or even error / crash handling). This is probably the closest to the "efficient" argument but I'd counter by saying the code isn't "more efficient", it's "less functional". Sometimes less functional is exactly what you want (eg why spin up Microsoft Word if all you want to edit is a plain text file) but it's still not the same as saying "more efficient".
- csnover 5y agoThese are all great points. Something else I would add to the list is that older software would often run using a busy loop[0]. This was ‘fine’ on contemporaneous CPUs that didn’t have any low-power modes, but on a modern CPU it means that older software will use 100% of one CPU core and force it to stay running at its maximum frequency while doing no work at all. [0] https://en.wikipedia.org/wiki/Busy_waiting https://en.wikipedia.org/wiki/Busy_waiting
- hnlmorg 5y agoI'd say that's covered under the first point since it's a newer added hardware instruction (`HLT` I believe). But it's definitely another very good example of the first point.
- milesvp 5y agoDOSbox is great for games, and other Non real-time uses. I'm not sure that you get the same timing precision and variance in DOSBox as you do with DOS on hardware. I'd be curious if older CNC machines have had luck replacing their aging hardware with newer machines running DOSbox. As to solving old hardware in software, I'm starting to see HDL as a solution to dealing with this. I've been watching the MiSTer project for a while now as a way to capture old hardware on a fairly large FPGA.
- hnlmorg 5y agoGames are probably more real time than CNC machines since you're dealing with short feedback loops between user interfaces the frame buffer. It's more the esoteric drivers that are going to be an issue with those CNC machines. I've read on here about people running such hardware in DOSbox but it's not a problem I've needed to solve personally. However since DOSbox is an emulator (as opposed to FreeDOS which is a "just" an OS), I wouldn't be surprised if DOSbox handled those situations fine.
- userbinator 5y agoCNC is definitely more "real time" in the sense that if the timing isn't right, a tool crashes into the work. In a game, all that would happen is a little glitch that may or may not be noticeable.
- hnlmorg 5y agoIt's been a looooong time since I've worked with CNC machines but doesn't the machine itself cache the instructions? Or is the PC the controller? If it's the latter than I see your and the GP's point about RT. :)
- genewitch 5y agoThe old machines wouldn't buffer that much, and newer cheaper machines (including every 3d printer I've used) still expect a stream of data in real time. Someone with an inclination could probably make a python controller or something but it's probably cheaper and safer to just buy new machines.