A.D.A. Amiga Demoscene Archive

  Welcome guest! Please register a new account or log in

  

  

  

Demos Amiga Demoscene Archive Forum / Coding / Where/how did you learn to code assembler?
 Page:  1  2  »» 
Author Message
z5_
Member
#1 - Posted: 28 Nov 2005 18:01
Reply Quote
When i started learning assembler (which was about two months before i stopped learning assembler...), i felt that it all was a bit too much too soon. I mean, first you had to have good startup-code. Then you had the whole timing thing: the best way to put time in a demo (interrupt, vblank,...). Then you had to have a system to put one effect after the other... some sort of mainloop. Soon afterwards, the question of speed started bugging me and stuff like double or even triple buffering were mentioned. And to top it all off, one had to have a chunky to planar system in place to code effects (well, it wasn't really necessary but still... can you do without them these days). And all this while getting to grips with assembler language, copper, blitter, sound...

The question i'm curious in: how did you learn assembler? Did you know other persons who teached you. Did you share code, exchange ideas,... Did you study other code (there isn't that much code around to study though).
bonkers
Member
#2 - Posted: 28 Nov 2005 18:19
Reply Quote
Pezac/Nature helped me out a lot when I started. Meet him on C-Frogs old BBS Flowerbed. I wasn't the best of students but Pez was very patient.

I know it's really hard to get started but don't give up as it's a very rewarding hobby democoding. What I would suggest is to not to try to learn everything at once. Skip learning the hardware right now and just concentrate on chunky stuff so you start understanding how assembler code is built up. People might say that you should skip graphics at all in the begining but then it's easier to lose interest, so I think you should start with a chunky effect. Try and write something realtively simple such as a bumpmapper by reading a tutorial, preferably a C or pseudo-code tutorial so you get the concept but have to figure out how to do it in 68k asm.

Don't give up, I would love to see a demo from you. Good luck.
z5_
Member
#3 - Posted: 30 Nov 2005 12:46
Reply Quote
Well, i sort of gave up and buried my dream months ago. Coding a demo has probably been my biggest dream in my live though. I envy you guys. The demoscene is great in the sense that young people can be creative, learn to work in group, make art and show it to hundreds of people. I think this is something wonderful.

But, i may try to at least code one effect (i did a small intro with some scrollers, sprites, a picture, some wipes and music but never released it...). Allthough, a bumpmapper seems a bit difficult :o)
xeron
Member
#4 - Posted: 30 Nov 2005 12:59
Reply Quote
I learnt AMOS, then Amiga E, then C. And during this time i fitted bits of ASM in here and there. I started by adding bits of ASM here and there to my Amiga E code (inline assembler rules ;-) to speed it up. Eventually I found I was just as happy coding in Asm as I was E or C.

It was only THEN that i started demo coding and learning to "bash the hardware".

I'd start with chunky coding as bonkers said; just get a good startup code and use Kalm's C2P. Then gradually learn the hardware if you want to do oldskool stuff.

Actually, hardware bashing is more fun than making modern C2P effects, I really enjoyed the experience of coding my entry to TRSAC '05. Doing things like controlling the blitter via the copper, doing screen synced changes and stuff like that is fun ;-)
winden
Member
#5 - Posted: 30 Nov 2005 13:20 - Edited
Reply Quote
z5, in a few days i'm releasing my startup code with integrated dobule buffering, frame-sync c2p, 16/64/256/ham6/ham8 output, fixed tp61, timed effect linking and modular effects soon (used for "crossing the deadline" intro for example). In the mean time, the sources for "daripper demo" from radykal 98 may help you with startup, c2p and sync :)
bonkers
Member
#6 - Posted: 30 Nov 2005 13:52
Reply Quote
@z5, atleast I find using HW-sprites and stuff a lot trickier then doing c2p effects. A bumpmapper is not hard at all, if you have done a wipe routine you have actually done most of the work.

@xeron, still haven't seen your TRSAC'05 entry as my Amiga have nearly died, ordered a brand new a1200 yesterday so I'll have a look at it when it arrives. Great to see that you are releasing stuff though.

