CPCWiki forum

General Category => Programming => Topic started by: Joseman on 22:33, 14 May 15

Title: Skool Daze port for CPC (FINISHED)
Post by: Joseman on 22:33, 14 May 15
Final version of SKOOL DAZE port for CPC, download here:

skool daze 4 cpc &copy _public_domain_ (2015) (http://www.cpc-power.com/index.php?page=detail&num=12009)

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 (http://www.cpcwiki.eu/forum/index.php?action=profile;u=324) 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 (http://ge.tt/5HiwtMG2/v/0?c)
Title: Re: Skool Daze loaded on CPC, introduction music working!
Post by: andycadley on 22:39, 14 May 15
Well it's a good start. Now you just need to patch up the drawing routines a bit.  :D
Title: Re: Skool Daze loaded on CPC, introduction music working!
Post by: alex76gr on 23:20, 14 May 15
Thumbs up Joseman!
Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: Joseman on 13: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 (http://ge.tt/970pcbG2/v/0?c)
Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: arnoldemu on 13:43, 18 May 15
keep going with your progress :)

One suggestion:

Keep far away from MacDeath ;)

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

Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: Nich on 20: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! :)
Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: BSC on 21: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.
Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: Joseman on 10: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.
Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: KaosOverride on 11:42, 20 May 15
Maybe this can help:

