Author Topic: Multiplatform Z80 ASM development videos... with vampires!  (Read 3811 times)

0 Members and 1 Guest are viewing this topic.

Offline keith56

  • ちび悪魔!
  • Supporter
  • 464 Plus
  • *
  • Posts: 407
  • Country: jp
  • Part Ma, Part Aku... All Chibi!
    • Chibi Akuma(s)
  • Liked: 692
Z80 Assembly Lesson M7 - Multiplaform Font and Bitmap Conversion - and VASM!

This video uses the code from the last few lessons to make a platform independent font routine that will work in a common way on all our systems... we'll also export one file as a platform specific bitmap using AkuSprite, my sprite editor!

As if that wasn't enough, we'll even look at VASM, a great open source assembler, that can build to pretty much every CPU out there.. so in the future  will take us to the GBZ80, and beyond to the 6502 and maybe even the 68000!


https://youtu.be/q7MihWbk6XM

This Video lesson matches the text lesson on my website, and you can get the source code and my sprite editor as well! (all in sources.7z)
http://www.chibiakumas.com/z80/multiplatform.php#LessonM7

I've made some notes on the code differences between WinAPE and VASM, and you can download my windows builds from:
http://www.chibiakumas.com/z80/vasm.php
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter for CPC - http://www.chibiakumas.com
「チビ悪魔」可笑しいゴシックSTG: http://www.chibiakuma.com
Learn Z80 Assembly programming for CPC,Speccy,MSX + More with my Text+Videos Tutorials:http://www.chibiakumas.com/z80/

Offline keith56

  • ちび悪魔!
  • Supporter
  • 464 Plus
  • *
  • Posts: 407
  • Country: jp
  • Part Ma, Part Aku... All Chibi!
    • Chibi Akuma(s)
  • Liked: 692
Episode 1 of my 'Grime Z80' programming project is now public,

In this project I will try to remake an old dos game for ELEVEN different systems, in 7 days!
I'm using much of the code from my programming tutorials to help me achieve this!
Check it out!


https://youtu.be/nZo4mFqAgo8
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter for CPC - http://www.chibiakumas.com
「チビ悪魔」可笑しいゴシックSTG: http://www.chibiakuma.com
Learn Z80 Assembly programming for CPC,Speccy,MSX + More with my Text+Videos Tutorials:http://www.chibiakumas.com/z80/

Offline keith56

  • ちび悪魔!
  • Supporter
  • 464 Plus
  • *
  • Posts: 407
  • Country: jp
  • Part Ma, Part Aku... All Chibi!
    • Chibi Akuma(s)
  • Liked: 692
Episode 2 of the Grime Z80 project is up!

We now have tiles, a moving cursor and sound, on 11 different systems!


https://youtu.be/t-YKq3tXIZI
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter for CPC - http://www.chibiakumas.com
「チビ悪魔」可笑しいゴシックSTG: http://www.chibiakuma.com
Learn Z80 Assembly programming for CPC,Speccy,MSX + More with my Text+Videos Tutorials:http://www.chibiakumas.com/z80/

Offline keith56

  • ちび悪魔!
  • Supporter
  • 464 Plus
  • *
  • Posts: 407
  • Country: jp
  • Part Ma, Part Aku... All Chibi!
    • Chibi Akuma(s)
  • Liked: 692
Grime Z80 - Episode 3... Bring on the Grime! (and bullets)

The Grime game is actually starting to look like a 'game'... The grime can now grow, and the player can shoot... sort of!

And this is all working on all 11 systems!


https://youtu.be/b4cg5cUDMv0
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter for CPC - http://www.chibiakumas.com
「チビ悪魔」可笑しいゴシックSTG: http://www.chibiakuma.com
Learn Z80 Assembly programming for CPC,Speccy,MSX + More with my Text+Videos Tutorials:http://www.chibiakumas.com/z80/

Offline keith56

  • ちび悪魔!
  • Supporter
  • 464 Plus
  • *
  • Posts: 407
  • Country: jp
  • Part Ma, Part Aku... All Chibi!
    • Chibi Akuma(s)
  • Liked: 692
Grime Z80 - Ep4 is now live on youtube!... Grime is now actually playable, and starting to look like a real game... and most importantly it's working on all 11 systems still!


