CPCWiki forum

General Category => Programming => Topic started by: keith56 on 09:32, 08 January 18

Title: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 09:32, 08 January 18
I'm planning to start a series of these, so I think it's time to post a new thread!

I'm making some youtube videos in which I discuss the challenges and my strategy to multplatform ASM development, for the CPC MSX and Spectrum - using my game as a talking point

I'm hoping that people who are interested in gamedev may find them useful - or as my game is open source, may decide to use parts of my code in their own projects

I've uploaded a new video today, in which I discuss an overview of all the functionality in the 'Core' module of my game engine, some of the differences between the systems that caused design choices, and how I've got my game engine working with these platforms (so far!)

You can watch the new video here:
https://www.youtube.com/watch?v=TjaBUqqWQEc

there are also 2 previous episodes:

My development software setup:
https://www.youtube.com/watch?v=CeHiytsWKm0

and converting a 4 color CPC image to ZX spectrum:
https://www.youtube.com/watch?v=Xc5M03jLNPY

If these are interesting to people I plan to do more, so please let me know what kind of thing you'd like me to talk about
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 05:09, 14 January 18
I've done another youtube video!

This one describes how CPC Rom & Plus registers page in... mentions the memory paging options of the spectrum +3 , and touches on the complex world of MSX-subslots!!

This video includes a practice demonstration of CPC and spectrum screen memory using some short democode I've written

https://www.youtube.com/watch?v=ZfyRwITEv0M

on a somewhat related note, I'll be doing a prize draw where I give 3 of my patreon's professionally printed 'ChibiAkumas' T-shirts totally free (I'm even paying shipping), so if you were on the fence about signing up, you might want think about backing now for a chance to get one!
http://www.patreon.com/akuyou

Hope you like the video, I'm planning to keep making them - so please let me know if you have a particular subject you would like me to cover relating to retro-dev!
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 13:37, 20 January 18
Ok, I've been hard at work this week, and I'd like to present the official start of my GameDev tutorials!

I plan for these to take you from absolute beginner programmer, to Z80 game developer... Remember, I only learned ASM 18 months ago, and I'll teach you all the things I needed to learn, try to help you avoid the problems I had,  and explain them in what I think is the easiest and fastest way for a beginner!

The website of this new tutorial is here:
http://www.chibiakumas.com/z80/

The lessons will have an accompanying video, which I intend you to watch as well as reading the website (though in theory you could do just either one)... The video for lesson 1 is here:
https://youtu.be/LpQCEwk2U9w

Lesson 1 is for the total beginner, I assume you've never even used winape before, and I'll show you how to enter, compile and debug your first Assembly program!
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: ervin on 14:38, 20 January 18
Really great stuff!
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 02:53, 27 January 18
I've done another video, this one explains Binary and Hexadecimal, showing how to convert them with a little CPC basic 'calculator' tool I've written - and an Excel spreadsheet, I also explain how to manually calculate Binary->decimal and decimal->binary and demonstrate nevative hexadecimal numbers with the help of the winape assembler!

https://www.youtube.com/watch?v=coKLkFmx3eI

The XLS and calculator prog are in the 'Tools' folder of the 'sources' archive on my website:
www.chibiakumas.com/z80/

I hope this is of use or interest to people, it took me a lot of effort making it!
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: Hwikaa on 16:36, 30 January 18
Awesome work, Keith! I can't wait to see more videos. Thank you so much for sharing your knowledge, this is going to be helpful for sure.
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: Morri on 20:52, 30 January 18
I am also planning on watching these when time allows. I have always wanted to learn ASM and the fact that you cater for complete noobs could be exactly what I need.
Thank you so much for your efforts and willingness to share what knowledge you have acquired.
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 23:12, 30 January 18
Quote from: Morri on 20:52, 30 January 18
I am also planning on watching these when time allows. I have always wanted to learn ASM and the fact that you cater for complete noobs could be exactly what I need.
Thank you so much for your efforts and willingness to share what knowledge you have acquired.
No problem at all! I'm really surprised by how popular the videos are proving... the series was something I wanted to make, but I really didn't expect anyone to be interested - so I'm extremely happy with the response!

Lesson 2 should be up this weekend!
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: ervin on 00:56, 31 January 18
Yes, what Morri said.

These videos are absolutely brilliant.
Even though I have been learning z80 asm for a few years now, I'm still learning little bits and pieces from the vids.

I imagine the vids could perhaps become popular in the speccy and msx communities as well, for the z80 knowledge presented.
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 04:35, 31 January 18
Yes, I'm posting the vids on MSX.org and spectrumcomputing.co.uk too... though there's some resistance to this 'WinApe' thing!

There's a couple of people compiling with another assembler and running it on their msx... they'll get a shock if they do that with the next program - it writes to the CPC screen at &C000-&FFFF ... seeing as the MSX firmware data is at &F000 - it'll crash their machines!!!  :laugh: :P :laugh: :P ... (I'm going to put a warning in the vid)

