Jump to content
IGNORED

MADS doesn´t run on Mac OS X Catalina


skr

Recommended Posts

I´ve updated to Mac OS X Catalina, and now MADS doesn´t run anymore:

 

Quote

error=86, Bad CPU type in executable

This is what WUDSN outputs in eclipse. I´ve downloaded and installed the latest MADS version, but there is only a mads.pas file in it. So I downloaded fbc, but it´s not compatible with Catalina.

 

Anyone has a solution for this?
 

Link to comment
Share on other sites

I thought that might have been the answer. If you still have a macOS Mojave installer, you could create a virtual machine (using VMWare Fusion or Parallels) or install it on an external drive and boot to Mojave when you want it. 
 

I will upgrade to Catalina in the next few months, but I’m hoping that Wine will be working in 64-bit before I make the move. 
 

Does MADS have any source available so you could compile a 64-bit binary yourself using Xcode? I don’t know since I don’t do any 8-bit development. 
 

Bob C

Link to comment
Share on other sites

Is there a free VMWare player for MacOS like Windows?

 

Maybe run a Windows 10 guest - or just install as a standalone OS in it's own partition - that's what I do on my MBP, then buy a cheap licence on Fleabay for a few bucks.

Use the MS Windows and Office ISO downloader to get your installer https://www.heidoc.net/joomla/technology-science/microsoft/67-microsoft-windows-and-office-iso-download-tool

Use Rufus under Windows to create the bootable USB flashdrive.

Link to comment
Share on other sites

9 hours ago, darwinmac said:

but I’m hoping that Wine will be working in 64-bit before I make the move.

I run 64-bit Linux and Wine works fine (that rhymes :)). Considering macOS is Darwin+FreeBSD userland under the hood, I suppose it should work.

 

Edit: oops, from winehq: Current Wine includes support for 64 bit Wine on Mac OS X; however, this has not been tested very much, and some applications may never work due to an ABI incompatibility between Win64 and OS X

Edited by ivop
Link to comment
Share on other sites

  • 2 years later...

I don't use mads, but it compiled pretty simply, assuming you have Homebrew installed.

 

Steps:

 

1) Install Homebrew - no need to do this if you already have Homebrew installed, of course. Go to the link above, copy the line-noise under 'Install Homebrew' open Terminal.app, paste into the terminal, and press return...

 

prompt% /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

 

2) Launch a new shell window (or type 'rehash') to get things into your $PATH

 

3) Install fpc and wget (wget is just so you can easily fetch Mads)

 

prompt% brew install fpc wget

 

4) Fetch the Mads source code

 

prompt% wget https://github.com/tebe6502/Mad-Assembler/archive/refs/tags/2.1.5.tar.gz

 

5) unpack the archive and change directory to the just-unpacked source-code

 

prompt% tar xzvf 2.1.5.tar.gz

prompt% cd Mad-Assembler-2.1.5

 

6) Compile mads

 

prompt% fpc -O3 -Mdelphi -v mads.pas

 

7) There is no (7). Ok, well if you want to test that it works...

 

prompt% ./mads

mads 2.1.5

Syntax: mads source [switches]

-b:address      Generate binary file at specific address

-bc             Branch condition test

-c              Label case sensitivity

-d:label=value  Define a label

-f              CPU command at first column

-fv:value       Set raw binary fill byte to [value]

-hc[:filename]  Header file for CC65

-hm[:filename]  Header file for MADS

-i:path         Additional include directories

-l[:filename]   Generate listing

-m:filename     File with macro definition

-ml:value       margin-left property

-o:filename     Set object file name

-p              Print fully qualified file names in listing and error messages

-s              Suppress info messages

-t[:filename]   List label table

-u              Warn of unused labels

-vu             Verify code inside unreferenced procedures

-x              Exclude unreferenced procedures

 

You might want to put the binary somewhere in your $PATH - /usr/local/bin or ~/bin or somewhere like that so you don't have to provide a fully-qualified path every time you want to run it.

 

Note, the above was done on an M1 (Ultra :)) Mac running Monterey, but it'd work the same on an Intel one, and the OS level isn't really relevant for the steps here - it's all open-source, from source.

