Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Jon on January 17, 2007, 05:39:00 pm

Title: ASM Tutorials
Post by: Jon on January 17, 2007, 05:39:00 pm
I'm in the midst of writing z80 assembly tutorials, and I just wanted any input you can think of to help me make these user-friendly, and not complicated as hell :/confused.gif .  For example, please tell me any of the main things that made you go o.oblink.gif when trying to read other assembly tutorials.
Title: ASM Tutorials
Post by: DJ Omnimaga on January 18, 2007, 02:03:00 am
the fact that it's not software programming oriented enough, that it helps understanding ASM but it doesn't help making programs or small games. Something like ASM guru for regular 83 would be cool, but for 83+
Title: ASM Tutorials
Post by: Liazon on January 18, 2007, 06:22:00 am
In other words, teach people how to do simple things like matrix-based tilemapping and hit detection, which is something that I think a lot of basic guides teach.  It kind eases the transition between basic and ASM.

However, warn that people should not use the same method OVER and OVER because sometimes things need to be modified for different situations.
Title: ASM Tutorials
Post by: bfr on January 18, 2007, 11:15:00 am
Teach people how to do common things done in games, which programmers will most likely be making (highscores, grayscale, tile-mapping).  Also, try to explain how to use the VAT well, because even TI-83+ Assembly in 28 Days didn't really do a good job of explaining it well and giving methods how to access and get the values of things such as strings and other variables.  Try to focus on the things that aren't in other tutorials.  
Title: ASM Tutorials
Post by: Delnar_Ersike on January 18, 2007, 01:38:00 pm
Expand the harder parts into lots of tutorials *looks at Learning Assembly in 28 Days Day 2*. Cover the sections which explain the ASM equivalents of BASIC commands first, and make the guide understandable so even people who don't know a thing about coding on the computer (like me :oops:embarassed.gif )can dive in.
Title: ASM Tutorials
Post by: trevmeister66 on January 18, 2007, 03:43:00 pm
yeah i tried to start ASM, and i'm a pretty good programmer (not to be modest  :king:king2.gif ), but with the "ASM in 28 days", i couldn't understand much of anything. I just wanted to find out how to do sprites and hit detection. (and a menu).
Title: ASM Tutorials
Post by: Jon on January 18, 2007, 04:38:00 pm
I can teach you all about sprites :)smile.gif.  Menus make my head hurt in ASM, even my 4-entry menu in my pong game is a nightmare of poorly-coded asm. :/confused.gif

PS: I love plotting graphics in b/w, but not grayscale, cuz it makes my head hurt.
Title: ASM Tutorials
Post by: DJ Omnimaga on January 19, 2007, 02:03:00 am
is it me or does handling text/strings seems so hard in asm compared to doing other complex stuff such as displaying maps/sprites?
Title: ASM Tutorials
Post by: Liazon on January 19, 2007, 09:40:00 am
QuoteBegin-Delnar_Ersike+18 Jan, 2007, 19:38-->
QUOTE (Delnar_Ersike @ 18 Jan, 2007, 19:38)
Expand the harder parts into lots of tutorials *looks at Learning Assembly in 28 Days Day 2*. Cover the sections which explain the ASM equivalents of BASIC commands first, and make the guide understandable so even people who don't know a thing about coding on the computer (like me :oops:embarassed.gif )can dive in.

that's the wrong way to learn ASM.  Most of the basic commands are a combination of ASM routines made up of many many lines.  It'd be kinda complicated to teach those things from the get go.  For the most part, ASM is all about data manipulation.  what appears on the screen depends on where you store it.  patience, young padawan is the advice i'd give.  but most people pick it up real quick if they just let it wash over them; they just learn about code as opposed to making games.

edit:

