Possible "Cheat" To Run MSDOS Software Just By Double Clicking It's .Exe

korban · 1875

magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Arrgh, my bad AMIGASYSTEM. Sorry.


It has been such a long time that I forgot how the debug output is suppose to work  :-[


1) make sure you have a file names wbXcli.debug next to wbXcli executable. The .debug file does not have to contain anything but is allowed to.
2) start sashimi
3) start your project icon that uses wbXcli


Then Sashimi should output some debug information that wbXcli prints out. You can see for yourself if it accepts the stack parameter or not (amongst other things).


If you are able to paste the output from sashimi or make a screenshot (don't forget to resize the sashimi output window so that it contains all output).


AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3755
    • Karma: +69/-2
  • AROS One
    • AROS One
Sorry I'm coming home now, I was at the beach  8)

Here is the copy-paste of the sashimi log:

Sashimi installed ([Ctrl]+C or "Break 1" to remove)
[wbXcli] enter
[wbXcli] Attempting to process 1 icons
[wbXcli] (1)
[wbXcli] (1) retrieved argument -> "Gunship.sid"
[wbXcli] (1) retrieved  filename from lock -> "Gunship.sid"
[wbXcli] (1) retrieved directory from lock -> "AROS:"
[wbXcli] (1) trying to get icon for file "AROS:Gunship.sid"
[wbXcli] (1) found icon for file "AROS:Gunship.sid"
[wbXcli] (1) the icon is a project icon, parsing the icon follows
[wbXcli] (1) tool type WINDOW was not found
[wbXcli] (1) tool type STACK found (=   70000)
[wbXcli] (1) tool type USERSHELL was not found
[wbXcli] (1) tool type WAIT was not found
[wbXcli] (1) tool type DELAY was not found
[wbXcli] (1) tool type WBXCLI found (= C:TinySID "{f}" )
[wbXcli] (1) INFO: wait 100 stack 70000 usershell -1 window CON:0/50//80/wbXcli/Auto
[wbXcli] (1) WBXCLI.command = C:TinySID "AROS:Gunship.sid"
[wbXcli] (1) console window opened ok
[Kernel:000] EROR! Task went out of stack limits
[Kernel:000]  - Lower Bound = 0x4adb45c0, Upper Bound = 0x4adbe5c0
[Kernel:000]  - SP = 0x4adae1e0
« Last Edit: May 24, 2022, 07:36:34 AM by AMIGASYSTEM »



magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Thank you AMIGASYSTEM.

As i suspected wbXcli is doing its job as it is suppose to  :)

As said I have little time atm but at first glance tinysid from Fredrik Wikstrom also crashes with a stacklimit (inside AHI device player thread) for me using a normal AROS shell (so not using wbXcli). No matter how high I set the stack to so, i have to look at his tinysid code in order to see what might be wrong. It might even be that there is something amiss with AHI (but can't tell atm so pure speculation at this point).

Tested on official alt ABIv0 linux hosted release (not the new beta versions that deadwood posted for testing)


AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3755
    • Karma: +69/-2
  • AROS One
    • AROS One
I from a Shell have no problem if I use a Stack of 70000 or higher, TinySID both Standard and SDL work perfectly and qualitatively.


magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
@AMIGASYSTEM:

Strange that tinysid work for you (also on older builds). Not saying you should experience the same errors but just strange  :)

This is the debuglog when I use a stack of 700000 (yes, 5 zeros) and try to play accompanied Freeze.sid
Code: [Select]
[CMI8738]: DriverInit()
[CMI8738]: DriverCleanup()
[VIA-AC97]: DriverInit()
[VIA-AC97]: DriverCleanup()
== ahi_pci_init 1
== ahi_pci_init 2
== ahi_pci_init 3
== ahi_pci_exit 1
== ahi_pci_exit 2
== ahi_pci_exit 3
== ahi_pci_exit 4
[Envy24]: DriverInit()
[Envy24]: DriverCleanup()

Envy24HT DriverInit
[KRN] Task TinySID soundcard thread went out of stack limits
[KRN] Lower 00000000, upper f08f7f80, SP f09c50b0
[KRN] Trap signal 11, SysBase f08f61e0, KernelBase f08f6f44
    SP=f12cbc00  FP=f12cbc48  PC=ef7dc0d7
    R0=00000090  R1=f08f61e0  R2=00000001  R3=0100000e
    R4=feb5ad83  R5=f7d9e602
*** stack smashing detected ***: <unknown> terminated

I got a bit further with a stack of 4096000 but after pressing return:
Code: [Select]
[CMI8738]: DriverInit()
[CMI8738]: DriverCleanup()
[VIA-AC97]: DriverInit()
[VIA-AC97]: DriverCleanup()
== ahi_pci_init 1
== ahi_pci_init 2
== ahi_pci_init 3
== ahi_pci_exit 1
== ahi_pci_exit 2
== ahi_pci_exit 3
== ahi_pci_exit 4
[Envy24]: DriverInit()
[Envy24]: DriverCleanup()

Envy24HT DriverInit
[KRN] Trap signal 11, SysBase f08ab1e0, KernelBase f08abf44
    SP=f172ba10  FP=f172ba58  PC=ef78c3ea
    R0=f08acf80  R1=f08aa090  R2=ffffffff  R3=ffffffff
    R4=f1281580  R5=00000000
