OK. I got HuC compiled with the changes and removal of fmemopen. It compiles a simple source file, but pceas is complaining that it can find the x86 pseudo reg names (they now have an underscore). This looks to be a backend lib thing and not a executable issue (there were notes mentioning of moving and changing the asm lib stuffs).
EDIT: Nevermind about the x86 pseudo reg issue. Seems to be from add32() fastcall that's internal to HuC. No one bothered to change the names of the pseudo regs for the internal fastcalls to the match the changes to the backend lib. I'll update those now in HuC source code.. I'm not even sure why there are even internal fastcalls. Those should all be in the library..
Another project always fails to build, and in the same way each time:
04:A267 sta <__fptr
Undefined symbol in operand field!
04:A27D sta <__fptr+1
Undefined symbol in operand field!
04:A27F lda [__fptr]
Undefined symbol in operand field!
Hmmmm ... the problem that Bonknuts was seeing is the same type of error as the problem that cabbage has compiling his program.
Uli's new source files contain an inconsistent mix of "fptr" and "__fptr", just as though he was in the middle of changing things and then stopped part way through.
I've renamed all the instances back to their old HuC names "__fptr", and now cabbage's VWF test program compiles.
But it doesn't work properly, either with the old cygwin build, or with the new mingw build.
...
<hours pass>
...
OK, cabbage's source code now builds and runs properly with the new compiler.
The problem wasn't in his code, it was a change that Uli made in the new compiler.
Uli decided that "char" should be signed instead of unsigned, and that "#incbin" should define its label as a "signed char *".
This was breaking cabbage's program, and lots of other people's HuC programs probably, because that's different to how the old versions of HuC do things (and they were doing the sensible thing IMHO).
I've changed things so that #incbin
always defines the label as an "unsigned char *", and I've changed the default char to be unsigned as well.
There are new compiler flags to change that default char setting "-fsigned-char" and "-funsigned-char".
With all of today's changes, cabbage's source code now compiles and runs properly with the latest version of the compiler.
The changes have been checked into github, and here is a new Windows 32-bit version of HuC ...
<EDIT - Removed obsolete build.>
Please let me know if folks still have problems with it.