Jump to content

Search the Community

Showing results for tags 'assembly'.



More search options

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

  1. I wanted to ask : is assembly language and monitor covered in the x16 manual?
  2. 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  
  3. Version 0.8

    83 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).
  4. Version 0.0.3

    68 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.
  5. 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  
  6. Version 0.1

    4 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.
  7. 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  
  8. Version 0.0.4

    87 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!
  9. 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  
  10. I've started assembly that draws a beveled box in PETSCII on the screen. The user POKEs in left,top,right,bottom, and the code does the work. I just remembered that there are KERNAL routines to position the cursor on the screen. I should use those, shouldn't I? The routine starts by pre-computing the height and width, and then it positions the cursor: Then, it prints the top line: That's what I have so far. Next steps are to print the vertical bars and the bottom of the panel frame. Now for the print_x_spaces I have: And for the horizontal bar, I have: I guess I want to verify I'm doing things correctly, if there's a better way, and perhaps if this has already been done.
  11. Version 0.6

    346 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
  12. Hi all, Just trying a few things before starting on a basic game. One thing I'm up to is loading a file into VRAM. I see this is supported in BASIC, but is there any existing code to do this is ASM? I can see how to implement this myself by opening the file, reading it a byte at a time and using the auto-increment of both the file handle and the vera, pipe it through. But, is there a repository of helper functions to do things like this? Cheers Troy
  13. 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  
  14. Version 0.0.1

    23 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
  15. 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  
  16. 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  
  17. 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
  18. Version 0.0.2

    17 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/
  19. Version 0.0.4

    93 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.
  20. Version 0.0.4

    114 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.
  21. 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  
  22. 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
  23. UPDATE: This is now available on GitHub: https://github.com/natenorrish/enhanced-basic-transpiler I've recoded the script completely to parse and output as a tokenized PRG. I'm also planning to add inline ASM directives to use BASIC, but enabling the option to optimize parts of the program - this will be an experimental feature ------------------------------ Hey all, My retro programming background is more Qbasic than BASIC, so for me getting used to the first 2 characters only being used for variables was quite painful for me. I'm also not a fan of using line numbers, and would prefer to use subroutines as with Qbasic. I created a script (which I'll no doubt continue to develop) which converts Qbasic style code into BASIC with line numbers (please see screenshots) The BASIC output isn't pretty, and I may work on that at some stage. Features: @LABEL: Create labels using @LABEL: - this will be automatically converted to a line number, and anywhere in the code that references @LABEL will be converted to the line number Variable names: can use alphanumeric characters with underscore (I know not valid in Qbasic). Script will convert variable names to a unique 2 letter variable. This eliminates the worry of having to chose your variable names. Line numbers: automatically added in and whitspaces / blank lines are removed Comments: Qbasic style comments with single quote ' Planning to add in sub routines which auto handle variables. Anyone interested? Nate Commander X16 2020-10-06 17-12-21.mp4
  24. Version 1.0.0

    66 downloads

    Introduction Here is a little demo of how to dynamically load files in RAM bank in assembly. It's very simple to do but I think that it can be helpful for someone who don't know how to do this right away. In fact I personally would love to see more of this kind of programs in the download section How this loader works ? First thing to do is to tell the Kernal that we want to use a logical file. For this we need to use the SETLFS subroutine. From the "C64 Programmer Reference Guide" : Since we want to load from the disk (or filesystem) we'll need to use the device number 8. The logical file is not important so we use the file 0. Also, as we want to relocate the program into a bank at $A000, we'll set the Y register to #0 to activate secondary address mode. Next step is telling the Kernal which file we want to load. For this we'll use the SETNAME subroutine. From the "C64 Programmer Reference Guide" : For this we'll need to store our file names somewhere in our program so we write at the bottom of our file the names as a string of petscii characters. We then prepare our registers with the size of the filename to load, and then the address. Our final step to load a file is obviously the LOAD subroutine. From the "C64 Programmer Reference Guide" : As the Reference guide said, we want to load a file so we set our A register to 0 and since we want to load to banked RAM ($A000) we enter the address in our X and Y registers. One last thing that we need to do just after each of our LOAD calls, is to verify that our file has been successfully loaded. For this, we'll need to use the READST subroutine. From the "C64 Programmer Reference Guide" : As usual, following the Reference guide, all we need to do is call this subroutine just after our LOAD call, and check the content of the Accumulator. If zero, the load was successful. And that's all ! You can chain file loading as much as you need, and even you just need to call SETLFS once at the start of the chain. Note that you'll need to switch the bank between file loads to prevent overwriting previously added program. And since Bank 0 is also reserved you'll need to first switch to bank 1 and start from here. At the end you can also load a file in place of the loader, just avoid overwriting memory where the code is currently being executed. You can for example leave this kind of code in your first bank and at last run it to load a program from $0800 to $9EFF. Kernal Subroutines full documentation : https://www.pagetable.com/c64ref/kernal/ Post Scriptum If you have any suggestions for the code or even want to change things in this description, don't hesitate to tell me !
  25. Ghost Crusher View File In this game you need to crush ghosts between walls before the ghosts catch (touch) you. Red walls can not be moved, but green walls can be pushed around. Be careful as ghosts can walk diagonally. --- At the moment there are only 4 levels. In level 4 you will encounter a poltergeist. Poltergeists can only be killed against a static (red) wall. Let me know what you think about the difficulty level. For each level I can control: Number of walls and static walls Number of ghosts and their speed Number of poltergeists and their speed Number of portals and how long it takes before they let a dimensional ghost through. Submitter JimmyDansbo Submitted 10/20/20 Category Games  
×
×
  • Create New...

Important Information

Please review our Terms of Use