Author Topic: Skool Daze port for CPC (FINISHED)  (Read 16839 times)

0 Members and 1 Guest are viewing this topic.

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 778
  • Country: es
  • Liked: 628
  • Likes Given: 429
Skool Daze port for CPC (FINISHED)
« on: 00:33, 15 May 15 »
Final version of SKOOL DAZE port for CPC, download here:

skool daze 4 cpc &copy _public_domain_ (2015)
skool daze 4 cpc &copy _public_domain_ (2015)

Hi

I worked out to compile the source code on the cpc, change the screen layout to spectrum (#4000 with 256x192).

after this, i patched the original sound routine to a CPC sound routine, to emulate the spectrum beeper. This routine was inspired on what @SyX said about using the B channel of the CPC to emulate the zx beeper.

After the introduction music, you can see how the screen appears to be scrolled from right to left, i don't know if this is the original game code writing on the spectrum screen (#4000) as the game on spectrum starts scrolling from right to left.. i didn't path any screen routines... but it seems that the game tries to work on the cpc like on the spectrum  :laugh:

here is the sna if you want to hear the music of skool daze on cpc, is not a big deal as the program doesn't do anything besides play the original theme music, but i like to show my little work on this to the community  :P

here is the sna: Skool Daze CPC [music working].sna
« Last Edit: 01:24, 18 January 16 by Joseman »

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 833
  • Liked: 389
  • Likes Given: 67
Re: Skool Daze loaded on CPC, introduction music working!
« Reply #1 on: 00:39, 15 May 15 »
Well it's a good start. Now you just need to patch up the drawing routines a bit.  :D

Offline alex76gr

  • CPC664
  • ***
  • Posts: 143
  • Country: gr
  • Liked: 92
  • Likes Given: 40
Re: Skool Daze loaded on CPC, introduction music working!
« Reply #2 on: 01:20, 15 May 15 »
Thumbs up Joseman!
I still believe that i got my myopia from the green GT-65 monitor, but i can't prove it! :)

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 778
  • Country: es
  • Liked: 628
  • Likes Given: 429
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #3 on: 15:22, 18 May 15 »
Hi

I've managed to make a routine that converts "on the fly" 8 spectrum screen bytes to 16 cpc screen bytes, no color attributes (i have to think how can i traslate the attribute bytes to the cpc screen ram) and no optimization at all, i'm trying only to prove me that i can do this  :laugh: .

I call this routine just when the  8bytes with screen spectrum format is going to be printed on the spectrum screen, i intercept the bytes, convert it to 2-bytes mode 1 amstrad (16 bytes), and then print it on the amstrad screen.

because of this routine, the game can show now the "skool daze" logo and the scorebox.

Next step is traslate x and y coordinates to the amstrad screen ram for 8x8 tiles (i think, i have to see). If i achieve this, then the game must almost start working on the cpc... I accept suggestions!  :laugh:

Here is the sna: Music theme, logo and scoreboard working.sna
« Last Edit: 15:32, 18 May 15 by Joseman »

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #4 on: 15:43, 18 May 15 »
keep going with your progress :)

One suggestion:

Keep far away from MacDeath ;)

(You know how much he likes Speccy ports ;) ).

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline Nich

  • Supporter
  • 6128 Plus
  • *
  • Posts: 654
  • Country: gb
  • CPC Game Reviews webmaster
    • CPC Game Reviews
  • Liked: 498
  • Likes Given: 608
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #5 on: 22:14, 18 May 15 »
I was also aware that someone had disassembled the source code for Skool Daze, but I never had the time or motivation to inspect it more closely or attempt to convert it to the CPC.

I have many fond memories of playing Skool Daze on the Spectrum when I was 9 or 10 years old so I would *love* to see a CPC version, even if it is a Speccy port! :)

Offline BSC

  • CPC6128
  • ****
  • Posts: 177
  • Country: de
  • Yay! I became a 6128. Hope it wraps ..
    • my (Android) mobile game
  • Liked: 223
  • Likes Given: 176
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #6 on: 23:36, 18 May 15 »
What a great project! I used to play Skool Daze with my brother for ages (must have been around 1983) - what a great game! And fond memories :)

Thank you very much for approaching this conversion. And if I can be of any help - maybe concerning the sound / music department - let me know! I don't have a lot of spare time, but I'll see what I can do.
10 print"This is no signature.": goto 10

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 778
  • Country: es
  • Liked: 628
  • Likes Given: 429
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #7 on: 12:05, 20 May 15 »
Hi

Thankyou for all the encouragement! and thankyou for the help offers.

Right now i'm trying to figure out how to manage the speccy screen ram on the amstrad.

