Jump to content


Popular Content

Showing content with the highest reputation since 03/14/21 in Files

  1. 10 points

    Version 1.0.1


    This is a simple voxel demo written in 65c02 assembly. It has been tested in the r38 emulator. Press W A S D to move around. Press SPACE to quit.
  2. 8 points

    Version 1.0.0


    This weekend, I decided to play with X16 BASIC using the emulator and wound up making an X16 adaptation/extension of a short program for the Plus/4 that appeared in 'The Transactor' journal decades ago. The program uses three parameters: "S" (squiggles/spokes/segments), "W" (wave factor), and "A" (amplitude). Using X16 BASIC's extensions in terms of bitmap drawing commands, it outputs a neat design with lots of color and a surprising amount of visual variety. The original Plus/4 program just plotted in black and white and had some built in limitations (and at least two bugs), but I decided to extend the program, add a menu, and upload it after I added color and decided these were fairly cool looking results from such a short simple BASIC routine. It strikes me as a cool demo because with just three core parameters, you can get an astonishing range of outputs. Of course, like many graphics demos based on stacking transcendental functions, there are combos of inputs where the functions will sort of fall apart and produce something akin to a kiddo scribbling with crayons , but there are also weird "islands" in the domain of possible parameter combinations where order re-asserts itself, both in terms of what gets drawn and how the colors play out. There are 4 'modes' of operation you can pick from the menu. You can specify inputs for S, W and A manually; the program can run a sequence with fixed S and A while incrementing W; there is a mode that tries to picks random parameters within several domains where the program produces nice outputs; and there's one that just reads the inputs from some "presets" in DATA statements. (You can of course add your own 'best of' examples by adding data statements between lines 432 and 499). I always considered myself a passable BASIC programmer, but this weekend showed me I'm really sort of rusty so please go easy on me if I did something inefficiently or especially 'dumb' in my implementation. The main output routine is extremely crunched (sorry, not sorry) and I did some further things to optimize from the original program for purposes of getting a bit more performance out of the main routine. Although it absolutely crawled on the Plus4, I think its fairly impressive on the X16 especially if you look at the sheer amount of sines, cosines, multiplications, and variable fetches /updates that occur during an entire cycle through the primary output drawing loops. The X16's 40 column mode (SCREEN $00) was used to key this in and format it, so its probably best if listed/ displayed/reviewed in that mode, Tested on emulator r.38, and I don't see anything in the pending updates for the next emulator release that would break anything here. If there are questions about why/how I did something I'll be happy to answer. In fact, if there's any interest in a more detailed write-up of this short and fairly simple program (e.g., section by section, and line-by-line), I would be happy to give it a shot, especially if there are folks new to Commodore BASIC that might find it useful. It seems to me there are many highly advanced programmers for the X16 posting on this site who are using assembly, C, and even languages they are developing themselves. Its amazing! However, its surely the case that part of the mission of the X16 is to get some newbies involved, and from where I sit, that really does mean getting some more content up here written in BASIC. Keeping that in mind, I'll probably be diving back into more old issues of The Transactor to do more conversions for the X16 and will continue to upload as long as I'm still having fun with BASIC. Cheers.
  3. 8 points

    Version 1.3.0


    Raycaster demo (written in c and assembly) This version is a big improvement in performance: it now runs at 10+ fps! I am quite happy with the speed. The demo plays quite nicely now. See below description of version 1.3.0 for details. --- This is a raycaster demo written in c and assembly for the Commander x16. I've been trying out the x16 and thought it would be a cool idea to start working on a raycaster. Ultimately it would be great if "Wolfenstein 3D" can somehow be ported to the x16. That would be a BIG challenge though! This is how it looks now: Speed improvements in 1.3.0: Now running at 10+ fps! - Using zero page addresses for pretty much all my variables - Using fast multipliers that use "square" tables: https://codebase64.org/doku.php?id=base:seriously_fast_multiplication - Inlined the fast multipliers, so less copying of values, no jsr and rts - Re-using the somewhat "static" parts of the multiplications, so it won't be re-loaded/calculate each ray (this was harder than it sounds, quite of bit of refactoring done) - Cosine and Sine fractions are player-related, and even though they are negated sometimes, they (that is their squares) could be reused for (almost) each ray - The (square of the) fraction of the tile the player is standing in -to be used for calculating the initial x/y interception for each ray- could be reused - Cleaned up the main loop and several other parts - Replaced the 16-bit slow divider with a 512-entry table: distance2height (major improvement!!) New in this version 1.2.0: - draw functions have been ported to assembly. Much faster! - dda casting functions have been ported to assembly. Much faster! - drawing textures! - automatic generation of routine to draw ceiling and floor (only 4 cycles per plain pixel) - automatic generation of around 512 routines for drawing textures (only 8 cycles per textures pixel) - using joystick controls (you can use arrow keys and alt to control, you can hold down keys) - a few textures from Wolfenstein 3D (shareware version) have been added (loaded at startup) - changed the map to look like the first level in Wolfenstein 3D - added a border around the render area, just like Wolfenstein 3D Usage Unpack the zip. Make sure you have the .BIN files in the same folder as the source files. To compile: (this assumes cc65 is installed) cl65 -t cx16 -o RAY.PRG ray.c ray_asm.asm -O3 To run: x16emu.exe -prg RAY.PRG -run To play: up - move forwards down - move backwards left - turn left right - turn right alt-left - strafe left alt-right - strafe right To debug: p - turn on log screen o - turn off log screen t - turn on test ray l - rotate test ray left j - rotate test ray right Known issues (1.2.0) - Sometimes there is a corner of a wall not drawn correctly - Since there is no real V-sync you get "shearing" in the screen (requires double buffering) Next up: - Lots of speed improvements - Lots of cleanup of code (its messy now) - Add a time-per-frame indicator (using a vsync interrupt counter) - Mooaarr wall-textures! - Double buffer to prevent shearing - Show a map on the screen - Bigger map (limit is now 16x16) - Opening doors - Add (scaled) "sprites" - Lamps (scaled) hanging from ceiling - Stats in lower part, gun visible - AI, enemies Having fun! Jeffrey
  4. 5 points

    Version 1.0.0


    A Sokoban clone for the Commander x16. This started out, mainly to see if I could grasp the concepts behind the x16. No sounds or music, since this is a pure puzzle game. I have put in a fun level set called 'Sasquatch IV', publicly available at http://sneezingtiger.com/sokoban/levels.html. The code for this game can be found at https://github.com/envenomator/x16Sokoban.git Have fun!
  5. 4 points

    Version 1.0.0


    What is double PETSCII? What is PETSCII you may ask first. PETSCII is the extended commodore text character set. This character set has been designed in such a way that it would enable simple graphics on the screen. Which would make it easy for would be programmers on the system, to make card games and so on. However easy to use, it is not easy to create very nice graphics with it.... But... This has changed somewhat. If you search for PETSCII art, you see people are trying to get cooler and cooler graphics out of PETSCII. Double Petscii is using the Commander 16's native graphics modes to overlay two layers of PETSCII graphics. This demo is an experiment in how that may be used. Tech info: -It was made with the cc65, in C. -The PETSCII mode used is lores text mode, with two layers. (40x30 chars) -All colors are standard colors. -1 Color is used as a color to be sacrificed for non black transparency, so there are 15 colors to work with, not 16. -Pictures drawn in hyperpetscii petscii online drawing program. https://hyperpyxel.com/?p=229
  6. 4 points

    Version 1.0.0


    Variation of the quick sort demo, but this one using the 320x240x8bpp mode, which uses double the memory, and is that much cooler to watch Tap any key to progress from: Random Slowed down sort Random Full speed sort Back to Basic Note: that band of "non random" pixels below the middle of the screen is the default location of character tiles at $0f800 = $0ffff. This gets moved to right after screen memory at $04000 - $047ff (which is probably where it *should* default to, if you ask me :))
  7. 3 points

    Version 1.0.0


    This demo uses the real music data from Wolfenstein3d to play back on the X16's YM2151 FM synth chip. Some features of the audio translation are not yet implemented, but the program now plays correct pitch in R38 of the emulator. I will update this posting to my R39 build when that is released officially. The "Try It Now" feature works, but at least for me, the playback is quite choppy - the emulator itself has no problem with the playback, though. Next update will be to make the songs selectable at runtime.
  8. 3 points

    Version 0.3.5


    X16 Edit is a text editor for the Commander X16 platform. Design goals: Use plain text files Store text buffer in banked RAM (512KB to 2 MB) Handle large texts efficiently Simple modeless user interface inspired by GNU Nano Implement basic editing functions well - refrain from making the program too feature-rich Support both ISO and PETSCII modes Tested with emulator version r38. Run with the following command: x16emu -sdcard sdcard.img -prg X16EDIT-x.x.x.PRG -run where x.x.x is the program version. You can also run the program with the "Try it now" button. There is, however, no attached disk in the online emulator, and consequently you cannot save or open files. Also, some of the Ctrl+key sequences are not working in the online emulator. To fully test the program you still need to download and run it locally. Please read the attached file romnotes.pdf if you want to try the ROM version. Source files available at https://github.com/stefan-b-jakobsson/x16-edit Released under GNU General Public License v 3 or later. romnotes.pdf manual.pdf
  9. 2 points

    Version 0.5


    A game where you have to visit all fields in a maze with your "block". For the latest version and to see the source, go to https://github.com/JimmyDansbo/cx16-maze
  10. 1 point

    Version 1.1.0


    Aseprite script that converts the current palette into a 12-bit (4096 colour) palette, i.e. 4-bits per channel. To install in Aseprite, go to File -> Scripts -> Open scripts folder Then drop the script into that folder and restart Aseprite. You might also want to assign a hotkey to the script via Edit -> Keyboard Shortcuts. It's also useful for things like creating gradients. Just create a gradient in the normal way, then run the script, and each colour in the palette will be nudged into the closest CX16 colour.
  11. 1 point

    Version 0.7.1


    This is a space invaders inspired game. Use the mouse or joystick to control the player ship. The shield segments can take 2 hits each. If enemies get too close you retreat back to the last level. You lose when all your lives are gone or you fall back to earth level again. Now with 7 playable levels Requires emulator R38! Roadmap: more diverse enemy formations enemy attack raids over the sides power ups (shields, double cannon, disruptors etc.) boss enemy joystick control done music done Different enemy sprites. done Sprite animations. done for player sprite and enemies fade in/out of palettes and backgrounds. done more levels with more backgrounds (all planets of the solar system), done sound effects basics done title screen How to use with the local emulator: Unpack ZIP file into the same directory as the emulator. Start the emulator, then enter LOAD"INVADERZ.PRG" RUN
  12. 1 point

    Version 0.3.2


    A hex dumper I wrote, because I wanted one like the one I've got on my UNIX machines. It should be able to handle "proper" address 0 RAM banking, as well as r38 RAM banking (it checks the KERNAL version). Set the color with the number keys. Change the view by $100 with left/right cursor, by $300 with up/down, and by $1000 by enter/left arrow.
  13. 1 point

    Version 1.0.0


    I played this game with my friends in grade school on the PET. Though unable to find the original, I found a stripped-down VIC-20 version -- which showed me the program's essential structure -- and the later 1986 version by Commodore, mainly designed for the Commodore 64. I used both to create this version, which retains the original algorithms, and tries to emulate the older PET version. It uses very little X16-specific code -- exactly, SCREEN and COLOR. It relies on the 40 x 25 screen, and it uses just about all 25 of those rows. The rest is all PETSCII and BASIC 2.
  14. 1 point

    Version 1.0.1


    How many sprites does the Commander X16 have? Let's find out, shall we! Written in Prog8. Source code is here: https://github.com/irmen/prog8/blob/master/examples/cx16/bobs.p8
  15. 1 point

    Version 1.0.0


    This is simply a single-octave piano that lets you select up to 4 waveforms to play simultaneously at the same frequency, at any chromatic note in the octave starting at Middle C. All controls are illustrated on the screen, with the number keys acting as toggles. Waveforms highlighted red will be played at full volume for any note. Code is available in the Lesson13 subdirectory of this GitHub repo: https://github.com/SlithyMatt/x16-assembly-tutorial You can see a demo of this program (along with a lesson on how use the VERA PSG with assembly language) on YouTube: If you are a member of my Patreon community (https://www.patreon.com/slithymatt) , you'll also have exclusive access to a video in which I give a complete code walkthrough for this Piano program.
  16. 1 point

    Version 1.1.1


    This is a shoot'em up game in progress. Gradually I'll update this game as it progresses, but currently this is a non-playable game. This demo for the moment documents the tile engine. This lava planet is under attack! The player will defend the planet using an evolving ship configuration, and will need to use various landing stations on the background for repaing, refuelling and recharging weapons. The background will also contain various defense capabilities but will also contain enemy attack sites deployed on the planet! I use various softwares to create the graphics of the game myself (which is a lot of work!). But to speed-up the work, and to make the graphics modular, this method is the way to go! The base software for graphics modelling is Blender (blender.org - Home of the Blender project - Free and Open 3D Creation Software). This allows me to create 3D models and to generate the graphics in retro style, pixel perfect! Tiling is done using Pyxel Edit (Pyxel Edit: pixel art and tileset creation tool) to create the tiles used for the background, based on the generated background from Blender. Sprite animations and graphics fine tuning (like palette creation and remapping), using done using Aseprite (Aseprite - Animated sprite editor & pixel art tool). The background tile engine generates a random generated background, which will result in the player needing to be tactical or strategical in his choices as time evolves. The placement of the tiles is dynamic, based on a weighted system, so the randomness can still be "tuned" over time. The idea is that on this background, through further weighted randomness, more and more enemy installations will appear, (and less friendly installations) and that the player will need to be careful when to recharge, repair or refluel! Different levels will of course make this game more difficult, but that is the future ... You can find the complete code of this game here: X16_Code/cx16-tileengine at main · FlightControl-User/X16_Code (github.com) This program MUST be started from an sdcard, as it uses proprietary loadroutines that only work on the emulator using an sdcard configuration. These load routines are necessary to have complete control of the memory in the X16! Download the files into a folder, Unzip the x16.zip file, which creates an x16.vhd file. Run x16emu -sdcard x16.vhd -prg tileengine.prg -run to run the demo. Please try it out and let me know if you think this start and concept has potential and what I would need to be careful of or change.
  17. 1 point

    Version 1.0.0


    Boulder Dash style game written in Commander X16 BASIC for learning purposes. Link to detailed description and access to source code on my blog: https://www.8bitcoding.com/p/crazy-boulder.html
  18. 1 point

    Version 1.0.0


    Just a fun small intro put together to play around with the X16 emulator. I'm looking forward to the next iteration of the hardware and emulation, especially around the audio. Thanks for looking!
  19. 1 point

    Version 0.1


    This demo shows the full 4096 color palette of the X16 by using the raster line interrupt. The matrix is 64x64 colors. Due to limitations of available CPU cycles I had to add black gaps in between the lines. But I still thought it to be nice to look at. And it works in the Web-Emulator.
  20. 1 point

    Version 0.1.0-alpha


    If you have problems with the audio quality in the "Try it now", download and run in the offline emulator with the command line option "-abufs 12" or more. The CONCERTO synthesizer is what I intend to be the sound generating side of a music making software for the Commander X16. It uses the 16 voices of the PSG and aims to get the very maximum out of them. It is not quite there yet but has a lot of strengths already. The main features: 32 synth patches 16 monophonic channels, each playing a dynamically assigned synth patch up to 6 oscillators per voice up to 3 envelopes and 1 LFO per voice pitch, volume and pulse width modulation volume control per voice ("velocity") save and load presets (currently 1 slot - yee!) Features that are planned (for the sound engine): wavetables (à la MSSIAH) pitch bend dynamically assignable modulation (e.g. for influencing vibrato depth while playback) snappier envelope option somehow include the YM2151 multi step envelope generator (MSEG) I wanted to put this out here so that people can work with it, even though it is still far from finished. The reason is simple: I don't know if I will finish it and even if yes, I don't know when. What can you do with it right now? You can use the sound engine independently from the GUI, e.g. for playing music and/or sound effects in your game. You need to provide your own player at the moment, but the sounds are ready to be used by it. You could also use the GUI and reprogram it to do something completely different, i.e. use it as a template for your own application. For more information, look into the README and the source files and/or send me a PM. If you find bugs, please let me know, or post an issue on GitHub. https://github.com/biermanncarl/cx16-concerto
  21. 1 point

    Version 1.0.0


    Written in "C", in 2014 for the Commodore 64 and ported to CX16 in 2020. I wanted to know how hard it would be to make a chess AI. I am not a great chess player, nor did I research chess engines, so I made things up as I went. The end result is this chess which by any standards of chess, is not a good AI opponent. However, it's there and it's playable. Use and keys The user controls an on-screen cursor. The cursor changes color to indicate a state. The colors for selection are: Green - the piece can be selected Red - The piece cannot be selected as it doesn't have valid moves Purple - Empty tile or piece on the other side Blue - The currently selected piece Cyan - A valid destination for the currently selected piece To move the cursor, use the cursor keys. To select a piece, press the RETURN key while the piece is selected. To deselect the piece, press RETURN on the same piece again, or press ESC. To bring up the menu, press the M key, or the ESC key when no piece is selected. Pressing ESC in a menu backs out of the menu, to the previous menu or back to the game. Press RETURN to select a menu item and use the up and down cursor keys to change the selection. While a side is under human control, there are a few more options. Press B to toggle on/off a state showing on every tile how many of both black and white's pieces can attack that tile. Pressing A will toggle a highlight of all of the pieces on the opposing side that attack the selected tile. Pressing D will toggle a highlight of all the pieces on the side currently playing's side that can defend the selected tile. All three of these options basically give a visual representation of the Game Database. The colors are: For attackers Cyan and for defenders Red. Lastly, the game has an Undo/Redo stack that tracks the last 254 moves. Pressing U will undo the last move and R will redo the last move. In an AI/Human game, the undo will undo the last AI and human player move, so the human player can make a different move.
  22. 1 point

    Version 0.2.0


    This is an unofficial concept program for a CX16 menu. Modify the DATA statements to add your submenus and commands. This is currently just a demo to explore the look and and feel of a basic, BASIC menu.
  • Create New...

Important Information

Please review our Terms of Use