@xlibman: that's because most people will use ti-os ROM calls to display text since they dont' take up space in the program and they're already pretty good.  It's just that you have to make sure you give the routine the right info.  in terms of combining strings and all that, it's more of a matter of having space to do so and actually doing it.  that's probably why a whole day is used in ASM in 28 to talk about strings.
Title: ASM Tutorials
Post by: Jon on January 19, 2007, 05:18:00 pm
Yeah that's an excellent point.  You can't expect to be able to create brilliant game right out of the gate after reading some tutorials.  ASM takes time.  The way I would suggest is making a game while you learn ASM.  That way, you can slowly learn new concepts, and then apply them to your game.   My original Pong game was all ascii chars.  It took me months of revision to get it to where it is now.  So take some sort of game idea, program whatever you can with what you know, then learn what you need to know to finish the game.
Title: ASM Tutorials
Post by: Delnar_Ersike on January 19, 2007, 06:56:00 pm
QuoteBegin-Jon+19 Jan, 2007, 23:18-->
QUOTE (Jon @ 19 Jan, 2007, 23:18)
Yeah that's an excellent point.  You can't expect to be able to create brilliant game right out of the gate after reading some tutorials.  ASM takes time.  The way I would suggest is making a game while you learn ASM.  That way, you can slowly learn new concepts, and then apply them to your game.   My original Pong game was all ascii chars.  It took me months of revision to get it to where it is now.  So take some sort of game idea, program whatever you can with what you know, then learn what you need to know to finish the game.  

 *Delnar_Ersike
Title: ASM Tutorials
Post by: Spellshaper on January 20, 2007, 12:00:00 am
QuoteBegin-xlibman+18 Jan, 2007, 14:03-->
QUOTE (xlibman @ 18 Jan, 2007, 14:03)
the fact that it's not software programming oriented enough, that it helps understanding ASM but it doesn't help making programs or small games.  

 I second that.

Also, many people who read the tutorials want to program games, not tools.
We need a game-oriented tutorial. Like explaining hit detection and stuff.
Title: ASM Tutorials
Post by: Jon on January 20, 2007, 10:50:00 am
QUOTE
QUOTE

the fact that it's not software programming oriented enough, that it helps understanding ASM but it doesn't help making programs or small games.
Title: ASM Tutorials
Post by: Delnar_Ersike on January 20, 2007, 05:47:00 pm
QuoteBegin-Jon+20 Jan, 2007, 16:5-->
QUOTE (Jon @ 20 Jan, 2007, 16:50)
QUOTE
QUOTE

the fact that it's not software programming oriented enough, that it helps understanding ASM but it doesn't help making programs or small games.
Title: ASM Tutorials
Post by: trevmeister66 on January 20, 2007, 05:54:00 pm
*Basic Guru stares back O_Oshocked2.gif *