Also note, the above is step-by-step, it's easy to make "make a cup of tea" look complex if you go step-by-step, it's actually a lot easier/faster than it looks :)

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

24 minutes ago, Spaced Cowboy said:

NOOOOOOOOooooooo!!! (oooo) (ooo) (echooo). Never ever ever direct output from curl directly into bash. That's being pwned waiting to happen.

 

Edited by ivop
Link to comment
Share on other sites

Sure, your call.

 

It's the official way you install homebrew, right there on the home-page. Personally I install Homebrew on every Mac I have (which is almost a dozen or so, since I work there :)) and I've never had a problem - but there are other, more onerous, installation options if you prefer.  

 

Link to comment
Share on other sites

16 minutes ago, Spaced Cowboy said:

It's the official way you install homebrew, right there on the home-page.

That doesn't make it safe. MITM attacks, hidden text attacks, compromised webserver, compromised repo, DNS rerouted, a partial script that gets executed when the connection dies halfway (rm -rf /usr/local/program becomes rm -rf /usr), et cetera.

 

One of the solutions is indeed "don't care" ;) One of the others is at least download the install script first and check its integrity before you run it. But yeah, if the install script is doing curl|bash you are out of options.

 

16 minutes ago, Spaced Cowboy said:

and I've never had a problem

Hope you don't run that on production servers. A problem is bound to happen at one point. As for the other installation options mentioned on that page, cloning the repo is indeed preferred.

 

 

Edit: BTW this is not meant as an attack on you or something. It's great that you explained how it works on macOS! :thumbsup:

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

22 minutes ago, ivop said:

That doesn't make it safe. MITM attacks, hidden text attacks, compromised webserver, DNS rerouted, a partial script that gets executed when the connection dies halfway (rm -rf /usr/local/program becomes rm -rf /usr), et cetera.

 

One of the solutions is indeed "don't care" ;) One of the others is at least download the install script first and check its integrity before you run it. But yeah, if the install script is doing curl|bash you are out of options.

 

Hope you don't run that on production servers. A problem is bound to happen at one point. As for the other installation options mentioned on that page, cloning the repo is indeed preferred.

 

Nothing in this life is perfectly safe, and your point is valid if you're concerned about it - hence the "sure, your call". I assume, if this is the case, that you're also meticulously going through any and all the source code you download from the internet - like mads and wget above. I mean, anything you download is a security risk unless it's completely and rigorously verified... The number of times bugs and exploits have been found in Linux (just for example, not getting at linux specifically) despite the "millions of eyeballs" is proof that you can't trust anything unless you completely verify it yourself or pay someone to do so and get a service-level agreement...

 

[yeah, I was being a bit snarky here... Apologies]

 

Personally I think there's a lot of grey-area between "random site on the internet" and "home of homebrew", and yes, I get that this makes homebrew an even juicier target, but it's not been compromised yet to anyone's knowledge, the 'wget' link is TLS-secured so MITM attacks seem unlikely, and I think a DNS attack is feasible (they're not using secure DNS) but would also rapidly become public knowledge because of the sheer traffic through the site. I don't think, in 30+ years of working in and around the internet, I've ever come across a partial script download still being executed by the caller. There's always a first-time, I guess.

 

I should probably make it clear that I don't run anything on public servers at Apple - I'm not an SRE - that was why the comment contained "I've". 

 

So, YMMV - I was trying to provide simple steps to do something. Steps starting off with "clone the repo" and manually installing homebrew would not be simple, IMHO. Feel free to improve them :)

 

Link to comment
Share on other sites

9 minutes ago, Spaced Cowboy said:

[yeah, I was being a bit snarky here... Apologies]

Hehe, accepted. wget is different as it is signed. But yeah, the signing and all could be tampered with. And I have no idea what tebe does behind our backs ;)

 

11 minutes ago, Spaced Cowboy said:

Personally I think there's a lot of grey-area between "random site on the internet" and "home of homebrew"

But the home of homebrew is github which is not owned by Apple. And once people are used to this, they copy any random curl pipe bash from StackOverflow and get pwned. This practice should die. But it won't :D

 