I'll try to convert spc screen memory to coordinates -> coordinates to cpc screen memory

But like i said, i'm open to suggestions and help in this field :P   i don't know if there is a nearly direct conversion from spc to cpc with a conversion table or something like this, at the moment i'll try the 2 side conversion.
« Last Edit: 12:08, 20 May 15 by Joseman »

Offline KaosOverride

  • 464 Plus
  • *****
  • Posts: 307
  • Country: es
  • Liked: 192
  • Likes Given: 44
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #8 on: 13:42, 20 May 15 »
Maybe this can help:

Http://wordpress.animatez.co.uk/computers/zx-spectrum/screen-memory-layout/       

Http://whatnotandgobbleaduke.blogspot.com.es/2011/07/zx-spectrum-screen-memory-layout.html?m=1   


By what the first url shows, playing with HL seting the fixed offset from &4000 (010xxxxx..) to &C000 (110xxxxx..) and reorganize the Y bits, you are done, I think... Or if you continue to use the ZX screen offset then just the Y bits from HL :)

You have the source code, so this should be trivial to patch. Also you can use your own zx 1bit pixel to cpc pixel function to use the attribute table to select more than 2 colours.
« Last Edit: 13:49, 20 May 15 by KaosOverride »
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 778
  • Country: es
  • Liked: 628
  • Likes Given: 429
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #9 on: 13:56, 20 May 15 »
Hi @KaosOverride  ;)

Yes, i know this 2 pages, and yes, i was thinking that in a bit level it can be reproduced...

at the moment i don't need the &c000 conversion because i'm using the spectrum screen memory (#4000), if i can do anything with it, perhaps in the future i will change to &c000 where is more easy to control the boundaries.

i was thinking in calculate only the row position, as the row itself is linear memory... but i don't think that it will work with pixel shifting that cross any boundarie...

As you see i don't know clearly what to do at the moment...








Offline KaosOverride

  • 464 Plus
  • *****
  • Posts: 307
  • Country: es
  • Liked: 192
  • Likes Given: 44
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #10 on: 16:22, 20 May 15 »
Please take a look at the first URL. ZX lines are interlaced x8 like CPC ones, but ZX has 3 screen blocks. CPC has 1 fullscreen block. The HL register is used as shown at the graph. The Y coordinate bits are rearranged so memory mapping fix to the three blocks.

If you have a pseudo ZX framebuffer at CPC's &4000 without the 3 blocks, just one full block, just modify how Y bits are stored in HL and you have a just 1 block framebuffer interlaced x8.

The trick is that Y5, Y4 and Y3 are used as low bits for Y coirdinate. This maps 4x 2kb blocks, and 3 of them are used for the 3 screen blocks.

You have spectrum like geometry , but the map is 010 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 ... But ZX is 010 Y7 Y6 Y2 Y1 Y0 Y5 Y4 Y3 ...

You have to change the way HL is used , change the H increments for the Y2-Y0 to L, and the L block manipulation of Y5-Y3 to H
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

Offline KaosOverride

  • 464 Plus
  • *****
  • Posts: 307
  • Country: es
  • Liked: 192
  • Likes Given: 44
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #11 on: 16:41, 20 May 15 »
Ohh and you have to shift all the bits because ZX pixel is 1 bit and CPC mode 1 are 2 bits...
01 Y7 Y6 Y5 Y4 Y3

Yes, and more tweaks are needed... :(
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

Offline MacDeath

  • Chaotic post writer and mock-up specialist
  • Supporter
  • 6128 Plus
  • *
  • Posts: 4.041
  • Country: fr
  • Liked: 1109
  • Likes Given: 619
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #12 on: 02:02, 22 May 15 »
Is the game good to begin with ?

Also I have no issue with properly redone speccy games aka raster wankfest in fullscreen...  :laugh:

does seems like how to be a complete bastard.

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 778
  • Country: es
  • Liked: 628
  • Likes Given: 429
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #13 on: 02:24, 22 May 15 »

Source Wiki:

The ZX Spectrum version was voted the 4th best game of all time in a special issue of Your Sinclair magazine in 2004.

P.S. i'm searching and learning code to convert pixel coordinates to cpc screen memory (done)

I need now some code to convert spectrum screen memory to pixel coordinates...
« Last Edit: 02:35, 22 May 15 by Joseman »

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 778
  • Country: es
  • Liked: 628
  • Likes Given: 429
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #14 on: 07:28, 24 May 15 »
And  here we go...

I really sweated blood to achieve this... i get the skool to show on screen.

The code is a mess, unoptimized to hell, making tricks everywhere, but at least i achieved it!

The most important is that I learned a lot about the game and if the skool shows up... then i learned well ;)

Here it is the sna: showing the skool.sna

and now going to sleep!  :P



Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 14.937
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 2915
  • Likes Given: 5070
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #15 on: 20:57, 24 May 15 »
Oooh looking forward...

Offline MacDeath

  • Chaotic post writer and mock-up specialist
  • Supporter
  • 6128 Plus
  • *
  • Posts: 4.041
  • Country: fr
  • Liked: 1109
  • Likes Given: 619
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #16 on: 14:39, 25 May 15 »
who said speccy port was lazy and easy ?


oops... well it would if you had the documented source code... sort of.
ghood luck anywhay, and don't forget to ask for the graphics convertions...


[youtube]https://www.youtube.com/watch?v=aro3Ywi1qr8[/youtube]
[youtube]https://www.youtube.com/watch?v=ULCjgUNz6bQ[/youtube]
« Last Edit: 14:43, 25 May 15 by MacDeath »

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 778
  • Country: es
  • Liked: 628
  • Likes Given: 429
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #17 on: 15:33, 25 May 15 »

oops... well it would if you had the documented source code... sort of.
good luck anywhay, and don't forget to ask for the graphics convertions...


Yes, if i have the sufficient knowledge this conversion will be in about 2 hours  :laugh:

About the help in graphics and sounds, thanks really, but at the moment i want to know if i can achieve this (full game working) before waste everyone's time.

this days i will try to locate the screen at #0000, this way the game will load in the exact position than in spectrum (right now is not this way) as some code i've read uses  jumps to a predefined memory positions...

when i achieve this, another sna will emerge  :laugh:


Offline MacDeath

  • Chaotic post writer and mock-up specialist
  • Supporter
  • 6128 Plus
  • *
  • Posts: 4.041
  • Country: fr
  • Liked: 1109
  • Likes Given: 619
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #18 on: 15:59, 25 May 15 »
Good luck then in your Epic quest.

Try to see if you can contact original coder for this game, sometimes you can get lucky with that. ;)

