Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get TIM GIMP plugin compiling for Gimp 2.10 #1

Merged
merged 4 commits into from
Mar 25, 2023
Merged

get TIM GIMP plugin compiling for Gimp 2.10 #1

merged 4 commits into from
Mar 25, 2023

Conversation

hornc
Copy link
Owner

@hornc hornc commented Mar 12, 2023

Relates to g4jc#1

I realise the last discussion on that issue was 6 years ago, but @gwald, are you still interested in this? Asking because literally yesterday I used your https://github.com/gwald/Yarexe repo to get some of my old hacky Yaroze/asm code I wrote using a custom-ish Amiga toolchain, running again for the first time in decades, and saw you had made changes this year (2023). Thanks for pulling all that code together!

quick start -- there could be mistakes and some broken features There are still many warnings, but no errors.

Converted using:

sed -i 's/\bGPlugInInfo\b/GimpPlugInInfo/g
    s/\bGParam\b/GimpParam/g
    s/\bGParamDef\b/GimpParamDef/g
    s/\bPARAM_/GIMP_PDB_/g
    s/GRunModeType/GimpRunMode/
    s/STATUS_CALLING_ERROR/GIMP_PDB_CALLING_ERROR/
    s/PROC_PLUG_IN/GIMP_PLUGIN/g
    s/PROC_EXTENSION/GIMP_EXTENSION/g 
    s/GStatusType/GimpPDBStatusType/g
    s/STATUS_EXECUTION_ERROR/GIMP_PDB_EXECUTION_ERROR/
    s/\bRUN_INTERACTIVE\b/GIMP_RUN_INTERACTIVE/
    s/\bRUN_NONINTERACTIVE\b/GIMP_RUN_NONINTERACTIVE/
    s/\bRUN_WITH_LAST_VALS\b/GIMP_RUN_WITH_LAST_VALS/
    s/\bGDrawable\b/GimpDrawable/
    s/GPixelRgn/GimpPixelRgn/
    s/GImageType/GimpImageType/
    s/RGB_IMAGE/GIMP_RGB_IMAGE/
    s/GRAY_IMAGE/GIMP_GRAY_IMAGE/
    s/INDEXED_IMAGE/GIMP_INDEXED_IMAGE/
    s/GDrawableType/GimpImageType/
    s/\bRGB\b/GIMP_RGB/
    s/\bGRAY\b/GIMP_GRAY/
    s/\bINDEXED\b/GIMP_INDEXED/
    s/\bNORMAL_MODE\b/GIMP_NORMAL_MODE/
    s/gimp_directory()/NULL/
    s/gimp_layer_height/gimp_drawable_height/g
    s/gimp_layer_width/gimp_drawable_width/g
    s/gimp_query_images/gimp_image_list/
    s/STATUS_SUCCESS/GIMP_PDB_SUCCESS/' tim.c

Since the original repo is archived I may just fork just the GIMP plugin parts and continue working on those.

quick start -- there could be mistakes and some broken features
There are still many warnings, but no errors.

Converted using:

sed -i 's/\bGPlugInInfo\b/GimpPlugInInfo/g
    s/\bGParam\b/GimpParam/g
    s/\bGParamDef\b/GimpParamDef/g
    s/\bPARAM_/GIMP_PDB_/g
    s/GRunModeType/GimpRunMode/
    s/STATUS_CALLING_ERROR/GIMP_PDB_CALLING_ERROR/
    s/PROC_PLUG_IN/GIMP_PLUGIN/g
    s/PROC_EXTENSION/GIMP_EXTENSION/g
    s/GStatusType/GimpPDBStatusType/g
    s/STATUS_EXECUTION_ERROR/GIMP_PDB_EXECUTION_ERROR/
    s/\bRUN_INTERACTIVE\b/GIMP_RUN_INTERACTIVE/
    s/\bRUN_NONINTERACTIVE\b/GIMP_RUN_NONINTERACTIVE/
    s/\bRUN_WITH_LAST_VALS\b/GIMP_RUN_WITH_LAST_VALS/
    s/\bGDrawable\b/GimpDrawable/
    s/GPixelRgn/GimpPixelRgn/
    s/GImageType/GimpImageType/
    s/RGB_IMAGE/GIMP_RGB_IMAGE/
    s/GRAY_IMAGE/GIMP_GRAY_IMAGE/
    s/INDEXED_IMAGE/GIMP_INDEXED_IMAGE/
    s/GDrawableType/GimpImageType/
    s/\bRGB\b/GIMP_RGB/
    s/\bGRAY\b/GIMP_GRAY/
    s/\bINDEXED\b/GIMP_INDEXED/
    s/\bNORMAL_MODE\b/GIMP_NORMAL_MODE/
    s/gimp_directory()/NULL/
    s/gimp_layer_height/gimp_drawable_height/g
    s/gimp_layer_width/gimp_drawable_width/g
    s/gimp_query_images/gimp_image_list/
    s/STATUS_SUCCESS/GIMP_PDB_SUCCESS/' tim.c
