Hacker News new | ask | show | jobs
by annywhey 2813 days ago
Although I'm not intimate with the BBC hardware this kind of thing doesn't necessarily indicate a hardware mode switch - the renderer could use double width pixels in the HUD simply to lower draw times(simpler rasterization loop) and conserve memory.

AFAIK really complex scanline tricks mostly appeared on the Atari and Amiga platforms first because they exposed explicit programmability that made it simple to define exactly what you wanted the memory layout to map to. Other hardware could do similar things, but needed to code a cycle-exact loop - a feat that was certainly known in the 80's, but also relied on a good understanding of the timings of all the hardware.

2 comments

It definitely switches. There's four 1MHz timers and a vsync interrupt, so this stuff is very easy to arrange and the timing doesn't have to be very precise. (Ideally you'd leave more of a gap than Elite did, though, because it takes basically an entire scanline to do the mode switch and reprogram the palette.)

Try it on an emulator: https://bbc.godbolt.org/ - Elite is the default disc. To load: hold Shift, tap F12, release shift. Once the game is loaded and you see the animating ship, hold F12. The mode-switching interrupt stops running while it's held down (that key is wired to the reset pin on the real hardware), and you'll see the entire display incorrectly scanned out in just one of the modes.

In the case of Elite for BBC Micro I know it for certain that it does a mid-screen mode switch though ;) I remembered that Matt Godbolt mentioned this in one of his talks or blog posts when describing his JSBeep emulator, but couldn't find the reference unfortunately.

But anyway, it's also described here:

http://beebwiki.mdfs.net/MODE_5

The Amstrad CPC could also do this type of effect, although it could not freely position the raster interrupt. There are newer demos though that go quite crazy with reprogramming the display mid-screen, for instance:

https://floooh.github.io/tiny8bit/cpc.html?file=cpc/dtc.sna