|
Post by richarddan on Feb 7, 2024 1:39:50 GMT
I'm just trying to figure out why I have to put all the files in one folder in order to compile.Seems like a bit of a cluster. I've never done any kind of coding or programming before so this may be normal. But the file structure is not this way.
|
|
|
Post by gredler on Feb 7, 2024 7:22:41 GMT
I'm just trying to figure out why I have to put all the files in one folder in order to compile.Seems like a bit of a cluster. I've never done any kind of coding or programming before so this may be normal. But the file structure is not this way. You can definitely use sub folders, the paths are relative.
|
|
|
Post by richarddan on Feb 7, 2024 13:57:27 GMT
Whenever I use the subfolders like they come the compiler huc.exe does not locate them. I open a terminal in the huc.exe folder and run the command ./HuC hello.c. I have to put all of the include folder files and hello.c in the HuC folder and run from there.
|
|
|
Post by elmer on Feb 7, 2024 14:56:34 GMT
Whenever I use the subfolders like they come the compiler huc.exe does not locate them. You haven't set up your PATH so that Windows knows where to find huc.exe, so it only looks in the current directory. See this and this for more information. You will also need to set up the PCE_INCLUDE environment variable so that the HuC compiler knows where to find the include files. Usually folks just set up a "build.cmd" file that does the setup for them in each project that they're creating. Perhaps gredler will share one of his for you to look at.
|
|
|
Post by gredler on Feb 8, 2024 8:30:42 GMT
You haven't set up your PATH so that Windows knows where to find huc.exe, so it only looks in the current directory. See this and this for more information. You will also need to set up the PCE_INCLUDE environment variable so that the HuC compiler knows where to find the include files. Great call yes if you don't establish your env vars your paths will be wonky - that is likely contributing to the confusion. Usually folks just set up a "build.cmd" file that does the setup for them in each project that they're creating. Perhaps gredler will share one of his for you to look at. If my build process helps anyone I am happy to share it! I run this script as a bat: @echo off
rem *************************************************************************** :: Build and Run Script by Greg Brant 10/23/2020 :: Delete main.pce, run build.cmd, then launch in either local emulator :: or feed rom into turbo-usb2.exe to send the game to a ted2 usb connection rem ***************************************************************************cu
echo Starting script ::pause echo
:: delete old rom to prevent checking changes against old builds echo Checking for previous build if exist main.pce (echo main.pce found -- Deleteing old ROM) else (echo No old rom found) if exist main.pce del main.pce echo Old ROM purged :: pause echo
:: Build game echo Starting Build call build.cmd rem if errorlevel 1 echo BUILD FAILED: Inspect log for details!
:: Check for errors in build log, if errors are present then alert to check logs, otherwise run the game if %ERRORLEVEL% equ 0 ( GOTO :RUN ) else ( echo BUILD FAILED: Inspect log for details! TIMEOUT 2 EXIT /B %ERRORLEVEL% )
:RUN echo Build complete successfully echo Launching game :: Uncomment one of these commands to pick what to run the the successfully built rom in ::Bizhawk start emuhawk c:\huc\Catastrophy\Main.pce :: Mednafen ::start mednafen c:\huc\Catastrophy\Main.pce :: Launch to TED2 via USB ::call turbo-usb2.exe c:\huc\Catastrophy\Main.pce echo Build done at: time /T
I comment / uncomment based on which emulator or the everdrive I want to push builds to as I build it. This is a bat that wraps the cmd, the cmd is the one that came with huc I thought, @echo off
rem ***************************************************************************
setlocal
cd /d "%~dp0"
:new_compiler
pushd
set PATH=%CD%\lib_override;%CD%\huc\bin;%PATH%
set PCE_INCLUDE=%CD%\lib_override;%CD%\huc\include\huc
rem cd [change this directory to your env var mapped dir root]
rem set OPTIONS=-msmall -fno-recursive
del build_hucard_huc_old_log.txt
ren build_hucard_huc_log.txt build_hucard_huc_old_log.txt
huc -v -msmall -fno-recursive Main.c > build_hucard_huc_log.txt 2>&1
if %ERRORLEVEL% equ 0 ( type build_hucard_huc_log.txt ) else ( type build_hucard_huc_log.txt EXIT /B %ERRORLEVEL% )
:build-complete
I hope this is helpful!
|
|
|
Post by richarddan on Feb 8, 2024 19:00:23 GMT
Perfect thanks guys
|
|
|
Post by richarddan on Feb 23, 2024 15:16:53 GMT
can someone help me here. i created a map in mappy with the same tile size and number as in the tutorial(obeybrew) but i get a scrambled image
/* Welcome to Bonk's world! */
#incbin(levelmap,"tut7map.fmp");
#incchr_ex(leveltiles,"tut7pal0.pcx",0,0,20,7,0,\
"tut7pal1.pcx",0,0,20,2,1,\
"tut7pal1.pcx",0,16,11,1,1);
#incpal(levelpal0,"tut7pal0.pcx");
#incpal(levelpal1,"tut7pal1.pcx");
thanks for any help.
if there is a more in-depth tutorial please point me in that direction
|
|
|
Post by DarkKobold on Mar 9, 2024 16:02:56 GMT
So, I haven't used mappy in ages, but it looks like you never actually load the map itself? That often is the source of the issue, if you don't put the proper width and height into your load map function.
Can I suggest doing everything in Cosmigo Promotion? The demo version is free, and the only limit is the # of files you can have open at once. Also, elmer baked a promotion map loader into HuC via the STM format.
|
|