The CPC community are very lucky to have winape, I don't know any other Z80 system with an emulator with a built in Assembler and Debugger!
Next video should be up this weekend!
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 13:01, 02 February 18
Lesson 2 of my Z80 Assembly tutorials is up!

Lots covered this time, including Copy/Fill with LDIR, using EQU to declare constants, Labels, and conditional jumps to make loops... all writing to the CPC screen so you can see the effect!

https://www.youtube.com/watch?v=QAvuyAzO_Uo

Each video has a matching text section on my website, and if you really can't type in the code - you can download the commented sourcecode as well!

http://www.chibiakumas.com/z80/#Lesson2
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: Hwikaa on 09:57, 06 February 18
Again, great video (and great article, by the way).
Looking forward to the next one.  ;)
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 12:12, 09 February 18
Lesson 3 is now online!

This time we'll make a little 8 bit calculator, with the user interface in basic, and the calculations in assembly!
https://www.youtube.com/watch?v=zPXmvoZz9Nk

Don't forget to check out the website, where you can see the lesson and get the sourcecode for the ASM and basic!... I've even added a more conventional 'Print mode' colorscheme for those who don't like Red on Black!

http://www.chibiakumas.com/z80/
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 16:37, 16 February 18
Z80 Programming Lesson 4 is now online, this time we'll cover the Stack, indirect registers (IX & IY) - write our own String printer - print a hex string and use the CPC call with parameters!

https://youtu.be/Lz_tD123fmw

As usual the same content is documented on my website - and you can get the sourcecode as well!
http://www.chibiakumas.com/z80/
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 04:11, 20 February 18
Please see the 10 minute video below
https://www.youtube.com/watch?v=2Fixjz3VoSI

I'm planning to release the free development tools & scripts I'm using to develop Chibi Akumas V1.666 - to try to help beginners dip a toe into 8 bit multiplatform development, but I could do with some help in the form of beta-testing

If there are any users who have some time to spare to try out the tools shown in the video please let me know

I'm not aware of any potential problems with these scripts or tools,I've tried them on Win XP/7 and 10, and on 32 and 64 bit without issue

But of course it has to be *** At Your Own Risk! *** - that's why it's beta testing!
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 13:46, 24 February 18
Another episode of my Z80 programming tutorial series, covering Bit operations like NOT AND and OR, as well as Bit shifting commands, the CARRY flag, and even giving an example of a program with self modifying code!

As usual the video has a matching Text based tutorial on the project website:
http://www.chibiakumas.com/z80/

https://youtu.be/lyoIaVKF_3A
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: Gryzor on 18:47, 25 February 18
I find it very strange that I enjoy watching these while working out :D
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 22:43, 25 February 18
Quote from: Gryzor on 18:47, 25 February 18
I find it very strange that I enjoy watching these while working out :D
Er yeah me too - I used to try to listen to "Learn Japanese" podcasts at the Gym, but always ended up listening to music - but whatever works for you!

The last lesson was pretty big - did people feel that covered too much in one go, or was it about right?
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: Gryzor on 22:49, 25 February 18
Just about as long as my workout, so just fine [emoji16][emoji16]

