6 ms·
The Atari 2600 Webserver
- fred_is_fred 6y agoThe book "Racing the Beam: The Atari Video Computer System" is a pretty interesting overview of the technical challenges they had to overcome. The racing part comes to having to have the frame ready to paint before the CRT beam drew them.
- EvanAnderson 6y agoI hate to nitpick, but I think it's more interesting to think about it as it actually is. You mentioned having the "frame" ready, but there is no frame. The platform has produced some masterpieces of creativity under limitations. You have 128 bytes of RAM to work with (for all non-register variables and stack) and slavish timing requirements. The timing is nightmarish because you're actually controlling the painting of each scanline as the raster sweeps across and down the screen. The design of an Atari 2600 game's "kernel" (as they're called) is one where timing and cycle counting dominates. Game logic has to sit in specific points in time where the video raster isn't painting (horizontal and vertical blanking intervals). When the raster is sweeping across the phosphors your code is concerned primarily with manipulating the registers of the Television Interface Adapter (TIA) chip to produce the desired video output. There are some "tricks" the TIA can perform itself (mirroring the playfield output across a vertical center line, etc) that can be used to free up some cycles. Creative use of the 5 movable objects (two "player" sprites, two "missile" sprites, and a "ball" sprite) can be used to make more detailed graphics than would be possible with the playfield alone (which has a fairly coarse resolution).
- pwg 6y ago> The platform has produced some masterpieces of creativity under limitations. You have 128 bytes of RAM to work with (for all non-register variables and stack) And as the CPU was a 6502, you had three 8-bit registers within the CPU, one 8-bit accumulator and two 8-bit index registers.
- T-hawk 6y agoOn the 2600, you can use a fourth register, the stack pointer. The 2600 as a machine has no interrupts, so if a section of code doesn't push/pop/call anything, stack memory is never touched and you can do whatever you want with the stack pointer register. There's more tricks with the stack pointer on this machine too. Set it to point to the top of a sequence of video registers, and then you can rapidly write values to that sequence of registers just by issuing push instructions, which are faster than load/store/decrement!
- EvanAnderson 6y agoThat stack trick is ingenious. I've done next to no 2600 programming but I've done enough 6502 to appreciate that one. I am remound of the perennial HN favorite: http://blog.moertel.com/posts/2013-12-14-great-old-timey-game-programming-hack.html http://blog.moertel.com/posts/2013-12-14-great-old-timey-gam...
- T-hawk 6y agoI'll give you more detail of one way to use that trick then. The single-bit missile and ball objects are turned on or off by writing to their activation register, controlled by bit 1 of that register. Why bit 1, why not 0 or 7? Because that lines up with the zero flag in the 6502's flags register. What you do is set the stack pointer to that video register, compare on the object's Y-coordinate, then push the flags register to turn the object on or off! So the code needs no shifts or conditions or branches. It's even cycle invariant which is a great property on this machine. The video hardware was deliberately designed to do this (by chip legend Jay Miner), and Combat's code does. Also, the registers for the two missiles and the ball are adjacent, so you can do this trick to all of them in succession without resetting the stack pointer.
- EvanAnderson 6y agoThanks for sharing that. That's a neat piece of trivia. I'm already very impressed by Jay Miner's work, and this just adds to that. It makes sense that the TIA would be designed hand-in-glove for the 6507. BTW - I saw in your other comments that you wrote INV+. This counts as my little brush with "celebrity" for the day. >smile<
- TigeriusKirk 6y agoThere's a small hobbyist community programming for the 2600 these days. Even releasing new game cartridges! https://atariage.com/2600/programming/index.html https://atariage.com/2600/programming/index.html
- motohagiography 6y agoI went looking for the owner of the Atari brand for a luxury tech pitch, basically to do a heritage brand revitalization play, but couldn't figure out who to talk to at the time. Most luxury tech products were just too vulgar or too superficial to survive, but I could totally do one with Atari.
- ErikAugust 6y agoAren’t they making an Atari hotel? Is that what you had in mind?
- motohagiography 6y agoI read about that and thought it was such a waste. The products themselves I may just develop and create a new one, but it just seemed like such an obvious win to use the Atari brand.
- ticmasta 6y agoforget about that - they're doing a cryptocurrency!
- nasalgoat 6y agoDid you talk to the guys who did the physical Pong game?
- hobby-coder-guy 6y agoVulgar?
- bionsystem 6y agoThe owner of the brand is the company called Atari SA, previously Infogrames. The CEO is called Fred Chesnay and the company is listed on the French stock exchange. They have a portfolio of products around the brand and seem to be willing to explore many territories, including cryptocurrencies, hotels, as well as good old video games including mobile games and an AMD based pc/console hybrid for the living room coming out at the moment. Given the wide range of ideas I'm sure they would be willing to do business if you have a good one.
- everdrive 6y ago"This page would work a little better if javascript were enabled." Would it really, though?
- mrspeaker 6y agoThat is a big red warning, considering not much changes if you enable it. Though, seeing as the "human clock" doesn't work on humanclock.com - it does seem fair to have a message... and congrats to them for making it work mostly perfectly without JS! Most of the internet is just a blank page. I want to get some tshirts printed up that say "You need to enable JavaScript to run this app."
- deleted 6y ago[deleted]
- wizzwizz4 6y agoI don't think this is a real web server. There isn't enough RAM to implement Ethernet.
- Tuna-Fish 6y agoEthernet is not necessary. The webserver can talk to it's IP router with any protocol that they both implement. Just because everyone everywhere uses ethernet doesn't mean that you have to!
- wizzwizz4 6y agoTrue. But the cartridge claims to have IIS and Apache on it. Neither of those can run in 128 bytes.
- T-hawk 6y ago2600 cartridges can contain any amount of extra RAM or even CPU hardware. But this pretty well isn't real. There's no way you could drive a workable Ethernet connection just from an RF output. Also the "screenshot" is completely fake, the 2600 has nowhere near enough video objects to output all of that.
- wizzwizz4 6y agoTo be fair, the Atari 2600 supports sprite multiplexing.[0] And you can drive a BBC Micro's floppy drive from its screen output lines…[1] [0]: https://en.wikipedia.org/wiki/Sprite_multiplexing https://en.wikipedia.org/wiki/Sprite_multiplexing [1]: https://scarybeastsecurity.blogspot.com/2020/07/turning-400-bbc-micro-1981-into-40000.html https://scarybeastsecurity.blogspot.com/2020/07/turning-400-...
- T-hawk 6y agoMultiplexing on the 2600 can't go nearly as far as that screenshot shows. The 2600 has two sprites per line plus a few single-bit objects. There's a particular way to reuse sprites within the same scanline, but only at certain fixed intervals which isn't what we see here, plus strobing the positioning register that fast requires every single CPU cycle so it's impossible to also write the color and playfield registers at the same time. Source: I know the 2600 well, I wrote and published a homebrew game: http://dos486.com/atari/ http://dos486.com/atari/