6502 SpASM (6502 Spreadsheet Assembler and Linker)
github.com
github.com
I later used Z80's[3] at Uni for hardware projects, again programmed in assembler (via EEPROM which was less convenient, but we were practising for "embedded systems" development) which was fun too.
The only thing close to the BBC Basic experience was Delphi which supported inline assembly, which I used once to do some bitmap manipulation faster than I could convince the compiler to manage.
[1] a budget version of a BBC Micro Model B for most intents & purposes [2] and later a BBC Master Series [3] they basically started life as knock-off 8080s, the 8-bit chip that lead to the 8086/8088, so it'll feel familiar if you've done any old x86 assembly
Tools are everything here. Get a good emulator/debugger and assembler.
Lets say you had a 6x8 character cell or a really small sprite for graphics, unrolling the loop would make a copy about 2x faster but would cost about 40 bytes or so.
[1] W65C816S is the 6502-derivative ISA used in the SNES, the modern version you can still buy has an 6502 emulation mode:
https://en.wikipedia.org/wiki/MOS_Technology_6502#Variations...
https://www.mouser.com/new/western-design-center/wdcw65c816s...
That's part of what makes it wonderful! The impracticality of it, plus it helps to dispel some of the "magic" around assembly. Looking at things like this help you understand that it's just math and transformations, which Excel is pretty great at.
Other things similarly impractical/awesome:
- Ray Tracer in Excel [1]
- Matrix recommendation system in Excel [2]
- Neural Networks in Excel [3]
Personally I never understood matrix-based recommendation systems until I watched Jeremy Howard build one from scratch in Excel [4].
[1] https://github.com/s0lly/Raytracer-In-Excel
[2] https://towardsdatascience.com/netflix-and-chill-building-a-...
[3] https://towardsdatascience.com/interactive-neural-network-fu...
More Excel games at http://www1.plala.or.jp/chikada/index.htm (in Japanese. Google translate: https://translate.google.com/translate?hl=en&sl=ja&tl=en&u=h...)
I think ‘real spreadsheet games’ shouldn’t use VBA, but I also think that rules out arcade games with decent UI (you can animate by using iterations, but I think user input would require the user to hit enter to register commands), so, maybe, one should allow some minimal VBA in a subcategory of spreadsheet games that don’t use the spreadsheet’s scripting language)
Edit: I didn’t test it, but it seems using https://support.microsoft.com/en-us/office/cell-function-51b..., one could have a mouse-operated VBA-less Flappy-Bird that reacts to the user changing the width of a column, or use cut and undo to delete or reinsert rows or columns, thus providing user input. That’s workable for some value of workable.
Sometimes when we think we can, we do stop to consider if we should. And think "hell yes!".
I suppose VisiCalc would be more era-appropriate, but Excel/LibreOffice has better programming support.
It'd be nicer to have this kind of thing integrated into an editor (like vscode) with a live updating view of the assembled code, but I can definitely see myself using this.
This sounds interesting. Could you elaborate on what is meant by "live assemble into byte representation"? What exactly would the workflow be under which you would be doing this?
That is basically the native environment on many 6502 computers. You have basic, and usually you can call, or something to run a little machine language.
What you don't generally have is an assembler, unless you're on a BBC micro or something really spiffy like that.
You can open the spreadsheet, take me to origin, Constance a few instructions, and there are the bikes you need right there. It might be an 10 bytes or 20 bytes.
So you just typed them right in set up your call statement and carry on.
On these older or smaller computers, people do these kinds of things to get a little bit of speed, but they don't have a huge tool chain, or don't want to complicate call chain get that speed. Really they just want to tell the CPU to do a few things to be done with it.
Another case might be patching a piece of code.
So you reach a point where you need to code up a jump instruction, and then assemble the few instructions you need to make whatever changes going to make, and it returned so that the program may continue.
Open the spreadsheet type in the few things you need copy the bites done
You'll also have full macro assemblers with built in editors that'll load nicely out of the way that only becomes an issue if you're seriously RAM constrained.
I happen to like Excel, and found this idea very lean.
This is really about a single environment that will just assemble a program that will run on that CPU, and it will do so in a really really super accessable way.
There are times when dealing with 6502 computers, and I honestly many small computers, or you just want a little tiny bit of machine code.
Now that said, people have written nice libraries with this thing, that can be called from the basic on Apple 2 for example.
I'm sure it wouldn't be hard to set up on the terminal using common command line tools and nodemon or watchdog.
Or as a vscode extension.
Ah, all that was old becomes new again. One of my projects in university (35 years ago) was to write a pop-up 6502/8080 assembler for DOS. It hooked into the bios keyboard ISR, in a similar way to Sidekick (anyone remember that) and would assemble any code typed into the window on the fly.
The use case was to insert inline assembly code into high level languages without having to leave the IDE/editor.
It does provide immediate feedback on cycle counts. That could be useful. But if you are programming a 6502 in 2021, utility is not the point :-).