News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

CPC PROGRAMMING TUTORIALS

Started by CpcPlusdoctor, 16:06, 22 August 20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

CpcPlusdoctor

Hello to all cpc users.
i have a cpc 6128 and one 6128 plus model with 512kb ram and duke's m4board.
i would like to ask it it has not been asked before,since we our beloved machine has so many expansion capabilities and everyone inlcuding me have programming skills i have the following suggestion-suggestions:
1-i am a graduate of computer science and have created many programms for win pc including games as well many progtrammes since i was young in cpc 6128.I would like to make some application or games for our beloved machine so i was wondering if someone more experienced has gathered any websites or utilities  for games creation in order to save us time from searching.this way we can contribute all in order to make more app.
2-Any good tutorial for programming in c as well as any good ide for cpc 6128?
3-any tutorial on how to port games from other machines?or at least any clue?
4-in order to begin,ConvImgCpc save my picture to SCR format.Any tutorial on how to include it in a GW-basic programme ,for example for just loading it?Also any tutorial on how to make it work from a real 3inches disc?(It will be a fantastic help and start!!!)
if someone has already searched for all of these it is good to share with the rest of the forum in order to save us time and help us contribute.
Thanks.

tjohnson

Suggest contacting @keith56 he has produced some good asm tutorials, he has a good website here https://www.chibiakumas.com/z80/ and had produced a great set of videos on YouTube, search for chibiakumas.  Cheers Trevor

robbarton

Hi @CpcPlusdoctor ,
While I am probably the last person on here to be giving programming advice (!), I do have a line I cribbed from somewhere that will help you to load SCR in BASIC.
First save your picture as PIC.SCR on your disc. Then type this and save as LOADER.BAS (or whatever you want):

10 MODE 0:INK 0,13:INK 1,26:INK 2,14:INK 3,23:INK 4,10:INK 5,16:INK 6,0:INK 7,4:INK 8,5:INK 9,12:INK 10,11:INK 11,3:INK 12,26:INK 13,22:INK 14,7:INK 15,13:LOAD"PIC.SCR",&C000


Running this will set the appropriate inks for a Mode 0 picture (you'll need to change these to correctly match yours based on the palette in your specific picture), then load from "PIC.SCR" into memory at &C000 and thus display it on the screen immediately.

Hope this helps!

SRS

Welcome, and if you like multi plattform arcade games try this: https://jonathan-cauldwell.itch.io/multi-platform-arcade-game-designer
For games in C look out for cpctelera (engine with lots of examples)
As for loading SCR of Amstrad in GW Basic I guess you need a special program,

Examples: 10 DEF SEG=&HB800 20 BLOAD"PICTURE", 0 The DEF SEG statement in line 10 points the segment at the screen buffer.
The DEF SEG statement in line 10 and the offset of 0 in line 20 guarantee that the correct address is used.
The BLOAD command in line 20 loads the file named picture into the screen buffer.
should not work :)


pelrun

Are you sure you mean *GW*-basic? On what machine? Or did you just thinko and meant our regular Locomotive Basic? Because you'll have trouble with SCR's on anything not using the CPC's vram layout.

Anyway for loading SCR's made by ConvImgCpc from Locomotive Basic there's an easier method than manually copying the palette; simply select the "Code->Img" option before saving (keep Packed and Linear *off*). Then you can load it and set up mode/palette automatically with:LOAD"image.scr":CALL &C7D0

teopl

for C game programming on CPC: cpctelera + wincpctelera + any ide you like should keep you busy for a long time :)

1. go to cpc retrodev page http://cpcretrodev.byterealms.com/juegos/ and download all games sources, look at them - there you can find tools and engines used also. and fun for many days.
(btw go to google and this forum programming section and do the same :) )

2. no ide for cpc but you can use wincpctelera with visual studio for very easy debugging on windows with great ide.

3. this depends very on a specific case but in any case porting requires either detailed knowledge of both platforms or ready to use tools (which we rarely can have)
for example, you must know possible resolutions, colors, how sound is created, speed limits, ... if you are porting from non z80 machine or game is not very simple, you will probably need to write it from scratch or most part. often graphics and music are "ported" also to fit the target limitations.

4. I don't know if there is GW basic for amstrad.

GUNHED

Quote from: CpcPlusdoctor on 16:06, 22 August 20
... I would like to make some application or games for our beloved machine so i was wondering if someone more experienced has gathered any websites or utilities  for games creation in order to save us time from searching.this way we can contribute all in order to make more app.

Serious programming on the CPC involves (IMHO) the usage of machine language. There are some nice C derivatives too, but only machine language provides full flexibility and power.

For programming machine language I would suggest FutureOS, because it supports lots of expansions, is the fastest OS for the CPCs and provides by far the biggest flexibility. Some examples are full usage of the 2nd register set of the Z80, all RST vectors, own interrupt entry if needed, and much more.
Informations can be viewed at www.futureos.de

Good luck with all your projects!
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Powered by SMFPacks Menu Editor Mod