Poster | Thread |
samo79
| |
Re: Another surprisingly fruity OS4 port. Posted on 6-Mar-2008 19:13:06
| | [ #21 ] |
|
|
|
Elite Member |
Joined: 13-Feb-2003 Posts: 3505
From: Italy, Perugia | | |
|
| Thanks a lot Tokai !
Finally no more war between MOS and OS4 users !
_________________ BACK FOR THE FUTURE
http://www.betatesting.it/backforthefuture
Sam440ep Flex 800 Mhz 1 GB Ram + AmigaOS 4.1 Update 6 AmigaOne XE G3 800 Mhz - 640 MB Ram - Radeon 9200 SE + AmigaOS 4.1 Update 6 |
|
Status: Offline |
|
|
Rob
| |
Re: Another surprisingly fruity OS4 port. Posted on 6-Mar-2008 22:49:43
| | [ #22 ] |
|
|
|
Elite Member |
Joined: 20-Mar-2003 Posts: 6374
From: S.Wales | | |
|
| |
Status: Offline |
|
|
AlexC
| |
Re: A surprisingly fruity OS4 port. Posted on 7-Mar-2008 5:48:39
| | [ #23 ] |
|
|
|
Super Member |
Joined: 22-Jan-2004 Posts: 1300
From: City of Lost Angels, California. | | |
|
| @tokai
It's definitely useful. I wrote such a command (see Echo2Debug) a few years back to make it easier to find out where it crashed in my startup-sequence.
4KB isn't so bad, mine ended up being 32KB as I compiled it with clib2. Using newlib and gcc -Os, at best I can shrink it down to 2608 bytes after stripping.
I kept the code simple but it doesn't have a NOLINE option:
#include <string.h> #include <dos/rdargs.h> #include <exec/exec.h> #include <proto/exec.h> #include <proto/dos.h>
struct RDArgs * rda; char *UserText = NULL; const char *version = "\0$VER: Echo2Debug 1.1 (17.11.2005)";
int main(int argc, char **argv) { LONG rc = RETURN_FAIL; if ((rda = IDOS->ReadArgs("STRING/F",(LONG *)&UserText,NULL))) { if(UserText != NULL) IExec->DebugPrintF("%s\n",UserText); if(rda != NULL) IDOS->FreeArgs(rda); rc = 0; } return(rc); }
Not sure why you didn't use the DebugPrintF() function though _________________ AlexC's free OS4 software collection
AmigaOne XE/X1000/X5000/UAE-PPC OS4 laptop/X-10 Home Automation |
|
Status: Offline |
|
|
abalaban
| |
Re: A surprisingly fruity OS4 port. Posted on 7-Mar-2008 9:43:42
| | [ #24 ] |
|
|
|
Super Member |
Joined: 1-Oct-2004 Posts: 1114
From: France | | |
|
| @AlexC
Quote:
Not sure why you didn't use the DebugPrintF() function though |
Because he's a MorphOS coder and that he just recompiled its MorphOS source for OS4 _________________ AOS 4.1 : I dream it, Hyperion did it ! Now dreaming AOS 4.2... Thank you to all devs involved for this great job ! |
|
Status: Offline |
|
|
AlexC
| |
Re: A surprisingly fruity OS4 port. Posted on 7-Mar-2008 11:17:22
| | [ #25 ] |
|
|
|
Super Member |
Joined: 22-Jan-2004 Posts: 1300
From: City of Lost Angels, California. | | |
|
| @abalaban
Ah yes, I just checked the NDK3.9. I didn't know that function is new in 4.0.
_________________ AlexC's free OS4 software collection
AmigaOne XE/X1000/X5000/UAE-PPC OS4 laptop/X-10 Home Automation |
|
Status: Offline |
|
|
tokai
| |
Re: A surprisingly fruity OS4 port. Posted on 7-Mar-2008 16:12:21
| | [ #26 ] |
|
|
|
Regular Member |
Joined: 28-Nov-2003 Posts: 124
From: binaryriot | | |
|
| @AlexC
yeah, that was the initial purpose of SerialEcho too. Anyway.. if you skip startup code (initialize SysBase/ and DOSBase yourself) you could get it even smaller. In SerialEcho I had to disable this for OS4 for 2 reasons. 1st when I compiled SerialEcho for OS4 I had no idea how the interface stuff had to be initialized (so I just let the startup do it for me) and 2nd I had to use kputc (from libdebug.a), because I didn't found the previously undocumented RawPutChar function in OS4. It must be there too if OS4 wants to stay compatible, so I wonder why Hyperion didn't just made it publically available in the Exec interface stuff (or is it just differently named?).
Just for comparision: ram:> list serialecho.#? SerialEcho.morphos 1488 ----rwed Dienstag 16:08:06 SerialEcho.m68k 380 ----rwed Dienstag 16:08:06 SerialEcho.os4 4156 ----rwed Dienstag 16:08:10 3 files - 6024 bytes used
OS4 version currently needs a startup provided by vbcc (which usually does more than required, setting up stdio/etc. and whatever) which is completly skipped for MorphOS and SAS/C version. Sadly this makes the OS4 version not pure either, so it can't be made resident like the other both versions.
In Tooltype the problem is more noticable as it requires the startup and a whole statically linked sprintf() function. But it's still below 20kb, so I guess quite acceptable still if it does work. (does it? I don't know yet. :) )
regards, tokai
_________________ tokai.binaryriot.org binaryriot.de |
|
Status: Offline |
|
|
Beeblebrox
| |
Re: A surprisingly fruity OS4 port. Posted on 7-Mar-2008 18:14:14
| | [ #27 ] |
|
|
|
Regular Member |
Joined: 9-Feb-2005 Posts: 351
From: germany | | |
|
| @tokai
I tried and it did not work. On UBOOT my serial is configured to 115200Baud. Whats the Baudrate used by your prg ? I found Serialecho will crash when I type "serialecho ?" and hit return again after parameters are listed. B.t.w. echo bla >SER: doesnt work either. Communication with Term4.7 is fine. |
|
Status: Offline |
|
|
itix
| |
Re: A surprisingly fruity OS4 port. Posted on 7-Mar-2008 18:24:21
| | [ #28 ] |
|
|
|
Elite Member |
Joined: 22-Dec-2004 Posts: 3398
From: Freedom world | | |
|
| @tokai
Quote:
1st when I compiled SerialEcho for OS4 I had no idea how the interface stuff had to be initialized (so I just let the startup do it for me) and 2nd I had to use kputc (from libdebug.a), because I didn't found the previously undocumented RawPutChar function in OS4. It must be there too if OS4 wants to stay compatible, so I wonder why Hyperion didn't just made it publically available in the Exec interface stuff (or is it just differently named?).
|
I guess they considered it deprecated. You can actually call RawPutChar() in OS4 just by using its original 68k vector via EmulateTags(). I have seen some OS4 ports doing that.
I think it should be possible create compatibility macros with EmulateTags() so that you can call OS3 functions without going to iface mess. It would improve source level compatibility making it easier to port software from OS3, MorphOS or AROS. Same startup code would also work everywhere.
_________________ Amiga Developer Amiga 500, Efika, Mac Mini and PowerBook |
|
Status: Offline |
|
|
tokai
| |
Re: A surprisingly fruity OS4 port. Posted on 7-Mar-2008 23:04:41
| | [ #29 ] |
|
|
|
Regular Member |
Joined: 28-Nov-2003 Posts: 124
From: binaryriot | | |
|
| @Beeblebrox
Quote:
I found Serialecho will crash when I type "serialecho ?" and hit return again after parameters are listed. |
Please try the very latest version from http://tokai.binaryriot.org/public/ and see if that still happens.
About the serial problem itself... I don't really know how this works in OS4, but normally you can configure this in the Systems Serial Preferences. I guess it's still SYS:Prefs/Serial on OS4, dunno if it supports 115200 Baud. AmigaOS3.1 was always limited there. Term does its own thingy and does not care for the serial prefs.
But note if you have some 'Ramdebug' buffer activated the output of SerialEcho will appear there (you always can use Sashimi to verify), output to SER: still should go to the real port.
Thx. for testing.
regards, tokai_________________ tokai.binaryriot.org binaryriot.de |
|
Status: Offline |
|
|
AlexC
| |
Re: A surprisingly fruity OS4 port. Posted on 8-Mar-2008 10:32:53
| | [ #30 ] |
|
|
|
Super Member |
Joined: 22-Jan-2004 Posts: 1300
From: City of Lost Angels, California. | | |
|
| @tokai
I had not tried 50.2 without argument so I didn't notice that it crashed. 50.3 works fine here.
@BeeblebroxQuote:
I tried and it did not work. On UBOOT my serial is configured to 115200Baud |
The program itself doesn't set a baudrate, it just sends the text wherever debug output is supposed to go.
[edit]tokai beat me to it[/edit] It's possible that you have the debug stream going to the memory buffer, in which case you can dump it with "C:DumpDebugBuffer". You can set where the debug output should go to either from uboot, by adding a "serial=1" or "serial=0" argument to the os4_commandline variable, or within OS4 with "C:KDebug console=serial" or "C:KDebug console=memory".
As the A1 has two serial ports, your terminal has to be connected to the right one, unit 0, which is the one next to the usb ports on the XE. Not sure which header it is on the micro.
If SER: doesn't print anything, make sure that the mount file has the correct speed set in it, and of course that you're reading from unit 0 as well.
Last edited by AlexC on 08-Mar-2008 at 10:34 AM.
_________________ AlexC's free OS4 software collection
AmigaOne XE/X1000/X5000/UAE-PPC OS4 laptop/X-10 Home Automation |
|
Status: Offline |
|
|
Beeblebrox
| |
Re: A surprisingly fruity OS4 port. Posted on 9-Mar-2008 10:12:57
| | [ #31 ] |
|
|
|
Regular Member |
Joined: 9-Feb-2005 Posts: 351
From: germany | | |
|
| @AlexC @tokai
Quote:
It's possible that you have the debug stream going to the memory buffer, in which case you can dump it with "C:DumpDebugBuffer".
|
yes, my text is shown when I type dumpdebugbuffer
Quote:
You can set where the debug output should go to either from uboot, by adding a "serial=1" or "serial=0" argument to the os4_commandline variable, or within OS4 with "C:KDebug console=serial" or "C:KDebug console=memory".
|
didnt test the uboot variant, with "kdebug console=serial" it does not work. I had a look on the TX line with an oscilloscope because I was not shure about the baudrate.
Quote:
As the A1 has two serial ports, your terminal has to be connected to the right one, unit 0, which is the one next to the usb ports on the XE. Not sure which header it is on the micro. If SER: doesn't print anything, make sure that the mount file has the correct speed set in it, and of course that you're reading from unit 0 as well.
|
I have it connected to ser0. Output to ">ser:" is working now, seems I had some stupid wrong setup last time.
V3 does not crash here anymore after calling it without parameters.
|
|
Status: Offline |
|
|
Beeblebrox
| |
Re: A surprisingly fruity OS4 port. Posted on 9-Mar-2008 11:15:34
| | [ #32 ] |
|
|
|
Regular Member |
Joined: 9-Feb-2005 Posts: 351
From: germany | | |
|
| @AlexC
I tried now os4_commandline variable with "debuglevel=0 serial=0" and "debuglevel=1 serial=0". Theres some output after a cold boot, but nothing with serialecho.. |
|
Status: Offline |
|
|
AlexC
| |
Re: A surprisingly fruity OS4 port. Posted on 10-Mar-2008 8:20:14
| | [ #33 ] |
|
|
|
Super Member |
Joined: 22-Jan-2004 Posts: 1300
From: City of Lost Angels, California. | | |
|
| @Beeblebrox
I don't have a terminal hooked up to my serial port atm so I wouldn't know if serialecho doesn't actually send the output to the serial port. I'm assuming that it should work if you can see its output in the memory buffer. Try with echo2debug, I know that one to be working so if it does the problem is in serialecho, if that one doesn't work then the problem is with your settings somewhere, in which case one more thing you could try is turning HW flow control off on the terminal side. _________________ AlexC's free OS4 software collection
AmigaOne XE/X1000/X5000/UAE-PPC OS4 laptop/X-10 Home Automation |
|
Status: Offline |
|
|
tokai
| |
Re: A surprisingly fruity OS4 port. Posted on 24-Sep-2012 19:59:38
| | [ #34 ] |
|
|
|
Regular Member |
Joined: 28-Nov-2003 Posts: 124
From: binaryriot | | |
|
| Hey guys,
After more than 4 years I updated SerialEcho. Well... I fixed some harmless issue in 2008 that was never released to the public. With help of Develin (onyxsoft) a build issue for AROS was fixed too. Whoohooo!
Well... Just fetch it from: http://tokai.binaryriot.org/public/
Versions for MorphOS, AmigaOS, AROS (x86), and OS4 are available. Source code is included too, in case someone wants to make builds for other architectures which are supported by AROS or some other amiganoid operating system I do not know about yet — I'm really out of the loop what is up-to-date these days. Is OS4 still alive? Or MorphOS?
Anyway... I'm only posting this kind of 'news' here, because I can't test the version for OS4 and would like to know if the recent builds still work. So, if someone would be so kind to try and then report back... this would be great! Thanks! _________________ tokai.binaryriot.org binaryriot.de |
|
Status: Offline |
|
|