PCEngineFans.com - The PC Engine and TurboGrafx-16 Community Forum

Tech and Homebrew => Turbo/PCE Game/Tool Development => Topic started by: Hippokittie on May 15, 2017, 11:15:20 AM

Title: HuC/ Magic Kit running concerns or alternatives?
Post by: Hippokittie on May 15, 2017, 11:15:20 AM
I am rather new to working with PCE games, and have programmed with C in the past. I tried downloading and using both Magic Kit and HuC. Neither of them are allowing me to use them. HuC doesn't create the PCE files, only Assembly files. Magic Kit just tells me I have the wrong operating system (Windows 7). I tried running different HuC versions, all with the same concerns. With that, I was advised there are other programs to program in C for PCE. Any advice on what to do to get either to work or to replace them? Thanks!
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: elmer on May 15, 2017, 11:55:51 AM
Which version of HuC are you using, and where did you get your Magic Kit?

What command line are you using to compile the C file?
What other files are in the same directory with your .c file?
Have you set up your Windows path? If so, to what?
Have you set up the PCE_INCLUDE environment variable? If so,  to what?
Are you comfortable with the Windows Command Prompt?
What *exactly* are the error messages that you get?

Have you checked out the latest version of HuC that's linked to on this page ...
http://www.pcenginefx.com/forums/index.php?topic=20120.msg436168#msg436168
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Hippokittie on May 15, 2017, 02:46:19 PM
Which version of HuC are you using, and where did you get your Magic Kit?

What command line are you using to compile the C file?
What other files are in the same directory with your .c file?
Have you set up your Windows path? If so, to what?
Have you set up the PCE_INCLUDE environment variable? If so,  to what?
Are you comfortable with the Windows Command Prompt?
What *exactly* are the error messages that you get?


3.21 is the version I am using of HuC (downloaded the one you sent me with similar concerns)
I got both from zophar.net

The concern is when I try to even launch the compiler (HuC or Magic kit) it doesnt launch. With HuC it simply opens and closes before I can type anything (so I tried dragging the .C file to it and it creats assembly files). Magic Kit says "The version of this file is not compatible with the version of Windows you're running."

The other files with my .C file are HuC, Isolink, Nesasm, pceas, pcxtool.

Was not advised I would need to setup a windows path before launching HuC.

The PCE_Include, is that in the program file or in a separate file? (like setting file for HuC)

I have had to use Windows Command prompt a fair bit with Steamworks, as well as with my Dos emulator for my old games.

Am I missing something?
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: elmer on May 15, 2017, 04:06:39 PM
3.21 is the version I am using of HuC (downloaded the one you sent me with similar concerns)
I got both from zophar.net

OK, thanks!  :)

If you're starting from new, I'd really recommend using the new version of HuC that's discussed in the forum thread here, it has a lot of improvements.

You don't need that old version of Magic Kit, and can delete it, HuC already includes a much newer version of it.


Quote
The concern is when I try to even launch the compiler (HuC or Magic kit) it doesnt launch. With HuC it simply opens and closes before I can type anything (so I tried dragging the .C file to it and it creats assembly files). Magic Kit says "The version of this file is not compatible with the version of Windows you're running."

That old version of Magic Kit won't run because it's a 16-bit executable that won't run under Windows 7.

HuC includes a 32-bit version that will run under Windows 7, but ... you seem to be expecting that HuC (and PCEAS) will act like a windowed application or an IDE (like Visual Studio).

They don't. They are command-line applications, just like the GCC compilers on Linux (and most traditional compilers).

Generally, to use the compiler, you open up a Command Prompt, navigate to the correct directory, and then type "huc whatever-your-file-is.c".


Quote
Was not advised I would need to setup a windows path before launching HuC.

The other files with my .C file are HuC, Isolink, Nesasm, pceas, pcxtool.

OK, if your .c file is in the same directory as the HuC executables, then you won't need to set up a PATH.

That's not good long-term, but you can work like that for a short while, until you're more familiar with the whole command-line environment.


Quote
The PCE_Include, is that in the program file or in a separate file? (like setting file for HuC)

And this is why your compile is failing. An error message is being printed in that box that flashes up, but you can't see it because the window closes too fast.

That's why people open up a command prompt ... it stays open, and you can see the error message.

You need to set up the PCE_INCLUDE enviroment variable so that HuC knows where to find all the include files and libraries that it needs to compile your C file.


Quote
Am I missing something?


Yep ... lots about how traditional development environments work.

But it's not your fault, it's that there is a real lack of decent HuC documentation.

