Jump to content
IGNORED

Mac OSX: How to use Altirra/Wine and Eclipse/WUDSN/MADS for development


Recommended Posts

It seems you haven't followed my instructions completely because the script that I provided circumvents the bug in MADS which omits the "Source:" line at the beginning of the .lst file. This in turn is a requirement for Altirra to correctly use breakpoints etc. This has been explained by Phaeron to me here:

http://atariage.com/forums/topic/254747-;-trace-and-;-assert-not-working-with-altirramads-under-wine/

So unless you get the script working the way I explained in the first post (and in the other thread) and have "Source:" at the beginning of the .lst file, breakpoints etc. won't work.

Link to comment
Share on other sites

Perhaps I should have copied the content of the .lst file from the filesystem instead of the Eclipse editor (where it is generated before altirra.sh is executed). So here is the new content generated with the latest version of mads I could get for Mac os x and this time from inside the file system.

 

mads 2.0.7
Source: /Users/patjomki/Documents/workspace/Example/example.lst
1 org $4000
2
3 start
4 FFFF> 4000-4007> A9 34 lda #52
5 4002 8D C8 02 sta 712
6
7 4005 endless
8 4005 4C 05 40 jmp endless
9
10 ; run start

The problem remains though. :(

Breakpoints are not executed.

Link to comment
Share on other sites

Compared to my .lst file within windows I found out that there is a difference:

 

mac version:

mads 2.0.7
Source: /Users/patjomki/Documents/workspace/Example/example.lst

 

windows version:

mads 1.9.9

Source: C:\jac\wudsn\Workspace\Example\example.asm

 

So shouldn't the altirra.sh script generate the Source: line with .asm at the end instead of .lst?

Link to comment
Share on other sites

Yes. That was the reason. In order to avoid that I had to change the .sh script a little bit. So here is the version of freetz' script that allows source level debugging:

#/!bin/bash
fullpath="${1//\"}"
lstfile=${fullpath%.xex}.lst
WineExec=/Applications/Wine.app/Contents/Resources/bin/wine
AltirraExec=/Applications/Altirra.app/Contents/Resources/wineprefix/drive_c/winebottler/Altirra.exe

sed "/mads /a\\
Source: $lstfile
" $lstfile > $lstfile.temp
sed "s/lst/asm/" $lstfile.temp > $lstfile
rm $listfile.temp

cd "$(dirname "$fullpath")"
$WineExec $AltirraExec /singleinstance /run $(basename "$fullpath") &

Enjoy!

Edited by patjomki
Link to comment
Share on other sites

Interesting, while this contradicts what Phaeron wrote on the issue of breakpoints here where he specifically metions the .lst file in the Source line:

http://atariage.com/forums/topic/254747-;-trace-and-;-assert-not-working-with-altirramads-under-wine/?p=3550868

 

...the newer versions of MADS (I have 2.0.8 running here now) seem to have now been fixed and include the Source line with reference to the .asm file.

Therefore the lines from 'sed "/mads /a\\' until 'rm $listfile.temp' are not only no longer necessary with current versions of MADS, but will also prevent the inclusion of the correct files as they will result in two Source: lines which then seem to break the desired functionality.

I'm not sure if previous versions of MADS and/or Altirra (I'm still running Altirra 2.71 here in my wine environment) required the .lst files instead of the .asm file (because source level debuggin was working for me before), so I leave the original script as it is, but I have added instructions to remove the lines that are dealing with this issue when using MADS 2.0.8 and above.

Edited by freetz
Link to comment
Share on other sites

Thanks a lot.

 

I even already found that version but was confused due to the reason that the files extension of the source file changed from .pas to .dpr.

Anyway, I could compile it and the bug with the missing Source: statement in the .lst file is gone. ;-)

 

One thing is a little bit confusing. Athough the version no. should be 2.11 according to the .zip file the printed version no in the .lst file is still mads 2.0.8?

Edited by patjomki
Link to comment
Share on other sites

  • 1 month later...

So I thought about starting to learn assembler again.

I'm using my Thinkpad with Fedora 27 , installed Eclipse, WUDSN , Wine 3.0.1 stable and downloaded Altirra 3.10 .

Using Mads 207 ( well the 211 dated DPR version ) I can compile and run programs but once I enable the debugger , Wine starts to freeze after 5 seconds.

Anybody got an idea or has a similar issue ?

Link to comment
Share on other sites

So I thought about starting to learn assembler again.

I'm using my Thinkpad with Fedora 27 , installed Eclipse, WUDSN , Wine 3.0.1 stable and downloaded Altirra 3.10 .

Using Mads 207 ( well the 211 dated DPR version ) I can compile and run programs but once I enable the debugger , Wine starts to freeze after 5 seconds.

Anybody got an idea or has a similar issue ?

 

 

I've replicated my setup under OS X 10.11 also with Wine 2.0 , the 32 bit bottled version of Altirra 3.0 and Mads 2.08 (2/11) and I have the same issue once I enable the debugger.

Link to comment
Share on other sites

Do you use the shellscript provided by freetz?

 

 

Yes, only difference is the path to my Wine binary and I removed the & so the Altirra process doesn't start in the background.

 

#/!bin/bash

fullpath="${1//\"}"

lstfile=${fullpath%.xex}.lst

WineExec=/Applications/Wine.app/Contents/Resources/bin/wine

AltirraExec=/Applications/Altirra.app/Contents/Resources/wineprefix/drive_c/winebottler/Altirra.exe

 

cd "$(dirname "$fullpath")"

$WineExec $AltirraExec /singleinstance /run $(basename "$fullpath")

 

I should also mention that I tried again on my Fedora install with the 32 bit wine libraries and binary but this also hangs once I enable the debugger.

 

Could it be my version of Wine ?

Edited by Lastic
  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

GEANY

 

http://www.geany.org

 

Geany is a small and lightweight Integrated Development Environment. It was developed to provide a small and fast IDE, which has only a few dependencies from other packages.

 

Geany is known to run under Linux, FreeBSD, NetBSD, OpenBSD, MacOS X, AIX v5.3, Solaris Express and Windows. More generally, it should run on every platform, which is supported by the GTK libraries. Only the Windows port of Geany is missing some features.

geany_mads.zip

  • Like 1
Link to comment
Share on other sites

Outlining works for Mad-Pascal in Geany

I can try to make it work for MADS ;)

That would be pretty awesome. I have only looked at Geany breifly so far, but were it able to outline like WUDSN, I would be looking pretty closely. :)

 

I was really keen to use VS Code a while ago for MADS work, but I just could not live without MADS outlining. Thought about implementing it myself in VS Code, researched it, then gave up. :) No room left in my head for that stuff.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...