Also ask the ZX spectrum community... they know their machine well.
« Last Edit: 16:01, 25 May 15 by MacDeath »

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 778
  • Country: es
  • Liked: 628
  • Likes Given: 429
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #19 on: 16:51, 27 May 15 »
Ok

The video ram is now located at #100 - #3EFF (i can't do at #0000 because the game uses IM1)

Now all the original code and data is located at the same position than on spectrum. A lot of routines and data are hard stored, change it's location will be madness, because all this routines will be needed to change and reprogrammed.

Because of this (data in the same location), now you can see the characters in the ground floor, they are something like ghosts right now  :laugh:

As promised here is the sna: skool Daze [video memory relocalized, data in original place].sna



 



Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 778
  • Country: es
  • Liked: 628
  • Likes Given: 429
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #20 on: 22:44, 27 May 15 »
Quick update:

Now the ringbell and the lessonbox is working...

easy task here as they use routines that i already converted (slow & dirty  :laugh: ) to cpc.

sna: skool Daze [ringbell and lessonbox working].sna
« Last Edit: 22:47, 27 May 15 by Joseman »

Offline KaosOverride

  • 464 Plus
  • *****
  • Posts: 307
  • Country: es
  • Liked: 192
  • Likes Given: 44
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #21 on: 01:46, 28 May 15 »
Lol some tiles are in reverse video. Thanks to the 8x8 colour attrib....
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 778
  • Country: es
  • Liked: 628
  • Likes Given: 429
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #22 on: 01:54, 28 May 15 »
Lol some tiles are in reverse video. Thanks to the 8x8 colour attrib....

Well at the time there is no handle for the color, it's only 1bit data, pixel or no pixel, hence only 2 colours, the appearance of reverse video is only casual (i think)

Offline KaosOverride

  • 464 Plus
  • *****
  • Posts: 307
  • Country: es
  • Liked: 192
  • Likes Given: 44
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #23 on: 17:03, 28 May 15 »
The reverse video looks like the tile is correct, but the color attribute will reverse the 2 colours to correct ones.

Maybe is better to redo some tiles and avoid reverse tricks. Do you have the original CPC video ram free? That's 16kb free for expanded to 4 colours tiles..
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 778
  • Country: es
  • Liked: 628
  • Likes Given: 429
Re: Skool Daze loaded on CPC ( trying to port it)
« Reply #24 on: 18:22, 28 May 15 »
Do you have the original CPC video ram free? That's 16kb free for expanded to 4 colours tiles..

no, and it will never be  :laugh: