Author Topic: Need pointers compiling DOOM source for Jaguar  (Read 5051 times)

Offline Saturn

  • Global Moderator
  • Hero Member
  • *
  • Posts: 3015
  • Country: us
  • Karma: 21
    • View Profile
    • http://jaysmith2000.ipbhost.com/index.php?s=c827a7b611daaaf555722b332b1b9a2c&act=idx
Re: Need pointers compiling DOOM source for Jaguar
« Reply #45 on: August 26, 2016, 22:03:01 PM »
So what i would do is compile so you have a doom.bin file then HEX edit this and find the 3rd iwad string of text in the rom.

Once you find this open up windows calculator (if doing this on windows) and then switch it to programmer mode and use HEX. Then add 802000 + IWAD offset together and you should get a new address you can plop into jagonly.c which when you recompile doom.abs again, then recompile and make a doom.bin file it should run.  address you end up putting in jagonly.c might be close to something like 0x83E....

Great! I'll try this as soon as I can. Much appreciated :D

Offline rush6432

  • Sr. Member
  • *
  • Posts: 271
  • Karma: 20
    • View Profile
Re: Need pointers compiling DOOM source for Jaguar
« Reply #46 on: August 29, 2016, 21:00:41 PM »
Any Luck?

Offline Saturn

  • Global Moderator
  • Hero Member
  • *
  • Posts: 3015
  • Country: us
  • Karma: 21
    • View Profile
    • http://jaysmith2000.ipbhost.com/index.php?s=c827a7b611daaaf555722b332b1b9a2c&act=idx
Re: Need pointers compiling DOOM source for Jaguar
« Reply #47 on: August 29, 2016, 21:09:42 PM »
Yes, I have DOOM.BIN open in hex, found the 3rd IWAD at 0003D8E0.
And use 802000 + 3D8E0 to equal 83F8E0

