Fixato>
I think you're asking a little much from a forum thread when you want a step by step guide. As you can see, it's already not really working. It's better to have a smaller group in such a case.
Before the real stuff, some questions/comments:
- From the git repository I saw you assembled things with tniasm. So I assume you made the choice for cross development instead of development on MSX. Right?
- You started with an sc5 picture. If that's not a specific choice, I would suggest to delay anything like that because sc5 graphics take up loads of space. This will require overhead in dealing with large ROM files which shouldn't be in a first lesson. Best to keep everything within 16KB. I would suggest to start with SC1 and expand from there as you learn.
- I assume you will want to start learning by using ROM bios calls and not dive right into controlling hardware directly. Right?
- What is your current level of understanding? For instance, do you understand the example you have in your GIT repository or do you need to start at basic ASM syntax?
First of all, thank you to those who took the time to write some sane responses.
However, as Edwin pointed out as well, I guess the forum approach isn't what I need, but more a 1on1/face2face tutoring.
I guess I should devote more time to reading through the dry technical material that's out there.
Retrotechie: I'll give that zx spectrum app a chance as well; need to find a different emulator though, because I couldn't get "zxsp" running on my mac.
Anyway, thanks for the responses, but this won't be the way for me Sorry for having wasted your time.
fixato
if you choose sjasm i can send u some simple samples of rom
the same if you choose hiTech C v7.8
Actually, the way you wanted to start learning assembly is probably the best. Learning something just becomes so much easier when it's phun! This is definately the way to go, start with a 'cool' project on screen 5 instead of boring hello world crap in screen 0.
Step 1: Get a good assembler. For beginners I really recommend WB-ASS2. It's a great way to start, since you can ASM and test on-the-fly. You can check register contents, monitor main ram, easily test code... Brilliant to start with, tho not so much once you get the hang of it...
Step 2: Get some good routines. Rip someone else's routines, no point in re-inventing the wheel. Try MAP for some great routines for doing COPYs for instance. By doing copies (HMMM and LMMM) alone you're already halfway to making a cool demo or small game.
Step 3: Don't be afraid of the BIOS. Especially when you're still learning, the BIOS is your best friend. Once you get the hang of it you can do more stuff for yourself, but plenty of stuff can be done just fine by using the BIOS. What's the point in setting the screenmode yourself when a LD A,$05 | CALL $5F will do the trick? (assuming you're not doing some mad mode-split).
Step 4: Just start coding. Z80 assembly is very easy. Just get yourself a small book with all the instructions, and you're set to go. It doesn't take a genius to know what LD A,(HL) or INC HL will do. You'll have your book to know which instructions affect flags or to know why LD DE,(HL) doesn't seem to work...
Step 5: Look at other people's code. Just look at stuff other people wrote. It's how I 'discovered' most of the 'tricks' to fast code, and there's no shame in borrowing routines from someone else. I've never ever written a math routine myself, someone else has already done it better and faster than I ever will, so why bother...
Just start coding, and start having fun. Just use WB-ASS2 so you can just ASM | GO $C000 to test, and just see what happens. If something really has you baffled, just post the source here, and I'm sure someone will be able to tell you why something doesn't work as you had planned...
Good luck, and happy codings!
So, I was wondering if the people here can guide me by the hand and perhaps spoonfeed me a bit. Kinda imagine you have to teach your kid how to cycle.
Fixato,
Your analogy was almost the right one. But the best way to learn something is to follow the steps of someone really good at it. By saying this, I mean: instead of starting from scratch, try patching/modifying some games. I learned nearly all my MSX programming this way and I can assure you that every game I patch is like the original programmer was teaching me himself. You even learn from his mistakes: from the bugs that were left on the code.
I learned a lot of tricks when I created some yet unreleased (I want to revise them) hardisk versions on the 80s, I learned even more creating the Gradius-1 smoothscroll (never released, it was a proof of concept and I want to redo it better).
Then with Salamander I not only learned a lot (how things should not be done) and had the idea of the DynamicVsync to solve its problems.
And I also had a lot of other great teachers:
- Konami's Soccer
- Psycho World
- Gradius-2 (patched it for smoothscroll)
- FireHawk -> Fantastic coding here, those guys were awesome.
And I know some top notch programmers that learned it this same way (list not in any specific order):
- Adriano (Uzix, ExecROM, Illusion City, Parodius English, lot of gamefixes)
- DJC (author of the Snatcher Translation, Knightmare Gold and a lot of state-of-the-art speccy convertions)
- Muffie (many incredible Coleco conversions)
- RicBit (Rambo enhanced, Shalom translation etc)
- SlotMan (many awesome Coleco/SG-1000 conversions, Dungeons and Dragons, Carmen Sandiego, Profanation MSX2 etc )
- A.Maoski (PowerMSX, lot of game patches): he's not between us anymore due to an accident, unfortunately.