@winden, cool that you are releasing your demosystem. Are you using your own c2p?
winden
Member
#7 - Posted: 30 Nov 2005 23:04
Reply Quote
bonkers, i used to code my own c2p's from 1996 to 1998 (synthesis had
a purpose-made c2p for each routine) but toward a later time (starting 1999) i coded a "generic screen setup" that automatically created the copperlist and dinamically switched c2p's depending on resolution and cpu... kalms had already joined the group so i think i ended using his c2p's ;)

anyways i recall coding a 060-optimized 8bpl c2p (2 merges operations in parallel) which fitted in 256bytes (perfect for 030 cache and 4k intros), and also some effects which did calc+c2p+chipwrite all-in-one from the main innerloop which gave quite a speed boost :)
skan
Member
#8 - Posted: 1 Dec 2005 08:56
Reply Quote
@z5

Oh, I'm so with you. I can understand your frustration since it's mine too. Anyway, I found that pixelling is giving me some satisfaction lately... So I picked up some old pics of mine (unfinished) and started pixelling over them, as well as doing new ones (JP clips for istance). What i'm trying to say is: coding is teh great ultimate challenge, but the scene has room for graphicians and musicians too! ;)
kas1e
Member
#9 - Posted: 1 Dec 2005 09:02
Reply Quote
skan, i can said more, amiga scene do not have already graphicans :)
rload
Member
#10 - Posted: 1 Dec 2005 11:15
Reply Quote
I went to Bush Party II 95, my first party. There I met Acceede of Codbowels/Astra Syntex/Donut Fetish who laughed at my AMOS programming and showed me a bit of asm. Then I met Cyberstarr at Odyssey 95 the next week who was also doing asm. So then I learned lots of stuff from him and Accede and every other coder I could get my hands on. Learned nearly everything at parties :) Lots better than to dig into boring technical books which do not intend to teach you what you want to know (bloody OS coding assembly books!) I bought hte reference manual at Odyssey 95 too.. Lots of us Norwegian n00b amiga sceners of 95 learned to code by learning from each other at that time.
z5_
Member
#11 - Posted: 1 Dec 2005 12:35
Reply Quote
Hmm... it's tempting to dig my asm-one up again and have a go at one effect in chunky mode... maybe then i will find peace of mind :)

Can somebody actually name a demo/screenshot where i can see what a bumpmap is (i completely suck at naming effects)? And anybody have a link to a turorial to grasp the basics about that?

@Winden: startup-code with the most important basic features built in sounds great. What would be even better though, if possible, is a version with one very basic chunky effect added. Something i could compile in asm-one out of the box and study how it's done.
winden
Member
#12 - Posted: 1 Dec 2005 13:26 - Edited
Reply Quote
z5, please get daripper source and there you can find a bumpmapper, a tunnel table and some other things with c2p, music and timing included. Maybe one problem is that I used devpac 3... this was done using old system (same as synthesis)... btw screenshot at pouet for this demo is a bumpmap ;)

for the "new" startup, i switched to assembling .asm to .o files and then linking them (just like when you use C programming) with phxass (free from aminet)

also you may consider reading some older coding tutorials from mags like trashcan, nosense, rom, jurassic pack, pressure... stuff like voxels, bumps, c2p... were all very explained and discussed on diskmags :)))
dalton
Member
#13 - Posted: 1 Dec 2005 14:12
Reply Quote
I started on PC with basic followed by pascal and then assembler. I managed to produce some smaller intros but I never really knew what I was doing. Then I started coding asm on my calculator and gameboy and for the first time I understood how a computer works. On amiga I started with AMOS basic, it gives a good introduction to the hardware. It took several years before I had a solid ground to build assembler programs on the amiga. The threshold is higher than on any other platform I've tried, and there aren't really any good tutorials for starters. But once you have overcome the initial problems it's all downhill =)
z5_
Member
#14 - Posted: 1 Dec 2005 16:28
Reply Quote
dalton
Welcome back, Dalton :)

But once you have overcome the initial problems it's all downhill =)
Hmm... that sounds negative but i presume you meant that things got easier?
skan
Member
#15 - Posted: 1 Dec 2005 16:55
Reply Quote
mhmh, i feel a primal instinct... wanna get my hands on asm-one again... ;)
z5_
Member
#16 - Posted: 1 Dec 2005 17:54 - Edited
Reply Quote
What i found a pity was the lack of tutorials. And with tutorials, i mean sourcecode which can be assembled and run straight from the box (many tutorials on the net aren't compatible anymore with up to date amigas) and has decent commentary written inside describing what each part does. It doesn't need to be hundreds of effects.

For example, i was just looking at the code from the network intro Winden pointed me too. Being interested especially in the bumpmap effect, i looked and found a directory called bump which has a lot of files in it, none of which make sense to me (meaning, i don't have any idea of what's inside... well, i can guess that chk has something to do with chunky but that's about it). Then i open the asm file and find a whole lot of code but no comments. Figuring out what this all does and means would probably take me ages.

I'd rather have one effect and a lot of explanation. Tutorials in diskmags are great but it's always nice when you have something you can compile and see in action from the start. Something you can experiment with.

Good, well documented tutorials, each including only one effect. The lack of that makes assembly such a big stepping stone imo (i am familiar with coding and have learned bits of Pascal, C, C++). One has to get to grips with assembler language and the principles behind effects aswell.

(btw. that was not a stab at Winden's source code. I realise that the source code for the intro was programmed to make an intro, not to serve as a tutorial).

I'd rather have one well documented tutorial on my Amiga then hundreds of non-documented tutorials on paper or in diskmags.
rload
Member
#17 - Posted: 1 Dec 2005 18:37
Reply Quote
I remember having lots of problems assembling stuff because of missing includes, weird include dirs and all that shit to begin with. I would have loved it if amiga users had a more standard set of includes and didn't use absolute paths for everything and so on. :)

Remember to turn on case sensitivity in the assembler btw, that really made a mockery of everything without me understanding why nothing worked.
z5_
Member
#18 - Posted: 1 Dec 2005 20:43
Reply Quote
I guess, being so elite now, you guys don't want to help newbies because we have to suffer all the evil you have suffered while learning. :)
Overflow
Member
#19 - Posted: 1 Dec 2005 20:50 - Edited
Reply Quote
Hehe...dunno if i should say i ever really learned to code..

Back when i had my C64 me and a cousin played around with basic...making disktools, small "demos" with cycleing color, sprites that bounced etc..

Then when i got the amiga i played around with Devpac and a few discs of a swedish coding tutorial. I got to the point were i made a demo with cycling colors here and there, starfields, a bouncing logo and a scrolltext..plus a tech tech wave picture smack in the middle..
This was back in ...92 or so..Last year I found this site, and started coding a little again, got almost back to my old crappy level thanks to the tutorials given here at this site plus from downloading what i could find of example coding etc.
z5_
Member
#20 - Posted: 1 Dec 2005 21:24
Reply Quote
Overflow
You forgot to mention that you stopped again because you were too busy playing counterstrike... :)
bonkers
Member
#21 - Posted: 2 Dec 2005 00:40
Reply Quote
@loadie, I agree with you, all startup code you find publicly is so bloated which makes it really hard to understand and to assemble. Having to write your own start-up code as the first thing is not that fun.

@z5, even though i might not be a very good coder feel free to ask anything either here or by email, that's the least I can do to give something back for the great work you guys are doing with this site.

I googled around and found this tutorial on bump mapping,
http://www.flipcode.com/articles/demomaking_issue07.shtml
there are explenations of other effects there aswell. Usually I find it really hard to read other peoples asm code to figure out how an effect is done. I usually read stuff like this one and then try and code it just so it works, then when I really understand the nature of the effect I try to optimise and write it more properly, this usually goes through quite a few iterations. I'm sure that if you are able to write a scroller and the stuff you wrote above you know enough asm to get this effect to work.

Have you managed to get a c2p to work?
Overflow
Member
#22 - Posted: 2 Dec 2005 02:32
Reply Quote
LOL z5_ shhhhhhh, originally it was work and exams workwise that stopped me from giving coding much time. Tons of theory...but adding Counterstrike to the equation sure didnt help :P
z5_
Member
#23 - Posted: 2 Dec 2005 12:55 - Edited
Reply Quote
Have you managed to get a c2p to work?
Nope. What i have from last year is all planar stuff, mostly with blitter and copperlists for colors,... That happens when you start with reading the amiga hardware reference manual (that name might be wrong though... it was a copy of a manual describing every part of the hardware and how to program it).

Thinking about it, i wouldn't even know how to start or how a c2p fits in. I found that thinking in bitplanes was quite straightforward, especially for overlaying graphics on top of each other.

Say for example that i want to show a picture on screen, can i do that with c2p. I suppose i need to save my picture in chunky format instead of planar. But what then? Feed it to the c2p to planar routine which will then give me my gfx in planar structure, then appoint my bitplane pointers to it like i used to do with planar gfx? Anyway, i'll catch up on a bit of that and it's a bit off-topic here :)

Still, if anybody could do a "package" with one c2p effect and startup-code, well-documented and compatible with a modern Amiga and Apreferably Asm-One, that would be great :o)
dalton
Member
#24 - Posted: 2 Dec 2005 19:04
Reply Quote
Here's the pack we used in elcrew earlier. It's basically a startup, Kalms' c2p and the p61 player. It has a small bug that crashes asm-one if you click the mouse in the editor window. It should not considered a good example of how to make use of the amiga, it goes against alot of the conventions that I have argued for on this forum. But it comes with free online support =)

