atarialoha Posted May 3, 2021 Share Posted May 3, 2021 Hi folks, I unzipped and copied the source (src) files for ATasm onto my Mac, under Applications/Atari800MacX/atasm/src/ (I wanted to use ATasm with Atari800MacX and just load the saved state, assemble to it, and reload, then debug with DDT) Anyway, make gave some errors. I assume it didn't work and I am not sure what happened: gcc -Wall -DZLIB_CAPABLE -I../zlib -DUNIX -O3 -fomit-frame-pointer -c asm.c gcc -Wall -DZLIB_CAPABLE -I../zlib -DUNIX -O3 -fomit-frame-pointer -c symbol.c gcc -Wall -DZLIB_CAPABLE -I../zlib -DUNIX -O3 -fomit-frame-pointer -c parser.c gcc -Wall -DZLIB_CAPABLE -I../zlib -DUNIX -O3 -fomit-frame-pointer -c setparse.c gcc -Wall -DZLIB_CAPABLE -I../zlib -DUNIX -O3 -fomit-frame-pointer -c state.c gcc -Wall -DZLIB_CAPABLE -I../zlib -DUNIX -O3 -fomit-frame-pointer -c dimage.c gcc -Wall -DZLIB_CAPABLE -I../zlib -DUNIX -O3 -fomit-frame-pointer -c inc_path.c gcc -Wall -DZLIB_CAPABLE -I../zlib -DUNIX -O3 -fomit-frame-pointer -c crc32.c gcc -Wall -DZLIB_CAPABLE -I../zlib -DUNIX -O3 -fomit-frame-pointer -c atasm_err.c gcc -Wall -DZLIB_CAPABLE -I../zlib -DUNIX -O3 -fomit-frame-pointer -c state2.c gcc -o atasm asm.o symbol.o parser.o setparse.o state.o dimage.o inc_path.o crc32.o atasm_err.o state2.o -L../zlib -lz ld: warning: directory not found for option '-L../zlib' Quote Link to comment Share on other sites More sharing options...
atarialoha Posted May 3, 2021 Author Share Posted May 3, 2021 Here are the folder contents afterwards: #atasm_err.c# atasm atasm_err.o dimage.c inc_path.h parser.o state.o symbol.h Makefile atasm.1.in compat.h dimage.o inc_path.o setparse.c state2.c symbol.o asm.c atasm_err.c crc32.c directive.h ops.h setparse.o state2.o asm.o atasm_err.h crc32.o inc_path.c parser.c state.c symbol.c Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted May 3, 2021 Share Posted May 3, 2021 You need to provide the PATH correctly for the '-L../zlib' have a look and make sure it there somewhere and change the switch accordingly. Looking at you application, it's expecting the Library to be in Applications/Atari800MacX/atasm/ I would suspect it might be under Applications/Atari800MacX/atasm/lib/ so the switch could be '-L../lib/zlib' Quote Link to comment Share on other sites More sharing options...
HiassofT Posted May 3, 2021 Share Posted May 3, 2021 You can also build ATasm without zlib support (it's optional and only used for creating compressed Atari800 snapshot files, a feature I've never used). Simply run: make USEZ= ZLIB= so long, Hias Quote Link to comment Share on other sites More sharing options...
atarialoha Posted May 3, 2021 Author Share Posted May 3, 2021 ok thanks both, will try those Quote Link to comment Share on other sites More sharing options...
atarialoha Posted May 4, 2021 Author Share Posted May 4, 2021 (edited) No joy. It could be I'm on the M1 Mac. If all else fails I'm just going to use Windoze... I actually have a Windoze box (old PC bought on eBay) on the side and use it via realVNC (free for home use; even the clipboard is shared). This is if I want native speed instead of virtualizing it (I can't anyway right now as VMware Fusion doesn't yet have a binary for the M1; Parallels does but their bloodsucking subscription business model is too greedy for my taste). My older x86 Macs are also on the LAN if I really need to boot them up. Edited May 5, 2021 by atarialoha Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted May 4, 2021 Share Posted May 4, 2021 Can't you download zlib sources and configure/make the library yourself and then copy it to the expected folder? Quote Link to comment Share on other sites More sharing options...
atarialoha Posted May 5, 2021 Author Share Posted May 5, 2021 8 minutes ago, Wrathchild said: Can't you download zlib sources and configure/make the library yourself and then copy it to the expected folder? Yes but I was waiting for someone to give me a kick in the ass to do it properly LOL Here is what was done, for future reference by others: Downloaded from here https://zlib.net/zlib-1.2.11.tar.gz and then extracted, renamed to zlib, and moved to the same directory level as src, and then compiled make gcc -o atasm asm.o symbol.o parser.o setparse.o state.o dimage.o inc_path.o crc32.o atasm_err.o state2.o -L../zlib -lz and now it works (haha, thanks!) ./atasm -h ATasm 1.09 (A mostly Mac65 compatible 6502 cross-assembler) Usage: ./atasm [-v] [-s] [-r] [-d[symbol=value] [-o[fname.out] [-m[fname.state]] <fname.m65> where -v: prints assembly trace -s: prints symbol table -u: enables undocumented opcodes -m[fname]: defines template emulator state file -x[fname]: saves object file to .XFD/.ATR disk image [fname] -r: saves object code as a raw binary image -f[value]: set raw binary fill byte to [value] -o[fname]: saves object file to [fname] instead of <fname>.65o -d[symbol=value]: pre-defines [symbol] to [value] -l[fname]: dumps labels to file [fname] -g[fname]: dumps debug list to file [fname] -Idirectory: search [directory] for .INCLUDE files -mae: treats local labels like MAE assembler 1 Quote Link to comment Share on other sites More sharing options...
atarialoha Posted May 5, 2021 Author Share Posted May 5, 2021 I just realized I actually compiled my first M1 CPU native binary executable! Woot! 3 Quote Link to comment Share on other sites More sharing options...
tsom Posted May 5, 2021 Share Posted May 5, 2021 Since you're on MacOS, you could also use HomeBrew (https://brew.sh) and install zlib with that: brew install zlib Quote Link to comment Share on other sites More sharing options...
atarialoha Posted May 5, 2021 Author Share Posted May 5, 2021 (edited) 49 minutes ago, tsom said: Since you're on MacOS, you could also use HomeBrew (https://brew.sh) and install zlib with that: brew install zlib Yes but I am always paranoid about all these types of tools and some of my suspicions are confirmed by others. So I don't have homebrew on my Macs. https://applehelpwriter.com/2018/03/21/how-homebrew-invites-users-to-get-pwned/ There seems to be ways to reduce the risk but, in such a case, I prefer to not even install it. It is somewhat analogous to people circumventing smartphone operating systems to install their own apps through "jailbreak" methods. Edited May 5, 2021 by atarialoha Quote Link to comment Share on other sites More sharing options...
tsom Posted May 5, 2021 Share Posted May 5, 2021 9 hours ago, atarialoha said: Yes but I am always paranoid about all these types of tools and some of my suspicions are confirmed by others. So I don't have homebrew on my Macs. https://applehelpwriter.com/2018/03/21/how-homebrew-invites-users-to-get-pwned/ There seems to be ways to reduce the risk but, in such a case, I prefer to not even install it. It is somewhat analogous to people circumventing smartphone operating systems to install their own apps through "jailbreak" methods. Hm. I've never had an issue with Homebrew (or read of any exploits), and think it's the easiest way to install packages and tools without having to deal with downloading / building/installing. But to each their own In the end, you got it to build, so congrats! My wish is better integration with VSCode - I was able to set up a build task that can compile a source file with a keystroke, but it would be awesome to have a dedicated extension for it, and be able to debug (with Atari800MacX), like I see the C64 people do with Kick Assembler (java...ick ) 2 Quote Link to comment Share on other sites More sharing options...
atarialoha Posted May 5, 2021 Author Share Posted May 5, 2021 4 hours ago, tsom said: Hm. I've never had an issue with Homebrew (or read of any exploits), and think it's the easiest way to install packages and tools without having to deal with downloading / building/installing. But to each their own In the end, you got it to build, so congrats! My wish is better integration with VSCode - I was able to set up a build task that can compile a source file with a keystroke, but it would be awesome to have a dedicated extension for it, and be able to debug (with Atari800MacX), like I see the C64 people do with Kick Assembler (java...ick ) I haven't investigated it but since you're on a Mac, you can just create an Automator action or write a simple AppleScript to do it all, no? (I haven't written AppleScript for two decades so would need time to get back into it if I were to do so). Quote Link to comment Share on other sites More sharing options...
tsom Posted May 5, 2021 Share Posted May 5, 2021 I do have a task in VS Code that does do a build of the current open file, one task for both 'atasm' and 'mads': { // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format // tasks and problem matcher to compile Atari sources in the Mac/65 format "version": "2.0.0", "tasks": [ { "label": "Build - ATASM", "type": "shell", "command": "atasm", "args": [ "${relativeFile}", "-mae", "-Iincludes", "-IUtility", "-o${fileBasenameNoExtension}.xex" ], "group": "build", "presentation": { // Reveal the output only if unrecognized errors occur. "reveal": "always" }, "problemMatcher": { // "owner": "atasm", "fileLocation": [ "relative", "${workspaceFolder}" ], "pattern": [ { "regexp": "^In (.*),\\sline\\s(\\d+)--$", "file": 1, "line": 2, }, { "regexp": "^\\s(Error|Warning):\\s(.*)$", "severity": 1, "message": 2 } ] } }, { "label": "Build - MADS", "type": "shell", "command": "mads", "args": [ "${fileBasename}", "-l", "-o:${fileBasenameNoExtension}.xex" ], "group": "build", "presentation": { // Reveal the output only if unrecognized errors occur. "reveal": "always" }, "problemMatcher": { // "owner": "MADS", "fileLocation": [ "relative", "${workspaceFolder}" ], "pattern": [ { "regexp": "^(.*)\\s\\((\\d*)\\)\\s(ERROR|WARNING):\\s(.*)$", "file": 1, "line": 2, "severity": 3, "message": 4, } ] } } ] } Put this tasks.json file into a .vscode folder in the same folder as the source, and you'll be able to launch a build task (Command(control)-Shift-B. If there are errors, it will also show in the "Problems" tab. Ideally, it'd be nice to be able to launch the application in the emulator AND debug. (And having more than just syntax coloring would be nice - hover popups, IntelliSense, etc. Quote Link to comment Share on other sites More sharing options...
atarialoha Posted May 5, 2021 Author Share Posted May 5, 2021 I have only just started to investigate this (and I am not familiar with Visual Studio Code; my hobbyist needs are simple and I just use the Atom editor) but it looks like much can be accomplished by passing parameters in Automator to the shell: https://www.jimbobbennett.io/open-anything-in-vs-code-using-a-macos-quick-action/ Quote Link to comment Share on other sites More sharing options...
atarialoha Posted May 5, 2021 Author Share Posted May 5, 2021 (edited) Wow, you learn new things everyday when discussing Atari stuff ? I just looked at Visual Studio Code and it seems quite impressive, with integration to "Retro Assembler," but then again it is Yet Another IDE For Me To Learn so probably I will keep it simple... stay with the text editor (Atom) and do the command line assembly manually. It's a bit funny however for Linux and Mac users to use a Microsoft IDE hahaha. But I guess the new guy in charge of MSFT has taken / recognized a new direction because the Windows stronghold is not as strong as 20 years ago (what with the growing popularity of MacOS, Linux, Android/iOS, and cloud platforms). Even Intel is losing its grip to ARM and maybe RISC-V. Edited May 5, 2021 by atarialoha Quote Link to comment Share on other sites More sharing options...
RetroCoder Posted May 31, 2021 Share Posted May 31, 2021 There is a Visual Studio Code extension that combines ATasm with Altirra. Allows for source level debugging and breakpoints. look for Atasm-altirra-bridge in VSCode extensions. I would love for someone to compile the latest version of ATasm on a mac and send me the executable so that I can put it into the extension. Currently it ships with Linux and windows support. Quote Link to comment Share on other sites More sharing options...
tsom Posted May 31, 2021 Share Posted May 31, 2021 (hopefully this works). Here is atasm v1.11, build from this repo, for MacOS: https://github.com/CycoPH/atasm atasm.zip 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.