12 minutes ago, Spaced Cowboy said:

So, YMMV - I was trying to provide simple steps to do something. Steps starting off with "clone the repo" and manually installing homebrew would not be simple, IMHO. Feel free to improve them :)

I have no interest in improving macOS instructions, but I'd recommend pointing to the semi-difficult installation instructions instead of curl|bash.

 

Something else. Why do you download wget if you already have curl available?

 

Link to comment
Share on other sites

3 minutes ago, ivop said:

Hehe, accepted. wget is different as it is signed. But yeah, the signing and all could be tampered with. And I have no idea what tebe does behind our backs ;)

If the signature is tampered with, it's very hard to do so without leaving some trace of that. The signing keys would have to be exposed and that fact ought to trigger a revocation of the keys, a re-release with the new signature etc. etc. 

 

If Tebe is doing things behind our backs, I think that counts as just "malicious software" not MITM - and there really isn't much you can do about that without verifying the downloaded material if (s)he's releasing malicious content either through ignorance or with intent.

 

6 minutes ago, ivop said:

But the home of homebrew is github which is not owned by Apple. And once people are used to this, they copy any random curl pipe bash from StackOverflow and get pwned. This practice should die. But it won't :D

I feel the context is important. There is a judgement call to be made based on that context, and yes, I agree that people won't necessarily see the subtlety there, but personally I think there's a lot of benefit to be gained by getting them to make that judgement, rather than blindly expecting what worked for X to work for Y.

 

Tbh, I'd prefer it if homebrew had a better, simple, installation option - but I think raising the bar to introducing people to 'git' is too far. Given that the site is (pretty much, there's a token effort to support Linux) geared towards installation on MacOS, it wouldn't be unreasonable for them to create an Installer script and use the system installer to get bootstrapped, IMHO.

 

11 minutes ago, ivop said:

Something else. Why do you download wget if you already have curl available?

Unconscious bias. I've been using wget a lot longer than curl. I probably should have used curl, but I find it's easier to use wget, and the above instructions were a cut/paste of my shell history (with a bit of rework to support those without what I already have installed) when I ran through the compilation myself.

 

Link to comment
Share on other sites

6 minutes ago, Spaced Cowboy said:

If the signature is tampered with, it's very hard to do so without leaving some trace of that. The signing keys would have to be exposed and that fact ought to trigger a revocation of the keys, a re-release with the new signature etc. etc. 

Sure, it is not easy. But IIRC years ago debian servers were hacked this way. And it was detected, but not before several people were breached.

6 minutes ago, Spaced Cowboy said:

If Tebe is doing things behind our backs, I think that counts as just "malicious software" not MITM - and there really isn't much you can do about that without verifying the downloaded material if (s)he's releasing malicious content either through ignorance or with intent.

Sure, that's not MITM, but Man Upfront that creates malicious software in the first place. That's a matter of trust and we trust Tebe. If mads indeed was doing weird things behind our backs and it was found out, that would be the end of Tebe's imago. People also happily run FJC's U1MB firmware or my Pokey Explorer. The latter is open source though, but nobody checks if my .xex is indeed that source ;) Trust.

 

6 minutes ago, Spaced Cowboy said:

Tbh, I'd prefer it if homebrew had a better, simple, installation option - but I think raising the bar to introducing people to 'git' is too far. Given that the site is (pretty much, there's a token effort to support Linux) geared towards installation on MacOS, it wouldn't be unreasonable for them to create an Installer script and use the system installer to get bootstrapped, IMHO.

That sounds better. That way, the System Installer also keeps track of which files get installed and it can also be properly uninstalled if needed. That's also one of the reasons why curl|bash should not be used, but a proper package manager, which I assume the system installer is.

 

6 minutes ago, Spaced Cowboy said:

Unconscious bias. I've been using wget a lot longer than curl. I probably should have used curl, but I find it's easier to use wget, and the above instructions were a cut/paste of my shell history (with a bit of rework to support those without what I already have installed) when I ran through the compilation myself.

Haha :)

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...