Jump to content

Search the Community

Showing results for tags 'programming'.

  • 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 13 results

  1. Good evening everyone. 2021-08-23 00-11-55.mp4 Since I am currently learning to program assembler like crazy, and it still takes some time until I get something good ready, I thought I would combine it with something I can do a little better. Some time ago in another thread I mentioned an idea how to introduce younger people to retro computers. An IDE with which you can assemble a game by point & click. So I've done some other things in the meantime .. But since last week I've been working on this idea. Status so far: I have a rudimentary editor, can create my project and attach it to the emulator right away. The Sprite Editor is still very spartan, but I can already insert sprites from common image formats (these are saved in asm code) -> ahh ok, i forgot to show it in the vid ... sry I chose KickAssembler for the necessary compiler, simply because I am currently learning C64 / X16 coding with it. In addition to the GUI programming, I scour every possible source that deals with the X16. I am currently creating a boilerplate with which certain things can be incorporated into macros. E.g. initialization of sprites, Copy2VRAM etc. The next steps will be the layer configurations and tilemaps. And then another iteration of GUI improvement ... and then on and on I'm also sure that some are not interested in such a software, since most of them already have their workflows. I'll keep you posted here in this thread if you want. EDIT: right video format.... i'm dump and have to go to bed....
  2. Hi! I have been playing with interupts a little, in kickc, and it all works nice. But now I tried to incooperate it in a game I hit a snag. It seems when I setup an interupt, for scanline, my keyboard functions stop working. I am probably doing something really basic wrong. The weird thing is also, when I restore the interupt to it's previous state, the keyboard is still not working. ps. the keyboard routing I am using is kickc "kbhit", which seems to call kernal routine "GETIN" at $FFE4, I also tried directly calling kernal routines, which works fine, but not when my interupt is enabled. ps2. I enable the interupt, something like this. What I am asking is. How does the keyboard normally work? 1- Is there an interupt when a key is pressed? Why does that interup stop working when I set my scanline interupt. How are they related? Do I need to do some extra "magic" at the end of my scanline interupt, to keep the key handling interupt working? 2- Can you somehow check the keyboard in a loop, without interupt, by polling a memory address or maybe a vram address, and if so which one? Also anyone could point me to the correct sections in the documentation, I will be thankfull! The most accurate I have found an answer is the section in the manual called "'Custom keyboard scan code handler". But I somehow don't get the full picture. Thanks CC
  3. I thought this might come in handy for people using the Adobe software family when designing graphics for old ChickenLips. It's an Adobe Colour Table (.ACT) file containing the default 256 colour palette. I found it useful when designing tiles in Photoshop. Let me know if there are any errors in it! Have fun. cx16.ACT
  4. Warning: I'm new to Commodore/Commander x16 BASIC. And 35 years out of practice in BASIC. And never really that advanced to begin with. And, I'm working on someone's else's code that I cannot make public at this time. I have a linear array of 6 values. The code uses FOR-NEXT to fill all 6 values with a random integer between 3 and 25. The square root of the RND value is calculated before being being multiplied (in case that makes a difference) . The screen is cleared then the values are printed on screen and the user is prompted (GET B$) to accept them or choose 6 new random values. If the user reject them, then the program goes back to the FOR-NEXT loop to create 6 new values. Problem is, if they reject the values 19 times, the program crashes with "?OUT OF MEMORY ERROR IN 650 (the line with the FOR-NEXT and RND). I can use CLR before the FOR-NEXT; no OOM error. But this borks all the arrays in the program that are filled using DATA statements. The FRE(0) function seems like it is applicable I cannot understand how to use it to clear out the array (if that is what causes the OOM)?
  5. Chonky Text in 6502 Assembly View File A little demo of rendering giant text in assembly. It takes the data from the Lower/Upper character set in ROM and renders it in a large, "LCD-style" font. You can use .asciiz in CC65 for letters, or use a zero-terminated array of bytes to reference the character codes, as below (thanks to https://www.commanderx16.com/forum/index.php?/profile/5-jimmydansbo/ for the character set reference). Submitter gavinhaslehurst Submitted 03/03/21 Category Demos  
  6. Version 0.8

    116 downloads

    A little demo of rendering giant text in assembly. It takes the data from the Lower/Upper character set in ROM and renders it in a large, "LCD-style" font. You can use .asciiz in CC65 for letters, or use a zero-terminated array of bytes to reference the character codes, as below (thanks to https://www.commanderx16.com/forum/index.php?/profile/5-jimmydansbo/ for the character set reference).
  7. I Make the first Custom Rom for Commander X16 Customs Roms allows you to change the Rom logo (on the left-corner) or edit the available command. Links removed due to rule violations
  8. KickC is a C-compiler for 6502-based platforms creating optimized and readable assembler code. The newest version 0.8.5 adds support for developing for the Commander X16 platform. The compiler includes header-files and linker-files for the chipset of Commander X16. Also included is veralib.h and a conio.h implementation contributed by @svenvandevelde. It also includes some example-programs that work in the emulator (and hopefully on the real platform). Below you can see a bit of the included sprites.c example program. You can get it here: https://gitlab.com/camelot/kickc/-/releases PS. I am the author of KickC.
  9. Floating Point in 6502 View File **EDITED TO ADD: for all those who are new like me, exploring this world, please see the forum thread where some of the more experienced coders here have pointed out some really useful Kernal routines which take the pain out of this!! Hi all! As I journey towards 6502 mastery (LOL), this demo explores floating point numbers and how they are stored and managed in binary. It borrows heavily from others' code to achieve what I was struggling to do from first principles, and I am grateful to all the YouTubers, bloggers and hobbyists out there who have kindly shared their work in this area. This particular routine takes a binary floating point number stored in memory and displays it on the screen in a human-readable decimal format. It also dumps some of the memory addresses involved so you can have a look under the hood. Some functions include: jsr FLTTODEC Displays the floating point number stored in MSB, NMSB, NLSB, LSB and BEXP as a decimal number on screen (PETSCII string) jsr print_mem_16 .word (addr) Memory dump. Shows paired bytes at the address, looping for MemDumpLen addresses (default=8) If you click try it now, you can poke around in memory to change the starting parameters of the programme. For example, to change the most significant byte of the mantissa, POKE $080E,XX and to change the binary exponent, POKE $081E,XX then type RUN again to see the results. FLTTODEC was adapted by me for the specific hardware of the Commander X16 from Jeff Tranter's code, who in turn adapted it for CC65 from the original appearing in Compute! issues 9 and 11, 1981 by Marvin L. De Jong. https://github.com/jefftranter/6502/blob/master/asm/wozfp/bcdfloat.s Jeff's Blog: https://jefftranter.blogspot.com/ Submitter gavinhaslehurst Submitted 01/14/21 Category Demos  
  10. Version 0.0.2

    28 downloads

    **EDITED TO ADD: for all those who are new like me, exploring this world, please see the forum thread where some of the more experienced coders here have pointed out some really useful Kernal routines which take the pain out of this!! Hi all! As I journey towards 6502 mastery (LOL), this demo explores floating point numbers and how they are stored and managed in binary. It borrows heavily from others' code to achieve what I was struggling to do from first principles, and I am grateful to all the YouTubers, bloggers and hobbyists out there who have kindly shared their work in this area. This particular routine takes a binary floating point number stored in memory and displays it on the screen in a human-readable decimal format. It also dumps some of the memory addresses involved so you can have a look under the hood. Some functions include: jsr FLTTODEC Displays the floating point number stored in MSB, NMSB, NLSB, LSB and BEXP as a decimal number on screen (PETSCII string) jsr print_mem_16 .word (addr) Memory dump. Shows paired bytes at the address, looping for MemDumpLen addresses (default=8) If you click try it now, you can poke around in memory to change the starting parameters of the programme. For example, to change the most significant byte of the mantissa, POKE $080E,XX and to change the binary exponent, POKE $081E,XX then type RUN again to see the results. FLTTODEC was adapted by me for the specific hardware of the Commander X16 from Jeff Tranter's code, who in turn adapted it for CC65 from the original appearing in Compute! issues 9 and 11, 1981 by Marvin L. De Jong. https://github.com/jefftranter/6502/blob/master/asm/wozfp/bcdfloat.s Jeff's Blog: https://jefftranter.blogspot.com/
  11. Version 0.0.4

    133 downloads

    This may be of interest to absolute 6502 assembly beginners like me, although advanced 6502 programmers may cringe at the way I've done things here! This program does very little, but it is a repository of useful assembly routines for things like printing different bytes of memory (useful for debugging) as well as some basic math operations. I will keep adding to this as I progress through my assembly journey (I'm aiming to write my fractal BASIC programs in assembly). Thanks to the following YouTubers for their excellent tutorials on all things 6502: Ben Eater - YouTube Matt Heffernan - YouTube ChibiAkumas - YouTube (and also his excellent website: Assembly Tutorials: Learn 6502 Assembly Programming... With ChibiAkumas!) Function usage: (notation for cc65 assembler) jsr print .byte (list of PETSCII character codes to print, ending in a $0 byte) jsr println .byte (list of PETSCII character codes to print, ending in a $0 byte) jsr print_mem .word (start address of memory dump) Set MEMDUMPLEN to the number of addresses you wish print_mem to display.
  12. Beginner 6502 Assembly Stuff View File This may be of interest to absolute 6502 assembly beginners like me, although advanced 6502 programmers may cringe at the way I've done things here! This program does very little, but it is a repository of useful assembly routines for things like printing different bytes of memory (useful for debugging) as well as some basic math operations. I will keep adding to this as I progress through my assembly journey (I'm aiming to write my fractal BASIC programs in assembly). Thanks to the following YouTubers for their excellent tutorials on all things 6502: Ben Eater - YouTube Matt Heffernan - YouTube ChibiAkumas - YouTube (and also his excellent website: Assembly Tutorials: Learn 6502 Assembly Programming... With ChibiAkumas!) Function usage: (notation for cc65 assembler) jsr print .byte (list of PETSCII character codes to print, ending in a $0 byte) jsr println .byte (list of PETSCII character codes to print, ending in a $0 byte) jsr print_mem .word (start address of memory dump) Set MEMDUMPLEN to the number of addresses you wish print_mem to display. Submitter gavinhaslehurst Submitted 01/12/21 Category Demos  
  13. So, this is something I will need out of necessity (1120 lines and currently at 44kb) and not entirely sure how to do by just looking at the C64 wiki. It describes how LOAD may be used, but only at the start of a program with little description of how this saves Program Memory or can benefit Program Flow. Let us say we have a fairly large program and want to break up its raw number of lines to keep memory free. What essential components do I need to tell a program to LOAD THIS, DO THIS, and then GO BACK WHERE YOU WERE? Basically - I'm aiming for the framework to execute a GOSUB but with a file. That way, within the program framework, I can offload... PROGRAM START SYSTEM SETUP DATA ALLOCATION DATA INITIALIZATION (THIS) MAIN LOOP START DRAW (THIS TOO, BUT SPECIFIC) INPUT PROCESS (AND THIS - BUT SPECIFIC PROCESSES/OPERATIONS) CONTINUE MAIN LOOP END PROGRAM TERMINATION Perhaps I just need an illustrative example. It's not apparent LOAD can be used this way, as it "returns to the very beginning" of the originating file. https://www.c64-wiki.com/wiki/LOAD Thanks in advance.
×
×
  • Create New...

Important Information

Please review our Terms of Use