You might want to  take a look here ...
http://obeybrew.com/tutorials.html

And here ...
http://www.archaicpixels.com/HuC_Setup


And I should add something to HuC to do a simple drag-n-drop-build for people that aren't comfortable with batch files and makefiles.  ](*,)
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Hippokittie on May 15, 2017, 05:04:41 PM
Okay so I went into my Windows System Properties Environment Variables naming the variable HuC and using the value H:\TG16\HuCPCENGINE\huc\include (where I have the pc engine stuff from the forum). I went into command prompt, typed in a system path to it with no result. Followed after I made a copy on my desktop, ran it through command prompt (as advised on archaic pixels) and it gave me no error. It brought up Usage: (file path), Compiler options, output options, linker options, assembler options, and Debugging options.

All seemed good.

I followed the instructions from Obeybrew (which is where I first looked and was advised to drag to the HuC file to make the pce :mrgreen: ) to type huc [mytitle here].c. Nothing.

I then reviewed another site ( http://www.magicengine.com/mkit/doc_asm_usage.html ) for a more clear answer (assuming I did the pointer wrong or was doing something weird). I am following the DOS instructions with the "set PCE_INCLUDE" in command prompt and it doesnt work (looking it up further takes me back to Environment Variables setup). I feel lost. I do thank you for your help here.

Side note, when I launched command prompt and went into the huc debugger and everything a thought came to mind (as it launched my Dev C++ and Context editor), wouldn't it be possible to import the compiler information into the C/C++ compiler programs (librarys and such) and have them create the .pce files as well? (Did something similar with Unreal script in college).
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: elmer on May 15, 2017, 05:49:40 PM
I'm sorry, but I've got lots of stuff that needs my attention tonight, but I'll write up a better response tomorrow.

In the meantime ... the include path that HuC wants ends in "\include\pce" and not "\include".

Don't worry ... your version is the right one for most compilers, but HuC wants the extra "pce" at the end, probably because they thought about doing an "\include\nes" at one point, but never actually did it.
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Hippokittie on May 16, 2017, 06:23:28 AM
I'm sorry, but I've got lots of stuff that needs my attention tonight, but I'll write up a better response tomorrow.

In the meantime ... the include path that HuC wants ends in "\include\pce" and not "\include".

Don't worry ... your version is the right one for most compilers, but HuC wants the extra "pce" at the end, probably because they thought about doing an "\include\nes" at one point, but never actually did it.

I thank you for your help here. I can C program alright, only reason I am going for that over assembly.
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Galad on May 16, 2017, 10:01:31 AM
I haven't used huc in a few years,downloaded the new huc,read elmers comments and it worked.Thanks Elmer :dance:


Edit:Forgot to mention,I extracted huc to C:\
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Hippokittie on May 18, 2017, 12:02:23 PM
With some tinkering and a video from Galad (thank you), I now have HuC working. Still raises the question is there a better one to use? I have HuCEngine downloaded and installed and have NO idea what it is used for haha, but it does allow me to type programs and compile them on it. Is HuC truly the best C programmer for Turbografx16?
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Galad on May 18, 2017, 03:53:37 PM
You're welcome
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: spenoza on May 19, 2017, 12:15:33 AM
How many C environments do you think there will be for such an underdog system in the west?
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Hippokittie on May 19, 2017, 10:35:01 AM
How many C environments do you think there will be for such an underdog system in the west?
Well I know of off hand 3 different ones already. I also heard about one on another forum that is a paid one that allows you to do NES, Snes, and Genesis games as well. I have also seen people use Context for Assembly TG16/PCE programming and used a file on their system to convert assembly direct to HuC files haha. More of a curious question than anything.
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Galad on May 20, 2017, 02:33:47 PM
How is Huc going for you Hippokittie?I'm uploading videos on youtube as I progress,learn the system and working with Huc.Started Learning how to use grafx2,mappy,I'll upload videos of these once I have a good grasp on them.Today I drew some sprites in Grafx2 and coded it's states in Huc,not much but it's a start.

https://www.youtube.com/watch?v=6VgEi3igM_w
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Hippokittie on May 20, 2017, 07:14:29 PM
Galad, it is going alright. Some issues here and there (mainly with my sprites and maps(then again I may have done them wrong using yychr) not loading). It's a bit different than I expected, most of my code isn't working right haha.
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Arkhan on May 20, 2017, 07:34:58 PM
Galad, it is going alright. Some issues here and there (mainly with my sprites and maps(then again I may have done them wrong using yychr) not loading). It's a bit different than I expected, most of my code isn't working right haha.


Did you get it sorted out, or no?

There's a PCE dev chat on Rizon on IRC. (irc.rizon.net)

Nobody goes there but me, but you could also pop in there and maybe encourage others to go in there for real-time flailing.

(its #pcedev on irc.rizon.net)

I registered it at one point, but apparently nobody likes IRC anymore.
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Gredler on May 21, 2017, 02:12:17 AM
Maybe that should be stickied and a link to a browser irc site? I'll idle in there alongside DoxPhile and pauls chat if I can have it up while I work, or on my phone from time to time.


And welcome to the pce dev scene you two, it's so nice to see some fresh faces and hopefully we can work together sometime in the future.  There are not a ton of us here, it's a small group, but I think before you guys or ladies joined in I  was the rookiest of the crew. My coding skills are inept at best but I've learned quite a bit about techniques in making art for the platform and have graduated to past grafx2 to where I can use my modern dev environment workflows to make art on the pce which is really time saving.


Good luck with your projects, can't wait to see where they head!
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Arkhan on May 21, 2017, 02:21:56 PM
I prefer using PaintShopPro for art for any of this stuff.

You can get Corel PSP X9 whatever for like 50$ or something, and it supports older image formats and has a nice palette editor.


We could sticky that IRC chat, or we could update that PCE Dev Wikia that fell over once I left for Japan and stuff lol.
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Gredler on May 21, 2017, 03:22:55 PM
Oh yeah, forgot about that wiki, is that stickied and does it have links to the chat? Having convenient links to dev chats like DoxPhile pauls and your irc would be very helpful to newcomers seeking quick answers to simple questions

I still haven't tried modern psp, but yeah that and photoshop+gimp are easier solutions for complicated image generation :) compared to the fun and old grafx2
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Arkhan on May 21, 2017, 03:47:41 PM
I have been a PSP user since forever.  We always had a version.  I grew up on 7, and 9, and so I got the newest Corel one since PSP9 don't work right on Windows 10, lol.

I like the way it does palettes, and the interface doesn't piss me off.

The wiki is... doin whatever.   We all got sidetracked/left for vacations and stuff.


There is an Aetherbyte and a PCEDEV chat on Rizon, but if you don't use IRC its like lolf*ck.

We can  just use Mibbit to generate a web widget, I guess, and jam it into the Wiki.

I have a PCEFX one too, IIRC.

Aaron could jam a widget up in this site.
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Galad on May 22, 2017, 02:47:39 AM
Grafx2 is ok for now until I have a good grasp on everything though the interface is from 20+ years ago.I might get on irc and ask a few questions,Thanks for the welcome Gredler.
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Galad on May 23, 2017, 02:23:53 PM
Update on my learning to programming TurboGrafx-16,still not much though.I'm hoping Hippokittie got everything worked out,it's tough to get going at first.
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Arkhan on May 23, 2017, 05:45:50 PM
NeoPaint is a good step up from Grafx2, I think.

It's like if PC Paintbrush got modernized, basically.

Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: elmer on May 23, 2017, 06:53:32 PM
Or just use what professional developers working on tilemap systems like the Nintendo DS use ... ProMotion (http://www.cosmigo.com/).

Now with a "free" version.
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Galad on May 24, 2017, 03:07:34 AM
I'll have a look at NeoPaint,thanks.
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Gredler on May 24, 2017, 02:50:36 PM
Or just use what professional developers working on tilemap systems like the Nintendo DS use ... ProMotion (http://www.cosmigo.com/).

Now with a "free" version.



Wow Elmer thanks for sharing that!

Onion skinning for previewing animation and tile management tools are enough for me to jump in and try it out, fantastic!

I posted a while back in another thread asking for popular alternatives to Photo shop, was this suggested? I must've forgotten to try it if so, because this looks great and I surely would be foolish to not give it a shot.

Thanks!
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Hippokittie on May 25, 2017, 10:17:44 PM
With help of a few people in here and on Rizon chat (wooo AK) I got things working a bit. Still doing some coding and running into animation problems but I am alright with it haha. Will keep on at the Rizon chat. Still though, maybe I will work on an exporter for like context script editor that will work in the future. We will see.
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Galad on May 26, 2017, 05:08:44 AM
Figured out more or learnt more of huc,coding a new system is always fun and frustrating at first.
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: elmer on May 29, 2017, 06:50:41 AM
Onion skinning for previewing animation and tile management tools are enough for me to jump in and try it out, fantastic!

I posted a while back in another thread asking for popular alternatives to Photo shop, was this suggested? I must've forgotten to try it if so, because this looks great and I surely would be foolish to not give it a shot.


I've mentioned it before, a few times.

I've owned a license since 1999 with ProMotion version 4.0 ... and keep paying for the upgrades, it's well worth it.

IIRC that's 4 paid-upgrades in 17 years ... he's not exactly nickel-and-dime-ing people.

It's a bit heavy-weight and over-featured for the simple translation-hacking tasks that I've been doing, but it's the best thing that I know of for the development of palette-based graphics for games, especially for the 4th-gen consoles like the PCE.

http://www.cosmigo.com/promotion/docs/onlinehelp/TileMappingSettingsDlg.htm
http://www.cosmigo.com/promotion/docs/onlinehelp/GameboySupportFunctions.htm
http://www.cosmigo.com/promotion/docs/onlinehelp/ModifyChannelBitsDlg.htm

Now that there's a free version, too, there's not much of a reason for folks to avoid trying it out.
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: touko on May 29, 2017, 09:02:01 AM
seems to be a very good program, but the free version is so slow to start .
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: elmer on May 29, 2017, 10:18:44 AM
seems to be a very good program, but the free version is so slow to start .

If you mean the annoying "ProMotion" animation ... then just turn it off in the File->Preferences menu.
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: Gredler on May 29, 2017, 11:29:11 AM
Heck ya not sure how I missed it in your previous mentions but I will check it out next time I am at a workstation
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: touko on May 30, 2017, 01:30:05 AM
seems to be a very good program, but the free version is so slow to start .

If you mean the annoying "ProMotion" animation ... then just turn it off in the File->Preferences menu.

thanks, but i think there is a problem with my win7, because on windows 8.1 it start normally,and splash screen cannot be disabled in free version .
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: elmer on May 30, 2017, 04:29:12 AM
thanks, but i think there is a problem with my win7, because on windows 8.1 it start normally,and splash screen cannot be disabled in free version .

Ahhh ... sorry. I applied my license key to unlock the "full" version before I got annoyed-enough with the splash screen that I wanted to turn it off.

I'm running Win7 x64 and it starts up almost instantly now.

IIRC, this is the first version of the software that even has a free version.

It's not exactly an expensive piece of software for its features, and I guess that I can understand why he doesn't let you turn off the splash screen in the free version.
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: touko on May 30, 2017, 05:18:46 AM
Quote
Ahhh ... sorry. I applied my license key to unlock the "full" version before I got annoyed-enough with the splash screen that I wanted to turn it off.
Don't worry, in fact it's not annoying because on windows 8 it's fast, it's only on my win7 which is slow, and i thought it was because of splash screen + free version .  :wink:
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: touko on July 10, 2017, 07:55:29 AM
Hi, i found this :
http://www.westerndesigncenter.com/wdc/tools.cfm
It can be useful .
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: elmer on July 10, 2017, 08:12:52 AM
Hi, i found this :
http://www.westerndesigncenter.com/wdc/tools.cfm
It can be useful .

Have you tried using it?

Even though it says "free", the last time I downloaded it, it still required you to purchase a license file in order to actually compile anything.

And you're screwed anyway if you really want to deal with bank-mapped hardware like the PCE.
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: touko on July 10, 2017, 08:22:35 PM
Quote
Have you tried using it?
No  :P

Quote
Even though it says "free", the last time I downloaded it, it still required you to purchase a license file in order to actually compile anything.
I thought it needs only registration  :-k

Quote
And you're screwed anyway if you really want to deal with bank-mapped hardware like the PCE.
Yes, but if someone want to go with a new (and better) asm compiler,i thought it was a good start,but if it not free, it's useless .

EDIT:i tested wdctools and it's free ,maybe the others are free too .
Title: Re: HuC/ Magic Kit running concerns or alternatives?
Post by: elmer on July 11, 2017, 05:11:13 AM
EDIT:i tested wdctools and it's free ,maybe the others are free too .

It certainly does look like they only require you to register now in order to unlock the C compiler.

If that's really the case, then would be cool of them.

I took a look at their PDF manual explaining the compiler and program architecture ... and it looks a bit scary (in theory). It seems that they're doing a lot of copying of stuff between stacks every time a function is called or returned from.

That's probably an easy way to get full ANSI C compliance, but it sounds a bit slow.

The lack of banking and optimizations for the HuC6280 CPU and PCE programs would obviously effect us, too.

I'll be interested to hear opinions if someone tries playing with it.