Sent from my HTC 10 using Tapatalk

Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: adolfo.pa on 00:19, 26 February 18
It worked for me. Also, I loved the part about self modifying code; I think introducing this kind of more advanced topics so soon makes things more interesting. I want more!! :-)
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: andycadley on 01:19, 26 February 18
Interesting. Watching it I thought self-modifying code might be jumping a little too far into fairly advanced topics, but perhaps not. It was also unusual to see a less mathematical description of the various Boolean operations, a more practical approach than many textbooks would use but I can imagine people finding it more useful.
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 04:41, 26 February 18
Quote from: andycadley on 01:19, 26 February 18
Interesting. Watching it I thought self-modifying code might be jumping a little too far into fairly advanced topics, but perhaps not. It was also unusual to see a less mathematical description of the various Boolean operations, a more practical approach than many textbooks would use but I can imagine people finding it more useful.

I'm not very good at maths, so I'm explaining them the easiest way to me in the hope it'll help others - it's kind of intentional, I want to teach the 'dumbest' way I can think of in the hope it will attract people who've not been comfortable with other tutorials - lets face it there must be 1000 of Z80 tutorials out there - and most people have never coded anything!

Yes, Self modifying code is a stretch, and when I first saw it discussed I though "That's too hard, I'll just forget it", but about 6 weeks later realised I wanted to use it, and now I use it for everything.

It's a bit tough to work out good short examples to teach all the ASM commands, and this was the perfect one for self-modifying so I slipped it in, I'm planning to do about 10 of these 'New command' lessons in total, then I will switch to more practical examples that will relate to game coding!
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 07:54, 05 March 18
Lesson 6 is now up

Covering Lookup table, Screen Co-ordinates, Vector Tables, Basic Parameters Byref... I'll teach you how to code your own ASM sprite routines you can call from basic!

https://youtu.be/IhbXd-m6WmQ

As always you can download the source code from my website - and the whole lesson is documented there too!

http://www.chibiakumas.com/z80/

Also, as a bonus, I've created an 'introduction to the Enterprise' video, showing off the Enterprise 128 computer, and showing how to program 'Hello World' in assembly on that system!

https://www.youtube.com/watch?v=CtZHk__bkgE
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: AJW on 08:33, 05 March 18
From your latest lesson:
Quote

GetNextLine:
    ld a,h
    add &08
    ld h,a
bit 7,h
    ret nz 
ld bc,&c050
    add hl,bc
    ret


If I'd seen that yesterday, I wouldn't have spent hours trying to figure out how to do the same thing.   :-[


Seriously though, thanks for the lessons. I did a bit of Z80 assembler coding thirty-odd years back, but I'm more than a little rusty, and it is nice to have a recap that doesn't involve digging through all 620-odd pages of my dog-eared copy of Rodnay Zacs' Programming the Z80. Keep up the good work.
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 09:34, 05 March 18
Quote from: AJW on 08:33, 05 March 18
From your latest lesson:
If I'd seen that yesterday, I wouldn't have spent hours trying to figure out how to do the same thing.   :-[

That's great to hear! That's pretty much the whole theory of the tutorials - trying to teach people the things it took me too long to figure out!

The 'Command' languages are nearly done, and I'll switch over to more practical examples... so please feel free to make requests - and if I know enough to explain it - I will do so.
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 16:30, 09 March 18
Lesson 7 of my Z80 Programming Tutorials is up !
This lesson covers RST's, creating a custom interrupt handler, the shadow registers, and using IN and OUT commands!

We'll put all this together to learn how to make the 4 color CPC screen show up to 20 colors, by changing the palette as the screen redraws!
https://youtu.be/ltmK9MtZlR8

As always, sourcecode and written documentation is available for download on my website!
http://www.chibiakumas.com/z80/
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: tjohnson on 17:10, 09 March 18
Good news ive watched the first few videos over the past week, very informative i liked the mixing of    assembler with basic

Sent from my E5823 using Tapatalk

Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: blackdalek on 14:03, 10 March 18
I've been really enjoying these tutorial videos. Everything is made very easy to understand.

I am sure that if these video lessons and Keith's website are still available when my son is older he'll have no problem becoming a Z80 wizard  ;)
Thanks for the good work @keith56 (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1886)

I only touched very lightly on assembly programming when I was a kid. I had no help and only The Z-80 Microcomputer Handbook by William Barden Jr. and the Amstrad Firmware Guide & sample disc. I found William Barden's book confusing and didn't know anyone with experience I could ask questions of. If I had internet and access to tutorials like this back then, everything would have been a lot simpler. As it was, I only managed a basic understanding of what registers and accumulators did and how they worked with the data and how to add and rotate and compare and jump and call and all those kinds of things. But I never got as far as combining my crude knowledge of the Z80 instruction set with the wonders to be found in the Firmware Guide. Also, not having an assembler I could figure out how to use was my biggest obstacle to progressing as I couldn't assemble and test anything I had learned. I can't remember which assembler it was that I finally got hold of but I could not work out how to use it and by that time I'd lost interest in machine code and was focusing on other things in my life. :(
I think I am going to revisit Z80 programming as a hobby when I retire ;)
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 14:03, 11 March 18
Quote from: blackdalek on 14:03, 10 March 18
I've been really enjoying these tutorial videos. Everything is made very easy to understand.
I am sure that if these video lessons and Keith's website are still available when my son is older he'll have no problem becoming a Z80 wizard  ;)
Thanks for the good work @keith56 (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1886)
Thank you for your extremely kind words!
The next lesson will be the last of the 'Basic Commands' series... but I will start a new series of more in-depth stuff after that!
I hope my site will be around for a long time, but the content of the website is all on one page because I intend to release it as a complete PDF so people can read it offline - and you can always use a Youtube downloader to rip the videos if you want - I make no money from them, so go ahead with my blessing!!!

