News for hackers. Stuff that matters.
Re:Porting Doom to a USB Bluetooth Dongle by humanistbot on Tuesday November 16, 2021 @12:11PM (#29243157)
Now this is what I come to HN for. A true hack in the classic sense of the term. An absurd attempt to do something with technology that its designers had absolutely no intention of supporting, and learning quite a bit about it in the process. Bravo!
Re:Porting Doom to a USB Bluetooth Dongle by WalterBright on Tuesday November 16, 2021 @04:54PM (#29246810)
This is also why I embrace Open Source! If Doom was closed source, none of this would happen.
Re:Porting Doom to a USB Bluetooth Dongle by askl on Tuesday November 16, 2021 @11:58AM (#29242951)
So maybe the PineTime watch[1] could also run doom, it uses almost the same SoC except with less RAM and flash

[1] https://pine64.com/product/pinetime-smartwatch-sealed/

Re:Porting Doom to a USB Bluetooth Dongle by audunw on Tuesday November 16, 2021 @04:33PM (#29246601)
There's probably not enough RAM. (64kB vs 256kB for the nRF52840). Certainly not for the full resolution of the display with color. But I'm sure a more basic port would be possible.
Re:Porting Doom to a USB Bluetooth Dongle by ece on Tuesday November 16, 2021 @12:34PM (#29243524)
I'm here for this hack.
Re:Porting Doom to a USB Bluetooth Dongle by smirutrandola on Monday November 15, 2021 @05:38AM (#29225856)
Video link: https://www.youtube.com/watch?v=kUsfgSCRpG0

These are the same guys of the doom port to the ikea lamp (see https://news.ycombinator.com/item?id=27498789).

Re:Porting Doom to a USB Bluetooth Dongle by mcotocel on Tuesday November 16, 2021 @11:54AM (#29242886)
Interesting how a modern USB Bluetooth dongle is more powerful than a proper computer from 40 years ago, and much smaller as well.
Re:Porting Doom to a USB Bluetooth Dongle by AnIdiotOnTheNet on Tuesday November 16, 2021 @12:35PM (#29243530)
Also interesting is how, given that, we still have slow and unresponsive software that often isn't doing much more than we did 40 years ago.
Re:Porting Doom to a USB Bluetooth Dongle by fhood on Tuesday November 16, 2021 @05:21PM (#29247036)
We use additional compute power to enable frameworks and abstractions that allow code to be written faster. Sure it's bloated but at least there is a reason.
Re:Porting Doom to a USB Bluetooth Dongle by AnIdiotOnTheNet on Tuesday November 16, 2021 @05:55PM (#29247318)
Is code actually being written faster? Or with fewer people? I am not convinced that it is.
Re:Porting Doom to a USB Bluetooth Dongle by AussieWog93 on Tuesday November 16, 2021 @06:50PM (#29247770)
Yeah, this is my experience too. I view it more as beauracracy; in order to get my job done I now also have to understand a whole lot of arbitrary systems created by a group of programmers on the other side of the world.

If you break out of the desktop/mobile environment and into embedded, it's genuinely liberating.

Re:Porting Doom to a USB Bluetooth Dongle by adgjlsfhk1 on Tuesday November 16, 2021 @11:08PM (#29249212)
one thing to consider is that the types of people writing code are very different. In the 80s it took geniuses to write a simple videogame within ram constraints. Now that is a feasible final project for an intro CS class.
Re:Porting Doom to a USB Bluetooth Dongle by AussieWog93 on Wednesday November 17, 2021 @07:04PM (#29260544)
I don't think it did.

Electrical engineers still write incredibly low-level code in embedded programming courses - we did some pretty interesting shit in MIPS assembler before we even touched C++ - and I doubt we were any smarter than the CompSci kids.

I think it's primarily a cultural difference - modern CompSci people love treating everything as an academic exercise and hand-waving away complexity, whereas the old-school "hackers" (before CompSci was really a huge thing) would love getting into the nitty-gritty of things and didn't really give a damn about whether or not they were following best practices.

If the average CompSci student (who, to be fair, is smart but not Genius-level) spent as much time reading the spec sheet for the Motorola 68000 as they did learning how and when a Turing Machine halts, they'd have no issue understanding 80's video game code.

Re:Porting Doom to a USB Bluetooth Dongle by fhood on Thursday November 18, 2021 @01:56PM (#29269047)
Yes, 100%. Without question. I know it's trendy to hate modern languages and frameworks but they do reduce overall dev time even if they have more of an initial learning overhead.
Re:Porting Doom to a USB Bluetooth Dongle by jagger27 on Tuesday November 16, 2021 @01:08PM (#29244112)
Apples USB-C charging bricks are quite capable on their own. The new 140W brick uses a 32-bit Arm Cortex-M0 STM32G0-series microcontroller with 36K RAM, 128K flash ROM, running at 64MHz.

Source: 9:45 minute mark of the video in this article: https://9to5mac.com/2021/10/29/teardown-shows-details-of-app...

Re:Porting Doom to a USB Bluetooth Dongle by philistine on Tuesday November 16, 2021 @09:31PM (#29248753)
At some point Apple is going to start putting S-series chip in those chargers.
Re:Porting Doom to a USB Bluetooth Dongle by mavhc on Wednesday November 17, 2021 @04:38AM (#29250802)
Have you tried turning your charger off and on again?
Re:Porting Doom to a USB Bluetooth Dongle by bombela on Wednesday November 17, 2021 @04:02AM (#29250544)
What can you possibly do to need such computing power for a switching power supply... I wonder
Re:Porting Doom to a USB Bluetooth Dongle by pantalaimon on Wednesday November 17, 2021 @04:37AM (#29250798)
STM32G0 is as already the lowest end current MCU line from ST (if you ignore the STM8 line of 8-bit MCUs)
Re:Porting Doom to a USB Bluetooth Dongle by jagger27 on Wednesday November 17, 2021 @08:24AM (#29252645)
USB PD is a fairly complex protocol. I can safely plug my phone into my MacBook charger now because both ends can negotiate a suitable power level. We’re not just doing 5V 1A anymore. The CPU they chose is probably a little overkill, but it’s nicer than 8-bit microcontrollers to write programs for since it’s just Arm.

Who knows, maybe they have a bunch of internal sensors and can intelligently react to high temperatures or moisture.

Re:Porting Doom to a USB Bluetooth Dongle by 8fingerlouie on Wednesday November 17, 2021 @02:40AM (#29250148)
I worked on the kernel parts of the pre smart phones.

When GSM was invented, there was real doubt that it might not be possible to meet the very specific timing needs on the hardware that was available at the time.

I remember when we had to integrate Bluetooth into our 16 bit, 8Mhz Infineon E-gold platform. We had ~20 people working on it for 2 years.

Re:Porting Doom to a USB Bluetooth Dongle by Arrath on Tuesday November 16, 2021 @12:25PM (#29243390)
Reminds me of the article on HN some months ago where someone got a form of Lunix running on the controller SoC within a hard drive. Incredible what power is being packed into other devices, these days.
Re:Porting Doom to a USB Bluetooth Dongle by PeterisP on Tuesday November 16, 2021 @02:58PM (#29245648)
http://spritesmods.com/?art=hddhack perhaps, with the backdoor that adds an extra user when /etc/shadow is read from the drive?
Re:Porting Doom to a USB Bluetooth Dongle by Arrath on Tuesday November 16, 2021 @04:58PM (#29246841)
That's the one I was thinking of!
Re:Porting Doom to a USB Bluetooth Dongle by luke2m on Tuesday November 16, 2021 @12:33PM (#29243505)
Re:Porting Doom to a USB Bluetooth Dongle by jjice on Tuesday November 16, 2021 @02:34PM (#29245344)
Satirical news/blog stories are my favorite part of the old internet. Really with they would have a comeback. The long form written humor is a lot more fun to me than something like Twitter.
Re:Porting Doom to a USB Bluetooth Dongle by Arrath on Tuesday November 16, 2021 @01:26PM (#29244450)
This feels like a rabbit hole, my my.
Re:Porting Doom to a USB Bluetooth Dongle by awesomepeter on Tuesday November 16, 2021 @03:39PM (#29246090)
Why lunix? I assume you mean Linux, I've seen it written this way a few times and am wondering where it comes from
Re:Porting Doom to a USB Bluetooth Dongle by pjmlp on Tuesday November 16, 2021 @04:23PM (#29246513)
Re:Porting Doom to a USB Bluetooth Dongle by Arrath on Tuesday November 16, 2021 @04:56PM (#29246821)
Typo, nothing more nothing less.
Re:Porting Doom to a USB Bluetooth Dongle by elurg on Wednesday November 17, 2021 @05:45AM (#29251307)
Doom is less that 30 years old and was resource-intensive for the time.
Re:Porting Doom to a USB Bluetooth Dongle by numpad0 on Tuesday November 16, 2021 @01:49PM (#29244771)
> nRF52840

That's not a standard Bluetooth dongle, that's the go-to chip that runs a lot of smartwatches, tags, and health devices. Has community Arduino support as well.

Re:Porting Doom to a USB Bluetooth Dongle by sodality2 on Tuesday November 16, 2021 @03:07PM (#29245761)
Also the OpenSK project from Google uses them - build-your-own FIDO2 token :D
Re:Porting Doom to a USB Bluetooth Dongle by moffkalast on Tuesday November 16, 2021 @12:57PM (#29243905)
> the game was running at 34.5 fps

It can run Doom at 35 fps, but can't stream a good bluetooth signal to headphones more than 5 m away smh.

Re:Porting Doom to a USB Bluetooth Dongle by callmemclovin on Wednesday November 17, 2021 @01:48AM (#29249884)
You're right, because the nRF52 series are Bluetooth Low Energy (BLE) devices, they can't stream music at all :-) Music streaming is done via Bluetooth Classic (as of now). BLE != Bluetooth Classic
Re:Porting Doom to a USB Bluetooth Dongle by audunw on Wednesday November 17, 2021 @06:26AM (#29251590)
That's not true. BLE can stream music now, it's in the Bluetooth 5 standard. The nRF52 isn't great for it, there's nRF53 for that, but it's possible

https://www.nordicsemi.com/News/2020/01/Nordic-launches-a-Bl...

Re:Porting Doom to a USB Bluetooth Dongle by moffkalast on Wednesday November 17, 2021 @06:58AM (#29251901)
I was under the assumption that BLE chips have regular BL support as well as a fallback for when you actually want to use the thing for something productive. Is that not the case or are most phone manufacturers just lying while putting two chips on devices?

Like if a chip supports Bluetooth 5.1 that should include both, no?

Re:Porting Doom to a USB Bluetooth Dongle by audunw on Tuesday November 16, 2021 @01:56PM (#29244851)
Have you tried a Bluetooth 5 LE headphone? It's a completely different radio and protocol from previous generation Bluetooth headphones. I don't know if there are any in the market yet. There certainly isn't any based on nRF5340 yet.

I don't know if the range will be better, but latency and pairing process should be much better.

Re:Porting Doom to a USB Bluetooth Dongle by MonaroVXR on Wednesday November 17, 2021 @03:56AM (#29250519)
>but can't stream a good bluetooth signal to headphones more than 5 m away smh.

So many factors, right I can't pull out the Bluetooth specs.

Re:Porting Doom to a USB Bluetooth Dongle by maxwelljoslyn on Tuesday November 16, 2021 @01:17PM (#29244305)
Bluetooth devices are in such a sad state :^(
Re:Porting Doom to a USB Bluetooth Dongle by srvmshr on Tuesday November 16, 2021 @12:00PM (#29242984)
Doom is becoming the NetBSD of computer games. People managed to port it everywhere
Re:Porting Doom to a USB Bluetooth Dongle by LukeShu on Tuesday November 16, 2021 @12:05PM (#29243067)
I'm pretty sure Doom de-throned NetBSD at least a decade ago.
Re:Porting Doom to a USB Bluetooth Dongle by xook on Tuesday November 16, 2021 @01:50PM (#29244780)
I would ask "Is there a BSDoom?" but this[0] might qualify.

[0] https://www.cs.unm.edu/~dlchao/flake/doom/

Re:Porting Doom to a USB Bluetooth Dongle by unmole on Tuesday November 16, 2021 @08:35PM (#29248458)
Linux beat NetBSD ages ago.
Re:Porting Doom to a USB Bluetooth Dongle by gattilorenz on Wednesday November 17, 2021 @02:46AM (#29250172)
Most Linux distributions dropped support for older architectures (Motorola 68K, Sparc, Vax and the likes) that NetBSD still somewhat actively supports [1]. Heck, many Linux distributions dropped even i386...

[1] https://www.netbsd.org/ports/#ports-tier2

Re:Porting Doom to a USB Bluetooth Dongle by pantalaimon on Wednesday November 17, 2021 @04:33AM (#29250769)
To make your life easier, just get the official nRF52840 Dongle - it's only 10€ but has all GPIOs conveniently exposed. No need to repurpose the LED or the user button for a GPIO.

https://www.nordicsemi.com/Products/Development-hardware/nrf...

Re:Porting Doom to a USB Bluetooth Dongle by josu on Wednesday November 17, 2021 @06:28AM (#29251611)
I mean, to make your life easier just play Doom on your computer. But I don't think that was the point of this project.
Re:Porting Doom to a USB Bluetooth Dongle by tombert on Tuesday November 16, 2021 @10:49PM (#29249113)
It's sort of insane how ubiquitous outright computers are now. Like, I didn't know that USB dongles were full-on computers, but it doesn't surprise me either...Computers have gotten so cheap and small to a borderline-disposable level.

Kind of cool that I get to be a part of first generation experience that.

Re:Porting Doom to a USB Bluetooth Dongle by grae_QED on Tuesday November 16, 2021 @12:09PM (#29243133)
At this rate, I wouldn't be surprised if some one ported doom to their electric toothbrush.
Re:Porting Doom to a USB Bluetooth Dongle by Minor49er on Tuesday November 16, 2021 @12:21PM (#29243315)
It might be hard to play, but I'm confident I could work my way up from Knee-Deep in the Fluoride through Thy Brush Consumed on a single tube of paste
Re:Porting Doom to a USB Bluetooth Dongle by krylon on Tuesday November 16, 2021 @12:40PM (#29243610)
There Will Be Toothpaste
Re:Porting Doom to a USB Bluetooth Dongle by carl_dr on Tuesday November 16, 2021 @12:45PM (#29243689)
Have you seen Doom on a pregnancy test?

https://twitter.com/foone/status/1302820468819288066?s=21

Re:Porting Doom to a USB Bluetooth Dongle by benbristow on Tuesday November 16, 2021 @12:51PM (#29243771)
It's not actually running on the original hardware, it's running on external hardware which is controlling the display

https://twitter.com/tomwarren/status/1302913385764458498

Re:Porting Doom to a USB Bluetooth Dongle by detaro on Tuesday November 16, 2021 @12:53PM (#29243816)
where "on a pregnancy test" means "they ripped out the original hardware from a pregnancy test and put in a new controller and new display, which then shows Doom"
Re:Porting Doom to a USB Bluetooth Dongle by marlone93 on Tuesday November 16, 2021 @01:17PM (#29244295)
It's even simpler than this. On the "pregnancy test" Doom is actually running on a pc and the scaled video is sent via usb to the replaced microcontroller which drives the replaced display. Source: https://mobile.twitter.com/Foone/status/1302834931421175809
Re:Porting Doom to a USB Bluetooth Dongle by grae_QED on Tuesday November 16, 2021 @05:18PM (#29247014)
hah! no, but, real or not, that's hilarious!
Re:Porting Doom to a USB Bluetooth Dongle by callmemclovin on Wednesday November 17, 2021 @01:57AM (#29249941)
That's true, but I guess it will take some years until manufacturers leave behind the proven line-up of cheap mikrocontrollers like the TI MSP430. They're so ubiquitous in these applications, TI even provides a Electric Toothbrush Controller Reference Design if you want to have a look at it.