English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 16 November 2017, 19:19   #41
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
I think a folder DATA should hold all game data:
Code:
DATA/
DATA/_1
...
DATA/WGB
DATA/bermuda.bat
...
DATA/BERMUDA.WGP
#1) i fixed the type issue in util.cpp and build it with -O2 (optimize) option,
but nothing groundbreaking new.
update in the the zone: BermudaSyndrome-68k-WIP.lha

#2) the old version Bermuda-68k.exe does crash winuae, while the one build with -O2
Bermuda-68k-040.exe does work.
lotsa mutex errors and cannot find display (rtg not working for me) and vorbis/ogg support error.
but seems different.

#3) i build libmad and rebuild the bermuda binaries - link error gone,
but when starting the game, it still says no vorbis/ogg support.
maybe sdl-mixer has to rebuild.
zone updated: BermudaSyndrome-68k-WIP.lha

Last edited by emufan; 16 November 2017 at 20:23.
emufan is offline  
Old 16 November 2017, 23:28   #42
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
i try to build NAGI v2.06/NAGI Source Nov 14th 2002.
it does build with some minor fixes (label missing statement)
but linking gives one missing fucntion from string.h:
Code:
 undefined reference to `_strtok_r'
it is used in this way:
Code:
	token = strtok_r(crc_list, ",", (char**)&running);
string.h only has
Code:
char	*strtok __P((char *, const char *));
done with gcc 3.4.0 - is there a replacement or something what can fix it?


#2) using gcc631 , which has strtok_r , i get this error:
Code:
sys/memory.c:87:16: error: lvalue required as left operand of assignment
  (u8 *)mem_ptr += size;
                ^~
how can i fix this?

#3) this is accepted, but wrong " (u8 *)mem_ptr == size;"

does anyone know, how to fix #2) ?

Last edited by emufan; 17 November 2017 at 00:46.
emufan is offline  
Old 17 November 2017, 01:50   #43
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,979
Quote:
Originally Posted by emufan View Post
i try to build NAGI v2.06/NAGI Source Nov 14th 2002.
it does build with some minor fixes (label missing statement)
but linking gives one missing fucntion from string.h:
Code:
 undefined reference to `_strtok_r'
it is used in this way:
Code:
    token = strtok_r(crc_list, ",", (char**)&running);
string.h only has
Code:
char    *strtok __P((char *, const char *));
done with gcc 3.4.0 - is there a replacement or something what can fix it?


#2) using gcc631 , which has strtok_r , i get this error:
Code:
sys/memory.c:87:16: error: lvalue required as left operand of assignment
  (u8 *)mem_ptr += size;
                ^~
how can i fix this?

#3) this is accepted, but wrong " (u8 *)mem_ptr == size;"

does anyone know, how to fix #2) ?
That is in glibc2.2.5 or clib2, should be pretty easy to build that one function and either link it or shove it in one of your other libs, it's the very terrible and messy way I do things. And apparently I built it (for WOS) but I haven't had an occasion to use it.
grelbfarlk is offline  
Old 17 November 2017, 02:11   #44
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
the only way to get rif od the strtok_r error, I have to use m68k-amigaos-gcc.exe -mcrt=clib2 with gcc6
when you say glibc2, how to I link this one?

#1) added -lc with gcc3.4.0, only remaining errors are those strtok_r :/
emufan is offline  
Old 17 November 2017, 03:33   #45
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,979
If you have it in some other library other than libc.a then you'd just link it with -lsomelibwithstrtok.

So it's probably not in clib which you are using with gcc3.4.0. Like here's what I do:
I go look in clib2 or gclib2.2.5 to find the actual code that has that function.

In glibc2.2.5 it's in strtok_r.c
Then I go into that dir and just build that object like:

gcc strtok_r.c -c -o strtok_r.o

Then you have the object. From here you can take strtok.o and when you're compiling add it to the linking line like:
gcc someprogram.o strtok_r.o -o someprogram.exe

