C64 Basic: Game Map Overhead “Camera View”
ibobev
84 points
11 comments
May 26, 2026
Related Discussions
Found 5 related stories in 97.2ms across 8,541 title embeddings via pgvector HNSW
- The curious case of retro demo scene graphics zdw · 345 pts · March 30, 2026 · 46% similar
- VGA Memory Access Is Complicated ingve · 12 pts · May 09, 2026 · 45% similar
- I Built an Open-World Engine for the N64 [video] msephton · 377 pts · March 28, 2026 · 44% similar
- Monkey Island for Commodore 64 Ground Up aresant · 56 pts · March 17, 2026 · 42% similar
- Soul Player C64 – A real transformer running on a 1 MHz Commodore 64 adunk · 106 pts · April 20, 2026 · 40% similar
Discussion Highlights (3 comments)
bonzini
There's a lot that can be improved in the code, such as just using FOR...TO...STEP would be much faster. In general, this is a routine that is super easy to write in 6502 assembly. Most magazine BASIC games had something like that, with a few such routines that were POKEd in memory at startup. Several were written in a relocatable fashion so that they could be copied easily from one game to the next.
amiga386
What you really need: http://1amstudios.com/2014/12/07/c64-smooth-scrolling/ https://www.c64-wiki.com/wiki/Scrolling * The top 4 bits of $D018 (VM10-VM13) control the base of graphics memory * The bottom 3 bits of $D011 (YSCROLL) and $D016 (XSCROLL) let you delay screen display by 0-7 pixels in either axis * The 4th bit of $D011 (RSEL) and $D016 (CSEL) let you shrink the screen viewport so it's visibly 304x192 pixels (in NTSC) even though the screen memory is still 320x200. VM10-13 lets you establish a double-buffer, you can switch instantly between a front and back buffer by changing $D018. While you are scrolling, you copy the front buffer to the back buffer, offset by 8 horizontal pixels (1 byte) or 4 vertical pixels, then add in new map data on the edge you're scrolling towards. On each frame, you update XSCROLL/YSCROLL by one pixel so the visible screen is moving towards your new screen, then once it's moved all 8/4 pixels, switch to the new buffer. The cost of copying all that graphics memory is expensive, so split it across the 8/4 frames.
pugworthy
Man does this bring back memories of my old Atari 800 and entering or writing games in BASIC for it. Something extremely nostalgic about that kind of development for some of us.