{"id":18513176,"url":"https://github.com/tomzox/vic20_games","last_synced_at":"2025-04-22T16:58:19.279Z","repository":{"id":154044383,"uuid":"212581061","full_name":"tomzox/vic20_games","owner":"tomzox","description":"This is a collection of games I wrote in the early 80s in machine language for the VIC-20.","archived":false,"fork":false,"pushed_at":"2019-10-10T16:29:48.000Z","size":269,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T16:51:15.294Z","etag":null,"topics":["assembly-6502","commodore-vic20","machine-language","vic20","video-games"],"latest_commit_sha":null,"homepage":null,"language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomzox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-03T13:00:11.000Z","updated_at":"2024-02-22T09:57:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"a37e3718-8d64-483a-b35f-9105b19f8d2b","html_url":"https://github.com/tomzox/vic20_games","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomzox%2Fvic20_games","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomzox%2Fvic20_games/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomzox%2Fvic20_games/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomzox%2Fvic20_games/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomzox","download_url":"https://codeload.github.com/tomzox/vic20_games/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250284652,"owners_count":21405295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assembly-6502","commodore-vic20","machine-language","vic20","video-games"],"created_at":"2024-11-06T15:36:44.304Z","updated_at":"2025-04-22T16:58:19.259Z","avatar_url":"https://github.com/tomzox.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"# My games for VIC-20\n\nIn this repsitory you'll find some games I wrote between 1982 and 1984 for the\nVIC-20. At that time I was 15, so the purpose was mainly for fun and learning.\n\nThe games were written originally in MOS-6502 machine-language directly in memory,\nusing a self-developed disassembler (use of an assembler was not possible due\nto memory constraints). This means in particular the code was not relocatable,\nso all variable and jump addresses were hard-coded. I had calculate all the\nbranch offsets manually, and re-calculate when moving or inserting code. I achieved\nthis by maintaining a copy of the code on paper, and cutting the paper with a\nscissor when inserting code. On paper I also could maintain comments to the\ncode. As example I scanned two of about 20 [pages of the snakes game](images/scan_paper_strip.jpg).\n\nThe code you find here is typed-in newly using the hex-dump also contained on\nthese paper trails. Afterward I ran the image through the\n[\"dxa\" disassembler](https://www.floodgap.com/retrotech/xa/)\nand reverse-engineered its meaning to allow extending the original sparse\ncomments. The result of this process is checked in as initial revision in git.\n(Corresponding to the above example would be label \"l12e0\" and following in the\n[initial commit](https://github.com/tomzox/vic20_games/blob/878d373eedd9b34c65d4f6ac6c3869f37f470bd1/src/snakes.asm).)\nAfterward I cleaned up the code (such as introducing symbolic names\nfor variables and functions in place of the hex labels generated by the\ndisassembler), further improvement of documentation, bug-fixing\nand a few adaptions and extensions noted below. As a result the games now play\nnicely in the excellent [VICE](http://vice-emu.sourceforge.net/) VIC-20\nemulator.\n\n## Dino-Eggs game\n\n\u003cIMG ALIGN=\"center\" SRC=\"images/egg_snap_start.png\" ALT=\"Screenshot Dino-Eggs game\"\u003e\n\nIn this game the world consists of 4 levels in a cave between which the\nplayer can traverse via ladders and by jumping. The objective is picking\nup Dino eggs buried in the ground and sometimes hidden by stones. To\nkeep the Dino Mum away, the player has to keep a fire going, which needs\nto be kindled by wood to be found in the cave. All the while the player\nhas to watch out for snakes crawling across the levels and hidden in\nthe ground beneath stones.\n\nI should note I didn't completely finish developing this game in the 80s.\nThere are sketches showing I had planned for spiders crawling on the ceiling\nof the cave and occasionally lowering themselves (this explains the empty\nspace remaining at the top of the current game); also there's no sound yet. Also\nthe code implementing the snakes somehow got lost (except for the jump to the start\nof that handler). But I rewrote that code now as I remember it, and fine-tuned\nsome details in the game controls, so that it's nicely playable.\n\nFor more details see the [Dino-Eggs documentation](docs/dino_eggs.md).\n\n## Snakes game\n\n\u003cIMG ALIGN=\"center\" SRC=\"images/slg_snap_play.png\" ALT=\"Screenshot Snakes game\"\u003e\n\nThe game simulates a bunch of snakes wriggling around on a field, between which\nthe player needs to run around and pick up items. Of course the player also has\nthe option of killing the pest.\n\nI do not recall where I got the idea for this game; I guess I saw a similar\ngame maybe running on an Arcade machine in a movie or TV show. What I liked\nbest about it is the movement of the snakes. I recall I had some trouble coming\nup with a game objective built around those cool snakes.\n\nFor more details see the [Snakes documentation](docs/snakes.md).\n\n## 10-Miles-Runner\n\n\u003cIMG ALIGN=\"center\" SRC=\"images/10_miles_snap.png\" ALT=\"Screenshot 10-Miles-Runner game\"\u003e\n\nThis is likely one of the first machine language programs I wrote. It's an\nextremely simplified variant of the Space Invaders theme. In this game, an\nalien space ship (symbol) is  toggling between left and right side of the\nscreen, firing at the player at the bottom of the screen. With each iteration,\nthe ship is coming a little closer to the player. The player has to evade the\nship's fire by moving left or right, and try hitting the ship with his own\nmissiles before the ship reaches him at the bottom.\n\nFor more details see the [10-Miles-Runner documentation](docs/10_miles_runner.md).\n\nI have no idea where the name of this game came from. The code is\nshort at just under 350 lines of assembly. Apparently this was a direct\ntranslation from an earlier version written in BASIC. The game does not even\nuse user-defined characters for the objects shown on screen. I just included it\nhere, as it shows my learning curve, starting with this initial attempt,\n(actually followed by a Pac-Man derivate not included here as the\ncode for generating the maze is missing), then the already much larger Snakes\ngame, and finally the Dino-Eggs game.\n\n## How to run the games\n\nFirst install the [VICE](http://vice-emu.sourceforge.net/) VIC-20 emulator.\nMy games require 8kB memory extension, so you need to configure VICE once\naccordingly: Start xvic, then press F12, select \"Machine settings\" then check\n\"Block 1 (8kB)\"; quit the menu by pressing Escape. Then save these settings via\nF12 -\u003e \"Settings management\" -\u003e \"Save current settings\" and quit the emulator.\nNote if this is not done, the games will crash, or at best you'll see only a\nblack screen.\n\nNow you can run the games by simply specifying the name of one of the game\nexecutables (which you find in the `prg` directory of this repository) on the\nxvic command line.  If the program does not start automatically after having\nbeen loaded, type `RUN` into the VICE window and press the RETURN key.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomzox%2Fvic20_games","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomzox%2Fvic20_games","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomzox%2Fvic20_games/lists"}