*** Logged alert:
Program failed
Task : 0xF119C100 - tinysid
Error: 0x80000002 - Hardware bus fault/address error
PC   : 0xEF78C3EA
Module kernel Segment 1 .text (0xEF78A000) Offset 0x000023EA
Function tlsf_freevec (0xEF78C380) Offset 0x0000006A
CPU context:
EAX=0xF08ACF80  EBX=0xF08AA090  ECX=0xFFFFFFFF  EDX=0xFFFFFFFF
ESI=0x00000000  EDI=0xF1281580  ESP=0xF172BA10  EBP=0xF172BA58
EIP=0xEF78C3EA  ESP=0xF172BA10  EFLAGS=0x00010286
Stack trace:
0xEF79AC69 kernel Function nommu_FreeMem + 0x000000B9
0xEF793FCC kernel Function Exec_35_FreeMem + 0x0000007C
0xEF793F1D kernel Function Exec_38_FreeEntry + 0x0000003D
0xEF79609D kernel Function Exec_48_RemTask + 0x000000DD
0xF105DF06 tinysid Function DeleteTask + 0x00000016
0xF105DA1B tinysid Function stop_playing + 0x000000C7
0xF105B577 tinysid Function main + 0x0000010B
0xF105B3C4 tinysid Segment 1 .text + 0x00000154
0xEF810640 dos.library Function CallEntry + 0x00000050
0xEF78F3FB kernel Segment 1 .text + 0x000053FB
« Last Edit: May 24, 2022, 08:39:57 AM by magorium »



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3755
    • Karma: +69/-2
  • AROS One
    • AROS One
I don't know maybe Hosted AROS behaves differently.

I created a video where you can also listen to two musics in SID format from both Shell and Dopus4.

In the video I run the two SID musics several times without having any problem, in the TEST I used AROS One + D3 by deadwood.

Even on earlier versions of AROS One TinySID works fine with minimum 70000 stack

https://drive.google.com/file/d/1cYkf5OebuDVtp3xYVZsGHL5VInRVHYLu/view?usp=sharing
« Last Edit: May 24, 2022, 12:00:40 PM by AMIGASYSTEM »



paolone

  • Legendary Member
  • *****
    • Posts: 569
    • Karma: +90/-0
No no script created, I just assigned the DosBOX path, created a "Datatypes" Descriptor and all the executables through the def_MSD.info are associated to C:RunInDOSBOX

In this way any executable will have its icon preconfigured with RunInDOSBOX and the MS-DOS executable will be started automatically with a simple click, if I want I can also create a second Descriptor to start all .bat files as well


Hi, would you be so kind to explain to me how to create those "Datatypes"? I've tried to understand it so many times, but without luck.


AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3755
    • Karma: +69/-2
  • AROS One
    • AROS One
Paolo it is simpler than you think, in your last ISO of Icaros you have my Dopus4 ready for this operation, there are two tools "examinedtd" and "createdtd" (see screenshot) which are used one to decompile a Descriptor/Datatatype and the other to recompile it.

That said take any existing datatype and once you decompile it you will get a text file named "dt.txt" that you will need to modify according to your needs, look at a few of each type to understand the mechanism.

The two important items to consider are the "MASK" or "Pattern", you must use only one otherwise conflicts may arise.

MASK= Allows recognition of the file through the acronym that each file type has beginning file by looking at it with a hexadecimal editor, in the case of EXEs MSDOS and the famous "MZ". With "MASK" the file will be recognized even without an extension

Pattern= Allows recognition through its extension, if you delete the extension the file can no longer be recognized, in this case as a parameter the extension is used, example: #?.mp3

Once you have motificated your Descriptor you only need to fill it in with the "createdtd" tool, in my Dopus4 everything is already preset, just highlight "dt.txt" and click on "createdtd"

To complete you will have to create yourself a Def_..... (the name to add to the Def is what you will put in the descriptor, first line), in the Tooltype you will add the tool of your choice to open that type of file.



--- Italiano ---

Paolo è più semplice di quanto pensi, nella tua ultima ISO di Icaros hai il mio Dopus4 già pronto per questa operazione, ci sono due strumenti "examinedtd" e "createdtd" (vedi screenshot) che servono uno per decompilare un Descrittore/Datatype e l'altro per ricomplilarlo.

Detto questo prendi un qualsiasi datatypes esistente e una volta decompilato otterrai un file di testo nominato "dt.txt" che dovrai modificare in base alle tue esigenze, guardane qualcuno per ogni tipologia per capire il meccanismo.

Le due voci importanti da considerare sono il "MASK" o "Pattern", ne devi utilizzare solo uno altrimenti potrebbero crearsi dei conflitti.

MASK= Consente il riconoscimento del file attraverso l'acronimo che ogni tipo di file ha inizio file guardandolo con un editore esadecimale, nel caso degli EXE MSDOS e il famoso "MZ". Con "MASK" il file sarà riconosciuto anche senza estensione

Pattern= Consente il riconoscimento attraverso la sua estensione, se elimini l'estensione il file non potrà più essere riconosciuto, in questo caso come parametro si utilizza l'estensione, esempio: #?.mp3

Una volta motificato il tuo Descrittore ti basterà compilarlo con lo strumento "createdtd", nel mio Dopus4 è tutto già preimpostato, basta evidenziare "dt.txt" e cliccare su "createdtd"

Per completare dovrai crearti una Def_..... (il nome da aggiungere al Def è quello che metterai nel descrittore, prima riga), nel Tooltype aggiungerai lo strumento da te prescelto per aprire quel tipo di file.
« Last Edit: May 25, 2022, 05:39:23 AM by AMIGASYSTEM »



paolone

  • Legendary Member
  • *****
    • Posts: 569
    • Karma: +90/-0

AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3755
    • Karma: +69/-2
  • AROS One
    • AROS One
I'm glad to have been helpful  :D