Copy Link
Add to Bookmark
Report

Saxonia Issue 04 Part 026

eZine's profile picture
Published in 
Saxonia
 · 22 Aug 2019

  

Mysteries 3
By Rumrunner/VOID
l
b00340104void-272-104.raw













In issue two of Saxonia, I wrote two articles named (surprise, surprise)
Mysteries one and two. This time, I though that I should share one of my
mistakes with you so perhaps you wont use too much time sorting it out if
you do the same mistake.

It started when I coded the new Voidcharts. I had some textroutines and
mouse/keyboardroutines in place, and I wanted to add a logo to the top of
the screen. It just so happens that in an Amiga, you have the magnificent
blitterchip and I decided to use this to copy the logo to the screen.

Now, the logo was in two bitplanes, you know me, I'm no graphician and I
wanted to use the copper anyway so I didn't need any more colours. I made
a simple routine that blitted the first bitplane to the screen and it all
worked out well. I then blitted the second bitplane to the screen, and
all of a sudden, the code locked the computer.

Right, I checked all of the regular sources for error first, like
destination adress and modulo. It seemed that the blitter didn't overwrite
any important data, so the error had to be somewhere else. I then checked
the registers and the settings. There were no errors. When removing the
part of the routine which blitted the second bitplane to the screen, it
worked again. There were no errors in the routine.

Having messed back and forth with the registers and adresses for some while,
I took a peek longer up in my code. There, I saw what was going on. I did
a bsr to the logoblitter before turning on any blitterdma. Switching
blitterdma on first solved the problem, and the routine worked correctly.

However, I still haven't found out what made the routine blit one bitplane
without blitterdma switched on. Perhaps it's some sort of timing, as in the
dma wasn't yet switched off after having taken over the computer. Those who
have been involved in programming the cia-registers know that you need
some waitroutines here, as the chips need the signal to be steady for some
time. Perhaps it's the same with the dmacon-register. That's my best bet,
but, like said, I'm not sure. Perhaps it's something else causing this.
I haven't spent too much time thinking about whether this can be useful
in some manners or not, but for those who are interested, some small pieces
of code in order to check this out using other registers might be something
to spend a few evenings on.

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT