English Amiga Board


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

 
 
Thread Tools
Old 20 August 2017, 18:05   #221
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by xboxown View Post
I am wondering if it is because it did not change the variables in the configuration menu even though it looks changed and stored and it is still attempting to boot from serial port even after you selected s6d1 or something.
i have to look into it, i still do not really understand what it wants to do,
but maybe we will find something.
emufan is offline  
Old 20 August 2017, 18:06   #222
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
I did remove the eprintf.cpp from src tree and added -lnix and the __eprintf issue is gone, but:
Code:
../SDL/lib/libz.a ../SDL/lib/libSDL.a -lnix  

/usr/local/amiga/lib/gcc/m68k-amigaos/3.4.0/../../../../m68k-amigaos/bin/ld:
Base symbol for base relative reloc not defined: section .text, reloc to symbol .data

/usr/local/amiga/lib/gcc/m68k-amigaos/3.4.0/../../../../m68k-amigaos/bin/ld:
BFD 2.14 20030612 (Amiga OS build 20050713) internal error, aborting at
/tmp/cvs/adtools/binutils/bfd/amigaoslink.c line 244 in get_relocated_section_contents

/usr/local/amiga/lib/gcc/m68k-amigaos/3.4.0/../../../../m68k-amigaos/bin/ld:
Please report this bug.

collect2: ld returned 1 exit status
mingw32-make.exe: *** [bin/linapple-RTG_noixemul_off.exe] Error
emufan is offline  
Old 20 August 2017, 18:20   #223
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 723
try this

Code:
extern "C" void __eprintf (const char *format, const char *file, unsigned int line, const char *expression)
{
  (void) fprintf (stderr, format, file, line, expression);
  abort ();
  /*NOTREACHED*/
}
alkis is offline  
Old 20 August 2017, 18:36   #224
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by alkis View Post
try this


thanks, i was thinking about that, recalling from the lw plugins and the
"C" condition in the assert.h file - but I resisted.

*rant*
what is really disturbing is the lack of info about all the linking options for the crosscompiler,
-mcrt clib2, nix nix13 - tons of subfolders with same libs but under different conditions.
when does one link -lc or -lamiga , once i saw a -lauto,
what is the diff between lib, libb, libb32 ?! i guess there is zero documentation :/

#1) with the function we should now get some console (stderr) output if an assert condition is met, right?

