Disassembling my old code part 10 – Code review

Introduction

This is part 10 of a blog series I’m doing to catalog and revitalize one of the programs I wrote way back in 1988 on the Amstrad CPC 6128, which I called Disced. Back then when I had to learn something I did it by reading magazines or books and lots of trial and error.

Below are a list of previous blog posts on this subject.

  • Disassembling my old code part 1 – Getting started with WinAPE
  • Disassembling my old code part 2 – Setting screen mode & Soft 968
  • Disassembling my old code part 3 – Text operations
  • Disassembling my old code part 4 – Set cursor position & disc cache
  • Disassembling my old code part 5 – Get Shift key and set translate
  • Disassembling my old code part 6 – Processing disc activities
  • Disassembling my old code part 7 – Drawing rectangles
  • Disassembling my old code part 8 – Processing HEX in the left pane
  • Disassembling my old code part 9 – Assembling the code
  • Disassembling my old code part 10 – Code review <—- you are here

Well it’s been a long time since my last post on this subject and I apologize for that. Life, work, family and other things have taken priority but I’m always thinking about this, believe me. I do love my Amstrad beginnings so I’m always going to return to this when I can and right now I’m on my summer vacation so let’s see what we can achieve with this now!

Virtualizing WinAPE using Hyper-V

Side note, there’s one minor change since my last post, I’ve now created a dedicated Hyper-V virtual machine to simplify things and run another instance of WinAPE and use that to side-by-side compare the assembled code with the released version of DISCED code from 1988, this will speed up my code review (I hope).

For anyone wanting to do something similar, simply create a new Generation 2 virtual machine in hyper v and install Windows 11 22H2 or later, and then install the DirectPlay Windows Feature before moving forward.

 

Launching WinAPE on the VM

Once installed you’ll be able to launch WinAPE.

and get back to where we were with this blog series. To do that I ran disced from the mounted DSK file (drive A:)

and after it launched DISCED

I quit Disced by pressing ESC and brought up WinAPE’s disassembler (F7), this gave me exactly what I need to compare the original disassembled code from 1988 to today’s changes.

Below is a screenshot of the original code (starting at address &9000 hex) running in WinAPE on the virtual machine in  Hyper V. I’ve previously explained how to do this disassembling in WinAPE in part 1 here.

Comparing the code

OK now that is out of the way, let’s compare the current code with the original.

On my computer hosting WinAPE (not the VM, just the normal computer) I assembled the code as described in part 9. I know that this code crashes as soon as I try to run it so obviously something in the source code is off as I already found out in part 9 of this series.

Once done, I can compare the original code (running on the new VM) to the newly assembled code (running on WinAPE on my local PC). In the screenshot below, that’s exactly what I’m doing, WinAPE on the local pc on the left, same screen from the VM on the right.

Using this method I used page down in the assembled code (on the left screen) and did the same on the code from 1988 until I found changes that looked wrong. The first obvious problem was the (c) symbol (hex A4) which I needed to resolve.

To fix it, I opened the assembler again, and found the line in question. This is before.

and this is my edit, I’ve removed (c) and replaced it with the copyright character in HEX

After making that change and reassembling the code, then disassembling it I could see it fixed that problem, but another one was revealed (a missing space).

So I modified the missing space and made some other changes to the source code as you can see here.

I then saved the changes, and re-assembled the code.

Finally, I verified (by disassembling) that the changes worked, and by worked I mean that the right code appears in the left disassembled code box.

And it did ! Success.

At this point, even though it’s tedious I’ve found a way that works for me. Please remember that I don’t work with Z80 machine code so all of this is a re-learning process for me and I have to do it when time permits.

The method that works for me currently involves stepping through the code using two instances of WinAPE one running from the ‘new’ source code and one running from the original code. I then compare the newly assembled code with the old original code, fix the differences by editing the source code, save, then reassemble, disassemble new changes and continue.

Now I just have to repeat this method until the code ends. The goal here for this part of the blog series is to get the source code working 100% so that I can release it to GitHub and you or me can make changes to it.

I’ll continue with this code review (and hopefully code release) in the next part, coming soon (I promise).

but for now, here’s where I am with this project, the code used in this part (and the other parts) can be found on Github here.

 

Posted in Amstrad, Disced, Github, Z80 Machine code | Leave a comment

Vacation coming soon, back to Disced

Introduction

I’ve been busy working and living my life so much so that this blog has taken a toll in terms of content lately, but fear not, I’m totally aware of this and plan on fixing it come July 2024.

My goal is to restart/finish the disassembly of Disced and release a new version of it finally (after compiling it on an Actual Maxam ROM).

Until then, please review this >

Disassembling my old code part 9 – Assembling the code

 

Posted in Disassemble, Disced, MAXAM | Leave a comment