Or you can stuff it in one of your other libs, like say you want to add it to your libc.a
ar cru libc.a strtok_r.o
That added it to the library, now you have to run ranlib so it's added to the index
ranlib libc.a

Now your libc.a has the strtok_r.o function the next time you need it (which for me is like just this one time and I never need it again).

This is a bad idea for many reasons, just off the top of my head, configure could say oh do you have strtok_r? Oh good you have it that means you must also have clib2.9999.9999 lets assume you have these 30 other functions which aren't there. That's probably not going to happen very often but something to watch out for.
grelbfarlk is offline  
Old 17 November 2017, 04:32   #46
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 678
All the executable crashed with A00000006 in it. Every single one of them. Every...single...one of them.
xboxown is offline  
Old 17 November 2017, 09:03   #47
Hedeon
Semi-Retired
 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 2,055
Maybe do a declaration first. So:

u8 *mem_ptr = NULL;

Then later

mem_ptr += size; (no cast needed now)

An lvalue is a variable. Mostly this error is because the variable has not been correctly declared. 2.95.3 accepts it. Newer gcc and vbcc do not.
Hedeon is online now  
Old 17 November 2017, 13:57   #48
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by grelbfarlk View Post
In glibc2.2.5 it's in strtok_r.c
Then I go into that dir and just build that object like:

gcc strtok_r.c -c -o strtok_r.o
that's some sort of LEGO, but at least it does create a binary, thanks

I had to use strtok_r.c and rawmemchr.c from glibc 2.2.5 - edited both, eleminating "__"
and comment out the "weak_alias" instruction at the end.
Quote:
Originally Posted by Hedeon View Post
An lvalue is a variable. Mostly this error is because the variable has not been correctly declared. 2.95.3 accepts it. Newer gcc and vbcc do not.
did so, but no success, only 3.4.0 accept the default thing, gcc6 and 295 do not.
Quote:
Originally Posted by xboxown View Post
All the executable crashed with A00000006 in it. Every single one of them. Every...single...one of them.
bad news, damn :/
I could build NAGI, will zone it, maybe this one will work at least.

zoned: NAGI-68k-WIP.lha
#1) this does work, my videotoaster setup has p96 driver. nagi-030 opens its window,
does quit, coz no game detected

tested with Voodoo Girl: Queen of the Darned

bit slow, but does work (ESC for menu, enable joystick)

#2) I tested the bermuda binaries and it does work here.
it does guru if you interrupt the intro, so push RETURN key to stop it
right after the intro starts or watch it til the end - the game starts afterwards.

in the screen shot i renamed the binaries. using rtg 800x600 16bit

"w" for fullscreen (?!) does not work, so play in window mode.

in 1st sequence you hit TAB , choose knife, so he can cut the strings
sound and speech (talk to the girl) does work too.
console displays midi message, timidity not configured. so this may work aswell,
if there is an installed timidity

#3) somehow i triggered a turbo mode, he runs now like on speed

just retry, I'm using the binaries, which are in the zone.
Attached Thumbnails
Click image for larger version

Name:	BS.png
Views:	139
Size:	20.3 KB
ID:	55457  

Last edited by emufan; 17 November 2017 at 16:20.
emufan is offline  
Old 17 November 2017, 15:55   #49
Aladin
Registered User
 
Join Date: Nov 2016
Location: France
Posts: 856
bs 040 start on window but when push "w", the screen is grey, repush "w", the window is also grey. No joystick support (old version aminet too). (amikit/winuae 060/JIT)
Aladin is offline  
Old 17 November 2017, 16:24   #50
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by Aladin View Post
bs 040 start on window but when push "w", the screen is grey, repush "w", the window is also grey. No joystick support (old version aminet too). (amikit/winuae 060/JIT)
so the "old" aminet version does work too, hmm, must be something broken with xboxown's installation/system.