Now, trying to figure out what to put here:
byte *I_WadBase (void)
{
   return (byte *)0x840000;


This:
byte *I_WadBase (void)
{
   return (byte *)0x83F8E0;

Now to recompile with the newly saved jagonly.c


Compiled with the new jagonly.c and got a DOOM.ABS @ 245kb. Used that to recompile in the doomloader folder and came out with DOOM.BIN @ 3.98MB. Tried it in VJ and it didn't work.
I'll look at DOOM.BIN in hex to see where the 3rd IWAD begins.

Shows 3rd IWAD at 3D4E0. Will try that next in jagonly.c

Still not working. Am I on the right track or did I mess up somewhere?
Hexed the newest DOOM.BIN and the 3rd IWAD still starts at 3D4E0.
Is something in jagonly.c still saying this should be 4.0MB or does it need to be converted some official way to DOOM.ROM?

Just pushed it through JiFFI and got the yellow text about IWAD missing so something got outta whack on that brainstorm.
« Last Edit: August 30, 2016, 01:09:08 AM by Saturn »

Offline rush6432

  • Sr. Member
  • *
  • Posts: 271
  • Karma: 20
    • View Profile
Re: Need pointers compiling DOOM source for Jaguar
« Reply #48 on: August 31, 2016, 21:53:47 PM »
Yes, I have DOOM.BIN open in hex, found the 3rd IWAD at 0003D8E0.
And use 802000 + 3D8E0 to equal 83F8E0

Now, trying to figure out what to put here:
byte *I_WadBase (void)
{
   return (byte *)0x840000;


This:
byte *I_WadBase (void)
{
   return (byte *)0x83F8E0;

Now to recompile with the newly saved jagonly.c


Compiled with the new jagonly.c and got a DOOM.ABS @ 245kb. Used that to recompile in the doomloader folder and came out with DOOM.BIN @ 3.98MB. Tried it in VJ and it didn't work.
I'll look at DOOM.BIN in hex to see where the 3rd IWAD begins.

Shows 3rd IWAD at 3D4E0. Will try that next in jagonly.c

Still not working. Am I on the right track or did I mess up somewhere?
Hexed the newest DOOM.BIN and the 3rd IWAD still starts at 3D4E0.
Is something in jagonly.c still saying this should be 4.0MB or does it need to be converted some official way to DOOM.ROM?

Just pushed it through JiFFI and got the yellow text about IWAD missing so something got outta whack on that brainstorm.

Many variables here. id guess the iwad pointer isnt right still. If you are seeing the yellow text, then its booting successfully like it should but cant find the assets. What hex editor are you using?

So if it didnt boot from the get go and you had to use that god awful jiffi program, the bin file probably didnt have a header on it and was compiled with -n in the batch file. you can remove that and it will give you the header, however you need this removed when calculating for the wad offset.

Offline Saturn

  • Global Moderator
  • Hero Member
  • *
  • Posts: 3015
  • Country: us
  • Karma: 21
    • View Profile
    • http://jaysmith2000.ipbhost.com/index.php?s=c827a7b611daaaf555722b332b1b9a2c&act=idx
Re: Need pointers compiling DOOM source for Jaguar
« Reply #49 on: August 31, 2016, 22:02:19 PM »
I'm using Hex Workshop Hex Editor (32 bit) but also have HxD installed.
Didn't work for me. I used 3D4E0 as the Download & Start addresses but it just crashed.
Also tried 803D4E0 in both. Same results. Not sure where I went wrong or where to start re-doing my process.
« Last Edit: September 07, 2016, 17:21:06 PM by Saturn »

Offline Saturn

  • Global Moderator
  • Hero Member
  • *
  • Posts: 3015
  • Country: us
  • Karma: 21
    • View Profile
    • http://jaysmith2000.ipbhost.com/index.php?s=c827a7b611daaaf555722b332b1b9a2c&act=idx
Re: Need pointers compiling DOOM source for Jaguar
« Reply #50 on: September 03, 2016, 12:44:03 PM »
Still going in the same circle. Any idea if what I'm doing is correct?

Offline rush6432

  • Sr. Member
  • *
  • Posts: 271
  • Karma: 20
    • View Profile
Re: Need pointers compiling DOOM source for Jaguar
« Reply #51 on: September 04, 2016, 17:51:14 PM »
Very hard to say...

Zip up your doom source folder and also zip up your loader folder that has the loader program, wad file and such and send it over and ill see what i can peek at here.

Offline Saturn

  • Global Moderator
  • Hero Member
  • *
  • Posts: 3015
  • Country: us
  • Karma: 21
    • View Profile
    • http://jaysmith2000.ipbhost.com/index.php?s=c827a7b611daaaf555722b332b1b9a2c&act=idx
Re: Need pointers compiling DOOM source for Jaguar
« Reply #52 on: September 04, 2016, 21:51:41 PM »
Here they are, I think still the ones I was using when I posted.

Edit: That may have been the wrong attempt. Think I found the right one. Let me know when to post it :)
« Last Edit: September 05, 2016, 05:05:03 AM by Saturn »

Offline Saturn

  • Global Moderator
  • Hero Member
  • *
  • Posts: 3015
  • Country: us
  • Karma: 21
    • View Profile
    • http://jaysmith2000.ipbhost.com/index.php?s=c827a7b611daaaf555722b332b1b9a2c&act=idx
Re: Need pointers compiling DOOM source for Jaguar
« Reply #53 on: September 07, 2016, 20:38:19 PM »
Verified the address of IWAD in both HxD and Hex Workshop:





Re-ran this from a 'clean' doomloader folder. (So I can remember what I did):
Add Carl's doom_n06.ABS to folder renaming it doom.abs. Run Link.bat to get DOOM.BIN
Open DOOM.BIN and find 3rd IWAD offset.
Open Windows calculator, switch view to Programmer, tick Hex and adding: 802000 + 3D8E0 to equal 83F8E0
Right click and edit jagonly.c in Doom Source folder. Search for: 0x840000 (found on line 414)
Paste in 0x83F8E0 to make the section read:
byte *I_WadBase (void)
{
   return (byte *)0x83F4E0;

Quick save and exit jagonly.c

Also check line 74 in the Makefile to ensure it reads: C2OBJ = gcc -B/jaguar/bin/ -b m68k -V2.6 -Wall -DJAGUAR -O2 -c -o $@ $?

Recompile Doom Source using Dosbox (have to change JagDoomSourceEdited folder name to doom!)
Open Dosbox and type:
mount c c:\
c:
setpath
Type make at the following prompt:
Paths Set!
c:\jaguar\doom>

(I've been having to reopen Dosbox a 2nd time to run make again to get the DOOM.ABS...?)
Once finished compiling, move the new DOOM.ABS (245kb, 1kb less than Carl's) to the doomloader folder and run Link.bat
Open the new DOOM.BIN with hex editor and locate offset of 3rd IWAD
Looking now, it's still at 3D8E0
So, based on this info from the last post on page 3,
So what i would do is compile so you have a doom.bin file then HEX edit this and find the 3rd iwad string of text in the rom.

Once you find this open up windows calculator (if doing this on windows) and then switch it to programmer mode and use HEX. Then add 802000 + IWAD offset together and you should get a new address you can plop into jagonly.c which when you recompile doom.abs again, then recompile and make a doom.bin file it should run.  address you end up putting in jagonly.c might be close to something like 0x83E....
I should be able to flash the DOOM.BIN, which is 3.99mb & contains the wad, to the Skunkboard (jcp -f DOOM.BIN $83F4E0) then load this latest DOOM.ABS @ $4000 to make it work? (jcp DOOM.ABS $4000)
I'm a little fuzzy on all the details after not messing with this for a week or two but to my understanding this should be correct. Please let me know if I'm off base again. I'd like to correct any mistakes in the process so I can return and go through the motions again until it works :)

I've attached the files. Will PM the password for Doomloadertest.zip
« Last Edit: September 08, 2016, 04:36:23 AM by Saturn »

Offline rush6432

  • Sr. Member
  • *
  • Posts: 271
  • Karma: 20
    • View Profile
Re: Need pointers compiling DOOM source for Jaguar
« Reply #54 on: September 07, 2016, 21:41:04 PM »
Ill try to take a look at it tonight and get back to you with my process for getting it to work. There are quite a few steps and it assumes you have a few things in place.

Offline rush6432

  • Sr. Member
  • *
  • Posts: 271
  • Karma: 20
    • View Profile
Re: Need pointers compiling DOOM source for Jaguar
« Reply #55 on: September 08, 2016, 04:28:08 AM »
@Saturn

Here is what ive changed. I automated the build process a bit more and eliminated some steps for you.

It should compile and leave you with a running binary as DOOM.BIN

I modified the makefile a bit to clean it up and change a few things

You can type 'make clean'

which will remove all the .o files (object files) which are the .c files compiled to asm. It'll also remove
the .abs file (doom.abs) and also copy init.sav to init.o (create init.o). Init.sav is a hacked version of
init.s from matthias domin i believe.

Regardless of this i also included hexedit.exe in the LOADER folder which i use as a simple portable hex editor
to find the offset quickly and also put the 'LOADER' folder into the doom directory.

When you compile and run 'MAKE' in dosbox and it does its thing, it will automatically at the end copy doom.abs to the c:\jaguar\doom\loader folder for you. and also now it will automatically compile doom for you after running make.

At this point, once this is compiled, you then use the hex editor to find the 3rd 'IWAD' offset text in the binary
and then to the left, use that hex address of the line that its on and at open windows calculator in programmer mode and HEX mode and enter 802000 + iwad offset you found the 3rd iwad text listed at using hexedit.exe

This will give you your new offset where you will put into the jagonly.c for the I_Wadbase.

After editing jagonly.c go ahead and recompile by running 'MAKE in dosbox, This should then give you a useable doom.bin file in the LOADER folder to either load up in Project tempest emulator at $802000 address or you can flash it to the skunkboard at $802000 by running 'jcp -f doom.bin $802000'
« Last Edit: September 11, 2016, 16:49:05 PM by rush6432 »

Offline Saturn

  • Global Moderator
  • Hero Member
  • *
  • Posts: 3015
  • Country: us
  • Karma: 21
    • View Profile
    • http://jaysmith2000.ipbhost.com/index.php?s=c827a7b611daaaf555722b332b1b9a2c&act=idx
Re: Need pointers compiling DOOM source for Jaguar
« Reply #56 on: September 08, 2016, 04:37:50 AM »
Thanks for this. I'll pop it open and have a look asap.

Offline Saturn

  • Global Moderator
  • Hero Member
  • *
  • Posts: 3015
  • Country: us
  • Karma: 21
    • View Profile
    • http://jaysmith2000.ipbhost.com/index.php?s=c827a7b611daaaf555722b332b1b9a2c&act=idx
Re: Need pointers compiling DOOM source for Jaguar
« Reply #57 on: January 06, 2017, 22:01:51 PM »
@rush6432  I finally had a chance to look at this closer. (I know, 4 months to the day, sorry)

@Saturn

Here is what ive changed. I automated the build process a bit more and eliminated some steps for you.

It should compile and leave you with a running binary as DOOM.BIN

I modified the makefile a bit to clean it up and change a few things

You can type 'make clean'

which will remove all the .o files (object files) which are the .c files compiled to asm. It'll also remove
the .abs file (doom.abs) and also copy init.sav to init.o (create init.o). Init.sav is a hacked version of
init.s from matthias domin i believe.

I didn't find a new makefile inside. What am I missing?

Regardless of this i also included hexedit.exe in the LOADER folder which i use as a simple portable hex editor
to find the offset quickly and also put the 'LOADER' folder into the doom directory.

When you compile and run 'MAKE' in dosbox and it does its thing, it will automatically at the end copy doom.abs to the c:\jaguar\doom\loader folder for you. and also now it will automatically compile doom for you after running make.

I found hexedit.exe but including the LOADER directory in the DOOM directory that I copy to C, there's no doom.abs inside it after running make. Also, all the o files are still there.
Can you up or re-up the new makefile?

Offline rush6432

  • Sr. Member
  • *
  • Posts: 271
  • Karma: 20
    • View Profile
Re: Need pointers compiling DOOM source for Jaguar
« Reply #58 on: January 08, 2017, 18:40:54 PM »
Not sure ill be able to help much. The first quarter of this year is going to be extremely time consuming for me with work. If i get some spare cycles ill try to post something again.

Offline Saturn

  • Global Moderator
  • Hero Member
  • *
  • Posts: 3015
  • Country: us
  • Karma: 21
    • View Profile
    • http://jaysmith2000.ipbhost.com/index.php?s=c827a7b611daaaf555722b332b1b9a2c&act=idx
Re: Need pointers compiling DOOM source for Jaguar
« Reply #59 on: January 08, 2017, 18:45:05 PM »
Understood, anything is appreciated but if not that's ok too. Real life getting in my way the last few months but didn't want to completely abandon ship on this as it's very interesting to me and I'd love to learn more about it. Thanks.

 

SimplePortal 2.3.7 © 2008-2020, SimplePortal