I only read 1 tutorial on basic before i understood the basics of it (can't remember the name, but it was on ticalc.org). I eventually taught myself how to make games.

I've read about 6-7 different asm tutorials and haven't understood any of them. (maybe it's my laziness  :Ptongue.gif )

Hopefully someday i'll be patiant enough to learn.
Title: ASM Tutorials
Post by: Halifax on January 20, 2007, 06:14:00 pm
Yea assembly does need patience thats what I hated about it. I sat down like 5 or 7 times and tried to learn then one day on Friday in school I was like Im going to go home and dedicate this whole weekend to learning ASM and that is when it happened. I actually learned(not mastered just grasped) ASM after 2 days.Seriously I think you need to just grasp the ideas not program for a week and let the ideas simmer and then things will click. Ask questions and you'll be on your way to a great career.

Now time for some x64 Aseembly how about it :)smile.gif
Title: ASM Tutorials
Post by: Liazon on January 21, 2007, 03:48:00 am
ya, it takes a different amount of time for everyone to grasp the concepts, but once you do, it's your choice whether you want to continue pursuing it cuz everything else is just an application of the basics.  Something clicks eventually but that can't happen unless you try.

actually, the thing that annoyed me the most was setting up the assembly environment, but that was before Latenite, SPASM, and wabbit were available XDsmiley.gif
Title: ASM Tutorials
Post by: trevmeister66 on January 21, 2007, 03:51:00 am
hmm... maybe i'll try and learn it when summer starts, or after i finish all my Basic projects.  
Title: ASM Tutorials
Post by: Jon on January 26, 2007, 05:53:00 pm
Anyway, to get back on topic, what else ought to make it into the tutorials?  I need to learn about interrupts/grayscale, then I will try to make a very in-depth explanation of how to create grayscale.  Interrupts are a toughy (tuffy?) to learn, and I'm pretty sure teaching them won't be any easier, but I will do my best.  :)smile.gif
Title: ASM Tutorials
Post by: DJ Omnimaga on January 27, 2007, 02:42:00 am
i would keep grayscale for the final sections (with graphics stuff tho)
Title: ASM Tutorials
Post by: Liazon on January 27, 2007, 04:17:00 am
grayscale is basically implemented the same way as basic except interrupts make less flicker
Title: ASM Tutorials
Post by: Jon on January 28, 2007, 03:30:00 pm
I just learned interrupts yesterday, and can't wait to teach them ^_^
Title: ASM Tutorials
Post by: DJ Omnimaga on January 29, 2007, 03:07:00 am
yeah i basic you have to keep running a recall pic command (xlib) to switch the gs checkered pattern quickly. This can make things slow sometimes (altough still bearable with xlib). Gambit from the IRC channel or Maxcoderz did an interrupt based gs for BASIC once, but it didnt looked much better because it wasn't synced with the LCD and it kept crashing :(sad.gif. I guess TI-OS+messing with interrupts in BASIC=kaboom
Title: ASM Tutorials
Post by: Liazon on January 29, 2007, 10:41:00 am
that sounds bad :(sad.gif

afaik, interrupt based usually guarantees (near)-flickerless.
Title: ASM Tutorials
Post by: Jon on January 30, 2007, 12:28:00 pm
It really depends on the method you are using for the grayscale, as well as the interrupt frequency (ie. desolate).  The more often interrupts are triggering, the more often the screen is being blinked, so it will be less flickery, but that also means the game will be slower, because more of the processor's power is being devoted to the grayscale :(sad.gif
Title: ASM Tutorials
Post by: trevmeister66 on January 30, 2007, 01:57:00 pm
not that this has anything to do with this thread, but i don't feel like starting one (and it would be pointless), but i am starting to actually understand ASM!!!  :w00t:woot.gif
I've been looking at a tutorial (Arasian one at ticalc.org), and what helps me understand it the most is (you could use this in your tutorial) that he shows you code how to do something and explains what it is. Unlike ASM in 28 days, he (maybe she?) doesn't explain everything about flags at once and stuff like that. And it helps that i am copying down his code, then commenting it all to make sure i understand what each command does.

Just thought i'd post something  :Ptongue.gif
Title: ASM Tutorials
Post by: dinhotheone on February 22, 2007, 11:05:00 am
if you complete this i would voulenteer to use it to teach myself asm. sorta like a beta tester. I really want to learn asm at sometime so i think it would be "mutually beneficial" :)smile.gif
Title: ASM Tutorials
Post by: trevmeister66 on February 22, 2007, 12:48:00 pm
i don't think jon will be doing much tutorial making for a while (if you don't know why, look at another thread ;)wink.gif)
Title: ASM Tutorials
Post by: dinhotheone on February 22, 2007, 02:57:00 pm
im assuming that your talking about tetris taking up the majority of his time right? (im bad at inuendo and hints) :/confused.gif
 ya, i see. But it doesn't really matter if the thing's not done for a while, i dont have anything important/timeconsuming untill the start of the fall soccer season. and even then its not that bad.
Title: ASM Tutorials
Post by: trevmeister66 on February 22, 2007, 03:26:00 pm
no, it's not tetris (he won't work on that for a while either).
Click http://omnimaga.org/index.php?showtopic=1159