News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_keith56

Multiplatform Z80 ASM development videos... with vampires!

Started by keith56, 09:32, 08 January 18

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

keith56

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 Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

keith56

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 Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

keith56

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 Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

keith56

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 Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

keith56

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 Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

keith56

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 Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

keith56

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 Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

keith56

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 Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

lmimmfn

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.
6128 for the win!!!

keith56

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!
Chibi Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

lmimmfn

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 :)

6128 for the win!!!

keith56

I've uploaded a new video to my tutorial series that may be of interest to people!

It covers making simple sound effects on the AY soundchip by controlling the registers... the video covers the theory of how the registers work, has examples of changing the registers, and how it affects the sound, and shows code that works on the  MSX, ZX Spectrum, Amstrad CPC and even the 68000 based Atari ST and NeoGeo!

Check it out!


https://youtu.be/Xr5LAOPjMcE
Chibi Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

keith56

I've started a new series of programming tutorials this week... the 'ChibiAkumas' series

In this series I'll be discussing how the Chibiakumas game works, looking at the source-code, and telling you how to change the game to make it work however you want! We'll be looking at the logic code, how to make your own levels, and designing your own sprites - you'll see easy examples of changes you can make, and what effect they have on the game!... the series should be of interest to anyone who's interested in how games work, or is looking to learn by changing existing code!

Eventually, the series will have it's own open source minigame (which you will be encouraged to alter any way you want) called 'Chibiko VS the Z80 coding bugs!'... the game isn't finished yet, so we'll be looking at 'Tragical Chase' for now which will be the basis for the new game (so nothing important will change)

The first episode discusses the co-ordinates system used by the game engine... as that's the starting point for understanding the game core... we'll look at how they work, and how the game engine can be used to draw text to screen


https://youtu.be/eco7KVeS7qQ
Chibi Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

keith56

This weeks tutorial may be of interest to you guys:
Learn Z80 Assembly - Lesson P24 - Bankswitching and hardware detection on the Amstrad CPC

It covers the use of extra 128k+ ram banks, turning on the CPC+ ASIC, and provides sample 'detection' code to allow you to detect if your game is running on a regular CPC, or a plus machine, a 464, 6128, or machine with 256k of ram - and even an example of CPC+ cartridge banking!

Hopefully it will be useful to people learning ASM who want to be a bit more adventurous and use the extra features!


https://youtu.be/btrEofQq9qo

Regarding CPC+ features... I've covered CPC+ color palettes before, I do plan to cover CPC+ sprites too! you'll just have to wait a little while until I get to it!
Chibi Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

keith56

Maybe this will be of interest to some people?

I've created a tutorial on my Youtube channel explaining how to use CPC+ hardware sprites.


https://youtu.be/nl8hSPx7UDM

Sourcecode for the example, and my sprite editor available on my website.
Chibi Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

roudoudou

HSP has "only" 15 colors, not 16  ;) the "color" 0 is transparency

And the resolution byte may be in pos+4, pos+5, pos+6 or pos+7 as well so you can use any adress at any time
My pronouns are RASM and ACE

keith56

If anyone's interested, I've started a small tutorial series on playing 'WAV' files (digital sound samples) on 8 bit systems...



https://youtu.be/F13IW9j2IjQ


This week I covered the basic AY (Example is shown on the MSX - but it also compiles on the CPC & Speccy128)... I'll be covering the CPC+ DMA next week, and all other z80 systems over future weeks...


Source code, and the 16->4/2/1 bit converter tool 'ChibiWave' (With C# source) are available in the sources.7z from my website
Chibi Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

Ast

I saw samples articles motives you to make a new tutorial !
CoOL ! ;)
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

keith56

Quote from: Ast on 08:19, 09 March 19
I saw samples articles motives you to make a new tutorial !
CoOL ! ;)
Yes, it was something I'd been meaning to look into for a while... probably ever since playing 'Advanced pinball simulator' on the CPC in fact!
It's surprisingly good fun making the old machines play waves - the one that surprised me was the Gameboy - it can do it just fine... but I don't think I ever saw a gameboy game actually do it!
Chibi Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

keith56

The CPC+ version of this tutorial is now on Youtube, showing how to make sounds with the CPC+ DMA,
Once again, files in the correct format can be created with ChibiWave, which is in the Sources.7z (and is open source)


https://youtu.be/hsJRknPLZYQ
Chibi Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

Ygdrazil

Hi keith56
Very nice tutorial!..
The DMA sound part of the CPC+ has always been a mystery to me... (As all sound programming actually is.. ::) )

Thanks for explaining!

Regards,
/Ygdrazil

Quote from: keith56 on 07:09, 16 March 19The CPC+ version of this tutorial is now on Youtube, showing how to make sounds with the CPC+ DMA,
Once again, files in the correct format can be created with ChibiWave, which is in the Sources.7z (and is open source)


https://youtu.be/hsJRknPLZYQ

keith56

Thanks, but I have to say big thanks to the people in this thread:
http://www.cpcwiki.eu/forum/programming/sample-playback-on-plus-dma-question/

for their expert advice and information!
Chibi Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

keith56

Maybe this will be of interest to some people? I've always struggled to get my head around the CRTC registers - and what each actually does... So I wrote a little 'toy' that allows them to be individually altered, with the resulting values shown on screen - for easy testing

There's a video below of it in use, maybe some people will find beneficial:

https://youtu.be/GIDRBGSLkvE

The source for the program, and other notes are on my website as always:
http://www.chibiakumas.com/z80/platform4.php#LessonP39
Chibi Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

lmimmfn

Quote from: keith56 on 22:37, 23 April 19
Maybe this will be of interest to some people? I've always struggled to get my head around the CRTC registers - and what each actually does... So I wrote a little 'toy' that allows them to be individually altered, with the resulting values shown on screen - for easy testing

There's a video below of it in use, maybe some people will find beneficial:

https://youtu.be/GIDRBGSLkvE

The source for the program, and other notes are on my website as always:
http://www.chibiakumas.com/z80/platform4.php#LessonP39
Excellent video and util for playing around, well done man. I think it could be a good basis for a split which like yourself i cant get my head around yet :) , but having something you can change and view visually is a good idea


*EDIT* I downloaded the source but it doesnt go above Lesson8 but has A1,A2. Also the github link at the bottom of the page links to Patreon rather than github
6128 for the win!!!

keith56

The files for the later episodes (after the basic z80 series) are in a different folder of the same archive... Please take a look at the folder

/Multiplatform/Sources/

in the sources.7z

The file "CPC_CRTC_Test.asm" is the one shown in this video...

I will fix the Github link, though the files on that site are not as up-to-date as the .7z on my website

The correct link is: https://github.com/akuyou
Chibi Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

Powered by SMFPacks Menu Editor Mod