Author Topic: Problem with ConvimgCPC  (Read 2559 times)

0 Members and 1 Guest are viewing this topic.

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 785
  • Country: es
  • Liked: 644
  • Likes Given: 433
Problem with ConvimgCPC
« on: 01:04, 05 February 16 »
Hi

I'm converting a PC screen of the game "Titanic" to make a menu for the cpc version and "upgrade" a little the disc loader...

The problem is that the converted screen is not centered, and i tried 1000 times to center it...

I like the results that ConvimgCPC brings to my screen but is not centered!!



anyone knows what can be happening???

and why Convimgcpc save the scr screens with a header of #50 bytes??

Thankyou!!



Offline Docent

  • CPC6128
  • ****
  • Posts: 166
  • Country: pl
  • Liked: 107
  • Likes Given: 0
Re: Problem with ConvimgCPC
« Reply #1 on: 02:57, 05 February 16 »
Hi

I'm converting a PC screen of the game "Titanic" to make a menu for the cpc version and "upgrade" a little the disc loader...

The problem is that the converted screen is not centered, and i tried 1000 times to center it...

I like the results that ConvimgCPC brings to my screen but is not centered!!



anyone knows what can be happening???

and why Convimgcpc save the scr screens with a header of #50 bytes??

Thankyou!!


ConvimgCPC adds an amsdos header to a cpc file it saves. The header consists of 128 bytes, added at the beginning of the file. The issue with centering is caused by these additional 128 bytes. If you want to read raw image to display it correctly, you need to remove this header.

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 785
  • Country: es
  • Liked: 644
  • Likes Given: 433
Re: Problem with ConvimgCPC
« Reply #2 on: 15:51, 05 February 16 »
ConvimgCPC adds an amsdos header to a cpc file it saves. The header consists of 128 bytes, added at the beginning of the file. The issue with centering is caused by these additional 128 bytes. If you want to read raw image to display it correctly, you need to remove this header.

Hi, thanks for the reply