You're experience sounds very similar to mine, I only did a 'type-in' of assembly that did the same kind of color switching my last example did, but I only understood it in a limited way.

Coming back to Z80 ASM now, I find it far more enjoyable than programming other modern systems, it has the simplicity of a limited command set - complete documentation to hand with enthusiastic support forums online, and the potential to delve into the hardware as deeply as you want - but unlike modern hardware , you CAN learn everything about a Z80 system, on the PC it's long since reached the point no-one completely understands what the OS or hardware does.

As I've said before, we're blessed in the CPC community with Winape's Debugger and Assembler... I couldn't have done what I can today back in the 80's.
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 15:33, 16 March 18
Lesson 8 of my tutorials is now up!

Covering the rarer Z80 commands and the I and R registers... we also use Unwrapped Loops to quickly copy the screen to one of the 128k banks.

Also this lesson covers how to use misuse the Stack to quickly flood fill areas of memory!
https://youtu.be/okLPQWs8ExQ

As always, there's a matching written lesson on my website:
http://www.chibiakumas.com/z80/index.php#Lesson8
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: Xifos on 10:07, 17 March 18
Thanks for your videos keith56 !
I learned that the i register can be used in im1.
Better for a flag than a variable !
:)
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 13:55, 24 March 18
The first of my new "Platform Specific" Series is on youtube!

Teaching how to make 'Hello World' Functionality in Assembly, on 5 systems in 25 minutes (MSX,CPC,ZX spectrum, TI-83 and Enterprise)

Includes: Clear Screen, Locate (move text cursor)... read keypresses, and print Characters and strings... this tutorial creates common functions which allow you to develop one program, that can be compiled for 5 different Z80 classic systems...

I've added proper Subtitles this time! please let me know if they help, as it took me hours to add... I've also retrospectively added subtitles to Lessons 1-4... so please take a look if you were having trouble with the way I speak.

https://www.youtube.com/watch?v=EN4DW9q-06g

The documentation, and sources are available here!
http://www.chibiakumas.com/z80/platform.php#LessonP1

The Z80 toolkit is available here.. though it's an earlier version than the one I used today... I'll get the latest version up as soon as I can!
http://www.chibiakumas.com/z80/Z80DevTools.php
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 15:12, 30 March 18
This week's #Z80 tutorial is up... Multiplatform lesson M1!... The Multiplatform series will use the code from the Platform Specific series... so this code will work on any Z80 system I'm covering

This week we're going to learn how to make some simple debugging tools, to check the status of the Z80... because not all the systems we will be using have debuggers as good as WinApe's!

https://youtu.be/xKQtEfO73YI

Source, and docs at:
http://www.chibiakumas.com/z80/multiplatform.php#LessonM1
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 13:45, 06 April 18
Lesson 2 of the Platform Specific series is now up!- Covering how to read the location of the text cursor on MSX,CPC,ZX Speccy, Enterprise 128/64, TI-83... and now the Sam Coupe!
This lesson also covers an example  'Gocha' with WinApe's IFDEF compiler directives that's caught me out many times!
As always, This Video lesson matches the text lesson on my website:
http://www.chibiakumas.com/z80/platform.php#LessonP2

