Beginner's ASM Tutorial: Multiplatform Z80 ASM development videos... with vampires!

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Ralf
Dynamite Dan
Posts: 1313
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: Beginner's ASM Tutorial: Multiplatform Z80 ASM development videos... with vampires!

Post by Ralf » Sat Jan 20, 2018 5:42 pm

Thanks!

I'd like to make a confession now ;) I always wanted to learn writing code for Amstrad CPC. Unofortunately out of all classic computers I can write code only for Zx Spectrum. I can't do it for Amstrad, can't do it for Sam Coupe, can't do it for MSX, not to mention machines with different CPUs than Z80 and completely different architecture.

I believe the easiest switch would be from Spectrum to CPC. With some experience at both platforms I could even maybe one day try to decompile and port some game from CPC to Spectrum ;) Or maybe not as it would turn too difficult. Anyway I'd like to try something new.

Unfortunately I never did it. I can see two obstacles - graphic modes of CPC which are quite badly documented (or at least Google failed me here) and different tools - emulators, debuggers, decompilers, art utilities, graphic rippers and so on.

So I'm really happy to see your tutorial. Don't hesitate to write about CPC. We know Zx Spectrum and I suppose there are people like me who would like to learn something new.
0 x

User avatar
R-Tape
Site Admin
Posts: 2591
Joined: Thu Nov 09, 2017 11:46 am

Re: Beginner's ASM Tutorial: Multiplatform Z80 ASM development videos... with vampires!

Post by R-Tape » Sat Jan 20, 2018 6:01 pm

"You probably think 64 kilobytes doesn't sound much "

Actually I wasn't!

Thanks, I will be following these. A lot of people here will be familiar with the assembly and need to know the peculiarities of the CPC, I heard the screen layout is more wonky than the Speccy's.

I'd like to see my panic style platformer (Lost Tapes of Albion/EFMB) converted to as many platforms as possible (currently Speccy, SAM, Amiga, MSX, PC and someone's working on a C64 version), the CPC may be one I can manage myself eventually.
0 x

AndyC
Manic Miner
Posts: 251
Joined: Mon Nov 13, 2017 5:12 am

Re: Beginner's ASM Tutorial: Multiplatform Z80 ASM development videos... with vampires!

Post by AndyC » Sat Jan 20, 2018 7:10 pm

Ralf wrote:
Sat Jan 20, 2018 5:42 pm
Unfortunately I never did it. I can see two obstacles - graphic modes of CPC which are quite badly documented (or at least Google failed me here) and different tools - emulators, debuggers, decompilers, art utilities, graphic rippers and so on.
The display on the CPC comes down to two chips, the CRTC which controls things like positioning on the screen, size of the displayed area and other timing issues and then the custom Gate Array, which encodes pixels based on the screen mode and handles palette selection (as well as doing ROM/RAM paging).

The CPC wiki has some pretty good documentation on how these work:

http://cpcwiki.eu/index.php/CRTC
http://cpcwiki.eu/index.php/Gate_Array
1 x

User avatar
Spud
Microbot
Posts: 195
Joined: Sun Nov 12, 2017 8:50 pm

Re: Beginner's ASM Tutorial: Multiplatform Z80 ASM development videos... with vampires!

Post by Spud » Sat Jan 20, 2018 10:49 pm

R-Tape wrote:
Sat Jan 20, 2018 6:01 pm
I'd like to see my panic style platformer (Lost Tapes of Albion/EFMB) converted to as many platforms as possible (currently Speccy, SAM, Amiga, MSX, PC and someone's working on a C64 version), the CPC may be one I can manage myself eventually.
Jaco is going to stab me to death, but I am going to convert it to the Sega Master System in that case (I've been wanting an excuse to code for that system for years). It would be also be a cool title to see on the Game Boy.
1 x

Ralf
Dynamite Dan
Posts: 1313
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: Beginner's ASM Tutorial: Multiplatform Z80 ASM development videos... with vampires!

Post by Ralf » Sun Jan 21, 2018 5:14 pm

The CPC wiki has some pretty good documentation on how these work:

http://cpcwiki.eu/index.php/CRTC
http://cpcwiki.eu/index.php/Gate_Array
Well, I suppose it is correct, I suppose it is thorough. But for learning it is terrible. When I opened these links I immediately wanted to run away ;) It's full of some long scary lists of names, numbers, ports, bits, palette indexes, suble differences in models and so on.