Yes, the first thing that i thought that it was an amsdos header (#80 bytes) but, if you substract #80 bytes of the converted file the size of the file is: 16336 bytes (not 16384 bytes like a normal cpc screen), that is why I thought that it wasn't an amsdos header, but a special header of convimgcpc, then i substracted #50 bytes that leave the file on the normal 16384 bytes cpc screen.

I just tried now to substract #80 bytes and the 16336bytes file work correctly!!

But this brings me another question! why the 16336bytes file and not the 16384byte? i know that there is screen ram that is not displayed, perhaps this is the explanation? anyone knows why convimgcpc do it this way?

Thankyou again!






Offline Docent

  • CPC6128
  • ****
  • Posts: 166
  • Country: pl
  • Liked: 107
  • Likes Given: 0
Re: Problem with ConvimgCPC
« Reply #3 on: 18:18, 05 February 16 »
Hi, thanks for the reply

Yes, the first thing that i thought that it was an amsdos header (#80 bytes) but, if you substract #80 bytes of the converted file the size of the file is: 16336 bytes (not 16384 bytes like a normal cpc screen), that is why I thought that it wasn't an amsdos header, but a special header of convimgcpc, then i substracted #50 bytes that leave the file on the normal 16384 bytes cpc screen.

I just tried now to substract #80 bytes and the 16336bytes file work correctly!!

But this brings me another question! why the 16336bytes file and not the 16384byte? i know that there is screen ram that is not displayed, perhaps this is the explanation? anyone knows why convimgcpc do it this way?

Thankyou again!
The reason why the size of a screen saved by ConvImgcpc bar the header is not equal to 16384 is pretty simple. Screen memory layout of Amstrad is a bit weird and in default settings is built from 200 lines of 80 bytes. Each byte represents 8, 4 or 2 pixels depending on video mode. When you do the math you'll find that the visible screen actually takes only 16000 bytes. Due to the interleaved division of the screen memory into 8 blocks of 2048 bytes, the remaining 48 bytes of each block are not visible. Unfortunately due to interleave you cannot remove them all to have screen of exactly 16000 bytes, only the remaining 48 bytes of the last block can be cut. So it gives you 16384-48=16336  - the size of the screen saved by convimgcpc without amsdos header.
To summarize - don't bother about missing 48 bytes :)


Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1978
  • Likes Given: 4650
Re: Problem with ConvimgCPC
« Reply #4 on: 19:34, 05 February 16 »
Did you try another conversion program? Maybe the one of JavaCPC? But there is more out there. Suggesting that just to see if the problem is the source screen or the converter.

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline demoniak

  • CPC664
  • ***
  • Posts: 84
  • Country: fr
  • Liked: 71
  • Likes Given: 45
Re: Problem with ConvimgCPC
« Reply #5 on: 19:56, 05 February 16 »
Hi, thanks for the reply

Yes, the first thing that i thought that it was an amsdos header (#80 bytes) but, if you substract #80 bytes of the converted file the size of the file is: 16336 bytes (not 16384 bytes like a normal cpc screen), that is why I thought that it wasn't an amsdos header, but a special header of convimgcpc, then i substracted #50 bytes that leave the file on the normal 16384 bytes cpc screen.

I just tried now to substract #80 bytes and the 16336bytes file work correctly!!

But this brings me another question! why the 16336bytes file and not the 16384byte? i know that there is screen ram that is not displayed, perhaps this is the explanation? anyone knows why convimgcpc do it this way?

Thankyou again!

Yes, ConvImgCPC saves only 16336 bytes for a normal screen (no overscan) because the 48 left bytes are unused in the screen

Offline Docent

  • CPC6128
  • ****
  • Posts: 166
  • Country: pl
  • Liked: 107
  • Likes Given: 0
Re: Problem with ConvimgCPC
« Reply #6 on: 21:22, 05 February 16 »
Yes, ConvImgCPC saves only 16336 bytes for a normal screen (no overscan) because the 48 left bytes are unused in the screen

Btw, any chances for a new version of ConvImgCpc? I have 0.17 from 2011...

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 785
  • Country: es
  • Liked: 644
  • Likes Given: 433
Re: Problem with ConvimgCPC
« Reply #7 on: 21:56, 05 February 16 »
Btw, any chances for a new version of ConvImgCpc? I have 0.17 from 2011...

0.17??

The last i have is 0.16!!

Where can i download this version (or another new)

btw what is the purpose of an amsdos header on a scr file?
« Last Edit: 22:02, 05 February 16 by Joseman »

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1978
  • Likes Given: 4650
Re: Problem with ConvimgCPC
« Reply #8 on: 23:06, 05 February 16 »
btw what is the purpose of an amsdos header on a scr file?


It allows the CPC to load the picture. Without an Header it would be considered a text file.

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline ZbyniuR

  • 464 Plus
  • *****
  • Posts: 320
  • Country: pl
  • 6128 A1230 PSX Win7
    • Jedyne polskie forum o CPC. :)
  • Liked: 344
  • Likes Given: 146
Re: Problem with ConvimgCPC
« Reply #9 on: 00:45, 06 February 16 »
Joseman - You should put here scr file instead picture. Let us check it what the problem is. I converted hundreds pictures by ConvImgCPC and I never had problem with header. Binary files on CPC shoud have it, and this is information about file for OS, not part of file, end of story.

Anyway on your picture first line look black so it no header. For me it looks rather as wrong offset in register 13 in CRTC. There should be 0, what is normal after command MODE. :)

I found ConvImgCPC 0.17 here:
CPC-POWER, CPCArchives

In STARS, TREK is better than WARS.

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.795
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1033
  • Likes Given: 1747
Re: Problem with ConvimgCPC
« Reply #10 on: 01:00, 06 February 16 »
Joseman - You should put here scr file instead picture. Let us check it what the problem is. I converted hundreds pictures by ConvImgCPC and I never had problem with header. Binary files on CPC shoud have it, and this is information about file for OS, not part of file, end of story.


As far as AMSDOS is concerned, that is information for that Disk Operating System, though Joseman hasn't stated what Operating System their using.
I've read and displayed Screens using Turbo Pascal under CP/M (I've got such a program on my website), so when loading screens with AMSDOS Headers, space has to be allocated because the Header gets read too.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 785
  • Country: es
  • Liked: 644
  • Likes Given: 433
Re: Problem with ConvimgCPC
« Reply #11 on: 01:19, 06 February 16 »
The problem was the amsdos header, problem resolved!!

i'm loading the file with a simple load"menu.scr",&c000

just substracted the #80 amsdos header and all works correctly!

Thanks again to all!!



Offline fgbrain

  • CPC6128
  • ****
  • Posts: 231
  • Country: gr
    • index.php?action=treasury
    • Chaos CPC Homepage
  • Liked: 129
  • Likes Given: 304
Re: Problem with ConvimgCPC
« Reply #12 on: 14:36, 06 February 16 »
Biggest problem with all Demoniak's wonderful tools is total lack of documentation -at least in English... >:(

anyone can help perhaps??
_____

6128 (UK keyboard, Crtc type 0/2), 6128+ (UK keyboard), 3.5" and 5.25" drives, Reset switch and Digiblaster (selfmade), Inicron Romram box, Bryce Megaflash, SVideo & PS/2 mouse, , Magnum Lightgun, X-MEM, X4 Board, C4CPC, Multiface2 X4, RTC X4 and Gotek USB Floppy emulator.

Offline Docent

  • CPC6128
  • ****
  • Posts: 166
  • Country: pl
  • Liked: 107
  • Likes Given: 0
Re: Problem with ConvimgCPC
« Reply #13 on: 18:10, 07 February 16 »
Biggest problem with all Demoniak's wonderful tools is total lack of documentation -at least in English... >:(

anyone can help perhaps??

True, its very useful tool with very sparse documentation.
 I'd add only one functionality though - the possibility to mark a rectangle from loaded picture and convert and save just only the selected rectangle. 
Or perhaps there is such option in the program I did not know of? :)