https://youtu.be/8YcBS3PReBo
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter for CPC - http://www.chibiakumas.com
「チビ悪魔」可笑しいゴシックSTG: http://www.chibiakuma.com
Learn Z80 Assembly programming for CPC,Speccy,MSX + More with my Text+Videos Tutorials:http://www.chibiakumas.com/z80/

Offline keith56

  • ちび悪魔!
  • Supporter
  • 464 Plus
  • *
  • Posts: 407
  • Country: jp
  • Part Ma, Part Aku... All Chibi!
    • Chibi Akuma(s)
  • Liked: 692
Re: Multiplatform Z80 ASM development videos... with vampires!
« Reply #55 on: 12:30, 01 August 18 »
Grime Z80 Project Episode 5 is now up - The game now has a title & gameover screen!

https://youtu.be/Vao2DsrGQAI

Just to reiterate, the game and source-code will be free with the end of the series.
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter for CPC - http://www.chibiakumas.com
「チビ悪魔」可笑しいゴシックSTG: http://www.chibiakuma.com
Learn Z80 Assembly programming for CPC,Speccy,MSX + More with my Text+Videos Tutorials:http://www.chibiakumas.com/z80/

Offline keith56

  • ちび悪魔!
  • Supporter
  • 464 Plus
  • *
  • Posts: 407
  • Country: jp
  • Part Ma, Part Aku... All Chibi!
    • Chibi Akuma(s)
  • Liked: 692
Re: Multiplatform Z80 ASM development videos... with vampires!
« Reply #56 on: 12:41, 08 August 18 »
Episode 6 of the GrimeZ80 project is up! now with Animations, TI tweaks & improved palette code
Check it out!

https://youtu.be/JV-f8H2IxF8
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter for CPC - http://www.chibiakumas.com
「チビ悪魔」可笑しいゴシックSTG: http://www.chibiakuma.com
Learn Z80 Assembly programming for CPC,Speccy,MSX + More with my Text+Videos Tutorials:http://www.chibiakumas.com/z80/

Offline keith56

  • ちび悪魔!
  • Supporter
  • 464 Plus
  • *
  • Posts: 407
  • Country: jp
  • Part Ma, Part Aku... All Chibi!
    • Chibi Akuma(s)
  • Liked: 692
Re: Multiplatform Z80 ASM development videos... with vampires!
« Reply #57 on: 12:22, 15 August 18 »
The last of the GrimeZ80 videos is up!

https://youtu.be/yUKfcX-5qzA


Get all versions of the game, and the sourcecode below:
http://www.chibiakumas.com/z80/grimez80.php

The game is opensource, and you are totally welcome (and encouraged) to use my code to make and release your own stuff!

On an related note, even though I only post the CPC programming related videos here, there is a new Z80 assembly programming video on my Youtube channel without fail every week, I'm covering the Master System, Gamegear  and gameboy at the moment... so please follow me there if you want to see more than just the CPC stuff!

If would like to support my tutorial videos and ongoing 8-bit game development, please consider backing me on patreon:
https://www.patreon.com/akuyou
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter for CPC - http://www.chibiakumas.com
「チビ悪魔」可笑しいゴシックSTG: http://www.chibiakuma.com
Learn Z80 Assembly programming for CPC,Speccy,MSX + More with my Text+Videos Tutorials:http://www.chibiakumas.com/z80/

Offline lmimmfn

  • Speccy
  • *
  • Posts: 2
  • Country: ie
  • Liked: 1