#2) it does work -> i've added somewhere in the src code: assert(2+2==5);
results in:
Code:
src/Memory.cpp:1051: failed assertion `2+2==5'
Abort trap

3.Work:AmiApple>

Last edited by emufan; 20 August 2017 at 19:02.
emufan is offline  
Old 20 August 2017, 19:26   #225
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
another attempt: i destroyed the rom data arrays. did random cat & paste into the same array,
preserving the size, but mixing the data.
result is the very same behavior of the emulation, when starting it using F2.

so something is wrong when it does start the apple emulation.
emufan is offline  
Old 20 August 2017, 19:45   #226
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 678
Quote:
Originally Posted by emufan View Post
another attempt: i destroyed the rom data arrays. did random cat & paste into the same array,
preserving the size, but mixing the data.
result is the very same behavior of the emulation, when starting it using F2.

so something is wrong when it does start the apple emulation.
I reallly think it is not reading the floppy disk but serial port. But then why does kegs32 work?? -sigh-
xboxown is offline  
Old 20 August 2017, 22:05   #227
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
this is really weird, i cannot make the emulation crash, whatever i disable or manipulate
i disabled all "serial" functions so this should not trigger anymore,
but i allways get the same cryptical chars at the start of the emulation (F2).
even those asserts do not trigger, this is mad somehow

the question remains, why does kegs work, when building it with the same setup as done with AmiApple.
it's not an sdl issue, must be something with types ( char, byte, word ...) - maybe.

#1) hmm, some observations:
Memory.cpp -> MemInitialize() and MemReset ()
here they do the memory initialization, fill mem with initial patterns:
g_eMemoryInitPattern == MIP_FF_FF_00_00

Last edited by emufan; 20 August 2017 at 23:18.
emufan is offline  
Old 20 August 2017, 23:18   #228
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 678
I don't know how you are doing it man....but I am drained! I am ....... exhausted...yet you keep on going.......

you are strong....stronger than me......your more persistent than me. I..........-falls down face on the floor snoring loudly from exhaustion-
xboxown is offline  
Old 20 August 2017, 23:33   #229
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
yep, at least something is moving now

that part of the code does some moving now, i changed the initial pattern from:
Code:
	if (g_eMemoryInitPattern == MIP_FF_FF_00_00)
	{
		for( iByte = 0x0000; iByte < 0xC000; )
		{
//			memmain[ iByte++ ] = 0xFF;
//			memmain[ iByte++ ] = 0xFF;
                        memmain[ iByte++ ] = 0x55;
			memmain[ iByte++ ] = 0x44;

			iByte++;
			iByte++;
		}
	}
and the initial (F2) weird char pattern changed and does flash now (D / U == 44 / 55)
the FF results in "@" maybe connected to:
typedef char WCHAR; // wc, 16-bit UNICODE character
which amigaos does not support?

the flashing of the chars has an impact of the sdl window, i can hardly move it, with the above changes.

#1) another intersting variable is "memrom", have to look what is done with this,
if i'm not mistaken, it does hoild the rom data.

Last edited by emufan; 20 August 2017 at 23:47.
emufan is offline  
Old 21 August 2017, 01:40   #230
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 678
Wait...wait...wait....wait....hold on your horses here....waaait i tell's ya



We are not talking about kegs anymore are we? We are returning back to lineapple? Are you saying you have fixed the @ # char in lineapple and now we are in?
xboxown is offline  
Old 22 August 2017, 20:07   #231
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
i'm not able to boot any apple2 140kb dsk file with kegs32 or kegs on amiga. so for now i went back to linapple.
while not sure what to do next, i build sddApple for 68k rtg, and this boots to the apple system.
but only after i found the correct rom.
with the wrong rom i got the same "@@@@" weird chars as with linapple,
so now i try to load a rom or convert a binary to the correct char array for linapple.

SDDApple68k-WIP.lha in the zone.

i had to remove the ASL code - did not compile - so you have to enter filename in the shell/cli, after you use F1 key.
not further tested. after CTRL+F12 you should enter PR#6 to boot the disk.
i will change this key combination in next wip.
emufan is offline  
Old 22 August 2017, 20:33   #232
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 678
Quote:
Originally Posted by emufan View Post
i'm not able to boot any apple2 140kb dsk file with kegs32 or kegs on amiga. so for now i went back to linapple.
while not sure what to do next, i build sddApple for 68k rtg, and this boots to the apple system.
but only after i found the correct rom.
with the wrong rom i got the same "@@@@" weird chars as with linapple,
so now i try to load a rom or convert a binary to the correct char array for linapple.

SDDApple68k-WIP.lha in the zone.

i had to remove the ASL code - did not compile - so you have to enter filename in the shell/cli, after you use F1 key.
not further tested. after CTRL+F12 you should enter PR#6 to boot the disk.
i will change this key combination in next wip.
xboxown is offline  
Old 22 August 2017, 20:42   #233
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 678
Please, please, please, please...can you release lineapple and kegs 68k to aminet!?? PLEASE!

I beg you! I beg you!!
xboxown is offline  
Old 22 August 2017, 21:31   #234
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
read carefully, it's not yet done, but some observations

what is worth testing is in the zone you can try already:
kegs-WIP.lha --> 68k RTG
SDDApple68k-WIP.lha

both not ready for an aminet release.

#1) is there a tool which can produce such an array from a binary:
Code:
...
"\xA9\x20\x8D\x26\x03\xAD\x57\xC0\xAD\x53\xC0\xAD\x50\xC0\xA9\x00"
"\x85\x1C\xAD\x26\x03\x85\x1B\xA0\x00\x84\x1A\xA5\x1C\x91\x1A\x20"
"\xA2\xD0\xC8\xD0\xF6\xE6\x1B\xA5\x1B\x29\x1F\xD0\xEE\x60\x8D\x22"
...
?
emufan is offline  
Old 22 August 2017, 21:52   #235
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 678
Quote:
Originally Posted by emufan View Post
read carefully, it's not yet done, but some observations

what is worth testing is in the zone you can try already:
kegs-WIP.lha --> 68k RTG
SDDApple68k-WIP.lha

both not ready for an aminet release.

#1) is there a tool which can produce such an array from a binary:
Code:
...
"\xA9\x20\x8D\x26\x03\xAD\x57\xC0\xAD\x53\xC0\xAD\x50\xC0\xA9\x00"
"\x85\x1C\xAD\x26\x03\x85\x1B\xA0\x00\x84\x1A\xA5\x1C\x91\x1A\x20"
"\xA2\xD0\xC8\xD0\xF6\xE6\x1B\xA5\x1B\x29\x1F\xD0\xEE\x60\x8D\x22"
...
?
That is true! But you have SDDApple68k which an OS 4.x apple // emulator ported to 68k heheh! If we can tackle this version also to be ready released too hehhehehee....eeeeeeeeee. We will end up with kegs, lineapple and SDDApple68k hahahahahah!!

-jumps up and down like a little school girl-!

You are a working machine hahaha!!
xboxown is offline  
Old 22 August 2017, 22:17   #236
amigoun
Registered User
 
amigoun's Avatar
 
Join Date: May 2010
Location: Czech Rep
Posts: 599
His name is emufan, no need to wonder
amigoun is offline  
Old 22 August 2017, 22:40   #237
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 723
Quote:
Originally Posted by emufan View Post
#1) is there a tool which can produce such an array from a binary:
Code:
...
"\xA9\x20\x8D\x26\x03\xAD\x57\xC0\xAD\x53\xC0\xAD\x50\xC0\xA9\x00"
"\x85\x1C\xAD\x26\x03\x85\x1B\xA0\x00\x84\x1A\xA5\x1C\x91\x1A\x20"
"\xA2\xD0\xC8\xD0\xF6\xE6\x1B\xA5\x1B\x29\x1F\xD0\xEE\x60\x8D\x22"
...
?
We can probably tackle this in two ways.
a) Make a function that load the binary and returns a char * or UBYTE * (whatever the application expects)
b) play with vasm and incbin the binary in gcc object format? (this won't need the binary at runtime)
alkis is offline  
Old 22 August 2017, 22:51   #238
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 723
or this in linux

hexdump -v -e '16/1 "0x%x," "\n"'

(add variable declaration braces etc)

Also this
https://balau82.wordpress.com/2012/0...blob-with-gcc/

Last edited by alkis; 22 August 2017 at 23:03. Reason: gcc .o from binary
alkis is offline  
Old 23 August 2017, 00:00   #239
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
I cannot promise anything, maybe it will work, or someone else must take a look.
but i keep trying

thanks alkis, that was a nice idea, linux rocks

this did finaly the desired result:
Code:
$  cat disk.rom | hexdump -v -e '16/1   "x%02X," "\n"' | \
sed -e s/x/\\\\x/g | sed -e s/","//g | sed -e s/$/\"/g |  sed -e s/^/\"/g

"\xA2\x20\xA0\x00\xA2\x03\x86\x3C\x8A\x0A\x24\x3C\xF0\x10\x05\x3C"
"\x49\xFF\x29\x7E\xB0\x08\x4A\xD0\xFB\x98\x9D\x56\x03\xC8\xE8\x10"
"\xE5\x20\x58\xFF\xBA\xBD\x00\x01\x0A\x0A\x0A\x0A\x85\x2B\xAA\xBD"
"\x8E\xC0\xBD\x8C\xC0\xBD\x8A\xC0\xBD\x89\xC0\xA0\x50\xBD\x80\xC0"
i think the massive backslash escaping is due to cygwin, I remember bash != bash

*fixed*

Last edited by emufan; 23 August 2017 at 00:13.
emufan is offline  
Old 23 August 2017, 00:15   #240
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 678
Quote:
Originally Posted by emufan View Post
I cannot promise anything, maybe it will work, or someone else must take a look.
but i keep trying

thanks alkis, that was a nice idea, linux rocks

this did finaly the desired result:
Code:
$  cat disk.rom | hexdump -v -e '16/1   "x%02X," "\n"' | \
sed -e s/x/\\\\x/g | sed -e s/","//g | sed -e s/$/\"/g |  sed -e s/^/\"/g

"\xA2\x20\xA0\x00\xA2\x03\x86\x3C\x8A\x0A\x24\x3C\xF0\x10\x05\x3C"
"\x49\xFF\x29\x7E\xB0\x08\x4A\xD0\xFB\x98\x9D\x56\x03\xC8\xE8\x10"
"\xE5\x20\x58\xFF\xBA\xBD\x00\x01\x0A\x0A\x0A\x0A\x85\x2B\xAA\xBD"
"\x8E\xC0\xBD\x8C\xC0\xBD\x8A\xC0\xBD\x89\xC0\xA0\x50\xBD\x80\xC0"
i think the massive backslash escaping is due to cygwin, I remember bash != bash

*fixed*

You already did soooo much!! Heck you even gave us SDDApple
xboxown 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 08:34.

Top

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