The problem is, what you want to do is far from simple. I think you really underestimate how difficult it is to code a demo or game. Out of thousands who try only a few succeed.
|
Quote:
I learned very quickly in 1990 from just 2 books... the Hardware Reference Manual, and the System Programmers Guide. Most of the first steps in Amiga programming (setting up a copper-list, bitplanes etc..) can be accomplished with only a very basic "sub-set" of 68000 instructions (primarily the MOVE instructions) Take baby steps... start simple.. and then explore... |
Many people on this forum have helped me massively in my own quest to make games and achieve something I thought was beyond me.
I joined the board on 31 October 2017 after 25 years of not really touching an Amiga or assembler... one of the first bits of code I created with Devpac was to draw a simple picture to the screen. Here is that assembler.... (yes it's shit) http://www.seismicminds.com/downloads/disp1.s and the required image.... http://www.seismicminds.com/downloads/bombjack.iff As Dan says.... take small steps, experiment with others code.. change the code, try and understand what it does, before long you will start to break down barriers and it will begin to click. 2 years on and I've learned so much, and even in another 2 years I'll probably not know as much as some of the coders here have forgotten, but we all must start somewhere. Below is the thread that got me started back into the Amiga, if you want I am happy to upload all of the early source files for you to experiment with, I would caveat it though in that I made lots of mistakes.... the biggest one being not using memory management.... ALWAYS USE MEMORY MANAGEMENT. http://eab.abime.net/showthread.php?t=89271 Edit... If you want to make games... an understanding of the principles of Object Orientated Programming will be a massive help. |
Quote:
|
The main problem is often time. When you have a full-time job already it's difficult to put in extra effort to learn a completely different topic.
I remember in 1991 I had my amiga I wanted to do something with it beside games. Someone gave me a copy of some Micro application asm book, and I bought Action Replay MKIII (excellent investment) to crack games (I already knew 6502 asm & C) I also got hold of the amiga bible (translated in french, that helped at the time), comprehensive book about custom chips & CIAs I was young, no children, a lot of time on my hands. Certainly helped. That said, I never got into proper game coding. I "just" coded an emulator then JST & all the hd game stuff. It's difficult to want to embrace all the goals at the same time though: a game is complex: there are graphics, level design, sound, file I/O, controls, tasks, interactions with the OS... you can't learn all that in one day. One step at a time as Dan said. And even mcgeezer admitted that he shouldn't have written Rygar in asm. Better do a mix of C & asm. C does the tedious loading/organizing/hiscore/computation parts that don't require too much speed. asm does the "fast" parts. note that a lot of games are coded in C only. They're not the fastest, but still... (Marble Madness, Cinemaware games, Lucas Arts, Sierra) |
My recommendation would be to spend some time with a good disassembler. Find a bit of code to analyse that's big enough to be interesting and start adding labels and comments until you end up with a fully documented piece of code that you understand well. Then improve it. If it wasn't originally written in optimised assembly then optimise it. Rinse and repeat until you've reached the level you're looking for.
Another similar suggestion, if you're comfortable with C, would be to write something in C, make it feature complete, then find the handful of functions that are "hotspots" and rewrite them in assembler. You can even start with the compiler generated assembly to give you a working, if non-optimal, starting point. |
Quote:
I believe that the OP is starting from scratch with learning 68k |
On the bright side 68000 assembly probably has one of the easiest syntaxes to learn. It has a very orthogonal instruction set (even if it's the assembler that's doing the work).
Many CPUs have specialised registers but on the 68000 you often don't care (apart from the address/data register split). Lots of registers too! |
With 68k you can do a lot with a small number of instructions. You only really need the more obscure ones when you start optimizing.
The biggest pain is the toolset itself. WinUAE helps a lot with the build-in debugger, even if it's not the most friendly. But stuff like cross-development with a source level debugger doesn't exist. Also it's easy to crash the machine and there are no exceptions when you have a bad pointer, so you have to get good at debugging stuff with minimal help. Not even a decent modern C compiler... So you have to struggle at first. Some kind of cross development system would be very helpful I think. I saw one for the Megadrive (also 68k based) which was kinda like an Action Replay but connected to a PC, so you could single step and debug at source level and see the results in real-time. Might be possible with an A500, or with WinUAE. |
WinUAE does let you single step through code. Though if you're running with the OS it will show you the code from interrupts as well as they happen. Which might be confusing for a beginner.
But you hit the nail on the head: one of the biggest challenges with assembly language is the lack of 'help' the system/assembler/etc give you. Even in the best case it can still be difficult to pinpoint errors. |
I use WinUAE, Notepad++ with VASM.
I have notepad++ configured like below... If I press shift+F10 I can build a project in under 1 second. If I press shift+F11 I can test a project... takes about 2 seconds with Warp mode If I press shift+F12 I can debug the project with MonAm hooked It's an extremely fast tool chain and works really well for all of my needs. |
Quote:
|
I quite enjoyed this beginners introduction to 68k asm:
http://mrjester.hapisan.com/04_MC68/ |
Quote:
I remember some Amiga demo mentioning it probably being the first developed using snasm on a 386 - might even have been an Anarchy demo :) |
Quote:
|
Quote:
Yes it does exist with Visual Studio Code and this extension: https://github.com/prb28/vscode-amiga-assembly . ;) |
Quote:
https://github.com/bebbo/amiga-gcc There was some talk of a LLVM/CLANG port (was it the Rust guys?) |
Quote:
i hope it will help everyone, i'm sure i'm not alone to try to code in ASM. Every amigans should try, we need more tools, more games, etc... Thank you guys. :great |
Quote:
|
Ah, that'd be the holy grail really.
I love the WinUAE debugger, but source level debugging would be the bee's knees. |
All times are GMT +2. The time now is 17:24. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.