Re: Multiplatform Z80 ASM development videos... with vampires!
« Reply #58 on: 17:53, 17 August 18 »
Fantastic work keith56, this is an excellent series especially combined with the website( would be nice to copy paste the listings from the web page to winape but its a very minor gripe, and I know the sources can be downloaded ), well done!
Im a programmer anyway( so I'm good in terms of bits, masks, registers, carries etc. ) and I've used 68k and 8086 asm 25+ years ago and did a bit of Z80 ask last year, so i guess im coming at this from a different angle( and shows your work can apply across a spectrum of users ) but this puts everything I'm interested in at the moment in one place rather than jumping around lots of different listings and trying to get more info on why something is done a certain way, especially for CPC specific things like the >4 colours mode 1 with Interrupts.
Similar was in an Amstrad action listing back in the day( changing palette and screen mode for the bottom of the screen ) but without internet or any other info I could only play around with it so much. Couldn't afford an assembler back then and would have been horrible without a disk drive anyway :)


I managed to interleave the screen modes with your listing which I enjoyed as a tinker, but I'm curious, it should be possible to change which vertical lines are used in change of screen mode/colour palette by waiting for the hsync? Is there any efficient way to do this other than hanging around in the interrupt code waiting for this? Or is it possible to change the interrupt execution timing relative to the vsynch?


Also, maybe its winape only and i dont have a CPC yet, but the palette in the example changes midline on the right quarter, is this due to the execution time of the instructions? I'm guessing this could be tidied with hsynch wait.


Sorry for all the questions, looking forward to more in the series.
« Last Edit: 18:12, 17 August 18 by lmimmfn »

Offline keith56

  • ちび悪魔!
  • Supporter
  • 464 Plus
  • *
  • Posts: 407
  • Country: jp
  • Part Ma, Part Aku... All Chibi!
    • Chibi Akuma(s)
  • Liked: 692
Re: Multiplatform Z80 ASM development videos... with vampires!
« Reply #59 on: 02:59, 18 August 18 »
Thanks for your comments! You're right about using images instead of text, it's just more convenient to get the site done quickly, and keep everything looking right, it may be something I go back and correct once the series is done, as I suspect it would help my google ranking too as it would allow people to find me who search for particular commands.

The regular CPC interrupt only occurs 6 times a screen, meaning you cannot easily set colors more often than that,
to select a particular different line, or to get exact positioning within a line, you will have to count the number of Ticks each command takes (Ts on my cheatsheet) and make sure your code uses the correct number of ticks

I believe each line takes 64 ticks, so you need your code to take 64 ticks if you want to change colors each line, or wait 64 ticks if you want the color change to be a line down... this is why Chibiakumas only changes colors max 4 times per screen!

if you colorchange always appears mid line, you probably need to delay by 32 ticks or something, a NOP is 4 ticks, so 8 NOP's may do it.


The CPC+ can cause an interrupt to occur on a particular line, you have to page in the ASIC ram (There are special commands to do this), and set the line to interrupt to memory position &6800... see the example here:

http://cpctech.cpc-live.com/docs/cpcplus.html

The new ChibiAkumas V1.666 uses this to get better color on the CPC plus!

My tutorials don't cover CPC Plus raster colors yet, but it's coming in a future lesson!

I see you say you've worked with 68000 ASM? I'm learning that at the moment!
« Last Edit: 03:03, 18 August 18 by keith56 »
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter for CPC - http://www.chibiakumas.com
「チビ悪魔」可笑しいゴシックSTG: http://www.chibiakuma.com
Learn Z80 Assembly programming for CPC,Speccy,MSX + More with my Text+Videos Tutorials:http://www.chibiakumas.com/z80/

Offline lmimmfn

  • Speccy
  • *
  • Posts: 2
  • Country: ie
  • Liked: 1
Re: Multiplatform Z80 ASM development videos... with vampires!
« Reply #60 on: 11:16, 18 August 18 »
Excellent thanks, was thinking I may have to pad with a few NOPs to align the lines but was trying to avoid it :)
I'll give it a whirl, just a bit of fun but nice to play about with things that made to wow back in the day.


I'm trying to avoid the plus features for the moment while I get the hang of the original CPC but when I pick up an Amstrad id really like to get a plus to add to my collection( still have my original Amiga 1200 from '92 but I've updated it for the modern age, wifi, hdmi, CF Card etc. and picked up an Atari 7800 )


You'll enjoy the 68k, I found it pretty straight forward compared to the 8086( and now the Z80 ) as it's just data registers and address registers as opposed to specific accumulator regs etc.
My 68k programming back in the day was to interface with simple hardware devices so no game programming unfortunately.


I need to revisit the 68k again as I would like to do some Amiga programming( time is the enemy here :) ), I've been following Scoopex( just watching mind ) series for the Amiga - https://m.youtube.com/user/ScoopexUs
It works well with the Amiga Hardware Reference Manual and 68k reference manual. For the Amiga it's quite a lot to digest so it's good to have someone else to show the basics and get something up and running quickly.
Id imagine the ST is a lot more straight forward though as it's more like the CPC with very little hardware so probably a better starting point but for me i'd like to play about with the Amiga's copper etc.


I love playing around with the old hardware :)