News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Carnivius

Getting an image onto a CDT file

Started by Carnivius, 15:24, 09 March 14

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Carnivius

Ok now that I have the ability to load CDT files into my real CPC, how do I go about copying over an image file as I'd like to see how some screenshots of my CPC-style projects look on my real CPC 464 to check various sprites and tiles look ok?


I know I can load in images into JavaCPC Paint but i don't know how to then make it a CDT file and then view it on the CPC (what kind of graphics program do I need on there or is there a way to make it a self-displaying file)
Favorite CPC games: Count Duckula 3, Oh Mummy Returns, RoboCop Resurrection, Tankbusters Afterlife

Devilmarkus

#1
This should be simple in JavaCPC, too:

I guess you are using Windows, so you can save a SCR to your PC with JavaCPC Paint...

Next step is:
Follow JavaCPC's menu:
Extras -> Create a CDT

There a little GUI opens up.

In the first field next to the "Create" button: Click "Create", find a folder where you want to store your CDT file in and enter it's filename e.g. myfile.cdt
Then: The first empty field: Click "Add" and select the .SCR file here.
Last step: Click "Build" and that's it...

Loading your SCR into your real CPC:
LOAD"!",&C000:CALL &C7D0 -> this call restores the palette and screen mode...

Loading an overscan SCR should be possible, too:
OPENOUT"D":MEMORY &1FF:LOAD"!",&200:CALL &811
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Carnivius

Dude, you are pure awesome.   That was very easy to follow and quick to do thanks!   Will post a photo in my RoboCop Prime topic (well technically it's Gryzor's topic since he started it but it's my project hehe).
Favorite CPC games: Count Duckula 3, Oh Mummy Returns, RoboCop Resurrection, Tankbusters Afterlife

Carnivius

I just tried that overscan code with a piece I saw on Pixel Joint today by a user named Brink (click the image to go to the PJ gallery page for it)










Is strange in that unlike the 320x200 sorta of size which you can see loading in lines, the loading for this image doesn't do anything at all until the image has finished loading and then it just appears!   Anyways very cool.   I've written out the codes for both normal and overscan image loading and stuck them by my CPC cos there's no way I can ever remember them otherwise.  :P
Favorite CPC games: Count Duckula 3, Oh Mummy Returns, RoboCop Resurrection, Tankbusters Afterlife

ralferoo

Quote from: Carnivac on 17:51, 16 March 14
Is strange in that unlike the 320x200 sorta of size which you can see loading in lines, the loading for this image doesn't do anything at all until the image has finished loading and then it just appears!

Not that strange. In the normal 320x200 case, you're loading the image at &c000 which is the normal screen address. You're then running a bit of code at &c7d0 which sets the colours. This is possible because, due the the way the screen works, you have 8 lots of 80*25 bytes, each followed by 48 unused bytes. And so, it's possible to put a very small program in this invisible region.

For overscan, the screen is bigger, so it can't just be loaded straight into screen memory. Instead, it is loaded elsewhere and (probably, I've not actually looked at what the code you're using does), unpacks the image to &4000. This will extend past &8000, and again due to the way screen memory works, it'll be arranged as 8 lots of SOME bytes followed by (2048-SOME) unused bytes. Of course, it might also use lower memory as it loads to &200...

Either way, the chip that's responsible for controlling the size of the screen will need to be reprogrammed to make the screen bigger, and as it'll no longer fit within the 16KB that's normally reserved for the screen, it'll end up straddling 2 consecutive 16KB banks. It can't load directly into screen memory because before &c000 is important system data and after screen memory, it wraps around to &0000 and there again is important system data. Even if it was possible, it'd look add as each line would be staggered from the last because each line now contains more data.

Carnivius

Quote from: ralferoo on 18:15, 16 March 14
'some stuff that I partially understood'  :)


Ah ok.  Still it's quite a complex bit of code just to load a picture (the commands are listed in DevilMarkus' post above).   I didn't even know there was a command called 'openout'.
Favorite CPC games: Count Duckula 3, Oh Mummy Returns, RoboCop Resurrection, Tankbusters Afterlife

EgoTrip

The OPENOUT lets you load files into low memory, which ordinarily would not be allowed, there is a minimum you can set MEMORY to without the OPENOUT workaround. (Can't remember it off the top of my head). Presumably this is to protect BASIC programs and varaible workspace. The command's intended use is to save data such as variables and arrays to tape/disk - you'd follow it with something like WRITE#9 "Data Here"

MacDeath

#7
Nice isometric pixel art about the deepness of french culture... :laugh: 


From a dude called brink ?


Love the shadows.


post edit : cheese (camembert?) and baguettes... still no red wine, WTF ? you miss the whole point of being french... oh yeah, CPC... and berets... that's tipish french too...


jokes appart... hard to compose a big fullscreen. also I definitaly should produce some isometrics too.
CPC and mode0 and overscan and isometric are a huge massive badass great combo.


in this compo, we can see the great strenghts of the "colourfull" CPC palette and video modes...


192x256x16(mode0)... and a range of colour with no colour clashes enabling colourfull hues of more than 3 colours.


Sweet use of the skyblue doing transition between darkblue and cyan/pastel cyan (+black and white of course)


Nice use if the ... dark yellow ? as green, and dark red as shadow to get a woody/eathy feeling...
nice contrast with the great red hues... the dithering in blue in the foreground is well calculated... a,d the lighting and shadows effect are just awesomely well done.


And cartoonish style just fit too well.
and mode0 just fit naturally too well with isometric.


thx to brink for the lesson...seriously... actually.


perhaps orange instead of pink for the door ? (more woody and warm...)

Powered by SMFPacks Menu Editor Mod