English Amiga Board


Go Back   English Amiga Board > Main > Amiga scene

 
 
Thread Tools
Old 14 March 2017, 08:18   #1
TroyWilkins
Registered User
 
TroyWilkins's Avatar
 
Join Date: Jan 2015
Location: Melbourne, Australia
Posts: 548
loadwb -debug

I'm sure at least some of you know about this, if instead of the loadwb command at the end of your s:startup-sequence, you change it to the following:
Code:
loadwb -debug
Your workbench menus will gain another menu title, with a couple of menu items that may be useful if you know how to use them.

I knew of this back in the day, so to speak, and had only ever seen it with Kickstart 3.0 (v39.29) and Workbench 3.0, as that's what I had on my A1200HD/40. This is under Kickstart 3.1 and Workbench 3.0, but I doubt it's any different:



I was curious as to how far back this feature existed, and so tried it with Kickstart 1.3 (v34.5) and Workbench 1.3.3 (v34.34), and it worked. So I thought I'd go further back in time, all the way back to Kickstart 1.0 and Workbench 1.0, and see if it worked there, and sure enough, it did. However, this was the most interesting find, well, I thought anyway:


It has some items that didn't appear when I tried this under 1.3 or later, as shown below.



I believe all these items are for debug purposes over a serial port (9600bps 8n1), as recently noted in the "Amiga questions you've always been too embarrassed to ask" topic here.

Anyway, I thought this was an interesting find that people may not know about...

Last edited by TroyWilkins; 14 March 2017 at 08:46.
TroyWilkins is offline  
Old 14 March 2017, 09:28   #2
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
Yes, that's how you start RomWack without waiting for a guru.
idrougge is offline  
Old 14 March 2017, 09:30   #3
TroyWilkins
Registered User
 
TroyWilkins's Avatar
 
Join Date: Jan 2015
Location: Melbourne, Australia
Posts: 548
Quote:
Originally Posted by idrougge View Post
Yes, that's how you start RomWack without waiting for a guru.
Indeed, but the extra items under the initial versions of kickstart and workbench I found to be interesting.
TroyWilkins is offline  
Old 14 March 2017, 10:45   #4
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
Especially the 1.0/1.1 items. What does "show variables" do?
idrougge is offline  
Old 14 March 2017, 10:48   #5
TroyWilkins
Registered User
 
TroyWilkins's Avatar
 
Join Date: Jan 2015
Location: Melbourne, Australia
Posts: 548
Quote:
Originally Posted by idrougge View Post
Especially the 1.0/1.1 items. What does "show variables" do?
No idea. I want to work out if there is a way I can connect a terminal to WinUAE or another emulator in order to explore this more.
TroyWilkins is offline  
Old 14 March 2017, 11:07   #6
Locutus
Registered User
 
Join Date: Jul 2014
Location: Finland
Posts: 1,176
WinUAE has a serial port emulation that binds to a tcp socket, this is very handy.

Essentially you start WinUAE and it will wait till you telnet to port 1234, after that all serial in/output goes over that port.

Its really handy to get debug outputs, such as these.
Locutus is offline  
Old 14 March 2017, 11:53   #7
TroyWilkins
Registered User
 
TroyWilkins's Avatar
 
Join Date: Jan 2015
Location: Melbourne, Australia
Posts: 548
Quote:
Originally Posted by Locutus View Post
WinUAE has a serial port emulation that binds to a tcp socket, this is very handy.

Essentially you start WinUAE and it will wait till you telnet to port 1234, after that all serial in/output goes over that port.

Its really handy to get debug outputs, such as these.
Oh wow, perfect, thank you! *Starts up WinUAE*
TroyWilkins is offline  
Old 14 March 2017, 12:06   #8
Jope
-
 
Jope's Avatar
 
Join Date: Jul 2003
Location: Helsinki / Finland
Age: 43
Posts: 9,861
flushlibs is actually handy, it frees you a bit of mem by deallocating ram resident libraries, which have an open count of 0.

You can also say avail flush in a cli to perform the same task.
Jope is online now  
Old 14 March 2017, 13:03   #9
TroyWilkins
Registered User
 
TroyWilkins's Avatar
 
Join Date: Jan 2015
Location: Melbourne, Australia
Posts: 548
Quote:
Originally Posted by idrougge View Post
Especially the 1.0/1.1 items. What does "show variables" do?
"Debug" gives this:


"variables" gives this:


"wblist" gives this:


"vollist" gives this:
TroyWilkins is offline  
Old 14 March 2017, 16:27   #10
matthey
Banned
 
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
Quote:
Originally Posted by Jope View Post
flushlibs is actually handy, it frees you a bit of mem by deallocating ram resident libraries, which have an open count of 0.

You can also say avail flush in a cli to perform the same task.
The libs with an open count of 0 will be flushed automatically during a low memory situation so there is usually no need to do it manually. Some flushed libs will have to be loaded again which will make the system slower and fragment memory. There are a few times when flushing the libs is useful like when changing to a new library version, checking if all memory is returned by a program, perhaps flushing libs before a program (or game) turns off multitasking, etc.

@TroyWilkins
Neat but nothing unexpected .
matthey is offline  
Old 14 March 2017, 16:31   #11
Jope
-
 
Jope's Avatar
 
Join Date: Jul 2003
Location: Helsinki / Finland
Age: 43
Posts: 9,861
Quote:
Originally Posted by matthey View Post
The libs with an open count of 0 will be flushed automatically during a low memory situation so there is usually no need to do it manually.
Ok, I was remembering that sometimes you can't load object modules from the shell before flushing. I'll try it some day, I believe you. :-)
Jope is online now  
Old 14 March 2017, 17:41   #12
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
IIRC option -debug of loadwb may also change the "About" popup on some versions (3.1 ?).