https://youtu.be/Eg4YkT3MBxI
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: Gryzor on 17:44, 06 April 18
Keith, I've given up trying to read your posts. Not only you're actually *doing* it, but you're writing faster than I can read :D
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 00:59, 07 April 18
well they're not going anywhere, so feel free to watch them at your leisure... just make sure you watch them in the correct order!

The main reason for the weekly releases is to try to take advantage of youtube's prioritization of 'new' videos

oh, and Patreon backers will have a special video in a day or twoon CPC compiled sprites!
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 14:05, 13 April 18
The next lesson is up! Multiplatform Lesson M2 - String Reading and Memory Dumping!

Based on our previous lessons, we're now going to read in a line of text input from the user, and convert it to a HEX memory address.. and dump some bytes of memory to the screen in a nice debugger output...

because it uses our 'Common modules' from the platform series... This common code example will work on ZX spectrum, MSX, TI-83, Sam Coupe, Amstrad CPC and Enterprise 128!

Along the way, we'll learn how to pass parameters to a call as bytes in the code, rather than registers... how to covert Uppercase to lower, Ascii to Hex, and much more!

https://youtu.be/XwYqfXEgXH8

There is a text based lesson matching the content here on my website, and of course, you can download the source code for all my lessons from:
http://www.chibiakumas.com/z80/multiplatform.php#LessonM2

If would like to support my channel and ongoing 8-bit game development, please consider backing me on patreon:
https://www.patreon.com/akuyou
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 13:44, 20 April 18
Lesson M3 of my Z80 Assembly tutorials is up!
We're going to start writing a little text-adventure, so this week we'll learn how to recognize predefined 'numbered' commands in a line of text entered by the user!

As always, the source and text description is on my website!
http://www.chibiakumas.com/z80/multiplatform.php#LessonM3

https://youtu.be/VetHaU2aybw
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 03:34, 28 April 18
The new lesson is up! This week I've used the previous code to build the basics of a text adventure!

Check it out:
https://youtu.be/vtBfd74tV7A

Of course, the website has a text based description of the code too, and the code is available to download:
http://www.chibiakumas.com/z80/multiplatform.php#LessonM4
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 04:31, 05 May 18
My next Z80 lesson is up!
Advanced Z80 Assmebly Tutorials - Lesson A1: Binary Coded Decimal

This goes back to Z80 fundamentals, and covers how to use Binary Coded Decimal for addition, subtraction and comparison!

Video Lesson:
https://vimeo.com/268145508 (https://youtu.be/LJ_RErak4GE)

Text Based Lesson:
http://www.chibiakumas.com/z80/advanced.php (http://www.chibiakumas.com/z80/advanced.php)

Update, Youtube has delcared my video to be 'spam'... deleted it and given me a community strike for some reason, so I've re-uploaded it to vimeo
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: ervin on 12:42, 05 May 18
Quote from: keith56 on 04:31, 05 May 18
Update, Youtube has delcared my video to be 'spam'... deleted it and given me a community strike for some reason, so I've re-uploaded it to vimeo


Wow, youtube is really losing the plot these days!

Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: mr_lou on 06:46, 06 May 18
I experienced that with my 8-bit Memoirs video too, for "violating YouTube Community guidelines"....  ???

Just write a note to YouTube. They'll put it back as soon as they've had time to look at it.

Of course, I put my video on Vimeo too, as we can't sit around waiting for YouTube to fix things.

I wonder how they decide a video is spam. An algorithm maybe that checks similarity in all videos uploaded by the same user?
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 08:49, 06 May 18
They retracted the strike after I complained - with no explanation why it happened

I assume it's because on an 'optical' level all my videos look the same, because they all show the CPC screen, winape debugger, and the only music I use is the one from my game.

I'm pretty sure the fact my videos get very few hits doesn't help either, but it's pretty unnerving - with the amount of work I'm putting into the video series, I'm relying on it being up for a long time.
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 07:48, 12 May 18
My latest Z80 Assembly Tutorial is up! Multiplatform Lesson 5 - covering using Arkosplayer (V1) for Music and SFX!
https://youtu.be/Wt3hhcdXY5c

