Jump to content

Search the Community

Showing results for tags 'c'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Commander X16 Forums
    • Introductions
    • X16 Discussion Lounge
    • X16 Help & Support Lounge
    • Off-topic Lounge

Categories

  • Official Software
  • Official Docs
  • Community Downloads
    • Games
    • Productivity Apps
    • Graphics Apps
    • Audio Apps
    • Demos
    • Networking Apps
    • Dev Tools
    • Tutorial Apps
    • Misc Apps

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me

Found 11 results

  1. Hi, I've recently downloaded the Commander X16 emulator and had a go at trying to program it with CC65. However, I can't work out how to make a sound, and there's no documentation on it (that I could find). Does anyone know how to do this? Thanks, Alex Paterson
  2. Just wanted to drive by and toss this out there: https://llvm-mos.org/wiki/Welcome https://github.com/llvm-mos I've been poking around on the beginnings of a game, something I wish I'd known enough to be able to do 35 years ago... I was using KickC, which is very cool, but I was running into too many issues and starting to spend more time on workarounds than on programming. Then, yesterday, I found out that there's an actively developed and complete 6502 backend for LLVM, which means you can do pretty much anything the LLVM frontends can do and then spit it out to your 6502. Library support may be challenging, of course. As of today, only the C64 (and Atari 800) has linker target files, but I've played with them (they're compatible with GCC ld linker scripts) and it shouldn't be too hard to create new ones for other targets. If you follow that link, you'll see that they've built programs for VIC-20, Apple IIe, C64, and even built a simple Rust program onto an Atari 800. Creating target files for the X16 shouldn't be particularly difficult. That having been said, don't expect any of the IO (printf, gets, files) to magically work out of the box today. This is in _ACTIVE_ development, and their focus is currently on C64. The backend 6502 codegen passes all LLVM unit tests (a few thousand), and that was announced in a post from just a few days ago. But if you're willing to just hammer the hardware with your own routines, well, it's pretty slick. I haven't gotten around to X16 programming yet, but I wanted to attach a screenshot of what I've been working on as compiled by LLVM-MOS's clang compiler for the C64. I've been building the project to cross compile for the PET, VIC-20, C64, and C128 with different graphics on each, so I should probably just add an X16 target
  3. cc64 X16 View File cc64 is a small-C compiler, written in Forth, targeting the 6502 CPU. It's hosted on the C64, on the C16 with 64k RAM, and now on the X16. Runtime targets are available for all 3 platforms, on each host, allowing cross-compilation. The code lives at https://github.com/pzembrod/cc64. It's licensed under the 2-clause BSD license: https://github.com/pzembrod/cc64/blob/master/COPYING See https://github.com/pzembrod/cc64/blob/master/Usage.md for usage. See https://github.com/pzembrod/cc64/blob/master/C-lang-subset.md for details about the supported subset of C. Released under the 3 clause BSD license. Submitter pzembrod Submitted 01/19/21 Category Dev Tools  
  4. Version 1.3.0

    272 downloads

    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
  5. Hi! I am working on a little project in screen mode 0. I can set the screen mode in basic. I can also set it in c. But when I set it in c, I get incorrect scrolling. It seems the scroll routing still thinks the screen is 60 characters high. I can't find it in the manual. (I probably put my blind glasses on :)) Scrolling is done like this. Print lots of character until the lower end of screen is reached, will trigger scrolling. It's rough, but it works. The screen setting is basically like this: *vera_video = 0x20 | 0x10 | *vera_video; *vera_hscale = 0x40; *vera_vscale = 0x40; *vl1_cfg = 96; *vl1_map = 0x00; What am I missing? I tried checking vera registers after doing a "manual" screen command, and the only thing I came to is the patter 0110 in the mapwidth, map heigh sections of the L1_CONFIG register. (hence *vl1_cfg = 96; ) Thanks CC
  6. Version 0.9

    269 downloads

    cc64 is a small-C compiler, written in Forth, targeting the 6502 CPU. It's hosted on the C64, on the C16 with 64k RAM, and now on the X16. Runtime targets are available for all 3 platforms, on each host, allowing cross-compilation. The code lives at https://github.com/pzembrod/cc64. It's licensed under the 2-clause BSD license: https://github.com/pzembrod/cc64/blob/master/COPYING See https://github.com/pzembrod/cc64/blob/master/Usage.md for usage. See https://github.com/pzembrod/cc64/blob/master/C-lang-subset.md for details about the supported subset of C. Released under the 3 clause BSD license.
  7. Wolfenstein 3D - raycasting demo with textures View File 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 Submitter Jeffrey Submitted 02/19/21 Category Demos  
  8. Version 1.0.1

    98 downloads

    This demo program provides an overview of what the vera card can do in terms of the different configurations in text mode, tile mode, and bitmap modes. The demo is nothing really fancy, but the workhorse underneath is the new API library (veralib.c and veralib.h, conio-cx16.c etc. ) that allows to configure and control the vera card of the CX16 using the kickc compiler of Jesper Gravgaard: camelot / kickc · GitLab. The veralib library and source code of this demo program has become an integral part of the compiler and test programs, and can be downloaded also from src/test/kc/examples/cx16/cx16-vera.c · CX16_VERA · Sven Van de Velde / kickc · GitLab. If you're a C-programmer, and you're interested in using this library, please beware that this is still work in progress. However, if you're motivated to try it out, i'm really interested to get feedback on this c-library to understand if the API is useful and clear. Feel free to try out the program, by running it in an emulator in windows; the mobile phone emulators won't be able to run this program properly because the keyboard is needed to run this. More features are planned to be added. One of the features planned is to provide mouse support, so it can be run using the android emulators too. kind regards, Sven
  9. totodilespy

    Snake

    Version 1.0.1

    33 downloads

    Fairly basic version of snake written in C (& complied with cc65). First project for the cx16 and I'm pretty happy with it. WASD to move. Might add joystick controls as well in the future.
  10. Snake View File Fairly basic version of snake written in C (& complied with cc65). First project for the cx16 and I'm pretty happy with it. WASD to move. Might add joystick controls as well in the future. Submitter totodilespy Submitted 02/09/21 Category Games  
  11. Vera Modes - Demo View File This demo program provides an overview of what the vera card can do in terms of the different configurations in text mode, tile mode, and bitmap modes. The demo is nothing really fancy, but the workhorse underneath is the new API library (veralib.c and veralib.h, conio-cx16.c etc. ) that allows to configure and control the vera card of the CX16 using the kickc compiler of Jesper Gravgaard: camelot / kickc · GitLab. The veralib library and source code of this demo program has become an integral part of the compiler and test programs, and can be downloaded also from src/test/kc/examples/cx16/cx16-vera.c · CX16_VERA · Sven Van de Velde / kickc · GitLab. If you're a C-programmer, and you're interested in using this library, please beware that this is still work in progress. However, if you're motivated to try it out, i'm really interested to get feedback on this c-library to understand if the API is useful and clear. Feel free to try out the program, by running it in an emulator in windows; the mobile phone emulators won't be able to run this program properly because the keyboard is needed to run this. More features are planned to be added. One of the features planned is to provide mouse support, so it can be run using the android emulators too. kind regards, Sven Submitter svenvandevelde Submitted 01/23/21 Category Graphics Apps  
×
×
  • Create New...

Important Information

Please review our Terms of Use