Jump to content

Search the Community

Showing results for tags 'assembly'.

  • 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

Product Groups

  • X16 Hardware
  • X16 Software

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

  1. Hi Everyone! Like many other people around here, I'm using the CA65 assembler to develop for the X16. One thing I don't really understand is what the .SEGMENT command does exactly. I find the CA65 documentation a bit terse on this matter: Could any tell me what exactly happens if I use .SEGMENT "DATA" inside my code? Thanks! Cedric
  2. so im pretty new to text based programming languages. with only one i am fluent with. (BATCH) i have coded some simple things before in BASIC and the X16 caught my eye because im really interested in C64 things. even though i dont have one of my own. so, jumping straight in, certain things i found that worked on the C64 dont work in the X16. and some things that im not even sure are possible even on a C64. so, as the title says, i have some simple questions. how can i make a random number generator capable of outputting 2 different 1 digit numbers? how does one program in assembly? no, im not asking to learn assembly. im asking how i actually start writing assembly code.
  3. Hello everyone, Here's my 3rd experiment on the x16. It's a 32x32 pixel scroller like you'd see in a demoscene intro. I wanted to share what I've learned so far in case it might help some other newbie along. While watching slithymatt's tutorials about VERA I wanted to play around with the layering, tiles and scrolling systems. Attached is an animated gif, the prg and the source code in KickAssember format, since that's what I'm used to using on the C64 for my cross development. The best thing about using KickAssembler in my opinion is that is has a strong macro language build in, so the source code loads the png font and converts it to a VERA compatible format... no need to write conversion helpers in other scripting languages. Hope you enjoy. p.s. Not sure if this is the best forum to post this? Is there somewhere more appropriate? p.p.s. IS the jittering in the emulator avoidable? I tried a few things but was unable to reduce / remove it? scroll32.prg src_scroll32.zip
  4. Version 0.0.0.7

    48 downloads

    I leave this here mainly for me to play about with when not at home, and also to see if it works on the web emulator. It does not yet function as a game, but as development progresses, I will regularly update this to track its progress. Controls: W, A, S, D to move. Hold down for running.
  5. Codename ChickenLips View File I leave this here mainly for me to play about with when not at home, and also to see if it works on the web emulator. It does not yet function as a game, but as development progresses, I will regularly update this to track its progress. Controls: W, A, S, D to move. Hold down for running. Submitter gavinhaslehurst Submitted 04/22/21 Category Demos  
  6. Will it be possible to detect the clock speed setting/jumpers programatically? In case I have a program that is sensitive to processor speed, I would like to automatically adjust a delay routine so that program usage is transparent to the user. If not, I suspect that most people will be using 8Mhz anyway.
  7. 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  
  8. Version 0.8

    120 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).
  9. Version 0.0.3

    127 downloads

    I have been playing with the VERA chip in assembly, and have come up with a cheeky little demo screen that is reminiscent of some 80s demos I can remember as a kid. No music or fancy interactive stuff, but some of you might find it amusing. Warning: As a GP I feel I ought to point out this demo contains flashing / strobing effects! Thanks to the excellent tutorials of SlithyMatt - Commander X16™ Community, especially the latest one demystifying the VERA chip. I have used a lot of his code from the latest tutorial to create this demo.
  10. VERA Demo Screen written in assembly View File I have been playing with the VERA chip in assembly, and have come up with a cheeky little demo screen that is reminiscent of some 80s demos I can remember as a kid. No music or fancy interactive stuff, but some of you might find it amusing. Warning: As a GP I feel I ought to point out this demo contains flashing / strobing effects! Thanks to the excellent tutorials of SlithyMatt - Commander X16™ Community, especially the latest one demystifying the VERA chip. I have used a lot of his code from the latest tutorial to create this demo. Submitter gavinhaslehurst Submitted 02/24/21 Category Demos  
  11. VTUI save/restore demo View File A small demo of the save_rect and rest_rect functions from the VTUI (VERA Text User Interface) library. For more information see https://github.com/jimmydansbo/vtuilib/ It is still very much work in progress, but I thought I would share this little demo with you. Submitter JimmyDansbo Submitted 02/08/21 Category Demos  
  12. Version 0.1

    10 downloads

    A small demo of the save_rect and rest_rect functions from the VTUI (VERA Text User Interface) library. For more information see https://github.com/jimmydansbo/vtuilib/ It is still very much work in progress, but I thought I would share this little demo with you.
  13. Version 0.0.4

    134 downloads

    This is a quick demo of a 2D graphics library I've been working on recently. It's written in assembler, and aims to make life a bit easier when it comes to drawing vector graphics. You can define individual polygons which can be moved about and rotated. The source code looks fairly daunting, but when it comes down to it, building, transforming and rendering the polygons is very straightforward. Hopefully this will form the basis of a game at some point soon. (Perhaps an Asteroids clone?) Once I sink my teeth into interrupt handling, I should be able to "vsync" everything so it's flicker-free. All comments and suggestions welcome! Short screen capture of this demo on YouTube (featuring my tunez!!): Commander X16 Demo - Vector Graphics in 6502 Assembly - YouTube WARNING: For those who are sensitive to flickering/strobing, please be aware that this may cause problems for you. -- See below for a quick preview of the game I'm working on, retro flickering and all!
  14. Assembly Vector Graphics Demo View File This is a quick demo of a 2D graphics library I've been working on recently. It's written in assembler, and aims to make life a bit easier when it comes to drawing vector graphics. You can define individual polygons which can be moved about and rotated. The source code looks fairly daunting, but when it comes down to it, building, transforming and rendering the polygons is very straightforward. Hopefully this will form the basis of a game at some point soon. (Perhaps an Asteroids clone?) Once I sink my teeth into interrupt handling, I should be able to "vsync" everything so it's flicker-free. All comments and suggestions welcome! Short screen capture of this demo on YouTube (featuring my tunez!!): Commander X16 Demo - Vector Graphics in 6502 Assembly - YouTube WARNING: For those who are sensitive to flickering/strobing, please be aware that this may cause problems for you. -- See below for a quick preview of the game I'm working on, retro flickering and all! Submitter gavinhaslehurst Submitted 02/03/21 Category Demos  
  15. Version 0.6

    539 downloads

    Here is the Mandelbrot version of my Julia Set program, coded in assembly. Again, many thanks to the forum users here for their guidance, as well as the many YouTubers with their excellent tutorials on 6502 assembly language. It's a lot faster than the BASIC version, but nevertheless, benefits from being run in warp mode. Now in colour, with thanks to: VERA Overview (8bitcoding.com) NEW VERSION NOW WITH MOUSE CONTROLS! When the image has finished rendering, click the left mouse on the area of the screen you wish to zoom in to. To change the detail settings (cycle between Low, Med, High) click the right mouse button. Poke around in the old version... Try copying and pasting the following groups of POKEs to explore further (not all at once, just each paragraph in turn!): POKE $D6B,$19:POKE $D6A,$64:REM FX=6500 POKE $D6D,$13:POKE $D6C,$54:REM FY=4948 POKE $D6E,$00:POKE $D6F,$FF:REM FX=POS,FY=NEG POKE $D7B,$00:POKE $D7A,$01:REM STEP=1 POKE $D7C,$FF:REM ITERATIONS=255 SYS2061 POKE $D6B,$0F:POKE $D6A,$A0:REM FX=4000 POKE $D6D,$00:POKE $D6C,$00:REM FY=0 POKE $D6E,$FF:POKE $D6F,$FF:REM FX=NEG,FY=NEG POKE $D7B,$01:POKE $D7A,$F4:REM STEP=500 POKE $D7C,$FF:REM ITERATIONS=255 SYS2061 POKE $D6B,$0F:POKE $D6A,$878:REM FX=3960 POKE $D6D,$03:POKE $D6C,$E8:REM FY=1000 POKE $D6E,$FF:POKE $D6F,$FF:REM FX=NEG,FY=NEG POKE $D7B,$00:POKE $D7A,$32:REM STEP=50 POKE $D7C,$FF:REM ITERATIONS=255 SYS2061 To use the POKES above in the web emulator, first click the X in the top right corner of the web emulator. Paste the POKES above that you want to use in to the text field to the left, replacing what's already in there, then click the Run button. Individual addresses that can be poked: $D6A 30 75 .word 30000 ; FX $D6C A8 61 .word 25000 ; FY $D6E FF .byte $ff ; FX SIGN ff = negative $D6F FF .byte $ff ; FY SIGN ff = negative $D7A A8 61 .word 25000 ; STEP (lower=higher zoom) $D7C 10 .byte $10 ; ITERATIONS Old poke codes for the colour PETSCII version: step: POKE $0D3D e.g. 50 for a step of 0.05 (smaller number, higher zoom) iterations: POKE $0D3F e.g. 30 iterations about right, higher = slower start x: POKE $0D2F, normally 8 (for -0.8) - nicely centred at low zoom start y: POKE $0D31, normally 12 (for -1.2) - again centred at low zoom Old poke codes for the PETSCII version: step: POKE $0cff e.g. 50 for a step of 0.05 (smaller number, higher zoom) iterations: POKE $0d01 e.g. 30 iterations about right, higher = slower start x: POKE $0cf1, normally 8 (for -0.8) - nicely centred at low zoom start y: POKE $0cf3, normally 12 (for -1.2) - again centred at low zoom You Tube video of this in action: Commander X16 - 6502 assembly demo - Mandelbrot set - YouTube Commander X16 - Fractal Zoom Demo - 6502 Assembly - YouTube
  16. Mandelbrot Assembly Demo View File Here is the Mandelbrot version of my Julia Set program, coded in assembly. Again, many thanks to the forum users here for their guidance, as well as the many YouTubers with their excellent tutorials on 6502 assembly language. It's a lot faster than the BASIC version, but nevertheless, benefits from being run in warp mode. Now in colour, with thanks to: VERA Overview (8bitcoding.com) NEW VERSION NOW WITH MOUSE CONTROLS! When the image has finished rendering, click the left mouse on the area of the screen you wish to zoom in to. To change the detail settings (cycle between Low, Med, High) click the right mouse button. Poke around in the old version... Try copying and pasting the following groups of POKEs to explore further (not all at once, just each paragraph in turn!): POKE $D6B,$19:POKE $D6A,$64:REM FX=6500 POKE $D6D,$13:POKE $D6C,$54:REM FY=4948 POKE $D6E,$00:POKE $D6F,$FF:REM FX=POS,FY=NEG POKE $D7B,$00:POKE $D7A,$01:REM STEP=1 POKE $D7C,$FF:REM ITERATIONS=255 SYS2061 POKE $D6B,$0F:POKE $D6A,$A0:REM FX=4000 POKE $D6D,$00:POKE $D6C,$00:REM FY=0 POKE $D6E,$FF:POKE $D6F,$FF:REM FX=NEG,FY=NEG POKE $D7B,$01:POKE $D7A,$F4:REM STEP=500 POKE $D7C,$FF:REM ITERATIONS=255 SYS2061 POKE $D6B,$0F:POKE $D6A,$878:REM FX=3960 POKE $D6D,$03:POKE $D6C,$E8:REM FY=1000 POKE $D6E,$FF:POKE $D6F,$FF:REM FX=NEG,FY=NEG POKE $D7B,$00:POKE $D7A,$32:REM STEP=50 POKE $D7C,$FF:REM ITERATIONS=255 SYS2061 To use the POKES above in the web emulator, first click the X in the top right corner of the web emulator. Paste the POKES above that you want to use in to the text field to the left, replacing what's already in there, then click the Run button. Individual addresses that can be poked: $D6A 30 75 .word 30000 ; FX $D6C A8 61 .word 25000 ; FY $D6E FF .byte $ff ; FX SIGN ff = negative $D6F FF .byte $ff ; FY SIGN ff = negative $D7A A8 61 .word 25000 ; STEP (lower=higher zoom) $D7C 10 .byte $10 ; ITERATIONS Old poke codes for the colour PETSCII version: step: POKE $0D3D e.g. 50 for a step of 0.05 (smaller number, higher zoom) iterations: POKE $0D3F e.g. 30 iterations about right, higher = slower start x: POKE $0D2F, normally 8 (for -0.8) - nicely centred at low zoom start y: POKE $0D31, normally 12 (for -1.2) - again centred at low zoom Old poke codes for the PETSCII version: step: POKE $0cff e.g. 50 for a step of 0.05 (smaller number, higher zoom) iterations: POKE $0d01 e.g. 30 iterations about right, higher = slower start x: POKE $0cf1, normally 8 (for -0.8) - nicely centred at low zoom start y: POKE $0cf3, normally 12 (for -1.2) - again centred at low zoom You Tube video of this in action: Commander X16 - 6502 assembly demo - Mandelbrot set - YouTube Commander X16 - Fractal Zoom Demo - 6502 Assembly - YouTube Submitter gavinhaslehurst Submitted 01/17/21 Category Demos  
  17. Version 0.0.1

    42 downloads

    Here is my work in progress Julia Set demo! I wrote this in BASIC a couple of weeks ago when starting out on the Commander X16 journey. Since then, I have been trying to learn 6502 assembler. This is the result so far! After wrestling with floating point arithmetic (see my other posts!) I have finally managed to get something working. At the moment, the output is PETSCII, but all being well there will be a graphical version of this in the pipeline. Feel free to muck about with the code. It's probably not written very well, but I have only been doing this for a couple of weeks (and despite being badly written, it's much faster than the BASIC version!) Many thanks to all the experienced forum users who commented on my previous posts to help guide me through this process, as well as the many YouTubers who posted tutorials about how to program the 6502. Watch this space for updates! Some things you can poke around in to change the parameters: POKE $0D30, X -- change the REAL component (this is passed as an integer but can be divided by ten a number of times to achieve smaller numbers - see below) POKE $0D36, X -- the number of times to divide the REAL component by 10 (in order to get around the lack of FIN in the Kernal at present) POKE $0D34, $00 -- make the REAL component positive POKE $0D34, $FF -- make the REAL component negative POKE $0D32, X -- change the IMAG component (this is passed as an integer but can be divided by ten a number of times to achieve smaller numbers - see below) POKE $0D37, X -- the number of times to divide the IMAG component by 10 (in order to get around the lack of FIN in the Kernal at present) POKE $0D35, $00 -- make the IMAG component positive POKE $0D35, $FF -- make the IMAG component negative
  18. Julia Set Assembly Demo View File Here is my work in progress Julia Set demo! I wrote this in BASIC a couple of weeks ago when starting out on the Commander X16 journey. Since then, I have been trying to learn 6502 assembler. This is the result so far! After wrestling with floating point arithmetic (see my other posts!) I have finally managed to get something working. At the moment, the output is PETSCII, but all being well there will be a graphical version of this in the pipeline. Feel free to muck about with the code. It's probably not written very well, but I have only been doing this for a couple of weeks (and despite being badly written, it's much faster than the BASIC version!) Many thanks to all the experienced forum users who commented on my previous posts to help guide me through this process, as well as the many YouTubers who posted tutorials about how to program the 6502. Watch this space for updates! Some things you can poke around in to change the parameters: POKE $0D30, X -- change the REAL component (this is passed as an integer but can be divided by ten a number of times to achieve smaller numbers - see below) POKE $0D36, X -- the number of times to divide the REAL component by 10 (in order to get around the lack of FIN in the Kernal at present) POKE $0D34, $00 -- make the REAL component positive POKE $0D34, $FF -- make the REAL component negative POKE $0D32, X -- change the IMAG component (this is passed as an integer but can be divided by ten a number of times to achieve smaller numbers - see below) POKE $0D37, X -- the number of times to divide the IMAG component by 10 (in order to get around the lack of FIN in the Kernal at present) POKE $0D35, $00 -- make the IMAG component positive POKE $0D35, $FF -- make the IMAG component negative Submitter gavinhaslehurst Submitted 01/17/21 Category Demos  
  19. 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  
  20. Version 0.0.2

    32 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/
  21. Version 0.0.4

    137 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.
  22. 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  
  23. Version 0.0.4

    227 downloads

    *** THIS FILE IS ALSO NOW IN THE DEMO SECTION TO ENABLE THE "TRY IT NOW" FEATURE *** 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.
  24. Now live on GitHub, version 1.2.38.0664 of the META/L assembly language editor. https://github.com/edrobotguy/cx16/blob/master/METAL1_2_38_0664update.zip If you down'oad the zip file, extract it into the same folder as your X16 rev 38 emulator. Then you'll find thorough documentation in docs/edit.html the video playlist is here: METAL1_2_38_0664update.zip
  25. Hello people, I have been doing some trial&error lately on how to get the Commander X16 into graphics mode and displaying sprites. Currently, my code is this and it outputs this. I use the ACME Cross Compiler if thats any special. I have tried to find it out myself by looking at the documentation but i haven't been able to make it work. I have also tried looking at the source code of other games but most of the games with sprites are made in BASIC (I want to make it in Assembly) or aren't open source. I have also searched online and searched on this forum but could not find anything regarding displaying sprites in assembly
×
×
  • Create New...

Important Information

Please review our Terms of Use