English Amiga Board


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

 
 
Thread Tools
Old 14 August 2017, 23:50   #161
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,546
Quote:
Originally Posted by xboxown View Post
eeeeeeeeee!!!!
the trouble for now are those fullpath/currentdir things, this differs alot from unix/linux.
this gives me alot of headache :/

while building without noixemul ( found default options in AmiDevCPP)
I get one undefined linker error:
Code:
objects/CPU.o(.text+0x25156):objects/CPU.o: undefined reference to `___eprintf'
objects/CPU.o(.text+0x253c2):objects/CPU.o: undefined reference to `___eprintf'
objects/CPU.o(.text+0x25422):objects/CPU.o: undefined reference to `___eprintf'
objects/CPU.o(.text+0x25496):objects/CPU.o: undefined reference to `___eprintf'
objects/CPU.o(.text+0x25508):objects/CPU.o: undefined reference to `___eprintf'

$ m68k-amigaos-nm.exe ../objects/CPU.o | grep  print
         U ___eprintf
there is not a single occurance of eprint in the whole source.
any idea where it does come from?

#1) sort of compiler issue MingW

Last edited by emufan; 15 August 2017 at 00:04.
emufan is offline  
Old 15 August 2017, 00:30   #162
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 287
So what will be your next step?
xboxown is offline  
Old 15 August 2017, 01:03   #163
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 47
Posts: 431
try adding this
https://github.com/eblot/newlib/blob...dlib/eprintf.c
to the project
alkis is offline  
Old 15 August 2017, 01:22   #164
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,546
Quote:
Originally Posted by xboxown View Post
So what will be your next step?
waiting for alkis
Quote:
Originally Posted by alkis View Post
now i get a duplicate, it is already in assert.h:
Code:
$ grep  eprint usr/local/amiga/m68k-amigaos/include/assert.h
extern void __eprintf (const char *, const char *, int, const char *);
extern void __eprintf (const char *, const char *, int, const char *);
  (__eprintf ("%s:%u: failed assertion `%s'\n",         \
extern void __eprintf (); /* Defined in libgcc.a */
  (__eprintf ("%s:%u: failed assertion `%s'\n",
so i need to put an extern ... eprint in cpu.cpp or remove all _ASSERT ?

#1)
added those in cpu.cpp:
extern void __eprintf (const char *, const char *, int, const char *);
extern void __eprintf (); /* Defined in libgcc.a */

added -lgcc to linker option, all does not have an effect :/

Last edited by emufan; 15 August 2017 at 01:39.
emufan is offline  
Old 15 August 2017, 01:52   #165
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 47
Posts: 431
have downloaded the file and added eprintf.c to the project?

or just add this to any file (just once)
Code:
void
__eprintf (format, file, line, expression)
     const char *format;
     const char *file;
     unsigned int line;
     const char *expression;
{
  (void) fiprintf (stderr, format, file, line, expression);
  abort ();
  /*NOTREACHED*/
}
alkis is offline  
Old 15 August 2017, 02:03   #166
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,546
Quote:
Originally Posted by alkis View Post
have downloaded the file and added eprintf.c to the project?
i added the code in an existing src code file cpu.cpp, but __eprintf
is already defined in assert.h - got duplicate definition when compiling.

so since nothing worked, i just "//" all _ASSERT && assert lines
and now it does build
emufan is offline  
Old 15 August 2017, 02:09   #167
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 287
Quote:
Originally Posted by emufan View Post
i added the code in an existing src code file cpu.cpp, but __eprintf
is already defined in assert.h - got duplicate definition when compiling.

so since nothing worked, i just "//" all _ASSERT && assert lines
and now it does build
Building is one thing but does it run, can you select disk image, can it boot games, is it functional?
xboxown is offline  
Old 15 August 2017, 02:28   #168
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,546
Quote:
Originally Posted by xboxown View Post
Building is one thing but does it run, can you select disk image, can it boot games, is it functional?
IIRC these asserts are sort of error checking, not relevant to the emulator code,
just testing/checking things.

and not using "-noixemul" does have a positive effect,
directory listing now does work without any fix

even choosing a dsk image does work now too.
get flooded with debug infos , ahve to look at it.

i guess the config loading issue could be fixed now too.

#1) indeed, enabled LoadConfig - does work now, does output massive debug infos, but no more crash

Last edited by emufan; 15 August 2017 at 02:36.
emufan is offline  
Old 15 August 2017, 02:30   #169
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 287
Wait...wait..wait...wait (very fast) are you saying we a have a full functioning emulator right now??!!!



A....are you saying I can go to the zone now and play with it no problem!!!???



I AM SOOO HAPPPY!!!
xboxown is offline  
Old 15 August 2017, 02:31   #170
Marlon_
Amiga Programmer

Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Sundsvall, Sweden
Age: 29
Posts: 483
Quote:
Originally Posted by emufan View Post
and not using "-noixemul" does have a positive effect,
directory listing now does work without any fix
Marlon_ is offline  
Old 15 August 2017, 02:35   #171
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,469
Compile with 'NDEBUG' as a preprocessor definition to ditch the ASSERTS
NovaCoder is offline  
Old 15 August 2017, 02:36   #172
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,469
Sounds like you are getting somewhere though, well done
NovaCoder is offline  
Old 15 August 2017, 02:40   #173
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,546
@xboxown: just a littlebit *hopefully*

Quote:
Originally Posted by NovaCoder View Post
Compile with 'NDEBUG' as a preprocessor definition to ditch the ASSERTS
Quote:
Originally Posted by NovaCoder View Post
Sounds like you are getting somewhere though, well done
ok, will do.
I just saw it does now read and write from/to the config file.
emufan is offline  
Old 15 August 2017, 02:51   #174
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,469
Quote:
Originally Posted by emufan View Post
@xboxown: just a littlebit *hopefully*




ok, will do.
I just saw it does now read and write from/to the config file.

You need to do a printf of some of the data it's reading to see if you need to perform a byte swap.

I have byte swap code if you need it
NovaCoder is offline  
Old 15 August 2017, 03:10   #175
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,546
Quote:
Originally Posted by NovaCoder View Post
You need to do a printf of some of the data it's reading to see if you need to perform a byte swap.

will try that.

I have byte swap code if you need it
NDEBUG || NODEBUG did work ( i inserted both)

one little problem, when starting the emulation.
i had a build where it painted a black screen only, now i get those random chars,

at the moment i cannot remember what i did to make it black.

zoned: AmiApple-WIP.lha images and config and some dsk included.
it does need ixemul.library v48 or newer.
if you have a rtg workbench, it will start in a window, otherwise it will open a new rtg screen.

#1) if you run with -b option (benchmark) it fails after a while
with an error when doing cpu benchmark,
maybe this is something to investigate.

Quote:
Originally Posted by Marlon_ View Post
yes, this was a good idea, why did we waste our time doing it the noixemul way ... :/

Last edited by emufan; 15 August 2017 at 04:06.
emufan is offline  
Old 15 August 2017, 04:28   #176
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 287
Quote:
Originally Posted by emufan View Post
NDEBUG || NODEBUG did work ( i inserted both)

one little problem, when starting the emulation.
i had a build where it painted a black screen only, now i get those random chars,

at the moment i cannot remember what i did to make it black.

zoned: AmiApple-WIP.lha images and config and some dsk included.
it does need ixemul.library v48 or newer.
if you have a rtg workbench, it will start in a window, otherwise it will open a new rtg screen.

#1) if you run with -b option (benchmark) it fails after a while
with an error when doing cpu benchmark,
maybe this is something to investigate.


yes, this was a good idea, why did we waste our time doing it the noixemul way ... :/
It looks beautiful! The quality and brightness and color matches 100% as a real Apple II running on TV in every regard. Amiga does better job emulating the proper feel of consoles and computers than a PC does for some reason.

However, even if I press F2 or load a game it doesn't start it just leaves you with # and @ filling the screen but nothing else. Am I missing something or it is not fully functional yet?
xboxown is offline  
Old 15 August 2017, 04:50   #177
Marlon_
Amiga Programmer

Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Sundsvall, Sweden
Age: 29
Posts: 483
Quote:
Originally Posted by emufan View Post
yes, this was a good idea, why did we waste our time doing it the noixemul way ... :/
noixemul has its benefits and afaik, the gcc6 toolchain (which I am using) doesn't fully support ixemul at the moment.

Quote:
Originally Posted by xboxown View Post
Am I missing something or it is not fully functional yet?
Didn't you read the post you quoted?
Marlon_ is offline  
Old 15 August 2017, 04:57   #178
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 287
Eh? -scratches hair- What post that I quoted? OH!! Nevermind! Good progress though!!
xboxown is offline  
Old 15 August 2017, 09:47   #179
gulliver
BoingBagged

 
Join Date: Aug 2007
Location: The South of nowhere
Age: 40
Posts: 1,657
Great work!

Keep it rolling...
gulliver is offline  
Old 15 August 2017, 17:36   #180
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,546
@xboxown: F2 should start the emulation, but something is wrong here,
still investigating.
you can edit the linapple.conf, change computer type or other things.
maybe one combination does work, out of the blue. dunno.
emufan is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Porting SDL2 to Amiga copse request.Other 3 30 November 2017 17:46
Porting an Amiga game to PC CYBER_SLUNK Coders. General 4 31 January 2017 19:14
Porting Photoshop to Amiga KONEY Coders. General 25 29 December 2016 23:49
Porting PhotoChrome ST/e to Amiga. pandy71 request.Other 0 09 February 2015 15:12
Porting Qt Framework to Amiga OS enviroments Pyromania Coders. General 2 24 July 2013 06:42

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 05:41.


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