Http://wordpress.animatez.co.uk/computers/zx-spectrum/screen-memory-layout/ (http://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 (http://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.
Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: Joseman on 11:56, 20 May 15
Hi @KaosOverride (http://www.cpcwiki.eu/forum/index.php?action=profile;u=431)  ;)

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...







Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: KaosOverride on 14: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
Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: KaosOverride on 14: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... :(
Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: MacDeath on 00: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.
Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: Joseman on 00: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 (http://en.wikipedia.org/wiki/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...
Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: Joseman on 05: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 (http://ge.tt/1JGY9zG2/v/0?c)

and now going to sleep!  :P


Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: Gryzor on 18:57, 24 May 15
Oooh looking forward...
Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: MacDeath on 12: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...



Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: Joseman on 13:33, 25 May 15
Quote from: MacDeath on 12:39, 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:

Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: MacDeath on 13: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.
Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: Joseman on 14: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 (http://ge.tt/67HjhBH2/v/0?c)






Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: Joseman on 20: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 (http://ge.tt/7r7A0DH2/v/0?c)
Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: KaosOverride on 23:46, 27 May 15
Lol some tiles are in reverse video. Thanks to the 8x8 colour attrib....
Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: Joseman on 23:54, 27 May 15
Quote from: KaosOverride on 23:46, 27 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)
Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: KaosOverride on 15: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..
Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: Joseman on 16:22, 28 May 15
Quote from: KaosOverride on 15:03, 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:

Title: Re: Skool Daze loaded on CPC ( trying to port it)
Post by: Joseman on 01:27, 02 June 15
Good night

news: Keyboard routines working, now it's possible to exit the demo mode, configure controls (really not, they are speccy controls), and change the name of the characters (until the game crash), the characters are non visible because still i don't have a routine to convert coordinates to screen ram, when i achieve this routine, it's very possible that the game starts working itself!.

sna: skool Daze [keyboard working, input names working].sna (http://ge.tt/4A1d3YH2/v/0?c)

Title: Skool Daze port for CPC (skool comes alive)
Post by: Joseman on 01:31, 04 June 15
Good night again  ;D

Great news with the Skool:

This night i coded a routine that traslate the game's coordinates to cpc screen and...

it comes alive!, now near all the characters (not eric) walks across the skool, even without a proper random routine!: the speccy uses a "system variable" called "FRAMES" that is a counter located at #5C78 that increments every 20ms, i suspect that the routine that update this variable is located in the spectrum ROM, hence it doesn't work on CPC. The location at #5C78 is not updated on the CPC,  then the random routine doesn't work well: As you may see, all the students and teachers go to the library and stay there in the spare time. Because of this the students on Skool Daze CPC version are more erudite than on the ZX version  :laugh: . Anyway, i will code a proper random routine for the cpc.

Now you can see all the students and teachers walking on and off on the name change section of the game.

When you enter the game, almost all works well, the students walks across the skool without problem, the teachers too. When the ringbell sounds the students go to the classroom and sitdown, then the teacher enter the classroom and the lesson starts!

Even the keyboard works with eric in the game itself.

The problem right now is that Eric is not properly moved across the screen (i suspect of 2 routines), but now i'm tired, perhaps another day  :P

Thanks that the ZX version makes a 80.000 t-states delay on the MAINLOOP, i can adjust the speed of the game at the same speed of the spectrum adjusting this delay to 10.000 t-states. Even with my bad routines, slooooooooooooooooow routines the students and teachers walks at the same speed than on spectrum, and if i don't do the delay, the game runs more speedy than on spectrum!!  :laugh:

Here is the sna as usual: skool Daze [characters moving, skool comes alive].sna (http://ge.tt/3TRd8gH2/v/0?c)
Title: Re: Skool Daze port for CPC (skool comes alive)
Post by: MiguelSky on 09:57, 04 June 15
Great !!
Title: Re: Skool Daze port for CPC (skool comes alive)
Post by: Neil79 on 13:46, 04 June 15
:D So are we going to have better graphics? Smooth frame rates? Do tell  ;D
Title: Re: Skool Daze port for CPC (skool comes alive)
Post by: Joseman on 14:25, 04 June 15
Quote from: Neil79 on 13:46, 04 June 15
:D So are we going to have better graphics? Smooth frame rates? Do tell  ;D

No no, you know that I LOVE the speccy graphics, even i will tell you more, I prefer the 1 bit graphics that the spectrum have, like this, 1 bit color.

ohhhh and the attribute system... you don't know how i'm ENJOYING removing all this crap, you know? i know that the speccy has this marvelous character based screen, but, i will tell you that i prefer the system of my  olivetti typewriter for character based screen, at least it is linear!!

no no, 1 bit color and olivetti typewriter based screen

this is really retro retro eh?  :)

just kidding  :P



Title: Re: Skool Daze port for CPC (skool comes alive)
Post by: MacDeath on 23:38, 04 June 15
Well, then just port it to PCW... ;D
Title: Re: Skool Daze port for CPC (skool comes alive)
Post by: Joseman on 03:09, 12 June 15
News on the port:

This time it took several days for me to avance any further on it.

All because of the "speech bubble" thingy, that is the bubble that the teachers or the alumns use to talk to eric or to give lessons in the classroom.

The routines of speech bubble needed to be fully rewriten because the words of the sentences where scrolled 1 pixel at a time from right to left, using rlca ... rl (hl), thanks of the lame 1bit per pixel that the spectrum have, this is the only needed to scroll the sentence 1 pixel to the left, this way is not possible on cpc in mode 1, we have 2 bits per pixel, if you scroll 1 bit to the left at a time, all becomes a mess. I have to "imitate" this routine with a lot of bit, set & res commands, this was a nightmare and i know that it have to be more easy than this, but like all my routines, I only do without any optimization and redundant every where. I'm not an expert z80 programmer, is enough that the routines works.

****
And if anyone is wondering... this is not fault of the cpc, all the graphics are 1bit shitty spectrum pixel, they are optimized for the spectrum, not the cpc, they have to be converted everywhere to 2 bits per pixel and the spectrum memory have to be converted everywhere too, only for this, the game never will be as fast as spectrum. This is the real reason why some games are more slow on cpc than on spectrum, shitty graphics and shitty code for this graphics. With optimized graphics and optimized code, sure the cpc can match the spectrum speeds, with more colors and better graphics. Its only a problem of the direct ports from spectrum to cpc. I say this, because some people tends to think (and make fun) that the speccy have any advantage over the cpc on scrolls or games on full screen (256x192 shitty full screen,  remember that the cpc is 320x200 full screen without overscan). No way only spectrum blind fanboys can think this.
****

Now the teachers talks, the little boy talks to eric several times, the sentence moves very jerky because the routine prints 2 letters at a time, then move characters, then print another 2 letters, then move characters and so on... because of my superfast routines... well this is the result...  :laugh:

Another thing that works now is the teachers givelines bubble (that is not the same bubble that the speech bubble), only fails on restore the school bottom because i didn't reprogrammed all the routine, then it uses speccy widths and sizes at the moment.

Eric can Sit down if you press "s" and you will see the givelines bubble sooner or later  :laugh:

Eric can jump now too if you press "j"

At the moment Eric can't move (i didn't modified the routines, sure it uses shitty attribute bytes and speccy mem directions)

Neither can shoot the catapult ("c") or the game will hang immediately, the same here, attribute bytes and speccy mem directions to change...

The game now can run without hang anymore (unless you shoot the catapult), the skool works and do all the scripts without problem apparently.

Oh, and the routine to scroll the skool to the left is much more quick now... almost equal to speccy, even when the cpc has to move 2 times more screen mem and my routines are very shitty  ;)

SNA: skool daze [characters talking, teachers give lessons, teachers give lines, (http://ge.tt/4cNkSAI2/v/0?c)
Title: Skool Daze port for CPC (skool comes alive)
Post by: Joseman on 03:33, 12 June 15
now going to sleep...
Title: Re: Skool Daze port for CPC (skool comes alive)
Post by: Gryzor on 10:59, 14 June 15
Wot? Still sleeping? :D
Title: Skool Daze port for CPC (skool comes alive)
Post by: Joseman on 00:53, 16 June 15
News on the port:

The bubble lines now are restored ok, no more garbage on screen after a teacher giving lines to us.

The scoreboard is working, now when you receive lines they are correctly displayed on the scoreboard. Highscore and score works ok too.

Improved the random routine with patrik's of WOS: http://www.worldofspectrum.org/forums/showpost.php?p=583693&postcount=3 (http://www.worldofspectrum.org/forums/showpost.php?p=583693&postcount=3), i added two ld a,r to improve the routine, but i'm not sure that this is the perfect random routine... anyway, now is clearly visible more random on the boys and teachers when walking on playtime, perhaps even more random than on spectrum... but again, i'm not sure...

I know that there is a bug on the speech bubble on the middle floor, but at the moment is not really important.

Next will be move  Eric correctly, i don't know at the time what's failing with Eric, but is clear that Eric and his catapult pelet are managed different than the other sprites...

i will see next time  ;)

SNA: skool Daze [ bubble lines ok,score board ok, random improved ].sna (http://ge.tt/2uglKPI2/v/0?c)

Remember to press a key and say "n" to change names if you want to see the game working totally correct (without move eric), you can (j)ump or (s)it to receive lines from the teachers... oh, and you can (h)it other people too (you will receive lines if there is a teacher near)

Curiosly right now you can loose the game with over 10000 lines and you can't do nothing to avoid this  :laugh:
Title: Skool Daze port for CPC (90% complete)
Post by: Joseman on 15:09, 18 June 15
Last news on the port:

Luckily the problem with eric's movements was only a remaining line of spc code that i let untouched. In asm is more hard to find errors than correct them  :laugh:

Now eric's can move without problem to the right, the skool will scroll correctly to the left. Really the skool can scroll to the left from the start of the port because the code is the same to skroll the entire skool in screen than scroll the skool 8 columns. You can visit the skool to the right and even go upstairs or downstairs.

Now remains to code the skool scroll to the right, in fact if you move eric to the left the game will hang when trying to scroll the skool. There is only speccy code in this routine right now. Anyway it will be easy to modify this routine, perhaps tonight.

The game will then nearly to be completely ported ...

by the way... I omited the delay routine in the mainloop so you can see how quickly the sprites are even with my bad coding  :laugh: , the slowdown when there are too much sprites on screen occurs too in the spectrum version...

SNA of this version: skool daze [Eric moving, skool scrolling to the left, no delay].sna (http://ge.tt/8cqOdaI2/v/0?c)






Title: Skool Daze port for CPC (95% done)
Post by: Joseman on 23:00, 18 June 15
Ok, as i said, the right scroll of the school was going to be easy... it's working now

Fixed the middle bubble speech bug too

Now almost all things are working, even you can hit the shields jumping (not flashing because of the nasty flash attribute byte of the spectrum), i think that i will change the sprite when hit a shield instead of emulate the flashing attribute of the spectoy.

You can write on the blackboards too, hit the other pals (hitting angelface brings points), sit and attend classes (is a bit tricky because on some classroms there are more students than chairs).

You really can play the game now (not finish it because still the catapult is not working), the rest is ok i think...

Here is the SNA: skool daze [skool scrolling to the right, middle bubble speech fixed].sna (http://ge.tt/4wfBEcI2/v/0?c)

Here are the instructions of the game: http://www.worldofspectrum.org/pub/sinclair/games-info/s/SkoolDaze.txt (http://www.worldofspectrum.org/pub/sinclair/games-info/s/SkoolDaze.txt)

Now, if there is people here that can playtest the game, specially the ones who played the speccy version, you can report bugs, or things that you think are wrong with the cpc version (gameplay)







Title: Skool Daze port for CPC (97% port done)
Post by: Joseman on 10:01, 19 June 15
Nobody can't stop me now!  :laugh:

Ok the catapult is working now, the pellet will do justice! The problem was (again) speccy code untouched...

Now you can fire the other alumns and (more important) the teachers, because with one hit you knock down the teacher and with another hit the pellet will bounce on his head and go up, this way you can hit the shields that you can't reach jumping. You can jump on top of knock down characters by the way...

Another thing is that now Eric can RUN, in speccy if you press "shift" + direction key, Eric will start to run, this way you can go quickly from one location to another (very handy), the problem is that this way multiple keys have to be press simultaneously... On the cpc i do this thing different: if you press (only 1 time) "caps lock" or "shift" Eric will RUN by default and if you press "caps lock" or "shift" again, Eric will walk normal by default... so less keys to press, they are a lot enough  :laugh:

Now the port is almost done, like i said, i will appreciate betatesting, the game is very fun! try it!, if you want DSK instead of SNA let me know!!

SNA: skool daze [catapult working, eric can run].sna (http://ge.tt/5Jj5ydI2/v/0?c)

P.S. I will do the joystick input and the cursor input soon...
Title: Re: Skool Daze port for CPC (95% port done)
Post by: Neil79 on 12:16, 19 June 15
Article is up :) Indie Retro News: The latest free games, indie games and retro news: Skool Daze (http://www.indieretronews.com/2015/06/skool-daze-hit-speccy-classic-getting.html)
Title: Re: Skool Daze port for CPC (95% port done)
Post by: CraigsBar on 13:50, 19 June 15
Quote from: Joseman on 10:01, 19 June 15
Nobody can't stop me now!  [emoji23]

Ok the catapult is working now, the pellet will do justice! The problem was (again) speccy code untouched...

Now you can fire the other alumns and (more important) the teachers, because with one hit you knock down the teacher and with another hit the pellet will bounce on his head and go up, this way you can hit the shields that you can't reach jumping. You can jump on top of knock down characters by the way...

Another thing is that now Eric can RUN, in speccy if you press "shift" + direction key, Eric will start to run, this way you can go quickly from one location to another (very handy), the problem is that this way multiple keys have to be press simultaneously... On the cpc i do this thing different: if you press (only 1 time) "caps lock" or "shift" Eric will RUN by default and if you press "caps lock" or "shift" again, Eric will walk normal by default... so less keys to press, they are a lot enough  [emoji23]

Now the port is almost done, like i said, i will appreciate betatesting, the game is very fun! try it!, if you want DSK instead of SNA let me know!!

SNA: skool daze [catapult working, eric can run].sna (http://ge.tt/5Jj5ydI2/v/0?c)

P.S. I will do the joystick input and the cursor input soon...
Dsk definately would suit me more.
Title: Re: Skool Daze port for CPC (95% port done)
Post by: Neil79 on 14:39, 19 June 15
Quote from: CraigsBar on 13:50, 19 June 15
Dsk definately would suit me more.


Same here


By the way, game crashes in JavaCPC if you press any key other than the one to start the game.
Title: Re: Skool Daze port for CPC (95% port done)
Post by: Joseman on 15:02, 19 June 15
@Neil79 (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1097) Thanks for the news on your page  :)

The key routine used is the one that is on cpcwiki, i know that if you press "especial" keys the game will crash as they are not returning a valid ASCII code, i know this bug (as the bubble speech bug), but it wast not important until now.

About the sound... it was the first code i made, and it was in 5 minutes... here there isn't limitations, i can use the AY in full power... sound effects, music... all that you want can be made, i have room for it and no limitations at all. I'm not musician and not very good ond SFX. If any one wants Music and sound effects 100% cpc, just help me  :laugh: . If you want even we can use playcity  ;) .

About the graphics and the vibrant cpc colors... Here is the problem... the graphic data is 1bit mode, and heavily hard coded, if you redo the graphics for mode 1 cpc (4 vibrant colors) we need twice the memory data for it, at the moment isn't a problem, it just that the routine that handles the school need to be totally rewriten. About Mode 0 (16 vibrant colors), much memory data needed and even more changes on the routine... Again... i'm not good on gfx too (well in coding not too), if anyone wants to help...

I know and understand about the 100% source code right now, any change can be made without problem if anyone helps...





Title: Re: Skool Daze port for CPC (95% port done)
Post by: Neil79 on 15:14, 19 June 15
Cheers for that informative reply  8)
Title: Re: Skool Daze port for CPC (95% port done)
Post by: SkoolKid on 15:34, 19 June 15
Hi all


Just popping in to say bravo to @Joseman (http://www.cpcwiki.eu/forum/index.php?action=profile;u=135) for using my Skool Daze disassembly to port the game to the CPC. Awesome work! It's nice to see that the effort I put in to reverse-engineering the game was of value to someone else, too.


Now I just need to find a CPC emulator and try this out. Anyone know of a good one for Linux?
Title: Re: Skool Daze port for CPC (95% port done)
Post by: TFM on 16:35, 19 June 15
Guess there is Arnold.  :)
Title: Re: Skool Daze port for CPC (95% port done)
Post by: Joseman on 16:59, 19 June 15
Quote from: SkoolKid on 15:34, 19 June 15
Hi all


Just popping in to say bravo to @Joseman (http://www.cpcwiki.eu/forum/index.php?action=profile;u=135) for using my Skool Daze disassembly to port the game to the CPC. Awesome work! It's nice to see that the effort I put in to reverse-engineering the game was of value to someone else, too.


Now I just need to find a CPC emulator and try this out. Anyone know of a good one for Linux?

Hi @SkoolKid (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1437)!!

Sorry by not getting in touch with you before, but while i wansn't sure that the port will work almost 100% i didn't want to bother anybody.

It has to be clear that the hard job, the difficult part is what skoolkid did, it is an incredible work to reverse enginer a game... and fully commented almost line by line.... thanks to it i learned a lot of asm...

your job  shows the love that you have to this game.

I only added crappy code, to make it work at any cost on the cpc... Now is time to see if the code can be optimized, add features... i don't know...

If the port is finished, it will have a credits part where you will be the first :)

Title: Re: Skool Daze port for CPC (95% port done)
Post by: TFM on 17:31, 19 June 15
Indeed an overwork would be nice (scrolling, colors etc). But that's again a lot of work. You did a great job up to now. And.... if I can suggest that... add a small note about "What to do" in this game actually.  :)
Title: Re: Skool Daze port for CPC (95% port done)
Post by: arnoldemu on 17:49, 19 June 15
@SkoolKid (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1437): I have sent a private message with the location of the wip version.

I have also sent a link to the older linux version.

Title: Re: Skool Daze port for CPC (95% port done)
Post by: robcfg on 19:01, 19 June 15
@arnoldemu Could you send me the link too, please? I'll be glad to test it.
Title: Re: Skool Daze port for CPC (95% done)
Post by: Nich on 20:44, 19 June 15
Quote from: Joseman on 23:00, 18 June 15
You really can play the game now (not finish it because still the catapult is not working), the rest is ok i think...

Now, if there is people here that can playtest the game, specially the ones who played the speccy version, you can report bugs, or things that you think are wrong with the cpc version (gameplay)
Writing on the blackboards crashes the game when I play it in CPCE. WinAPE seems to be OK, but both emulators don't print spaces correctly and they write a letter to the blackboard instead of a space. Pressing RETURN while writing to the blackboard crashes the game on both emulators.

Nonetheless, I am still very impressed indeed by the amount of progress you've made in the last few days! :o
Title: Re: Skool Daze port for CPC (95% done)
Post by: Joseman on 22:41, 19 June 15
Quote from: Nich on 20:44, 19 June 15
Writing on the blackboards crashes the game ...

Yes, a bug caused by the last update, eric can run because the opqa are capital, but i forgot that not all the letters can be substracted from lower case to uppercase... imagine than a space caracter ascii you substract a number... the result will be unpredictable!

a minor bug, no problem!
Title: Re: Skool Daze port for CPC (95% port done)
Post by: Joseman on 03:18, 20 June 15
Ok

The bug with the keyboard is fixed.

Joystick and cursor support added

Dsk created with the Skool Daze 4 CPC beta0 -> Skool Daze 4 cpc -beta0-.dsk (http://ge.tt/75oYEhI2/v/0?c)

Run"beta" and have fun!

At the moment better to select 'n' in "do you want to put in your own names?", because the input method selection plays with my keyboard routines and some keys may not work...


Title: Re: Skool Daze port for CPC (95% port done)
Post by: CraigsBar on 12:35, 20 June 15
Quote from: CraigsBar on 13:50, 19 June 15
Dsk definately would suit me more.


I tested the SNA with the Symbos SNApshot loader last night. You'll be please to know it works fine, so you have inadvertently made a perfect symbos launchable CPC game. Excellent work :)
Title: Re: Skool Daze port for CPC (95% port done)
Post by: Joseman on 12:54, 20 June 15
Quote from: CraigsBar on 12:35, 20 June 15

I tested the SNA with the Symbos SNApshot loader last night. You'll be please to know it works fine, so you have inadvertently made a perfect symbos launchable CPC game. Excellent work :)

Yes, but now it is an obsolete version!, try the dsk version for best gameplay  :)
Title: Re: Skool Daze port for CPC (95% port done)
Post by: CraigsBar on 12:59, 20 June 15
Quote from: Joseman on 12:54, 20 June 15
Yes, but now it is an obsolete version!, try the dsk version for best gameplay  :)
Just my luck, always one version behind the rest if the world. Anyway I revoke my preference for dsk. Either suits me fine.... How about CPR? ;)
Title: Re: Skool Daze port for CPC (95% port done)
Post by: arnoldemu on 13:13, 20 June 15
Does the cpc version have chewing gum stuck to the desks? Or perhaps those balls of paper and spit that are fired and stay stuck on the ceilings? Or dead flies in the plastic case of strip lighting?

:laugh:

I will go directly to detention for my cheekiness.
Title: Re: Skool Daze port for CPC (95% port done)
Post by: arnoldemu on 13:15, 20 June 15
Serious now: @Joseman (http://www.cpcwiki.eu/forum/index.php?action=profile;u=135) you are doing great with this conversion. :)
Title: Re: Skool Daze port for CPC (95% port done)
Post by: Joseman on 13:33, 20 June 15
Quote from: arnoldemu on 13:15, 20 June 15
Serious now: @Joseman (http://www.cpcwiki.eu/forum/index.php?action=profile;u=135) you are doing great with this conversion. :)

Thankyou, was a good chance for me to learn more asm, because of the source code totally commented...

The bit rotations, the oscure comparations, how a game is managed on asm, the tiles... all is clear now for me... now they are more horizonts opened for me...

it's a hobbie, but now i see more clear how to port games, or how can i program a game from scratch... some games come to mind... we will see...
Title: Re: Skool Daze port for CPC (95% port done)
Post by: SkoolKid on 17:38, 20 June 15
Quote from: Joseman on 16:59, 19 June 15
Sorry by not getting in touch with you before, but while i wansn't sure that the port will work almost 100% i didn't want to bother anybody.

It has to be clear that the hard job, the difficult part is what skoolkid did, it is an incredible work to reverse enginer a game... and fully commented almost line by line.... thanks to it i learned a lot of asm...

your job  shows the love that you have to this game.

I only added crappy code, to make it work at any cost on the cpc... Now is time to see if the code can be optimized, add features... i don't know...

If the port is finished, it will have a credits part where you will be the first :)
Thanks!


You're right about the love that I have for the game (and Back to Skool too) - some might call it an obsession. A healthy one, though, I hope.  :D
Title: Re: Skool Daze port for CPC (95% port done)
Post by: Gryzor on 17:44, 20 June 15
Never played it on the Speccy really, despite it looking really good (and having read tons of material about it). Maybe it's about time... :)
Title: Re: Skool Daze port for CPC (95% port done)
Post by: SkoolKid on 12:50, 21 June 15
So I've been playing the game in Arnold (thanks @arnoldemu (http://www.cpcwiki.eu/forum/index.php?action=profile;u=122) ), and I have an idea about what to do with a shield when it's hit: turn it upside down.


Actually, this is not my idea - it's what Chema did when he ported Skool Daze to the Oric (http://forum.defence-force.org/viewtopic.php?p=6456#p6456).

Title: Re: Skool Daze port for CPC (Beta 1 available)
Post by: Joseman on 14:03, 22 June 15
Beta 1 is available:

I re-read all my routines (not the bubble speech), and optimized them a little... is visible on the sprite repaint... before some little boys were draw a bit more slow...

I think that overall the game is a bit more speedy... not a lot but...

Here is the dsk & sna: 2 files - Ge.tt (http://ge.tt/5YcRQqI2?c)

The game is compatible con Xmass - Symbiface 2 + Bdos by the way, it can be installed on HDD


from this point i will slow the devolopment of the port, i think that i'll try to convert de school to mode 1 cpc sprites, and repaint them... but now i start 2 jobs a day (summer), i don't know how time i'll need to do this...

@SkoolKid (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1437): is a good idea to turn it upside down too... i don't know... i like the broken shield too... i'll see...

Thanks to

@Neil79 (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1097) from Indie Retro News: The latest free games, indie games and retro news (http://www.indieretronews.com/)

@Dubliner (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1275) from RetroManiac | Revista de videojuegos retro |Videogames Magazine | Indie | Games (http://retromaniacmagazine.blogspot.com.es/)

for the coverage!!
Title: Re: Skool Daze port for CPC (Beta 1 available)
Post by: Joseman on 00:45, 23 June 15
I've been playing the game this night...

there's a bug on the check of lines, Mr. Wacker don't send Eric to Home over 10000 lines never.

It's corrected on my code.

Take the beta1 as a infinite lives to test it  ;)




Title: Re: Skool Daze port for CPC (Beta 1 available)
Post by: KaosOverride on 17:23, 23 June 15
Great job Joseman!!  :D
Title: Re: Skool Daze port for CPC (Beta 1 available)
Post by: Neil79 on 20:20, 23 June 15
Fantastic!


The article has been updated with the latest beta, thanks :)
Title: Skool Daze port for CPC (Beta 2 available)
Post by: Joseman on 17:02, 24 June 15
Good afternoon

Beta 2 is ready to download...

The shields now reacts to the pellet and the sprite change, this way now you can see what shield was hit and what shield still needs to be hit.

The sprite to  show that a shield was hit is recicled from another sprite... hence the "strange" sprite for the hit-shield. when i have time, i will change the sprite, but now it's not important.

There is a know bug, the shields reacts allways to the pellet, even if it was hit before, i will fix this soon...

It was more easy than i thought at the first moment.

Changed the fire 2 joystick to HIT. now: fire1 catapult, fire2 hit. Eric is on fire that way!

Now the Border colour change at different sounds (like on spectrum)... but more vibrant colours  ;)

Finally, the bug on check lines is fixed, now Mr. Wacker will send Eric to home over 9999 lines, and he will have no mercy!!.

Now I really think that the game can be finished... when i have time, i will play to see... And you can too!!  :P

DSK & SNA: 2 files - Ge.tt (http://ge.tt/5YcRQqI2?c)

see you!!







Title: Re: Skool Daze port for CPC (Beta 1 available)
Post by: TFM on 20:37, 24 June 15
Great job!!!
Title: Re: Skool Daze port for CPC (Beta 1 available)
Post by: Neil79 on 21:13, 24 June 15
Quote from: TFM on 20:37, 24 June 15
Great job!!!


8)  This
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: Joseman on 01:48, 26 June 15
Yes, it's time for beta 4! (beta 3 will remain on my hd forever)

and yes, there were bugs:

When you hit all the shields, the teachers will reveal 1 letter of the code for the safe... in beta 2 the game will hang when the teacher is going to reveal the letter. Fixed.

Now only 1 hit for shield, no more extra hits... no more cheating!  :P

Added the loading screen from spectrum version.

*After all the teachers reveals the code and Eric open the safe, the next job is hit all the shields again... this part of code is still not revised, maybe the game will not work in the last stage of the game but surely now it's 99% working...

SNA & DSK: 2 files - Ge.tt (http://ge.tt/5YcRQqI2?c?c)







Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: Gryzor on 15:30, 26 June 15
Tee-hee! Just gave it a shot, it's so cute :)
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: SkoolKid on 17:37, 26 June 15
Nice work, Joseman. So close now!


On the subject of bugs, just wondering whether you're planning on fixing some of the bugs in the original game (http://skoolkit.ca/disassemblies/skool_daze/reference/bugs.html). If you had the foresight to use the '--fixes 2' option of skool2asm.py when you created the ASM file, you would have got some of the fixes for free already. If not, look for the '@ofix' and '@bfix' directives in sd.skool for clues.
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: Joseman on 19:29, 26 June 15
Hi @SkoolKid (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1437)!

Did you notice any difference (besides the slowdowns) with the spectrum version? how about the timings on the playtime and lessons?

I didn't correct any bugs that are on the spectrum version... but if i'm not mistaken, the game can be finished and the bugs are no that important?


Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: Neil79 on 22:59, 26 June 15
tested beta 2(?) through JavaCPC and I noted distinct slow downs when more than one person comes into view, so if you've got lots of kids walking about it is certainly noticeable.
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: Joseman on 23:55, 26 June 15
Quote from: Neil79 on 22:59, 26 June 15
tested beta 2(?) through JavaCPC and I noted distinct slow downs when more than one person comes into view, so if you've got lots of kids walking about it is certainly noticeable.

Yes, i know about the slowdowns. Think that this is a spectrum based game, with 1bpp graphics, the cpc is converting in realtime to 2bpp and managing twice the memory of the spectrum screen memory. If you see it that way, then you realize the merit that the cpc can do this at relatively good speed :) .

A lot of games suffer of this on CPC (because of the speccy based game and lazy ports), a lot of people outside of the cpc scene thinks (by ignorance) that is a cpc fault when it's not. If you do proper cpc graphics, hardware scroll and double buffer, the CRTC will crush any spectrum / msx scroll (or graphic) and kick in the ass at the poor C64 sprites and palette... Not to mention the annoying attribute clash that this 3 computers have...

I know that is a matter of taste, but for me, the cpc has all the balance that spectrum, msx or c64 don't (and never will) have...
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: SkoolKid on 21:09, 28 June 15
Quote from: Joseman on 19:29, 26 June 15
Did you notice any difference (besides the slowdowns) with the spectrum version? how about the timings on the playtime and lessons?

I didn't correct any bugs that are on the spectrum version... but if i'm not mistaken, the game can be finished and the bugs are no that important?
The only thing I've noticed so far is some extra black pixels that show up in the speech bubbles. And no, the bugs in the Spectrum version aren't particularly serious - they don't prevent you from finishing the game.
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: KaosOverride on 21:24, 28 June 15
Do you calculate on the fly or use any precalculated table? Maybe some speed can be gained...
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: Joseman on 22:46, 29 June 15
Quote from: KaosOverride on 21:24, 28 June 15
Do you calculate on the fly or use any precalculated table? Maybe some speed can be gained...

the 2 things, when i paint the school i use a mini-precalculated table but, when i do the 1bpp - 2bpp it's real time.

And yes, you're right, i started to build a precalculated table with all the spectrum byte occurrences... i really think that a LOT of speed can be gained (and some other thing ;))

Thanks for the tip, it's the next that i will do, but as i said, now i have 2 works, this update will come with some delay...




Title: Re: Skool Daze port for CPC (next beta update)
Post by: Joseman on 21:06, 05 July 15
Hi

Quick update of the next beta:

*The routine to print a tile is now using precalculated data (as @KaosOverride (http://www.cpcwiki.eu/forum/index.php?action=profile;u=431) suggested), the routine without precalculated data wasted 107us EVERY painted tile, now, it waste 64us, 43us we gain EVERY tile painted, that's for sure a big improvement, the game now runs very quick (not the scroll, only the tile paint), and i'm pretty sure that now it's very approximate to de spectrum speed. When a lot of sprites are in screen, the slowing down occurs on spectrum too.

*The routine to display the bubble speech is now a lot optimized it gains 50,0000 us every time it's called!!! now the bubble is MORE quick than on spectrum version!  :laugh: , on the past betas the speech bubble was displayed quick because a trick that i used: on spectrum the characters are set to "slow" to talk, on amstrad i was setting the characters to "quick" to talk, hence the quick text. Now the character is set to "slow" like on spectrum and the bubble is even more quick.

That means too that the game is overall more quick, because of the incredible waste of 50,0000us every time that a character was speaking every 2 letters (teachers on other rooms plus teacher on our classroom), all the game was slowing down, now this is solved. The 43us gained on the tile paint is clearly visible when there are not much characters on screen, Eric will run like hell (before even on this situation Eric was very slow)

I will not publish this beta, i have more ideas to do before...
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: KaosOverride on 01:07, 06 July 15
LOL  Turbo Skool Daze!!!!  :P
Title: Re: Skool Daze port for CPC (beta news)
Post by: Joseman on 08:11, 06 July 15
Quote from: KaosOverride on 01:07, 06 July 15
LOL  Turbo Skool Daze!!!!  :P

Not exactly, to be fair i'm shortening the delay that the game has on the mainloop, thanks to this i can make the impression of the game being more quick than on spectrum, if the delay were shortened on speccy the game will be a lot quick than on cpc!
Title: Re: Skool Daze port for CPC (beta news)
Post by: arnoldemu on 08:28, 06 July 15
@Joseman (http://www.cpcwiki.eu/forum/index.php?action=profile;u=135): I think you're doing great.

I see that now you have the game working you can optimise some of the code for CPC to improve it's speed :)

What would be interesting is if the game could be re-coloured for mode 1. I think this could be possible but it would mean extra ram for the pixels and extra code for the drawing.

EDIT: The job to recolour would be easier (here I mean the coding), because you have the source and this makes it easier to organise for the new code.
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: Neil79 on 12:17, 06 July 15
Ah man I can't wait for the next version then, keep up the great work :D
Title: Re: Skool Daze port for CPC (next beta update)
Post by: Joseman on 23:17, 06 July 15
Hi

This night i was playing redoing the logo and colouring it... by the way i implemented aplib and compressed it.

Can anyone tell me a good and powerful sprite cpc editor for windows?

As you see, I don't know how to make a good logo and scorebox section  :laugh: ... IF anyone wants to help me with this, i will be very grateful!

(http://s11.postimg.org/ixt0mqlwj/marcadores_coloreados.png)


see you!
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: Morri on 08:41, 07 July 15
I would recommend RGAS (Retro Game Asset Studio) (http://www.cpcwiki.eu/index.php/Retro_Game_Asset_Studio) which was written by @lachlank (http://www.cpcwiki.eu/forum/index.php?action=profile;u=133) . Excellent PC based program which is easy to use and even includes a level designer and is compatible with CPCtelera.
Title: Re: Skool Daze port for CPC (next beta update)
Post by: Neil79 on 11:40, 07 July 15
Quote from: Joseman on 23:17, 06 July 15
Hi

This night i was playing redoing the logo and colouring it... by the way i implemented aplib and compressed it

see you!


Nice!! Now all you need is coloured walls :D
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: zeropolis79 on 13:09, 07 July 15
I was thinking it needed some colour to it..
Title: Re: Skool Daze port for CPC (next beta update)
Post by: arnoldemu on 13:16, 07 July 15
@Joseman (http://www.cpcwiki.eu/forum/index.php?action=profile;u=135): It is better already!
The colours improve it.

(Also consider a colour split so the score part uses different palette ;) )

Ok i stop now ;)

Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: Joseman on 14:22, 07 July 15
Quote from: Morri on 08:41, 07 July 15
I would recommend RGAS (Retro Game Asset Studio) (http://www.cpcwiki.eu/index.php/Retro_Game_Asset_Studio) which was written by @lachlank (http://www.cpcwiki.eu/forum/index.php?action=profile;u=133) . Excellent PC based program which is easy to use and even includes a level designer and is compatible with CPCtelera.

Already used RGAS to remake the logo, but i miss some copy & paste options to automatize the tasks... I didn't see this options on RGAS...

Quote from: Neil79 on 11:40, 07 July 15

Nice!! Now all you need is coloured walls :D

Already tried to put 2 colors to walls and 2 colors to sprites... but then you have the anoying spectrum attribute class... it's more hard than you can think... is a BIG task, recolour all and make the sprites to act without attribute class... i don't know if i'll have the patience necessary... if any graphic master helps... maybe...

Quote from: arnoldemu on 13:16, 07 July 15
@Joseman (http://www.cpcwiki.eu/forum/index.php?action=profile;u=135): It is better already!
The colours improve it.

(Also consider a colour split so the score part uses different palette ;) )

Ok i stop now ;)

Already considered colour split... but you loose cpu time for virtual nothing... and you're cheating people with only the score box with different colors...  i don't know... i will think on this when it's time...

Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: Carnivius on 15:49, 07 July 15
How were Spectrum graphics done?  I mean were they all black and white as a base and then had the relevant colours 'switched on' in each 8x8 block?   Is that why this game comes out pure black and white on CPC cos of the different ways they colour?

I think I like the black and white look more than the Spectrum original's seemingly random splashes of unattractive colours.  Makes it look like a era from decades ago like it is (and school experiences have changed a fair deal since the 80's when it came out).   Still it would be fun to have a go at colouring it sensibly if the code allows for it.
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: Joseman on 19:04, 07 July 15
Quote from: Carnivac on 15:49, 07 July 15
How were Spectrum graphics done?  I mean were they all black and white as a base and then had the relevant colours 'switched on' in each 8x8 block?   Is that why this game comes out pure black and white on CPC cos of the different ways they colour?

exactly, it's like you describe.

The graphics are purely: "pixel on" or "pixel off", the thing work like this:

first they calcule the attribute ram color address (#5800 - #5AFF) of every 8x8 block they want to colour and put the attributes: colour, brightness & flash.

After that, with a simple calculation based on the attribute ram direction they calculate where the 8x8block they coloured will be painted on the screen ram.

simple as that... on spectrum.

On Amstrad this is a nightmare, the graphic data is 1bpp, and i don't know how emulate the attribute ram of the spectrum (i didn't think too much on it), how many cpu time is needed to do something like that... I think that the original R-Type do something like this on the CPC port. If i have this code perhaps... but the attribute clash will be present on the AMSTRAD!

And the problem is not only the graphics are 1bpp: they are stored in diferent ram locations, at equanimous positions to do the calculations more easy... to recolour the graphics on cpc, the graphics will be twice the size, they need to be moved to their (different) screen locations to another where they fit... i'm not a good coder, not a good graphic designer, but i can see a lot of trouble doin' that...


Title: Re: Skool Daze port for CPC (little update)
Post by: Joseman on 19:08, 11 July 15
Hi

Today i had some time to take a look to the speech bubble annoying bug of "extra black" pixels on the letters, this was a little hard to track bug, the error could be somewhere on the 4 functions that use the speech bubble, but, at last the bug is corrected.

The problem was (as usual) bad implemented code on the cpc side, things that works on spectrum they wont on cpc, as on speccy they rely on the carry flag to set spaces, but on amstrad i can't rely only on the carry flag to do pixel movement, i have register a and one variable that needed to be re-set every letter (on speccy it worked only with the carry flag not set), whithout reset this 2 variables, the space is converted on the last pixels that the last displayed letter had, hence the annoying extra black pixels.

(http://i58.tinypic.com/m80mmb.png)

bye!
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: yurif74 on 08:58, 13 July 15
Quote from: Joseman on 19:04, 07 July 15
exactly, it's like you describe.

The graphics are purely: "pixel on" or "pixel off", the thing work like this:

first they calcule the attribute ram color address (#5800 - #5AFF) of every 8x8 block they want to colour and put the attributes: colour, brightness & flash.

After that, with a simple calculation based on the attribute ram direction they calculate where the 8x8block they coloured will be painted on the screen ram.

simple as that... on spectrum.

On Amstrad this is a nightmare, the graphic data is 1bpp, and i don't know how emulate the attribute ram of the spectrum (i didn't think too much on it), how many cpu time is needed to do something like that... I think that the original R-Type do something like this on the CPC port. If i have this code perhaps... but the attribute clash will be present on the AMSTRAD!

And the problem is not only the graphics are 1bpp: they are stored in diferent ram locations, at equanimous positions to do the calculations more easy... to recolour the graphics on cpc, the graphics will be twice the size, they need to be moved to their (different) screen locations to another where they fit... i'm not a good coder, not a good graphic designer, but i can see a lot of trouble doin' that...
Hello, just talking, i'm not a good coder :)
but could you use the attribute ram (#5800 - #5A00) to draw different color? before drawing the screen look at the attribute ram and draw the appropriate color. or at least you could use a "color map" since there are only block of colours (different room colors) you could draw different colour when drawing particular room..
just an idea, do not know if it is really feasable
Juri
Title: Re: Skool Daze port for CPC (little updates and thinking)
Post by: Joseman on 18:22, 13 July 15
Quote from: yurif74 on 08:58, 13 July 15
Hello, just talking, i'm not a good coder :)
but could you use the attribute ram (#5800 - #5A00) to draw different color? before drawing the screen look at the attribute ram and draw the appropriate color. or at least you could use a "color map" since there are only block of colours (different room colors) you could draw different colour when drawing particular room..
just an idea, do not know if it is really feasable
Juri

Yes, it was my first approach to the problem... do some interrupt that constantly read the attributte ram, and traslate to the screen ram the colors set at anytime...

I don't know if it is feasible this way, but i'm sure that this will waste a LOT of cpu time, and the attribute clash will burn out our poor cpc eyes...

Na, if i consider to put colors in this version (i'm not sure), i will redo the school graphics to cpc mode1 tiles and perhaps even use hardware scroll... but is possible that this will never occur...


Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: TFM on 18:48, 13 July 15
One Question: Since this works in MODE 1 ... can all four colors be used in the screen? Or would this be a total mess up of the game? Err... can GFX be replaced by 4 col. GFX? Or does the game work with 2 col. GFX in general? Probably it won't work? Or could it?

Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: MacDeath on 20:22, 13 July 15
looks like a quite straight ZX81 port....  ;D
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: Joseman on 21:21, 13 July 15
@MacDeath (http://www.cpcwiki.eu/forum/index.php?action=profile;u=221) you know that i would LOVE that you re-make the logo, lesson and scoreboxes  :P
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: seanb on 13:47, 31 July 15
Just tried it and I would've loved to have played this as a child.

Not sure what to do (I've read a walkthrough now) and when I went to the map room I feel over for no reason and couldn't get up again.

I ended up with two teachers giving me lines until I was expelled.  Just like real life  ;D

Look forward to the finished release
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: Joseman on 17:03, 31 July 15
Quote from: seanb on 13:47, 31 July 15
Just tried it and I would've loved to have played this as a child.

Not sure what to do (I've read a walkthrough now) and when I went to the map room I feel over for no reason and couldn't get up again.

I ended up with two teachers giving me lines until I was expelled.  Just like real life  ;D

Look forward to the finished release

Glad that you like the great speccy conversion that i made  ;D

The game is working at 99%. I've played many hours on the real CPC without any problem.

You can hit all the shields and after, discover all the letters of the password... I don't know if the history master letter is possible to get, but i think that this part of the code must be working, as the blackboards are working... then you run to the safe to get the report (i don't know if this part works), and finally, you need to re-hit all the shields (this part almost certainly won't work), but trust me, you need to play many times to get to this part of the game...

If you are hit and you fall on the floor, you can get up by pressing 's'. you get hit at any time by the other characters or the pellet, you will press 's' a lot of times!

Any other problem you see, tell me!





Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: seanb on 17:07, 31 July 15
I was using the joystick.
when I went down I did the classic mash the buttons to find one that worked.
Thanks for letting me know what button to press.

I really want to play the completed game and beat it.
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: ||C|-|E|| on 18:29, 31 July 15
I am looking forward to try this in the Plus  :D . I think that I will be able soon, because I have already ordered the HXC today. The game looks really great!
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: Joseman on 18:38, 31 July 15
Quote from: seanb on 17:07, 31 July 15
I was using the joystick.
when I went down I did the classic mash the buttons to find one that worked.
Thanks for letting me know what button to press.

I really want to play the completed game and beat it.

Unfortunately there are too many keys to control eric for using only the joystick.

Here are the instructions of the game: http://www.worldofspectrum.org/pub/sinclair/games-info/s/SkoolDaze.txt (http://www.worldofspectrum.org/pub/sinclair/games-info/s/SkoolDaze.txt)

Now the game is on pause until the end of summer, because i don't have time now to dedicate to it.

As well I want to assemble JustCPC too...

Anyway... You can play it a lot of times, until you reach the bugged zone i think...




Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: TFM on 21:51, 31 July 15
Quote from: Joseman on 18:38, 31 July 15
Anyway... You can play it a lot of times, until you reach the bugged zone i think...
... The bugged zone! ... the new horror shocker game for the Amstrad. Legal age is 21, only play after midnight!  :)  Couldn't resist - it just sounds too great!  :)


Anyway, great proceedings. It's really a cool project and I wish you all luck to it. But I guess you're like 99% done now. Thanks a lot for this !!!! Just awesome!!!
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: yurif74 on 20:57, 25 October 15
any news?  :)
Title: Skool Daze port for CPC (december update)
Post by: Joseman on 01:59, 11 December 15
Ok, it was time to make some progress on the game...

I don't have time, and not the best period of my life for it, but I promised to finish this port, and i want to do it sooner or later.

I've fixed the unflash the shields part of the game (they need to be unflashed after open the safe).

At this time the game can be completed, you can flash the shields, retrieve the letters from the teachers, put the year of birth of mr. Creack on any empty blackboard and get the letter from him too, put the correct combination (letters from teachers) of the safe on any blackboard, open the safe, unflash all the shields again, and the game will congratulate you for it and move on to the next class at school...

I'll need to play the game from start to finish to make sure that there aren't new bugs...

After this, the final part of the port: change the shields sprite when you hit them the first time... it's not as easy as it seems, because the sprite data is disperse in the code, but no problem at all, only patience...

and that's all for the moment!


P.S. oh and a decent scoreboard!

Title: Re: Skool Daze port for CPC (december update 2)
Post by: Joseman on 16:38, 11 December 15
Ok

I've tested the game on winape and it can be complete, and i think bug free...

Tomorrow i'll try it on a real cpc...

(http://i63.tinypic.com/2dabsid.png)
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: Sykobee (Briggsy) on 01:21, 12 December 15
Great work.


Quick graphics suggestion, but it might require some jiggery-pokery of the screen position - could you use the hardware interrupts to change the grey on each floor? E.g., the top floor could be grey-blue, the middle pastel-green and the bottom pink.


Obviously anything that involves actually *using* 4 colours would mean a significant rewrite of the rendering code for both the backgrounds and the sprites (although the sprites would be an obvious place to start), as well as re-drawing everything. It would really improve the look of the game however (and the raster effect could continue to be used).
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: Joseman on 02:14, 12 December 15
Hi

I can use the 4 colours on screen if i want, 2 for the school, 2 for the teachers / students, the problem is that the sprites are displayed speccy style only 2 colors and overlay the sprites with the school, this means that if i paint 2 colors for the school and 2 colors for the sprites then we have the famous attribute clash from speccy right front of our cpc!! I think that this is not tolerable.

About the hardware interrupts i don't know if that can avoid the attribute clash effect... i doubt that, but if you can type some example code i can try that, but only if the attribute clash is avoided!!

Another solution is to paint the sprites on screen cpc style, but i suspect that this way we need to consume more t-states, and the game is only a little slow than on speccy right now that i think is tolerable, the game is playable and even more fast than on speccy if there are not many sprites on screen...




Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: seanb on 13:37, 13 December 15
We don't like colour clash round these parts mister  :D
Looking forward to the final release
Title: Re: Skool Daze port for CPC (Beta 4 available)
Post by: Sykobee (Briggsy) on 00:35, 14 December 15
For the hardware interrupt to work using the CPC Gate Array's 300Hz timer you'd have to try to ensure that the interrupt happened in one of the raster lines that make up a ceiling. Unfortunately, the interrupts aren't exactly 48 lines apart like the different floors in the school - they're 52 scan lines apart (Interrupts on the CPC/CPC+ and KC Compact (http://cpctech.cpc-live.com/docs/ints.html)).


I guess the Spectrum sprite code is using the Speccy standard: Read background. (Optional store for the restore phase). Mask (AND) with sprite mask. Render sprite data (OR).
Hence to fix it on the CPC would require rewriting the entire sprite code and redoing the sprites too (merge the mask and sprite into a single 2-bit CPC graphic where 0=transparent). A lot of painful work when porting existing code.
If you are lucky and the code allows it, you could do the sprite rendering->cpc format translation within the sprite renderer code and thus achieve different colours. But I don't think the gains for this method are worthwhile. And you may be dealing with a game that renders offscreen then does a single copy (I think Ant Attack did that?) to screen memory, because Speccy screen layout is even worse than the CPC...


And yes, please avoid attribute clash :-)
Title: Skool Daze port for CPC (FINISHED)
Post by: Joseman on 13:51, 31 December 15
Hi Guys

finally the port of Skool Daze for CPC is finished.


I knew that i wanted the port finished before 2016, as a gift for chrismas :) and i knew that i didn't want to waste more time on 2016 with the port.


I've been working on the port intensely this last days and enough is enough, i'm tired and i wanted to finish and stop developing the port.

Anyway, doing the port has been a great time and joy for me, i've learned a LOT with it, i know now how a game is coded from scratch because i've learn all the source code of this game, i really think that i can move on and code a game from scratch... but that thing is not going to happen anytime soon :).

Now there is a MENU with several options:

-the menu can be used with keys and joystick 1, the options with the joy are choosen with the direction keys...

-there is a credit screen (when you hit play) where i thanks many people and this forum for the great help and support.

-Instructions, i've typed the original instructions of the game and there is an option to see them. It was a lot of work, please read the instructions one time! :D. The character set used is a font that i've converted some time from a very well know game, anyone knows wich game?

-Change colors, yes, the game still have only 2 colors for graphics, but, you can choose the colors you want to use. Anyway, the giveline bubble is in 2 different colors than the rest of the graphics and the scoreboard is "multicolor". The changes will be saved on disk.

-Change keys, now you can redefine keys, yes, you can use 2 joysticks and redefine all the keys on them. Great!! the gx4000 can now run the game... oh wait... you can't write on the blackboards and therefore the game can't be completed, but, the game can run on it till almost the end! or if any little boy goes to tell you something... Forget the gx4000  :laugh: . Take care of your redefinition, if you use letters, when you write on the blackboard the letters will be changed with your redefinition!!.


I wanted to make a reduced version for the cpc464 with cassette, but i'm tired really, i don't know if the game will work on cassette, but i think that with disc.bas, menu.bin, dt3.bin, dt1.bin, dt2.bin, inks.def & keys.def in that order the game should work on tape. keep in mind that the menu.bin is coded with disc in mind, there isn't almost any compression, the file is about 20k's that i think is a waste of time for a cassette load, but it is the way it is :).


I've been working on the port for a year and i don't want to continue adding features any time soon, if there is a critical bug, then will be fixed. if not then it will be not fixed... soon.

There is a LOT of work in this port, a LOT of code to make this port work on the CPC. I've docens of papers of code and anotations, i know that as time will pass i'll forget how the port works, it's possible that the final version of the port will be this and i will not work on it anymore.

I'll play to the end the game one last time and if it can be completed without hang, i'll send the game to CPC POWER to include it as a new game for our beloved CPC ;)

Thanks for your support.

Here is the DSK, enjoy and happy new year!!


Skool Daze FINAL VERSION 30-12-2015.dsk (http://ge.tt/10DYysU2/v/0)


Title: Re: Skool Daze port for CPC (FINISHED)
Post by: Lazy Dude on 16:13, 31 December 15
cool, I will be having a pop at this then.

I still find myself asking why did it never exist on the CPC all those years ago!
Title: Re: Skool Daze port for CPC (FINISHED)
Post by: alex76gr on 16:17, 31 December 15
Joseman you are awesome! :)
Thank you so much for this.
Title: Re: Skool Daze port for CPC (FINISHED)
Post by: CraigsBar on 17:56, 01 January 16
Fantastic project, great to see it finished. Many many thanks, I know I am playing under emulation (since I am not at home) tonight!
Title: Re: Skool Daze port for CPC (FINISHED)
Post by: Gryzor on 19:28, 16 January 16
A bit late, but thanks for doing this man... perfect for Sunday morning's cup of coffee :)
Title: Re: Skool Daze port for CPC (FINISHED)
Post by: Paulo Garcia on 22:37, 17 January 16
 Hi

the link to download seems broken. Do you have another link to provide?

If not, PM me the images and I can host for you.


Thanks

Title: Re: Skool Daze port for CPC (FINISHED)
Post by: Joseman on 00:22, 18 January 16

Yes, the game is now on cpc-power!

skool daze 4 cpc &copy _public_domain_ (2015) (http://www.cpc-power.com/index.php?page=detail&num=12009)

There is a problem with the dsk that is actually on cpc-power, it doesn't work with cpc464 - DDI.

I just sent today a fixed version to kukulcan that i hope will be uploaded soon!

This version has a second loader called "464.bas" that is more faster than the "disc.bas" loader, but it has no option menu!.

Wait that the fixed dsk is on cpc-power, and then put on whatever page / pages you want, feel free to distribute!

Regards
Joseman




Title: Re: Skool Daze port for CPC (FINISHED)
Post by: Gryzor on 14:20, 19 January 16
Hey man, why not upload it here too, really? :)
Title: Re: Skool Daze port for CPC (FINISHED)
Post by: TFM on 18:23, 19 January 16
What's the aim of the game? What do I need to do? Any docs available?  :)

Title: Re: Skool Daze port for CPC (FINISHED)
Post by: Joseman on 21:27, 19 January 16
Hi

Here it is the last version 464 compatible

Skool Daze FINAL VERSION [v2 - 464 compatible].dsk (http://ge.tt/3knSo1W2/v/0?c)

Feel free to distribute and upload - link it wherever you want.

@TFM (http://www.cpcwiki.eu/forum/index.php?action=profile;u=179) there are instructions on the game menu!!!

Hope & glad that you like the port!

P.S. anyone wants / can make a CDT out of this?



Title: Re: Skool Daze port for CPC (FINISHED)
Post by: TFM on 19:22, 20 January 16
Uups, my internet provider (Tulane University) blocks this site due to content filtering. Sadly that happens more often. Can please somebody attach the game file and instruction here in the forum? That would be nice.  :)
Title: Re: Skool Daze port for CPC (FINISHED)
Post by: Gryzor on 11:24, 01 February 16
I uploaded it here. I hope @Joseman (http://www.cpcwiki.eu/forum/index.php?action=profile;u=135) doesn't mind?
http://www.cpcwiki.eu/forum/index.php?action=dldir;sa=details;lid=3943 (http://www.cpcwiki.eu/forum/index.php?action=dldir;sa=details;lid=3943)
Title: Re: Skool Daze port for CPC (FINISHED)
Post by: Joseman on 19:53, 01 February 16
Quote from: Gryzor on 11:24, 01 February 16
I uploaded it here. I hope @Joseman (http://www.cpcwiki.eu/forum/index.php?action=profile;u=135) doesn't mind?
http://www.cpcwiki.eu/forum/index.php?action=dldir;sa=details;lid=3943 (http://www.cpcwiki.eu/forum/index.php?action=dldir;sa=details;lid=3943)

absolutely!, feel free to upload wherever you want!
Title: Re: Skool Daze port for CPC (FINISHED)
Post by: Gryzor on 14:55, 02 February 16
Cheers man!
Title: Re: Skool Daze port for CPC (FINISHED)
Post by: Phantomz on 15:39, 02 February 16
Quote from: Joseman on 21:27, 19 January 16
P.S. anyone wants / can make a CDT out of this?

I don't know how to make a CDT, but do you want a cpr for plus users too, I know it won't work on the GX4000 because there are to many keys.  ;)

464 Plus users with a C4CPC could play the game a lot quicker than a CDT, I know someone still needs to make a CDT for normal CPC users.

I could also upload the version with the disc loader and not 464 loader, for 6128 users but people wouldn't be able to change colours like it says in the menu as can't save to the disc image in the cpr.  :doh:

Let me know if you want me to upload the 464 version here or both 464 and 6128 version.  ;)

Thanks for making this great port, I've never played the game but I remember my best mate at school going on about it, so I'll check it out when I have some free time ( away from making cpr's ).  :laugh:
Title: Re: Skool Daze port for CPC (FINISHED)
Post by: Joseman on 23:49, 04 February 16
Quote from: Phantomz on 15:39, 02 February 16
I don't know how to make a CDT, but do you want a cpr for plus users too, I know it won't work on the GX4000 because there are to many keys.  ;)

464 Plus users with a C4CPC could play the game a lot quicker than a CDT, I know someone still needs to make a CDT for normal CPC users.

I could also upload the version with the disc loader and not 464 loader, for 6128 users but people wouldn't be able to change colours like it says in the menu as can't save to the disc image in the cpr.  :doh:

Let me know if you want me to upload the 464 version here or both 464 and 6128 version.  ;)

Thanks for making this great port, I've never played the game but I remember my best mate at school going on about it, so I'll check it out when I have some free time ( away from making cpr's ).  :laugh:

Thanks for the "great port"  compliment, well, i think that at least is better than the c64 version that was commercialized!.

Feel free to make CPR versions of 464, 6128 or both versions and upload wherever you want!.



Title: Re: Skool Daze port for CPC (FINISHED)
Post by: Phantomz on 01:18, 05 February 16
Quote from: Joseman on 23:49, 04 February 16
Thanks for the "great port"  compliment, well, i think that at least is better than the c64 version that was commercialized!.

Feel free to make CPR versions of 464, 6128 or both versions and upload wherever you want!.

You're welcome.  :)

I'm not sure where else to upload them , so I've added them below.  :)
Title: Re: Skool Daze port for CPC (FINISHED)
Post by: nitrofurano on 11:49, 26 March 16

@Joseman (http://www.cpcwiki.eu/forum/index.php?action=profile;u=135), if you have a GX4000/CPC+ cartridge version of it, please share the link in the first message of this thread! :) (on emulators running from EmulationStation it's far easier to run from imagecartridges than from imagedisks or imagetapes)
Powered by SMFPacks Menu Editor Mod