Wednesday 29 August 2018

one year ago

August 29 2017 - begin planning the unnamed 8 bit language, the implementation began a few days later on September 1

it's been a year I guess it is finished and now's the time to really get into writing all those games on my list...

spudge .810 August 29 2018

a bugfix release (== optimisation bug)
spudge0810-2018-08-29.zip

Thursday 9 August 2018

glyphy (August 2018)


editing and animating fonts


glyphy.zip
  • generally expected to be used under emulation (Altirra for me)
  • mapping the mouse to paddles 2 and 3 is assumed (may need to temporarily un-map other joystick and mouse devices when using this)
  • a host directory mapped as hard drives H1: and H6: is required to load / save / export data to host directory
  • can export spudge code for the font and animation data for use in other spudge programs
  • the filenames used are fixed so some file manipulations will be required at the host level
    • edited font and animations loaded from and saved to H1:glyphy.f8
    • export data is written to H6:glyphyex.spg
    • another user defined font will be loaded from H1:userfont.f8 (to allow some level of copying between user edited fonts)




spudge August 9 2018 release

this one has a couple of code generation bug fixes, a couple of language improvements (can use pointer as loop variable, improved support for pointer arrays, allowAuto keyword) but is mostly about library improvements

libPMG.spudge
a simple player / missile interface

libMouse.spudge
mouse pointer support, really only designed for use in emulators as it reads paddle positions rather than trying to support a real mouse

libFontAnimation.spudge
font animation

Tuesday 5 June 2018

spudge release 2

Almost as soon as I started using spudge after the initial release I came across an expression evaluation bug, fixed that then found another :)

here's a slightly better version spudge0778-2018-06-05.zip

Wednesday 30 May 2018

the Atari colours

; simple static colours
; colours.spudge
proc spudge() {
    repeat {
        colbk = vcount <<< 1
    }
}

or make it move...

; moving colours with a VBI
; coloursMove.spudge
proc spudge() {
    ; install interrupt to scroll the rainbow
    replaceDeferredVBI(rainbowVBI)

    repeat {
        wsync = 0
        colbk = rainbow + (vcount <<< 1)
    }

    ; flip the VBI back to where it was
    restoreDeferredVBI()
}
; a simple VBI to scroll the rainbow
byte rainbow
proc rainbowVBI() vbi {
    if !(%11 & jiffy) { ; scroll every 4th frame
        rainbow += 1
    }
    exitVerticalBlank   ; special VBI exit
}



hello world.spudge

proc spudge() {
    print('hello world?')
}

spudge initial release (0.767)

it's finally here!
the first public release of spudge a new Atari 8 bit programming language

see the previous spudge pre-announcement for the 'rationale' for behind this

here's a zip containing the current (alpha) version along with some documentation and example code
spudge0767-2018-05-30.zip

It has mostly been developed on Windows, but it should run on Linux and Mac OS X too.

how to install
1) unpack the archive as the spudge directory in your home directory
2) copy (from the spudge/bin directory) the spudge.bat (for Windows) or spudge (MacOSX, Linux) file somewhere on your PATH and make executable
   (chmod +x on MacOSX, Linux)

perl 5
spudge requires perl 5, install it if required
on Windows 10 I use Strawberry Perl (5.26 http://strawberryperl.com)
on Linux and MacOS X it's probably already there
any recent version (5.18.2 and 5.26 tested) will probably be OK

MADS
spudge uses mads to assemble the assembler code
install somewhere on your PATH
  http://mads.atari8.info/

how to run
1) open a command shell in your source directory
2) spudge -h

here is a tests directory in the spudge installation which may be a good place to start
      spudge -c hello-world.spudge

an alternative Wally's Folly

1947 Roadster "Wally's Folly"

spudge 0.767 has been chosen as the initial public release

It's nearly ready...
hopefully released before the end of May...

Thursday 11 January 2018

spudge - a new Atari 8 bit programming language

Is there any interest in using a new programming language for Atari 8 bit programming?
Or is this destined to be a language with only one user :)

Last year I returned to write some new code for the Atari (for a bit of nostalgic fun after 30+ years away). It was great relearning how this old machine works and diving back into 6502 coding.

After writing some test programs and thinking about what else I wanted to do I had a ‘to do’ list with dozens of entries - from arcade games to little apps and demos. As much as I enjoy working in assembler I wanted a higher level language for the parts of the program which are not time critical.

After looking at the available options I didn’t find one which felt like a good fit, so I decided to create something new - I’ve always wanted to make a compiler…

I’ve been using a ‘placeholder’ name for the language for a few months until a better one came to mind, but, well, that didn’t happen so it’s still spudge :)

This has been a side project for a few months and I feel it is about 70% done (except for the libraries which may never be finished), hopefully it will be ‘finished’ in another few months (somewhat dependent on other distractions: holidays, gaming, wine, beer… and maintaining my level of interest)

It’s implemented in Perl 5 - creating an asm file which is assembled with MADS (the Mad Assembler) into an xex file, so it should run anywhere a recent version of perl 5 and MADS can be run.

spudge isn’t directly modelled on another language but it is probably most like Action!
It makes similar compromises to Action! - no floating point, ‘static’ subroutine local variables (including parameters), poor support for recursion...
The language is quite different to Action! but supporting much the same functionality with a few extra operators, and a more free form syntax, and, hopefully, often better performance.

What has already been done...

  • variables (local + global): byte, uint, int + pointers to these types, volatile (for memory mapped hardware) and const modifiers, alignment specification, address specification
  • string literals
  • numeric literals: decimal, hex or binary
  • arrays
  • for, while and if statements
  • procedures, functions
  • asm blocks (using standard asm instruction mnemonics)
  • unary operators: -, +, !, not
  • operators: =, +, |, &, ~, xor, or, and, lsh, <<, rsh, >>
  • assignment / update operators: =, +=, -=, &=, |=, <<=, >>=, lsh=, rsh=, &=, |=, ~=, and=, xor=, or=
  • comparison (signed) operators: ==, <>, !=, <=, >=, >, <
  • a few library calls
  • resource level ‘linking’ - only subroutines and variables which are actually referenced are included in the output

What is still to be done...

  • multiplication, division
  • signed comparisons
  • signed / unsigned / pointer expression tracking
  • elsif, else extensions to if
  • subroutines taking a variable number of arguments; esp. printf
  • more: validation, error checking, optimisations
  • user defined types
  • direct access to high / low bytes of 16 bit variables
  • lots of libraries

Is there anyone out there interested in: testing it, trying to use it in its current incomplete state?
Are there any 6502 experts wanting to suggest improvements to the generated code, provide library code (players, sound, graphics, CIO, etc.), code for multiplication, division, signed comparisons...?

Eventually I expect to get around to doing all of these but am happy to start with / integrate other code (but be warned I don’t think it will lead to fame or riches (and for one reason or another I might no be able to accept a particular bit of code))

Oh no!

Is this one of those blogs which limps along for a while and then just fades away...?