Jump to content
Jagware
SebRmv

Jaguar Image Converter

Recommended Posts

Zerosquare    10
Just tried Zeros convertors and they work great :) THANKS!
You're welcome ;)

 

SebRmv : to view CRY pictures on a PC, there's JagView, but it displays the colors slightly wrongly (so it's not a good tool for debugging). If I can find some time, I'll make a PC viewer for CRY files.

 

Share this post


Link to post
Share on other sites
SebRmv    2

Subsidiary question: how to view CRY15/RGB15 picture on a Jag?

I naively thought it was just needed to add VARMOD when setting VMODE, but it does not seem to work as I expect...

 

Share this post


Link to post
Share on other sites

Seb, I wouldnt worry about the colours being wrong - the output files are full of random pixels and don't wrap at the correct end of line positions. The pixels it does get in the right place are all the correct colour.

Share this post


Link to post
Share on other sites
Subsidiary question: how to view CRY15/RGB15 picture on a Jag?

I naively thought it was just needed to add VARMOD when setting VMODE, but it does not seem to work as I expect...

 

Put the jag in 16bit CRY and set VARMOD. Works fine :)

Share this post


Link to post
Share on other sites
SebRmv    2

Are these four images correct?

(these are ASM files, to include in a source file)

 

space.zip

Share this post


Link to post
Share on other sites

I tried all 4 in my app and they all looked like random data...

 

however your header in the .s says 320x200

 

the image i uploaded was 340x255.... so that might explain that

Share this post


Link to post
Share on other sites
SebRmv    2
I tried all 4 in my app and they all looked like random data...

 

however your header in the .s says 320x200

 

the image i uploaded was 340x255.... so that might explain that

 

yes, these are 320x200 images (this should correspond to the bmp you posted above)

Share this post


Link to post
Share on other sites
Zerosquare    10

I converted the files to binary (using a program written in 5 minutes ^^), and all of them display fine using the tool I posted yesterday. CRY15 and RGB15 files also work when using mixed-mode. So maybe there's something wrong with your display code, or your assembler is somehow generating junk...

 

Here are the files in binary form if it's useful : space.zip

Share this post


Link to post
Share on other sites
SebRmv    2

Would love to learn the final word of the story. Cyrano, could you please post the piece of code you are using? I can post mine if you wish (but it uses my library).

 

Anyway, I fixed a bug in my converter. The 15 bits mode were flawed, thanks for having spotted that (even if it seems it might be by accident :P)

The bad news is that I have to recompile a Windows compatible version if I want to make a binary distrib...

Share this post


Link to post
Share on other sites
SebRmv    2

Here is the code I used to test the four images... Just change the way VMODE is initialised depending on the image format.

 

#include <jagdefs.h>
#include <jagtypes.h>
#include <stdlib.h>

#include <interrupt.h>
#include <display.h>
#include <sprite.h>

#include <sound.h>

#include <joypad.h>

#include <console.h>

extern phrase image;

int main(int argc, char *argv[]) {
  SET_SHORT_INT(CRY16|CSYNC|BGEN|PWIDTH4|VIDEN,VMODE);     // for CRY16
//  SET_SHORT_INT(RGB16|CSYNC|BGEN|PWIDTH4|VIDEN,VMODE);     // for RGB16
//  SET_SHORT_INT(CSYNC|BGEN|PWIDTH4|VIDEN|VARMOD,VMODE);     // for CRY15/RGB15
  init_interrupts();
  init_display_driver();

  display *d = new_display(0);
  d->x = 16;
  d->y = 8;

  show_display(d);

  sprite *s = new_sprite(320,240,0,0,DEPTH16,&image);
  attach_sprite_to_display_at_layer(s,d,1);

  while(1) {
    vsync();
  }

  return 0;
}

Share this post


Link to post
Share on other sites
SebRmv    2

Here are the converted image (in ASM format)

 

NEBULA.zip

Share this post


Link to post
Share on other sites
SebRmv    2

Ok, so I'll have a look at the Windows port (if I am courageous enough)

 

Share this post


Link to post
Share on other sites
rocky1138    0

Sorry to bring this up from the dead but I can't find a copy of this anywhere. The Removers' website is down and searching google for "converter-0.1.8.tar.gz" brings up nothing.

 

Anyone got a copy I can have / anything on github?

Share this post


Link to post
Share on other sites
GT Turbo    5
Sorry to bring this up from the dead but I can't find a copy of this anywhere. The Removers' website is down and searching google for "converter-0.1.8.tar.gz" brings up nothing.

 

Hello,

 

The Removers website run nicely, i have done a download on it and it run :

 

http://removers.free.fr/softs/download.php

 

 

GT :poulpe:

Share this post


Link to post
Share on other sites
Orion_    1

I nice addition to this converter would be the "--header" option of the original tga2cry

I need to convert a lots of pictures with different size, so storing the width/height inside the final picture binary would be nice :)

you could store it using long, so width.l height.l makes 8bytes, the data are still phrase aligned :)

tga2cry have this option but it don't have the "auto pad width to phrase boundary", which is required for all the pictures I have

 

Share this post


Link to post
Share on other sites
SebRmv    2

Thanks for the suggestion. I will add the option very soon (hopefully tomorrow).

What is the exact behaviour of tga2cry when the --header option is enabled?

 

Once added, I plan to make a source release. Will you be able to build yourself the binary? I have not the compilation chain setup for windows...

 

Share this post


Link to post
Share on other sites
SebRmv    2

Just added the --header option. The source is available on my website.

It emits two words and a long corresponding to the height of the picture, the width of the picture, and the flags for the blitter (PITCH, DEPTH, WIDTH): this is to mimick tga2cry behaviour.

 

Share this post


Link to post
Share on other sites
Orion_    1

Thanks for the quick release, but, I tried to install ocaml on windows, it works but I can't compile camlimages :/

 

Zerosquare > thanks but I use rgb output, not cry :)

 

Share this post


Link to post
Share on other sites
SebRmv    2
Thanks for the quick release, but, I tried to install ocaml on windows, it works but I can't compile camlimages :/

 

Zerosquare > thanks but I use rgb output, not cry :)

 

Do you use a cygwin environment?

You need to take an old version of camlimages.

On archlinux, I packaged this version: https://aur.archlinux.org/packages/camlimages3/

I guess it should compile/work the same on windows/cygwin.

I hope you manage to compile it, because I am a bit lazy to install cygwin myself.

Please let me know. If you can't do it, I'll give it a try next tuesday at my office during the lunch break.

 

Share this post


Link to post
Share on other sites
Orion_    1

I tried all I can using cygwin but I'm still stuck when compiling camlimage, seems like a problem with autoconf

anyway, I finally made a little tool to adjust the width of the output from tga2cry, it was easier and faster to do..

hopefully someone can make a windows binary release of your tool one day :D

 

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×