Good tutorial gives you knowledge in small doses and not throws everything at your face at once. You start from some simple things and at each step have practical examples which use only the stuff that you learnt so far.

So at this moment I'll just wait how Keith's tutorial develops. I hope at some moment he'll show how to draw a sprite/tile in assembler on CPC.
0 x

AndyC
Manic Miner
Posts: 251
Joined: Mon Nov 13, 2017 5:12 am

Re: Beginner's ASM Tutorial: Multiplatform Z80 ASM development videos... with vampires!

Post by AndyC » Sun Jan 21, 2018 6:55 pm

Yes, it's more documentation than tutorial, Grimware's site was a bit better in that regard but it's disappeared for now at least. Hopefully Keith's videos will fill that niche a bit better. Generic sprite routines on the CPC are trickier to show than on the Speccy, because it depends a lot on how you arrange the screen ram and there are various tricks which work better in some circumstances than others.
0 x

AndyC
Manic Miner
Posts: 251
Joined: Mon Nov 13, 2017 5:12 am

Re: Beginner's ASM Tutorial: Multiplatform Z80 ASM development videos... with vampires!

Post by AndyC » Mon Jan 22, 2018 8:04 pm

Pretty good intro to the screens video. I think maybe it might have been instructive to scroll the screen slightly on the CPC to show how things start to get weird and possibly fiddle with the CRTC screen size registers - it can be quite instructive to show that making a 64-byte (32 characters in Mode 1) wide screen gives you a similar advantage in next line calculations to the Speccy. Those are effects that can be quite easily demonstrated from BASIC too, whereas some of the more cunning CRTC effects require a fairly deep understanding of the hardware and probably a smattering or two of assembly.
0 x

AndyC
Manic Miner
Posts: 251
Joined: Mon Nov 13, 2017 5:12 am

Re: Beginner's ASM Tutorial: Multiplatform Z80 ASM development videos... with vampires!

Post by AndyC » Tue Jan 23, 2018 7:25 am

Yeah, I figured that was pretty much your line of thought. I was thinking more in terms of "If you're playing around in BASIC and the screen scrolls, then weird stuff like this happens, so just remember to do a MODE first" rather than necessarily an in-depth explanation of how you could use it in a game. Particularly be cause the advice of doing a POKE &C000,x to see the effect is a good thing, unless it's not where you think it is!
0 x

User avatar
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Beginner's ASM Tutorial: Multiplatform Z80 ASM development videos... with vampires!

Post by Nomad » Wed Jan 24, 2018 3:33 am

I must admit I would love to be able to port crapchess to the MSX/CPC.

Are there any good books about assembly for the MSX, I found a few books but they were not so practical (much like the spectrum). If I can find a rom disassembly that goes into some detail how the system handled different tasks would be great. There also does not seem to be many assembly books in English for the msx. (well not on the net).

That is one thing the spectrum (and atari/commodore/apple ii) has going for it - lots of info out there. MSX is such a nice platform if I could only figure out how to use it :lol: CPC is more of a abusive relationship I think, I would have to think hard about attempting a port for that beast.
0 x

C.Born
Berk
Posts: 36
Joined: Sat Dec 09, 2017 4:09 pm

Re: Beginner's ASM Tutorial: Multiplatform Z80 ASM development videos... with vampires!

Post by C.Born » Sat Feb 03, 2018 8:23 pm

hi Keith,

may i say that you use a bit to much table lines? i work on 1920x1080 and i see a lot of red on black between fine white lines..
Image
0 x

Post Reply