Video: First looks at the New Dandanator Elite + from Rancanuo team

Introduction

I reviewed the original Dandanator Elite + a few years ago here

But time has moved on and Rancanuo team have developed a cool new Dandanator Elite + with new cartridges that look and feel straight from Amstrad CPC.

Take a look !

the new Dandanator Elite + is available from https://neotienda.es/index.php?id_product=419&controller=product&id_lang=8

The cartridges are also available here https://neotienda.es/index.php?id_category=47&controller=category&id_lang=8

I purchased mine to see what had changed between it and the previous generation Dandanator Elite +,

take a look at the review and please share your thoughts,

Please note in the video I state that the old cartridges will work in the new Dandanator Elite +, that’s incorrect, they are not compatible !

Cheers Niall.

 

Posted in CPC 464, Dandanator, Dandanator Elite +, New Dandanator Elite + | 2 Comments

Video: 2 CPC 6128’s born hours apart

Introduction

I blogged about this yesterday and you can read all about it here.

Part of my research into this involved me chatting with Juan and asking him to put together a video explaining and showing more about the 2 CPC’s. He was very helpful and sent me 3 videos with loads of details and awesome content. I’ve merged them together in this video and hopefully it does justice to this story. Thanks Juan !

Posted in CPC 6128, twins | Leave a comment

A great story about twin CPC 6128’s most likely manufactured in the same factory hours apart

Introduction

I’m a member of many Facebook groups dedicated to Amstrad computers, and in one of those groups called Amigos y Usuarios de Amstrad which I think means friends and users of Amstrad in Spanish, I spotted a post by a very nice guy called Juan Giovanni Ciller, and it caught my eye immediately. This is one of the most interesting things I’ve been involved with in the Amstrad scene in a while so I had to blog it. I hope you enjoy the story.

Basically he had purchased two different CPC 6128‘s over a period of time, months apart actually and he just happened to notice that the serial numbers were nearly identical, only 13 digits apart !!

Here’s a screenshot of that first post (in Spanish) with the translation below that.

and here is a closeup of the 2 CPC 6128 serial numbers,

  • 5326910879
  • 5326910892

Notice how both have a Version F sticker on the rear, and the text on the serial number sticker is in French. These CPC’s were manufactured in Korea.

What are the odds of that ! This was so interesting, as it could give us a look at how consistent (or not) the manufacture of these devices was back in the late 80’s.

I responded to the post and asked Juan to take more photos of the inside so we could clearly see (or hopefully see) some common traits of these 2 brothers. Juan was very obliging !

Here’s our initial conversation.

After that post, he modified his original post and showed more details of the two computers from the inside, how cool is that !

The motherboards

Here are the 2 CPC’s open, showing the motherboards.

This is such a cool photo, you can clearly see that they look nearly identical, maybe even the same person put them together, who knows. What we do know is they were definetly manufactured in the same factory as some of the parts are ‘in series’ meaning that they were pulled from a batch.

The Floppy disc drive motors

Juan very nicely posted more pictures of those similarities such as these Floppy disc Drive motors with a part number of MMA-6U2LEP, both manufactured on the 10th of July, 1986.

This means that when the assembler put these computers together, they pulled parts from a common source, which is confirmed by those exact same dates on the FDD motors.

The stepper motors

Next, we can see 2 more parts connected to the Floppy Disc Drives (FDD), I believe this is the Stepper Motor which adjusts the read/write head to move up and down the inserted floppy disc.

The only difference on these are the serial numbers, everything else is identical.

The motherboard serial numbers

Here we can see the 2 serial numbers on the motherboards themselves, obviously they need to be different, but we are hoping that they are also very similar.

  • K326830507
  • K326830445

and yes they are similar, the K is probably for a Korean factory. These motherboards were manufactured 62 units apart !

 

The keyboards

Below we can see the two serial numbers of the keyboards.

The date code is slightly different but everything else is the same !

Differences

However there are also some differences.

Next, we have a closeup of the date of manufacture of the plastic cases, these are not identical. Someone has written what looks like, and it might be the same person writing this, or not, i’m not a hand writing expert, from first glance it looks like different styles of numbers.

  • 8.16
  • 819

on them, and i’ve no idea what that signifies. There are date codes on the plastic, but they are hard to read.

From what I can make out the case on the left has the following date codes:

  • null
  • 85/86
  • 5/6
  • 2
  • 8

and the case on the right has

  • null
  • 85/86
  • 5/6
  • 2
  • 6

If someone out there knows what these numbers mean then let me know. I’m sure the 85/86 means it was around 1986and the others probably signify the month/day of manufacture.

The bottom CPC 6128 is missing the Amstrad 40010 Gate Array, and it has a different chip top right (NEC versus Zilog)

I noticed in his Facebook post that ‘one works’ which is most likely the one that still has the 40010 Gate Array chip inside, a previous owner may have removed the chip on the other one, I’ll ask him to confirm and update this post once I know more.

We can also see that whoever marked these parts did so with different coloured pens. What does that mean ? we don’t know. Could it be from the person who assembled the CPC or infact, from the person who assembled the motherboard, and were these done in different places, we do not know.

Aside from the pen colour, the parts below differ based on

  • 1366DK
  • 1666DK

If anyone knows what this means, let me know.

More info (from the videos)

I chatted with Juan on Facebook chat and luckily he understood English, and not only that he was very willing to tell me more. I asked him could he video the twin CPC’s and he sent me three videos explaining the story and showing them in detail.

In a nutshell here’s what happened based on Juan’s own words in the videos.

The first one was bought early 2022, from Ebay, paid about 100 euro, belt in the disc drive was gone but the rest is fine, a bit dirty but OK otherwise

The second one was bought in December 2022, at a flea market in Toulouse, France. He was surprised, to see it there so he bought it ! He cleaned this one up as it was very very dirty and some of the keys were stuck.

‘I have to save it’.

This one cost him 50 Euro.

Both of these CPC’s are French versions with the Azerty keyboard. I’m not sure why Juan (who I assume is Spanish) wanted French versions of the CPC 6128, I have yet to get that clarified.

A couple of weeks ago he tried to repair them. And it was at this point he realised that the serial numbers were nearly identical. What are the odds of that !

In the below photo we can see a clip from the first video that Juan made for me describing his story purchasing the 2 CPC 6128’s. The keyboards look different in colour, one is discolored and the case is scratched, but these two CPC’s are twins !

so what do you think of this story ? are these CPC’s from 1986 really twins, were they made in the same factory and on the same day, let us know!

cheers

niall (and Juan)

Posted in Amstrad, CPC 6128, twins | 3 Comments

Video: First looks at the Alcon 2020 game on Amstrad CPC

Introduction

Here’s my ‘straight out of the box’ review of a hardware scrolling and awesome audio solution on an Amstrad CPC via a cartridge and associated adaptor (for Amstrad CPC). All the info is in the CPCWiki topics:

  • https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/play2cpc-plus2cpc-ii-extra-sound-channels-and-rewritable-cartridges/
  • https://www.cpcwiki.eu/forum/games/alcon-2020-order-second-batch/msg216231/?topicseen#msg216231

Here’s my video below, what an awesome game and awesome product !

Posted in Alcon 2020 game, CPC 664 | Leave a comment

Video: Ghosts n Goblins game via the RGB2HDMI on Amstrad CPC 464

Introduction

This video came via a comment on amstrad-noob.com about scrolling in the Ghosts n Goblins game when using the RGB2HDMI adaptor. So take a look and tell me what you think

Posted in CPC 464, RGB2HDMI | Leave a comment

Disassembling my old code part 9 – Assembling the code

Introduction

This is part 9 of a blog series I’m doing to catalog some of the programs I wrote back in 1988 on the Amstrad CPC 6128, starting with a disc sector editor I wrote called Disced. I’m doing this because I like doing it, it brings back memories of how I started my career with computers back in the 80’s, long before the Internet (as we know it today) or mobile phones.

Below are a list of previous blog posts on this subject.

  • Disassembling my old code part 1 – Getting started with WinAPE
  • Disassembling my old code part 2 – Setting screen mode & Soft 968
  • Disassembling my old code part 3 – Text operations
  • Disassembling my old code part 4 – Set cursor position & disc cache
  • Disassembling my old code part 5 – Get Shift key and set translate
  • Disassembling my old code part 6 – Processing disc activities
  • Disassembling my old code part 7 – Drawing rectangles
  • Disassembling my old code part 8 – Processing HEX in the left pane
  • Disassembling my old code part 9 – Assembling the code <—- you are here

First of all apologies for the delay in updating this series, I’ve been very busy with real work and other things have taken priority. Don’t worry though, if you are following this series I do intend to finish it no matter what it takes and no matter how long it takes, so please be patient. We’ll get there in the end and hopefully both you and I will have learned a few things along the way.

Looking at the code I currently have in Notepad ++ I’m unsure if MAXAM would even let me assemble it in it’s current configuration, it’s been THAT long since I actually assembled any Z80 code that I’m obviously out of touch with it.

I won’t tackle MAXAM today, but I will attempt to make corrections to the current edited code using the built in Assembler in WinAPE. So let’s get started, and this is a good time to see if it would even compile in it’s current unfinished state.

Using the WinAPE Assembler

In WinAPE, click on the Assembler menu option and select Show Assembler F3.

The Assembler window appears, and as we have not used it before it’s blank.

Click on File and load the current version of your saved assembly source code.