This Video lesson matches the text lesson on my website, and you can get the source code as well...you can even get my music files and use them in your own games!
http://www.chibiakumas.com/z80/multiplatform.php#LessonM5
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 13:48, 18 May 18
Advanced Z80 Lesson A2 is up! Learn about the dark art of Interrupt Mode 2!
https://youtu.be/W9QHdz_AbGQ

Also check out the Web based version:
http://www.chibiakumas.com/z80/advanced.php

Interrupt Mode 2 isn't something you tend to need on the CPC, but it's super important on the Speccy, and it's worth knowing about so you know all your interrupt options!
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 15:21, 26 May 18
In this lesson we'll look at my "Template interrupt Handler"
It works on all systems (CPC/MSX/EP128/SAM/ZX) can use Interrupt Mode 1 or 2, protect some or all registers for you, and even allows you to misuse the stack for Reading/Writing without disabling interrupts (if you're careful!)

https://youtu.be/eDoQZULH9Ok

This Video lesson matches the text lesson on my website, and you can get the source code as well...
http://www.chibiakumas.com/z80/multiplatform.php#LessonM6
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: ervin on 00:05, 27 May 18
Quote from: keith56 on 15:21, 26 May 18
In this lesson we'll look at my "Template interrupt Handler"
It works on all systems (CPC/MSX/EP128/SAM/ZX) can use Interrupt Mode 1 or 2, protect some or all registers for you, and even allows you to misuse the stack for Reading/Writing without disabling interrupts (if you're careful!)

https://youtu.be/eDoQZULH9Ok (https://youtu.be/eDoQZULH9Ok)

This Video lesson matches the text lesson on my website, and you can get the source code as well...
http://www.chibiakumas.com/z80/multiplatform.php#LessonM6 (http://www.chibiakumas.com/z80/multiplatform.php#LessonM6)


This lesson is amazing - my favourite one so far.
Interrupts are something I've always struggled with, but not any more!
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 11:03, 02 June 18
*** Updated - yesterdays upload had rubbish audio, correct version re-uploaded ***

Lesson P3 of my Z80 tutorials is up: Bitmap graphics on the Amstrad CPC and Enterprise 128

This lesson will provide a 'Common' method of using bitmap graphics on all systems., and provides sample code which works in 4 or 16 color, and 320 or 256 pixel screen width.

We'll be looking at the Sam Coupe,MSX Spectrum and Ti-83 versions later!

https://youtu.be/_W62vFBzlew

Source and Text-Notes on my website as usual:
http://www.chibiakumas.com/z80/platform.php#LessonP3
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 04:26, 19 June 18
I've uploaded a 'teaser video' of a little project I'm doing next month, I'm planning to attempt to recreate an old XT-DOS game called 'Grime' on the Z80 - I'm going to try to do the whole thing in 7 days... sounds easy? well perhaps not!

I'm going to try to make one game that can compile on to 11 different target platforms (CPC/ZX/MSX1/MSX2/TI83/Enterprise/SamCoupe/Gameboy/GameboyColor/MasterSystem/GameGear)

https://www.youtube.com/watch?v=B2XKdiUEx80

The game will be released free and open source, it's intended as a 'learning tool' that people can build on if they want to try to make their own multiplatform games!
Of course, there's every chance I'll come across problems, but I'm optimistic I can pull it off!

I'm hoping this will be of interest to people!?
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: ervin on 08:19, 19 June 18
I'm *really* looking forward to seeing how this goes.
It will be very interesting indeed.
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 14:36, 22 June 18
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
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 08:36, 04 July 18
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
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 10:12, 11 July 18
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
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 13:33, 18 July 18
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
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 10:51, 25 July 18
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
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 10: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.
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 10: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
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 10: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
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: lmimmfn on 15: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.
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 00: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!
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: lmimmfn on 09: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 :)

Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 00:03, 13 October 18
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
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 23:13, 20 November 18
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
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 12:56, 23 November 18
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!
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 09:58, 01 February 19
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.
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: roudoudou on 12:34, 01 February 19
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
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 00:20, 08 March 19
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
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: Ast on 08:19, 09 March 19
I saw samples articles motives you to make a new tutorial !
CoOL ! ;)
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 11:49, 09 March 19
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!
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 07:09, 16 March 19
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
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: Ygdrazil on 08:28, 17 March 19
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 (https://youtu.be/hsJRknPLZYQ)
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 08:49, 17 March 19
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!
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: 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
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: lmimmfn on 23:56, 24 April 19
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 (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 (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
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 00:15, 25 April 19
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
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: lmimmfn on 01:12, 25 April 19
Quote from: keith56 on 00:15, 25 April 19
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 (https://github.com/akuyou)
Perfect, thanks man, got it
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: roudoudou on 06:21, 25 April 19
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
Hi, nice to share your tools!
A suggestion for your toy -> display the end AND the beggining of each blocks, this is VERY usefull when doing 32K screen because playing with L-adress allow to move the end of the block mostly away from visible screen and allow some optimisations ;)
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: pelrun on 14:17, 26 April 19
Multiplatform_ShowDecimal.asm is included by CPC_CRTC_Test.asm, but it's missing from the sources.7z I just downloaded from the website.
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 14:40, 26 April 19
Very sorry about that, guess I forgot to add a new file to the package.

The sources.7z is updated on the website, and I've attached the missing file below... I just tested on a blank install... it should work with the one extra file.
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: pelrun on 15:20, 26 April 19
Can confirm it definitely works with that file included. Cheers!
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 04:11, 02 May 19
If anyone is interested, I've now added a 'forum' to my ChibiAkumas website...


I'm hoping it will become a welcoming and helpful place for beginners learning all kinds of assembly language on all platforms... and I'd like it to become the main place for answering questions (and suggesting improvements/corrections!) that arise from my tutorials (Rather than Youtube - who deleted all my comments when I converted from a personal to brand account  >:( >:( >:( [size=78%])[/size]


Anyone who wants to ask questions, or help give answers is welcome to join, though please note, my forum is intended for ASM related content only, not general 'retro chit-chat'.


http://www.chibiakumas.com/forum
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 04:31, 09 July 19
I've made another little CPC tutorial video, this one goes really back to basics... and looks at a simple single-asm file 'Hello world'

As well as writing and running the example in WinApe, I've gone over tools and commands to create Disk,Tape and Cartridge images, in case you prefer to use an alternate Assembler or Emulator:

https://youtu.be/QQ-CL_7pTjY

I'll be doing similar tutorials for all the other platforms in my tutorial series (including 6502/68000/x86 and ARM), so please sub my channel if you're interested in non CPC systems to stay informed when I get round to other systems!
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 22:43, 07 August 19
To help promote the ChibiAkumas ASM website, and to encourage newcomers to give assembly programming a go, I'm doing a prize draw of three of my custom design T-shirts which will be given totally free... including free shipping!

To have the chance to win one of the T-shirts all you have to do is post an entry into the 'Show And Tell' section of the ChibiAkumas forum

More details here:
http://www.chibiakumas.com/forum/viewtopic.php?f=8&p=229&sid=4b08eb8de96c45f60e0e55e1df79d33a#p229

Video announcing the competition
https://youtu.be/VU7qiXWthI4
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 00:21, 02 October 19
Just a quick announcement, I'm starting a second Youtube channel for livestreaming content.

I'll still be doing the same content on my normal channel, but the new channel will be for live programming streams and gaming with technical discussion... I'm planning to put heavy focus on the chat, so hopefully it will be interesting and a bit of fun for people who aren't into short heavy content tutorials I currently do.

The new channel is here... please Sub if you are interested!
https://www.youtube.com/channel/UCc3e2vxORDpGLmxiej3nzpw (https://www.youtube.com/channel/UCc3e2vxORDpGLmxiej3nzpw)
Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 21:33, 17 November 19
I recently added a new video to my youtube channel, covering the use of 16 color mode to simulate 2 layers (Like in the Ghosts and Goblins and original Bubble Bobble game)

I even used the trick to effect a Red-Cyan 3D effect

https://youtu.be/JrpCZ9TcjFE

Title: Re: Multiplatform Z80 ASM development videos... with vampires!
Post by: keith56 on 21:35, 03 February 20
I've recently uploaded two tutorial videos covering software sprites:


One here on transparency:
https://youtu.be/KRrKXxJ8raw

And one on flipping sprites in Mode 0/1:

https://youtu.be/hegzLS2irtY


Maybe they are of interest to some people?
Powered by SMFPacks Menu Editor Mod