Author Topic: HuC/ Magic Kit running concerns or alternatives?  (Read 2481 times)

Hippokittie

  • Newbie
  • *
  • Posts: 21
HuC/ Magic Kit running concerns or alternatives?
« 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!

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: HuC/ Magic Kit running concerns or alternatives?
« Reply #1 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

Hippokittie

  • Newbie
  • *
  • Posts: 21
Re: HuC/ Magic Kit running concerns or alternatives?
« Reply #2 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?

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: HuC/ Magic Kit running concerns or alternatives?
« Reply #3 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.  ](*,)

Hippokittie

  • Newbie
  • *
  • Posts: 21
Re: HuC/ Magic Kit running concerns or alternatives?
« Reply #4 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).

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: HuC/ Magic Kit running concerns or alternatives?
« Reply #5 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.

Hippokittie

  • Newbie
  • *
  • Posts: 21
Re: HuC/ Magic Kit running concerns or alternatives?
« Reply #6 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.

Galad

  • Jr. Member
  • **
  • Posts: 75
Re: HuC/ Magic Kit running concerns or alternatives?
« Reply #7 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:\
« Last Edit: May 17, 2017, 12:38:51 PM by Galad »

Hippokittie

  • Newbie
  • *
  • Posts: 21
Re: HuC/ Magic Kit running concerns or alternatives?
« Reply #8 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?

Galad

  • Jr. Member
  • **
  • Posts: 75
Re: HuC/ Magic Kit running concerns or alternatives?
« Reply #9 on: May 18, 2017, 03:53:37 PM »
You're welcome

spenoza

  • Hero Member
  • *****
  • Posts: 2751
Re: HuC/ Magic Kit running concerns or alternatives?
« Reply #10 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?
<a href="http://www.pcedaisakusen.net/2/34/103/show-collection.htm" class="bbc_link" target="_blank">My meager PC Engine Collection so far.</a><br><a href="https://www.pcenginefx.com/forums/" class="bbc_link" target="_blank">PC Engine Software Bible</a><br><a href="http://www.racketboy.com/forum/" c

Hippokittie

  • Newbie
  • *
  • Posts: 21
Re: HuC/ Magic Kit running concerns or alternatives?
« Reply #11 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.

Galad

  • Jr. Member
  • **
  • Posts: 75
Re: HuC/ Magic Kit running concerns or alternatives?
« Reply #12 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.

« Last Edit: May 20, 2017, 03:08:22 PM by Galad »

Hippokittie

  • Newbie
  • *
  • Posts: 21
Re: HuC/ Magic Kit running concerns or alternatives?
« Reply #13 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.

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: HuC/ Magic Kit running concerns or alternatives?
« Reply #14 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.
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.