and yes, fullscreen is broken somehow. already seen with the emulators,
some issue with libSDL version i'm using, i think.
thanks for that test.
emufan is offline  
Old 17 November 2017, 16:29   #51
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 678
I will tell you how my data files look like:

DATA/FINAL.AVI
DATA/INTRO.AVI
DATA/LOGO.AVI

Then at the root of the folder where the executable is are different folder names inside of them sub folders and files, such as lab01 folder or menu folder or midi folder, or scn folder otext folder or town1, town2, etc folder and so on are in the root directory.

Is it possible you could tell me where you found your data folder if I match it like your perhaps it will work with me.
xboxown is offline  
Old 17 November 2017, 16:36   #52
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
it's like this below:
Code:
game/
| Bermuda-68k-020.881.exe
| Bermuda-68k-040.exe
| Bermuda-libmad-020.881.exe
| Bermuda-libmad-040.exe
|   
\---DATA/
    |   bermuda.bat
    |   BERMUDA.INI
    |   BERMUDA.OVR
    |   BERMUDA.SPR
    |   BERMUDA.WGP
    |   readme.txt
    |   
    +---01/
    |       EXTRA.MOV
    |       EXTRA.SPR
    |       GIRL.MOV
    |       GIRL.SPR
    |       KNIFE.SPR
    |       PRIEST.MOV
...
    +---DATA/
    |       FINAL.AVI
    |       INTRO.AVI
    |       LOGO.AVI
game/
game/DATA/
game/DATA/01/
...
game/DATA/DATA/
...
using this archive.

Last edited by emufan; 17 November 2017 at 17:04.
emufan is offline  
Old 17 November 2017, 17:14   #53
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by emufan View Post
so the "old" aminet version does work too, hmm, must be something broken with xboxown's installation/system.

and yes, fullscreen is broken somehow. already seen with the emulators,
some issue with libSDL version i'm using, i think.
thanks for that test.
libSDL1.2.6 has broken fullscreen support yeah. It just goes to grey.
The libSDL1.2.15 with AMMX support (which also works on systems without AMMX) has fullscreen support fixed.
Marlon_ is offline  
Old 17 November 2017, 18:50   #54
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 678
Quote:
Originally Posted by emufan View Post
it's like this below:
Code:
game/
| Bermuda-68k-020.881.exe
| Bermuda-68k-040.exe
| Bermuda-libmad-020.881.exe
| Bermuda-libmad-040.exe
|   
\---DATA/
    |   bermuda.bat
    |   BERMUDA.INI
    |   BERMUDA.OVR
    |   BERMUDA.SPR
    |   BERMUDA.WGP
    |   readme.txt
    |   
    +---01/
    |       EXTRA.MOV
    |       EXTRA.SPR
    |       GIRL.MOV
    |       GIRL.SPR
    |       KNIFE.SPR
    |       PRIEST.MOV
...
    +---DATA/
    |       FINAL.AVI
    |       INTRO.AVI
    |       LOGO.AVI
game/
game/DATA/
game/DATA/01/
...
game/DATA/DATA/
...
using this archive.

I understand!!!!!!! TODAY I WILL TACKLE IT!!!!!!!!
xboxown is offline  
Old 17 November 2017, 22:50   #55
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by Marlon_ View Post
libSDL1.2.6 has broken fullscreen support yeah. It just goes to grey.
The libSDL1.2.15 with AMMX support (which also works on systems without AMMX) has fullscreen support fixed.
ok, thanks for that info. not sure what version I built.
Quote:
Originally Posted by xboxown View Post
I understand!!!!!!! TODAY I WILL TACKLE
I wasn't aware of the second DATA folder, until you wrote about it.
but now the structure should be clear, good luck

Last edited by emufan; 18 November 2017 at 00:13.
emufan is offline  
Old 18 November 2017, 04:21   #56
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 678
OK reporting! At first all you exec crashed with 00008 even after I did your step except for noixemul version that actually worked!

