Page 2 of 3

Re: A miracle when it works first time!

Posted: Thu Aug 29, 2019 10:40 pm
by Cosmium
Turtle_Quality wrote:
Thu Aug 29, 2019 8:06 pm
For vertical clipping , if you use a lookup table to get the address of each row, you point rows 192-255 to somewhere harmless, ROM for instance. That way there is no loss of speed. I assume you hold the y address in a single byte so -1 would be 255.
Hey, that's an elegant solution!

Though I think it's handy to calculate ahead of time how many lines of the clipped sprite to draw. That way you can avoid drawing more than necessary as you would if you "blindly" wrote data into ROM over the course of the full sprite height.

Re: A miracle when it works first time!

Posted: Fri Aug 30, 2019 6:32 pm
by Cosmium
So I finished writing the part where the sprite should gracefully exit the bottom of the screen. Gave it a test and sure enough there were no "it works first time" miracles on display here either. Just an encore fireworks display! :)

Image

Luckily it was an easy fix and a silly mistake (aren't they always?!). I'd incorrectly assumed a register had a certain value in it after copying and pasting code. Ugh :roll:

I wonder what percentage of programming bugs are due to unfounded assumptions..

Re: A miracle when it works first time!

Posted: Sat Aug 31, 2019 5:58 am
by R-Tape
Ast A. Moore wrote:
Thu Aug 29, 2019 9:20 pm
Yup, even the release version of Exolon has a similar bug.
And so does Rallybug, or at least the paid-for version does. There's very few opportunities to actually reach the outer limits, but it's happen to me.

Re: A miracle when it works first time!

Posted: Sat Aug 31, 2019 11:34 am
by Ast A. Moore
R-Tape wrote:
Sat Aug 31, 2019 5:58 am
Ast A. Moore wrote:
Thu Aug 29, 2019 9:20 pm
Yup, even the release version of Exolon has a similar bug.
And so does Rallybug, or at least the paid-for version does. There's very few opportunities to actually reach the outer limits, but it's happen to me.
What’s that, you say? A bug in Rallybug? Figures. :lol:

Re: A miracle when it works first time!

Posted: Wed Sep 11, 2019 3:42 am
by Cosmium
Capture of the latest amusing bug while optimising my sprite routine. Think it needs a bit more of work. ;)

Funny how tiny and seemingly innocuous changes in the code can lead to such graphic disaster!

Image

Re: A miracle when it works first time!

Posted: Sat Oct 19, 2019 6:18 am
by Cosmium
Don't think I've seen this quirky one before :?

Check out the copyright year right after this latest programming crash:

Image

Re: A miracle when it works first time!

Posted: Sat Oct 19, 2019 7:30 am
by R-Tape
Is that 1882?! Clive hadn't even started going bald back then.

How is that even possible? Is 'overwrite ROM' enabled in you emulator?

Re: A miracle when it works first time!

Posted: Sat Oct 19, 2019 9:45 pm
by Cosmium
How is that even possible? Is 'overwrite ROM' enabled in you emulator?
I had a look at Spin's settings: "Allow ROM editing" and "Allow assembly to ROM" are disabled, and I've since fixed the bug, so I'm not even sure how it happened..

Actually it showed "(c) 1B82...". Wasn't even a number. Weird!

Re: A miracle when it works first time!

Posted: Sat Oct 19, 2019 9:59 pm
by R-Tape
Cosmium wrote:
Sat Oct 19, 2019 9:45 pm
Actually it showed "(c) 1B82...". Wasn't even a number. Weird!
Hex. Good to know that Sinclair research will outlive the common era!

Re: A miracle when it works first time!

Posted: Mon Dec 02, 2019 3:44 am
by Cosmium
A few days ago, while programming some fixed-point maths routines, I was suddenly rewarded with this festive-themed crash. Just before the (c) message it kinda looks like a full screens-worth of gaudy xmas wrapping paper, if you squint hard enough!


Image