edit and include kirchhoff.i

download
z5_
Member
#25 - Posted: 5 Dec 2005 16:42
Reply Quote
@dalton:

Thanks for releasing example code :o) I had a try compiling it but as usual, had troubles with the includes. I thought my includes were the official ones but they aren't divided into lvo,... but in dos, exec,... still, that should be no problem but i'm lacking the graphics_lib aswell. And i always had trouble compiling with the includes before so in the end i left them out and just defined the offsets of the needed libraries at the top of my code. Still, it would actually be nice to be able to compile with them...
rload
Member
#26 - Posted: 5 Dec 2005 17:05
Reply Quote
I don't think I ever had that LVO directory either, but it keeps popping up in other peoples sources along with all other kinds of personal includes not available anywhere. Try using exec/exec_lib.i and dos/dos_lib.i and similar instead. I think those are for the library vector offsets and exec/exec.i dos/dos.i are for the enums and constants and stuff.
bonkers
Member
#27 - Posted: 5 Dec 2005 19:18
Reply Quote
Kirchhoff!!

@z5, did you get kirchhoff or noname's WickedOS to assemble?
dalton
Member
#28 - Posted: 5 Dec 2005 23:01
Reply Quote
I wonder where I got the lvo dir from... doesn't it come with asm-one? except for that it should compile without problems. if it doesn't you could check if case sensitive labels is on or off. I think somebody might have mentioned that already...

@bonkers
maybe I should upload cocomoOS too? now how did I get a copy of that? =)
z5_
Member
#29 - Posted: 6 Dec 2005 13:53
Reply Quote
I once peeked into startup-code from Kalms (available on Aminet i think) and it did come with the lvo directory aswell.

I tried compiling the Kirchhoff system (i'll try wickedos aswell ofcourse) but i didn't manage. I think there is something wrong with my includes (i got them from a link posted here on A.D.A). I have errors like "Double symbol" but asm-one isn't really helpful :( Ouch...
Cyf
Member
#30 - Posted: 6 Dec 2005 14:03
Reply Quote
i learned asm alone

have you take a look at http://www.flashtro.com for old intro code sources (compil and that work!) ? see startupcodes, and simple to little more complex effects
 Page:  1  2  »» 

  Please register a new account or log in to comment

  

  

  

 

A.D.A. Amiga Demoscene Archive, Version 3.0