English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. Tutorials (https://eab.abime.net/forumdisplay.php?f=73)
-   -   New tutorial on BOBs (https://eab.abime.net/showthread.php?t=93360)

Yragael 12 July 2018 18:53

New tutorial on BOBs
 
Hi


For those who need some basic code to start with BOBs in assembly language, I just published this article :


http://www.stashofcode.fr/afficher-s...s-sur-amiga-2/


Written in french, but if you don't read french and are looking for code, just download the archive that contains those basic samples :

bobRAW.s for displaying a a BOB in RAW format

bobRAWB.s for displaying a BOB in RAW Blitter format

unlimitedBobs.s for using BOBs in the unlimited BOBs FX

vectorBalls.s for using BOBs in the vector balls FX

Have fun!

Jeeg 13 July 2018 14:50

Nice to share it with the whole community. :-)

turrican3 14 July 2018 09:36

excellent thank you guys. :great

meynaf 14 July 2018 10:20

Always good to see quality french articles.
Don't hesitate to write more, english sux :p

kamelito 14 July 2018 18:21

Quote:

Originally Posted by meynaf (Post 1254192)
Always good to see quality french articles.
Don't hesitate to write more, english sux :p

Lexomil aussi...
http://flabrador.free.fr/lexo/amiga/index.html

Steve 14 July 2018 19:31

1 Attachment(s)
Cool tutorials. Thanks! :)

I've tried compiling a couple but am getting compiler errors using Devpac 3.

I've attached a screenshot. Anyone got any clues about the errors?

DrCinicus 14 July 2018 22:28

Quote:

Originally Posted by Steve (Post 1254266)
Cool tutorials. Thanks! :)

I've tried compiling a couple but am getting compiler errors using Devpac 3.

I've attached a screenshot. Anyone got any clues about the errors?

In the first errors you should change addi.w in add.w;in the others you should use dcb.b instead of blk.b

Steve 15 July 2018 00:18

1 Attachment(s)
Quote:

Originally Posted by DrCinicus (Post 1254300)
In the first errors you should change addi.w in add.w;in the others you should use dcb.b instead of blk.b

Hi DrCinicus

Thanks for your help. Works perfectly now. Cheers! :great :)

Yragael 12 August 2018 01:26

I added perfectBob.s to the ZIP file.

It is an enhanced version of bobRAWB.s: it displays a BOB that is masked (ie: the BOB may contain transparent pixels) and that is cleared from the background between frames (ie: the whole background is not cleared between frames, which saves a lot of time when there are numerous bitplanes).

Note that using masks to recover only the pixels of the rectangular area of the background that the BOB hides is certainly not the fastest way to recover the background if this background did not change between frames. A better option would be to recover all the WORDs that the BOB hides even partially, which means copying a WORD-aligned part of the background without masking any part of it. Still, a precise recovering routine may be useful. Moreover, it is another interesting example of one usage of the Blitter.

So, the code contains three routines that use data structures :

_drawBOB draws the BOB

_clearBOB recovers the background behind the BOB with a pixel precision

_clearBOBFast recovers the background behind the BOB with a WORD precision

Yragael 15 August 2018 00:00

The files bobRAW.s and bobRAWB.s have been updated in the archive. Sorry guys : the previous ones were bad versions, with no masking.


All times are GMT +2. The time now is 13:44.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.05441 seconds with 11 queries