Jump to content

gavinhaslehurst

Members
  • Posts

    61
  • Joined

  • Last visited

  • Days Won

    1

Files posted by gavinhaslehurst

  1. Codename ChickenLips

    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. 

    48 downloads

       (3 reviews)

    Updated

  2. Chonky Text in 6502 Assembly

    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). 
     

    120 downloads

       (0 reviews)

    Updated

  3. VERA Demo Screen written in assembly

    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.  
     

    127 downloads

       (1 review)

    Updated

  4. Assembly Vector Graphics Demo

    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! 

    134 downloads

       (0 reviews)

    Updated

  5. Mandelbrot Assembly Demo

    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
     

    539 downloads

       (0 reviews)

    Updated

  6. Julia Set Assembly Demo

    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 

    42 downloads

       (0 reviews)

    Updated

  7. Floating Point in 6502

    **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/

    32 downloads

       (0 reviews)

    Updated

  8. Beginner 6502 Assembly Stuff

    *** 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. 

    227 downloads

       (0 reviews)

    0 comments

    Updated

  9. Beginner 6502 Assembly Stuff

    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. 

    137 downloads

       (0 reviews)

    Updated

  10. Julia Set Demo

    This is a quick and dirty Julia set demo written in Commander X16 BASIC. It generates a random Julia set each time it is run. I strongly suggest using the emulator's -warp option to speed things up a bit! Enjoy the fractal action! 🙂 

    21 downloads

       (0 reviews)

    Submitted

  11. Mandelbrot Basic Demo

    This is a quick and dirty Mandelbrot set demo written in Commander X16 BASIC. I strongly suggest using the emulator's -warp option to speed things up a bit! I plan to make this a bit more user friendly, and include more options for zooming, changing colours etc. But for now, enjoy the fractal action! 🙂 

    54 downloads

       (0 reviews)

    Updated

×
×
  • Create New...

Important Information

Please review our Terms of Use