I saw the introduction and entered the game. However, at first I thought the game frooze after the cut scene but realized I can only see the woman hanging in rope and saw birds flying in the sky. I don't see me hanging from a tree and when I press ESC it crashes with 00008. I attempt to save state or load state it says cannot save or load stats. If I attempt to quit the game with Q it crashes with 00008 as well. I am unable to get the resolution to show the entire game me and the woman all I see is the woman. I can press the TAB key to change woman but it if feels I cannot do anything else because I cannot see anything else except her hanging in a rope and nothing else. I am unsure what to do here.

I discovered the other ones do not work because my ixemul itself is unstable. If any ixemul program attempts to use ixemul and not just the game I get an ixemul prompt message with the name of ixemul and abord button and when attempting to close it by clicking on abort button it keeps prompting with abort button again and I have to restart the computer because of disk activity preventing the icons to be clicked on desktop and causes the icons to disappear when moving windows around.
xboxown is offline  
Old 18 November 2017, 04:32   #57
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
i run my workbench in 800x600 16 bit rtg screen. the game window is about 640x400,
so everything is visible.

which ixemul version are you using? i have v63.1 in my libs: folder
ixemul-63.1-m68k.lha --> ixemul_63.1_m68k/Sys/

I think it is a generic version, not build for a special cpu model.
copy the 3 folder to your SYS: partition folder: l , libs and prefs - so it's complete.

and increase the stack, before you start games/emus using ixemul.library.
stack 100000
bermuda...exe

#1) maybe I should remember, but I dont. what is your hardware configuration?
vampire with latest 2.5 firmware - or am I wrong?

Last edited by emufan; 18 November 2017 at 04:47.
emufan is offline  
Old 18 November 2017, 04:54   #58
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 678
I fixed it. It is nothing to do with you or with vampire or with the core it have to do with ApolloOS itself. It was the culprit for all my hardship and not because ApolloOS itself is bad or defective but MY VERSION itself was corrupted. So I went into maintenance mode since I got exhausted with nothing working well anymore and restored it back from r43 to r37 and now it works like a horse...if anything the game run now 100%. Not only does the video plays, it plays with no stutter on a vampire running at only x10!!! Powerful hardware the vampire, very, very, very, very, very powerful to be able to run at such speed this game at the same speed of a normal fast winUAE at max setting.

The colors are perfect, I can quit the game I can even save/load now but the only problem I have is when I press W to go into full screen. It enters full screen does not crash but the screen is all 100% gray. When I go back to windows mode it dies out and i need to restart the game. I am ok with that for now, I can play the game in windows mode that is fine with me.
xboxown is offline  
Old 18 November 2017, 13:19   #59
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by xboxown View Post
I fixed it.
good news

what says: version libs:ixemul.library ?
Quote:
I press W to go into full screen. It enters full screen does not crash but the screen is all 100% gray.
thats some bug in the libSDL, it was said above, it might be fixed in another version,
but we have to build that version, maybe I'll try later.

meanwhile you may reduce the workbench resolution, so it almost fit the size of the game window.

what about NAGI-68k-WIP.lha in the zone?

Last edited by emufan; 18 November 2017 at 13:27.
emufan is offline  
Old 18 November 2017, 19:04   #60
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 678
Quote:
Originally Posted by emufan View Post
good news

what says: version libs:ixemul.library ?

thats some bug in the libSDL, it was said above, it might be fixed in another version,
but we have to build that version, maybe I'll try later.

meanwhile you may reduce the workbench resolution, so it almost fit the size of the game window.

what about NAGI-68k-WIP.lha in the zone?

I am using ixemul.library version 48.3

As for NAG-68k................THANK YOU!!!!! :

I can finally play all these games, make my own and play it in my Amiga if I want too!!!!


Please, plese release everything you did so far to aminet....please!!!
xboxown is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:55.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.12680 seconds with 14 queries