Now comes the fun part, as I’m out of practice obviously the current code has some issues. So let’s try and fix that. To start off, click Assemble, then click on Assemble within that drop down menu within the WinAPE Z80 Assembler window, this should highlight any issues it has with the source code.

straight away we can see some problems found, so let’s step through them one by one,

The first problem is in Line 2, and it becomes obvious when you look at how it interprets the website URL. Obviously it doesn’t like the colon, so let’s fix that.

Using the edit ability in the Assembler, move your cursor to the problem and correct the mistake, in my case I changed the URL from https://www.amstrad-noob.com to simply www.amstrad-noob.com.

To prove that this has solved it, Assemble the code again. And sure enough after Assembling the code again, the Line 2 – Bad Syntax error is no longer present !

Next we need to find out what is wrong with Line 652 – Undefined Symbol. To speed that up, let’s use CTRL+G to go to the line number 652.

Tip:  You can also double click on the line that has an error in the bottom pane and it will automatically go to that line number in the upper pane.

The remaining errors are all Undefined Symbol so I think (or hope at least) that I can ignore that for now. I can also see that from line 652 on-wards the code appears untouched or unfinished (i.e. it’s the direct dump from my original disassembly and therefore some text has not yet been converted to Ascii.

Running assembled code

For fun I decided to try Assembling the code and then running it. If you click on Run it will Assemble the code first and inject it to the memory space it should be at in this case &9000.

Next, by calling &9000 in the CPC from basic after assembling/run the code,

and pressing enter, it just hung with a blank screen, yikes. I needed to determine what broke it so I compared known good code (by running disced.bas) to my ‘broken’ assembled code.

I placed a RET (C9) before the disk_processing_activities function and that worked fine so i know the hang is caused in the disk_processing_activities function or via something it in turn calls.

To help me figure it out I compared a screenshot of the code in memory from the Assembly attempt (right hand side screenshot), to a known good working disced.bas injected code (left hand side screenshot), there were several differences marked here.

So that leaves me with some minor edits that I can make to the code, the most obvious is 2 remove the 2 added spaces that appear in the code in-front of the Disced title text, so let’s try that. I can also see that the (c) symbol is not showing correctly in the source code.

Here’s the code side-by-side again after I removed the 2 spaces and re-assembled it, at least it now matches up, but again the addresses to some of the other functions is way off, so I need to dig deeper.

At the start of the disk_processing_activities there a mention of initial_cursor_position and that address in the good code was &9626, so I used my comparing trick (take a screenshot of the area with known good code, and then compare that screenshot with the assembled code).

At this point I’m not sure what the issue is, but I can see that everything from &961A is different in the assembled code so I need to look at the source code again.

Looking at it makes it clear where the problems are, after the initial “Exit DISCED Y/N” text, the remaining ‘code’ is gibberish, in other words I haven’t converted it yet to it’s real ‘code’ and/or ‘text’.

We’ll deal with that in the next part, until then, adios !

 

 

Posted in assemble, Disassemble, Disced, MAXAM, WinApe | Leave a comment

Video: Resetting a Dandanator after it was loaded with a 512kb game

Introduction

This video is a direct result of a comment I got where a user (Mark) had problems resetting his Dandanator Mini after it was loaded with the Sword of Ianna. That game uses up the entire 512kb ROM and auto-launches as soon as you start the Amstrad CPC. 

Resetting the Dandanator using the code provided in the ROM Generator software was tricky, in 10 times I tried it, I only got it to reset a few times. It seems that the USB button sometimes works, sometimes not, it’s flakey. I’m not quite sure why it works (or doesn’t work) the way it does, and I don’t think it’s my setup or my USB cable as reprogramming the Dandanator works every time otherwise. This is the only function on the Dandanator software that behaves this way for me.

Hopefully this video helps you to get it working. I also cover how to re-install the Sword of Ianna back on the Dandanator (full 512KB Rom game).

You can download the Sword of Ianna here – http://theswordofianna.retroworks.es/en/download-2

Posted in Dandanator, The Sword Of Ianna | 2 Comments

Video: First looks at the DES (Dandanator Entertainment System) for Amstrad CPC

Introduction

I’ve been using Dandanators for a few years now and I love them, their simplicity makes loading games very easy. I heard about a competing product called DES which uses the same hardware and software to work with the cartridges, but which is incompatible with the other Dandanators. It’s like they were 2 separate projects.

Anyhow, I ordered and paid for a DES system and it took some time to arrive, when it did I decided to do a video about it, hopefully I covered most aspects.

Some questions to my viewers:

1. What do you think about the product compared to other Dandanators or a DDI5 or an M4 ?

2. What (if anything) would you have changed about it if YOU were marketing/selling the DES ?

also, as a side note Jason Brooks your Dandanator mini makes a guest appearance in this video

Posted in Dandanator, DES | Leave a comment