|
Post by makaimura on Jan 16, 2020 14:23:31 GMT
Hi every body,
I would have liked to post something much more interesting for a first thread, but apparently I have a problem with my HUC.exe.
If someone could help me to understand.
I am just started learning from this old tutorial obeybrew.com. It is very easy to understand and ... everything stop for me at the first tutorial (lol).
After I have made the Hello.C and dropped it on the HUC.exe , The HUC.exe is supposed to create a .PCE. But, instead I get a Hello.s. So I believe .s is generated because something is wrong in my Hello.c. But, I am doing exactly what the tutorial teach.
I have tried older HUC builds and no luck. I am using Notepad++ , I save as .C ....
Please some one tell me what I am doing wrong .
PS: I am on win 8.1.
thanks in advance.
|
|
|
Post by Arkhan on Jan 16, 2020 15:24:23 GMT
It might be a timing thing where assembly isnt finishing properly.
What are you calling when you call huc?
huc program.c ?
try:
huc -s program.c
and then
pceas program.s
and see if that works for you?
It might be that you are dropping it into the exe. Do it from the Commandline instead (cmd.exe)
|
|
|
Post by elmer on Jan 16, 2020 21:53:36 GMT
I would have liked to post something much more interesting for a first thread, but apparently I have a problem with my HUC.exe. Welcome! That actually is quite an interesting problem that you've got there ... you've found something that is caused by the specific instructions in the ObeyBrew tutorial. After I have made the Hello.C and dropped it on the HUC.exe , The HUC.exe is supposed to create a .PCE. But, instead I get a Hello.s. So I believe .s is generated because something is wrong in my Hello.c. But, I am doing exactly what the tutorial teach. What is happening is that you're using Windows Explorer to drag-n-drop your .c file onto the huc.exe program, just as the tutorial tells you to do. Unfortunately, that doesn't work, because after HuC has transformed your .c program into a .s assembly-language file, it then tries to call pceas.exe to assemble it ... and it can't find pceas.exe, so no ROM file is created. It's a problem with the tutorial, which has missed the setup step where you create/modify the environment variables that add the compiler/assembler to the PATH, and tell them where the HuC includes are located. Most experiened old-school developers know how to do this, but the problem is not obvious to anyone that wasn't using computers in the 1980s and 1990s. Thank you for pointing this out! Here is a simple Windows batch/command file that sets up the correct environment variables and then calls HuC. If you copy this file, huc.cmd into your huc/bin/ directory, and then Drag-n-Drop your .c file onto it, then it should compile properly, and you can continue on with the ObeyBrew tutorials. Here it is as a file that you can download huc.cmd (1.22 KB), and this is what the file contains ... @echo off setlocal
rem ***************************************************************************
rem Simple Windows Drag-n-Drop wrapper for HuC. rem rem Drag-n-Drop your .c file on to this CMD file's icon to compile it with HuC.
rem ***************************************************************************
rem Sanity Check.
if "%~1" equ "" goto no_file if /i "%~x1" neq ".c" goto not_c
rem Setup the HuC paths, assuming that this file is in the huc\bin directory.
pushd "%~dp0" set PATH=%CD%;%PATH% cd "..\include\pce" set PCE_INCLUDE=%CD%;%PCE_INCLUDE% popd set PCE_INCLUDE=%CD%;%PCE_INCLUDE%
huc.exe -v -msmall "%~1" || goto huc_failed
exit /b 0
rem ***************************************************************************
:no_file :not_c echo Please Drag-n-Drop a HuC .c file onto the icon to compile the program echo with HuC. echo. pause exit /b 1
rem ***************************************************************************
:huc_failed echo. echo Compilation failed! Unable to build the %~n1.pce ROM! echo. echo Please look at the messages printed above to see why. echo. pause exit /b 1
rem ***************************************************************************
|
|
|
Post by spenoza on Jan 16, 2020 21:56:00 GMT
I didn't realize the Obeybrew tutorials were lacking critical information. Thanks for this, Elmer.
|
|
|
Post by Arkhan on Jan 16, 2020 22:33:17 GMT
how did the tutorials go on this long without someone else running into that issue.
gredler used the tutorials, for example. I figure he would've hit the same snag unless someone helped him setup HuC via different means before doing tutorials from that site.
|
|
|
Post by DarkKobold on Jan 16, 2020 22:53:00 GMT
how did the tutorials go on this long without someone else running into that issue. gredler used the tutorials, for example. I figure he would've hit the same snag unless someone helped him setup HuC via different means before doing tutorials from that site. He had me, don't forget.
|
|
|
Post by DarkKobold on Jan 16, 2020 23:14:37 GMT
I didn't realize the Obeybrew tutorials were lacking critical information. Thanks for this, Elmer. It's kind of unfortunate, because Obeybrew is incredibly important. It got me started. But it and archaicpixels have lots of missing or wrong information. I'd love some access to clean it up.
|
|
|
Post by gredler on Jan 16, 2020 23:26:32 GMT
I think if you setup your environment variables to have huc.exe you can drag and drop, no? I've been using a build bat file for so long I forgot if you can. I drag-drop onto Krikzz's turbo2usb.exe all the time, I love that thing.
~4 years ago when I first did the obeybrew tutorials I was very active in multiple chat rooms, so yeah DK or Arkhan helped me - it may've been rover himself answering my hurdle questions as I hit them.
I also have the habit from similar pipelines to run things from the command line when the documentation suggests to do so (huc says run huc code.c as the way to compile a rom)
|
|
|
Post by elmer on Jan 17, 2020 0:01:34 GMT
It's kind of unfortunate, because Obeybrew is incredibly important. It got me started. But it and archaicpixels have lots of missing or wrong information. I'd love some access to clean it up. I suspect that the missing step of setting up the environment variables would have been included in the "Installation" page on ObeyBrew, if it had ever been written. That step is included in the instructions on ArchaicPixels, but only for the old 1990s MS-DOS version of HuC/MagicKit. If you want to really want to be a hero and take on the job of updating those websites, then ... For ArchaicPixels, you'd need to contact BT Garner of MindRec. IIRC didn't Fragmare work with him? If so, he may have the contact details ... or perhaps someone else does. For ObeyBrew, you'd need to contact Old Rover. Since he's resigned from the PCE scene, he might just be willing to let someone copy his tutorials to another website so that they can be updated. Again, I wouldn't be surprised if *someone* here didn't still have a way of contacting Old Rover.
|
|
|
Post by elmer on Jan 17, 2020 0:21:56 GMT
I think if you setup your environment variables to have huc.exe you can drag and drop, no? I've been using DK's build bat file for so long I forgot if you can. I drag-drop onto Elmer's turbo2usb.exe all the time, I love that thing. Yep, if the environment variables are setup on Windows, then drag-n-drop should just work. Microsoft just keeps on making that harder and harder with every version, since they'd prefer you to use an installer program and put such things in the Windows registry. I should probably just include a script in the next version of HuC that Windows folk can use to set up those variables. I also have the habit from similar pipelines to run things from the command line when the documentation suggests to do so (huc says run huc code.c as the way to compile a rom) Yep, running the compile from the command line would be the "recommended" way to do things, just so that you can see the information output from HuC, but you still need to set those environment variables ... or create a batchfile to do the build. Just for clarity, turbo2usb.exe is KRIKzz's program, and not mine ... and IIRC, it was me that set up those "build" and "run" batch files for you guys early on in Catastrophy's development in order to get you guys to stop putting all of your files in the darned huc/bin/ directory, which was making compiler and squirrel updates troublesome when you were getting started.
|
|
|
Post by dshadoff on Jan 17, 2020 1:27:06 GMT
Agreed. HuC isn't any more chatty than it needs to be, but if you have a compile error, you're going to want to know what it's complaining about, or you'll get frustrated. Running from the command line is the only way I myself would run it.
|
|
|
Post by elmer on Jan 17, 2020 2:22:34 GMT
Agreed. HuC isn't any more chatty than it needs to be, but if you have a compile error, you're going to want to know what it's complaining about, or you'll get frustrated. Running from the command line is the only way I myself would run it. Dave, since you're not a Windows user, I should point out that the batch script that I posted above should stop and leave a window open to display the compilation errors if there are any. But, yeah, I'd still recommend working from the command line. For Windows users I *highly* recommend installing and using the free TCC/LE instead of Windows' abysmal built-in Command Prompt (cmd.exe). Old MS-DOS users may remember TCC better under its earlier name "4DOS", which was tremendously popular with power-users back-in-the-day.
|
|
|
Post by gredler on Jan 17, 2020 2:53:11 GMT
4DOS?!?!?!
Installing this tonight, thank you sir!
|
|
|
Post by dshadoff on Jan 17, 2020 5:00:09 GMT
I have to admit that I didn't pore over the scripts you put up, but now that I look, I see the pause. Still, programming (to me, at least) has always been about textual interaction - either via shell/command-line, or through an IDE which sticks the console output in an attached sub-window. I just never saw the draw of dragging a file onto an executable. Maybe a trashcan, but that's not the same thing. But to add to the DOS nostalgia on Windows, I recommend Total Commander (remember Norton Commander, anyone ?) for file management. www.ghisler.com
|
|
|
Post by Arkhan on Jan 17, 2020 8:21:25 GMT
Total Commander kicks ass.
The instructions for installing HuC are explained perfectly fine WITH HuC though, even on Zeograd's site. So, it is weird that the tutorials skimped on that.
I never really paid attention to the tutorials outside of when they started and Rover named the site after a word I made up the one day while screaming and flailing online lol.
I could try messaging BT to see if he can mess with stuff so that some of us can access it. Though, I THINK Tom maybe had access.
Maybe. It's been awhile.
|
|