Cyber Monday Sale - final discounts today for some of #SAMCoupe hardware and magazines, including Mechanical Keyboards and the Trinity Ethernet Interface. Also the SID & OLED Interfaces I've designed for #RC2014 and compatibles.
The Puppy can now handle both 16 and 8 bit values. I ended up making everything 8-bit. 16 bit operations simply need to work on both halves of their data.
So moving DE to HL know generates solutions using EX HL,DE as well as two LDs. The solution with an extra load is valid since it causes different collateral. The real question is why it doesn't generate the HL L,E alternative.
This feels like the appropriate time to mention a project I'm working since it's starting to give useful results.
Code generation for the #z80 is tough due to it's quirks. You can load indirect to an 16-bit register LD rp,(nn) but you can only load indirect 8-bit with LD A,(nn). However you can load register indirect to any* 8-bit register with LD r,(HL).
So 8-bit loads end up with:
LD A,(nn)
LD B,A
or
LD HL,nn
LD B,(HL)
After the last time my TRS-80 M4 let some smoke out I decided I should look for a #Z80 machine that has a slightly less chance of burning my house down. With my soldering skills who knows... 🤔
I will be nice to have a #cpm machine I can just leave on all the time.
I just pushed all the new changes I made over the last two weeks to GitHub. Almost every single file has been changed. All the drivers have been rewritten, as has been everything from the ROM to the bootloader to the system itself.
While I'm not personally particularly interested in old computers (beyond PDPs & LMs), I'm extremely interested in people designing their own 8/16bit computers, and the exploration of #8bit / #16bit computing as a living medium, rather than as relics of primarily nostalgic value.
Had an enjoyable evening trying to get the #RC2014 SID interface by @quazarsamcoupe working. It’s been quite a while since I’ve done any meaningful Z80 assembly but I finally got the SID to make a noise so progress. The last time I made a SID make noise was probably sometime in the mid 80’s on a Commodore 128.
@phf@N2UX Ah, nice! I didn't know there had been SID interfaces for the Amiga in the past!
As a kid I didn't have a C64 or Amiga later on. I grew up with the ZX Spectrum then the SAM Coupe so I've really stuck with the #Z80 all my life. But as a fan of all things #chiptune I set about in 2002 designing an interface to use the SID with SAM. After a query a few years ago I adapted the interface for #RC2014 so SID can now be used on a variety of Z80 systems that have a RC bus expansion slot.
Eyeing up an old possibly not working 464 that has a revision 3 PCB and a heatsinked 40007 ULA but there is also a space for a 40010 ULA too, so if the latter is dead I think I'd be able to fit a 40010 and remove the unneeded resistors. Why ? Well I'm of the age where you'd for no good reason take an old 8 bit PC and rehouse it in a homemade case and mod it to the max just because. I blame Maplin Electronics, Tandy and the likes for this random compulsion. 😜 #AmstradCPC#Z80
Following on from yesterday when I missed out an instruction when programming some #Z80, here it is fixed. Written as a standalone demo to run when I'm exhibiting at shows it's an 8K ROM to play a #ZXSpectrum Soundtracker music track on the #RC2014 Mini with the YM soundchip and my ZXTT (ZX True Tone) module so the YM/AY soundchip is clocked to exactly match the ZX Spectrum 128K models so the pitch/envelopes are bang on.
Currently cosied up on the couch hiding from #StormBabet browsing through Mike Sutton's ( @bread80 ) CPC Modular git repo as this WIP project does indeed float my boat. #AmstradCPC#Z80
Oops! Don't you just hate wasting a PROM chip as you missed out one instruction!
I write and test all my #Z80 code on a #SAMCoupe regardless what platform I'm writing for and I forgot to put IM1 into the code for when's running standalone on an #RC2014 mini.
It worked on the SAM as the Z80 was already in IM1 when I called my code, but of course when in a ROM chip starting up on the RC2014 the Z80 would be in IM0 mode on power up.
Probably a long shot but does anyone have links to a schematic for a totally TTL logic based 64 or 80 character display circuit ?
I'd like to build one and modify it so it could do monochrome graphics as well. Preferably for a Z80 based system.
More compiler debugging and I can now build a Z80 Fuzix kernel and user space that appear to work. Z80 code generation is based on the 8080 generator so the code is still fairly poor. Despite being able to run the compiler in 64K however the output is already often more compact, although much slower, than SDCC optimize for size. Still need to do more work on the linker for the relocatable user space, and then start trying to improve the code generation. #retrocomputing#z80#rc2014#compilers
The procedure declarations are importing operating system routines. For the calls in the body the compiler is marshalling data into the required registers.
Once I have includes working you'll be able to use library files for the imports.
And you can call pretty much any assembler code using this.
I'm starting with a register based calling convention. It saves me from dealing with stack frames, and will allow calls assembly routines - especially OS routines.
But it means loading lots of values into registers, then saving return values. My IL code data structure needs some updates for this scenario.
(Whereas stack frames should just need data pushing on the stack).
Grab a discounted bundle of the first eight issues of the magazine specifically for the SAM Coupe computer. Packed full of news, interviews, coding articles, reviews, maps, Manic Miner behind the scenes series, pokes, "What happened to..." features and much, much more.
Til Zilog developed its own operating system, in the form of the comprehensively titled Z80 Operating System with Relocatable Modules and I/O Management (Z80-RIO for short)
Some compiler routines such as sizeof() need to be able to handle a type name as a parameter, for example sizeof(Integer).
I've added a type called TypeDef to handle this. When the parser hits an identifier which is a type name but not a typecast it returns a value of type TypeDef.
With all the talk of #AI#LLM and so forth. I have come to the conclusion that I will only trust any such piece of technology as long as it powered by a #z80 microprocessor. The accuracy of the information returned by such a model is unimpeachable.