Yep, "weird" is the right choice of words.
It can surely baffle the casual or beginner ZX ASM programmer.
A "veteran" Z80 asm programmer will know that there is no instrution
INC (nn)
IY and the interrupt
Re: IY and the interrupt
Here's the result of my aforementioned dicking around:
[youtube]https://youtu.be/DW1viKMx5T0[/youtube]
I think you'll all agree that's dead useful!
The interrupt routine which animates the coin is written in C, using z88dk. It currently needs a tweaked z88dk runtime library because the default one switches the interrupt back to IM1 when the C program exits. But I'm going to fix that and give AA a pull request.
[youtube]https://youtu.be/DW1viKMx5T0[/youtube]
I think you'll all agree that's dead useful!
The interrupt routine which animates the coin is written in C, using z88dk. It currently needs a tweaked z88dk runtime library because the default one switches the interrupt back to IM1 when the C program exits. But I'm going to fix that and give AA a pull request.
Derek Fountain, author of the ZX Spectrum C Programmer's Getting Started Guide and various open source games, hardware and other projects, including an IF1 and ZX Microdrive emulator.
- Ast A. Moore
- Rick Dangerous
- Posts: 2641
- Joined: Mon Nov 13, 2017 3:16 pm
Re: IY and the interrupt
Neat. I seem to remember a similar trick with a line of scrolling text made out of screen attributes. Was pretty jaw-dropping the first time I saw it.
Every man should plant a tree, build a house, and write a ZX Spectrum game.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Re: IY and the interrupt
Yeah, I saw that too! In fact, that's what I intend to try next!Ast A. Moore wrote: ↑Thu Jan 04, 2018 8:03 pm Neat. I seem to remember a similar trick with a line of scrolling text made out of screen attributes. Was pretty jaw-dropping the first time I saw it.
And on that topic I need a new thread...
Derek Fountain, author of the ZX Spectrum C Programmer's Getting Started Guide and various open source games, hardware and other projects, including an IF1 and ZX Microdrive emulator.
Re: IY and the interrupt
I would suggest that you either use XOR for placing the sprite, or correctly mask the thing against the already existing image.dfzx wrote: ↑Thu Jan 04, 2018 7:27 pm ...
I think you'll all agree that's dead useful!
The interrupt routine which animates the coin is written in C, using z88dk. It currently needs a tweaked z88dk runtime library because the default one switches the interrupt back to IM1 when the C program exits. But I'm going to fix that and give AA a pull request.
It will look way nicer
And if you are careful (check if the screen data changed between updates ) you can make it pixel correct, even if "someone" else is messing with the screen.