Quote:
Originally Posted by matthey View Post
The libs with an open count of 0 will be flushed automatically during a low memory situation so there is usually no need to do it manually.
Not so easy : it may be that one lib has opened another, so after the flush you end up with libs that have open count of zero but have not been flushed (a likely situation with MUI, for example).
meynaf is offline  
Old 14 March 2017, 22:06   #13
matthey
Banned
 
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
Quote:
Originally Posted by meynaf View Post
Not so easy : it may be that one lib has opened another, so after the flush you end up with libs that have open count of zero but have not been flushed (a likely situation with MUI, for example).
Isn't that what the LIBF_DELEXP bit is for? My vague memory is that it is set when expunging a library with an open count greater than 0 and then the library should expunge itself when the open count reaches 0.
matthey is offline  
Old 14 March 2017, 22:54   #14
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,645
You learn a new thing every day, over 2 decades with an Amiga, and I never knew this! Thanks!
Amiga1992 is offline  
Old 15 March 2017, 07:49   #15
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by matthey View Post
Isn't that what the LIBF_DELEXP bit is for? My vague memory is that it is set when expunging a library with an open count greater than 0 and then the library should expunge itself when the open count reaches 0.
The only thing i can tell is that i've seen libraries go away only after several flushes.
meynaf is offline  
Old 17 March 2017, 04:53   #16
LocalH
Amiga user since 1990
 
LocalH's Avatar
 
Join Date: Aug 2004
Location: Kingsport, TN / USA
Age: 44
Posts: 295
Anybody ever try this with prototype versions of AmigaDOS (like 1.4a15 or 1.4b1, or others that may be out there in private hands)? Just wondering if it behaved any differently, especially in the oddball 1.4a15.
LocalH is offline  
Old 17 March 2017, 06:15   #17
TroyWilkins
Registered User
 
TroyWilkins's Avatar
 
Join Date: Jan 2015
Location: Melbourne, Australia
Posts: 548
Quote:
Originally Posted by LocalH View Post
Anybody ever try this with prototype versions of AmigaDOS (like 1.4a15 or 1.4b1, or others that may be out there in private hands)? Just wondering if it behaved any differently, especially in the oddball 1.4a15.
No, but good idea, I'll try it with the less common versions I have and report back here.
TroyWilkins is offline  
Old 18 March 2017, 00:07   #18
SuperPlay
Registered User
 
SuperPlay's Avatar
 
Join Date: Sep 2013
Location: Staffordshire / UK
Posts: 119
I have just noticed this thread after browsing Grapevine disk mag issue 12.

Article 264 titled 'The Rom-Whack' is worth a peek.
SuperPlay is offline  
Old 18 March 2017, 01:44   #19
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by SuperPlay View Post
I have just noticed this thread after browsing Grapevine disk mag issue 12.

Article 264 titled 'The Rom-Whack' is worth a peek.
here it is:
Code:
       T H E   R O M - W A C K


              By Dr Syn


What, I here you asking is the ROM-
Wack when it is at home?  Well the
ROM-Wack is your Amigas built in
debugger.

Well you must have two Amigas or an
Amiga and another computer running
comms software on a Null Modem link.
I use an Amiga to Amiga link up
myself.  I have JR-Comm running on one
machine at 9600 8n1.  On the machine
that has not got the comms software
running type (in the CLI) loadwb
-debug.  This will bring up a new menu
on the Workbench screen.  On the 1.3
this is hidden but on 2.0 it is not.
---------------------------------------
There are 2 options on this screen.
The first one is DEBUG.  This will do
the ROM-Wack for you.  The second is
Flush-Libs which will clear out any
unused libraries lurking in the
system.


You have probably noticed that the
machine that you have selected DEBUG
from has frozen, this IS normal, as
control has been passed to the second
machine.  If you now look at the
machine running the comms software you
should see a list of registers.  Now
here is a list of commands that can be
used.  I found them out by trial and
error as there is no documentation of
this that I have found.  I you find
more commands then why not send them
into Grapevine.

---------------------------------------
 TAB       - Lists registers
 Return key- Display current address
             and registers values
 >         - Forward 16 bytes
 <         - Back 16 bytes
 Backspace - Back 2 bytes
 CTRL D    - Quit Rom Wack
 CTRL I    - Step through commands at
             current address
 CTRL +    - Change value at current
             address and display them

         Type these commands!

 REGS      - List registers
 ALTER     - Alters current location

If you enter a number it will think it
is an address at set that as the
current address.

Hope that is of some use to you all.
----------------------------------------
I think that you can enter ROM-Wack on
a guru but I am not sure.

end.
--------------------------------------------
emufan is offline  
Old 18 March 2017, 11:06   #20
nogginthenog
Amigan
 
Join Date: Feb 2012
Location: London
Posts: 1,309
Anyone ever made a Windows GUI for ROM-Wack or SAD? Could be quite handy.
nogginthenog 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
LoadWB - Issue DamienD support.Other 21 19 April 2016 10:01
Wb 3.1 LoadWB freeze Bamiga2002 support.Apps 0 10 January 2012 12:06
Hisoft C++ Debug AlfaRomeo Coders. General 0 13 October 2008 21:17
Mame32 Debug redblade Retrogaming General Discussion 4 10 October 2005 05:43
Debug ? mtb support.WinUAE 8 19 December 2002 12:19

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 17:24.

Top

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