@gwald
Copy link

gwald commented Mar 12, 2023

Hi :)
Thanks for reaching out!
Re the NY code, please share it!
We compile NY games and demo's and package them up as PS1 cd images, similar to the Official Playstation magazine cover disc.
Here's the list of them so far: http://netyaroze.com/Media/Downloads#Net_Yaroze_Compilation_discs.

Re gimp,
I still use Gimp V2.8 (in a winXP PSX dev VM), but I wouldn't use it for exporting tim's.

I've been using the old paint shop pro 7 with the NY's tim photoshop plugin and img2tim in batch files.... and I'm pretty happy with that.

Compiling this for me, would be a huge pain, and I most likely wouldn't use it all that often.
But thanks all the same!

@hornc
Copy link
Owner Author

hornc commented Mar 13, 2023

@gwald No worries :) I'm running Ubuntu, and Gimp is my image editor of choice. Currently I'm just wanting a way to see what old files I have and how they fit together, and this plugin is now working well enough for that.

I'll consider adding to this plugin code if I need to. It seems like there are some Psxdev SDK specific features (VRAM viewer?) that don't do anything useful standalone.

My old homebrew Yaroze based assembly experiments all seem like works in progress, and a bit rough -- I'll share some of the source at some point. The output might not be that great, but there might be some interesting techniques in there. I remember having to cross reference the Yaroze Library reference book and figuring out what registers to use to pass in arguments to libps. It wasn't the most efficient way to develop, but it was fun :)

I'm half trying to figure out what I was coding back then, but also want to have another go as PSX assembly, maybe exploring the SPU which seems like it has quite a bit of potential for new projects.

@gwald
Copy link

gwald commented Mar 13, 2023

:D Very cool!
I've seen very little NY related assembly, and none TMK from an Amiga toolchain! :)
It's a very atypical combination, programming high level Net Yaroze in assembly, it's more a professional domain, then hobbyist, but the fact that it can be done is cool!
I was actually talking about NY assembly in the NY chat server (discord) a few weeks ago.

yes, the tim's require a VRAM X,Y coordinate, colour bit depth and a transparent colour set for the PS libs to load the TIM's into VRAM, which IMO was a PITA to deal with, thus the batch files which converts and sets these values.
But yeah, for a standalone viewer, they're meaningless, but for saving TIM's out they're important.

@hornc
Copy link
Owner Author

hornc commented Mar 13, 2023

@gwald I'm still working on pulling things together, but if you want a sneak peek, here's what I have so far:

https://github.com/hornc/psx-asm-cargo/tree/old-amiga/death

From some of my old files it looks like there were a few people writing tools for Yaroze on the Amiga, presumably for C, but I was working alone, and didn't share anything myself, I was just hacking around and figuring stuff out. If there is interest I'm happy to answer questions, and possibly share some of the tools if they are lost. Something called PSXControl is what I used to communicate over serial, released by a group called "Faeries Geneses" from Europe.

@gwald
Copy link

gwald commented Mar 14, 2023

I know there's a NY toolchain compiled for Amiga, on the NY-europe server:
http://www.netyaroze-europe.com/~CACTUS/ftp
But I recently found out that there was also one on a CD cover disc on an Amiga magazine, not sure if it was the same, I found it via: http://discmaster.textfiles.com and the disc is on archive.org

I was going to archive together some of the NY Amiga stuff I found along the way, but I never had an Amiga, and thought that it would be too many layers of niche, to be useful... so I'm very surprised!

Do you still have an Amiga or use an Amiga emulator?

If you have your Amiga toolchain and apps handy, I would say build a repo with it.

Thanks for sharing your assembly project, looks cool! :)

@hornc hornc merged commit a719aaf into master Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants