| Poster | Thread |
Vikke
|  |
2nd tutorial on ASM- and HW-coding Posted on 16-Mar-2013 17:18:22
| | [ #1 ] |
|
|
 |
Regular Member  |
Joined: 22-Apr-2004 Posts: 106
From: Finland | | |
|
| Thank you all for the great feedback regarding the first tutorial, here comes the next one.
Link: Vikke.net
This time it is a tutorial on doing horizontal shifting. Horizontal shifting is used for scrollers, but also as an effect in demos. You will probably recognize the effect once you see it.
If you have any questions about the code, just ask. I will try to explain everything as detailed as possible, but that isn't possible on the website.
The next codesnippet is already planned, and is yet another Copper-thingy, something very popular back in the day. Can you tell I really like the Copper? :)
And one more thing, I'm really sorry for the bad graphics. I wasn't this bad at doing graphics when only using an Amiga, but now making the graphics first in Photoshop and then converting to IFF isn't the best method. |
|
| Status: Offline |
|
|
olegil
|  |
Re: 2nd tutorial on ASM- and HW-coding Posted on 16-Mar-2013 18:51:12
| | [ #2 ] |
|
|
 |
Elite Member  |
Joined: 22-Aug-2003 Posts: 5900
From: Work | | |
|
| @Vikke
Don't feel bad, the important part here is the code.
Very good example, very good explanation. _________________ This weeks pet peeve: Using "voltage" instead of "potential", which leads to inventing new words like "amperage" instead of "current" (I, measured in A) or possible "charge" (amperehours, Ah or Coulomb, C). Sometimes I don't even know what people mean. |
|
| Status: Offline |
|
|
ara
|  |
Re: 2nd tutorial on ASM- and HW-coding Posted on 16-Mar-2013 19:55:56
| | [ #3 ] |
|
|
 |
Regular Member  |
Joined: 11-Jan-2006 Posts: 138
From: Unknown | | |
|
| @Vikke
Just an idea for one of the next tutorials: At the moment, you try to write the code as simple and readable as possible. Maybe you could make a tutorial where you start with a version of the code that is simple but too slow, and then optimize it step by step using Amiga specific as well as 68k specific optimizations.
Btw, either clear d0 and use OpenLibrary or don't clear d0 and use OldOpenLibrary :)
|
|
| Status: Offline |
|
|
Vikke
|  |
Re: 2nd tutorial on ASM- and HW-coding Posted on 16-Mar-2013 20:31:22
| | [ #4 ] |
|
|
 |
Regular Member  |
Joined: 22-Apr-2004 Posts: 106
From: Finland | | |
|
| @ara
So that is the difference with oldOpenLibrary and openLibrary, good to know :)
I will at some point make some kind of optimizations, at least when I get to the blitter. But perhaps I could show some examples of unrolled loops before that. The problem with making as fast MC68k-code as possible is that the readability goes more or less to zero, but I will try to make such a thing when doing morphs/smooth transitions between some effects (a lot of bitlogic will be involved, perhaps I'll show how it could be done without optimizations).
Anyway, a good idea. Thank you. |
|
| Status: Offline |
|
|
nubechecorre
|  |
Re: 2nd tutorial on ASM- and HW-coding Posted on 16-Mar-2013 22:11:39
| | [ #5 ] |
|
|
 |
Cult Member  |
Joined: 21-Nov-2003 Posts: 895
From: San remo -Italy- | | |
|
| |
| Status: Offline |
|
|
Sodapop
|  |
Re: 2nd tutorial on ASM- and HW-coding Posted on 17-Mar-2013 7:27:14
| | [ #6 ] |
|
|
 |
Member  |
Joined: 13-May-2003 Posts: 50
From: France | | |
|
| @Vikke
Hey ! I love this website ! And this time you commented the whole source code, absolutely marvellous ! 
By the way, I read the story behind your comeback to 68k coding, and I pretty much recognize myself into it ! I fell in love with assembly and Amiga chips during my teenage years, but didn't have much time and dedication to put into it back then... but it's always been in the back of my mind since then, and now that I've set up a proper Winuae HD config, with Devpac 3, I'm giving it another go ! I really don't care about other languages or computers, 68k and Amiga is the perfect combination for me ! And it can never be replaced ! Last edited by Sodapop on 17-Mar-2013 at 09:11 AM.
|
|
| Status: Offline |
|
|
CosmosUnivers
|  |
Re: 2nd tutorial on ASM- and HW-coding Posted on 17-Mar-2013 8:57:13
| | [ #7 ] |
|
|
 |
Regular Member  |
Joined: 20-Sep-2007 Posts: 119
From: Unknown | | |
|
| @Vikke
You need to close the graphics.library at the end...
Last edited by CosmosUnivers on 17-Mar-2013 at 08:57 AM.
|
|
| Status: Offline |
|
|
Vikke
|  |
Re: 2nd tutorial on ASM- and HW-coding Posted on 17-Mar-2013 9:24:38
| | [ #8 ] |
|
|
 |
Regular Member  |
Joined: 22-Apr-2004 Posts: 106
From: Finland | | |
|
| @CosmosUnivers
Good call. I'll do it in the coming tutorials.
I don't think that it really matters when opening a library that is always in ROM, as no resources are loaded or stored in RAM. I might be wrong on this one, but I think the only thing the openLibrary does in this case is to return the pointer to the library. If we would be loading an external library things would change a lot.
But of course it's a good measure to always close whats been opened. |
|
| Status: Offline |
|
|