tebe Posted January 5, 2019 Share Posted January 5, 2019 (edited) .cb +$80 "Hello"* Wratchild win Edited January 5, 2019 by tebe Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4190965 Share on other sites More sharing options...
+Sheddy Posted January 5, 2019 Share Posted January 5, 2019 Not really, does same as .cb "Hello" no good for screen display unless custom charset Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4190978 Share on other sites More sharing options...
tebe Posted January 5, 2019 Share Posted January 5, 2019 (edited) Yep, thanks. looks like I'll have to be doing that. On another note, is .align supposed to work to exact bytes rather than just pages? Not that it turns out to be that useful for padding out to 128 byte sectors, but when I was experimenting it seems to behave peculiarity with things like ".align $7f"? .align N[,fill_value] how it works: if N > 0 then i := (CURRENT_ADDRESS div N)* N else i := CURRENT_ADDRESS; if i <> CURRENT_ADDRESS then inc(i, N); CURRENT_ADDRESS := i; Edited January 5, 2019 by tebe 1 Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4190979 Share on other sites More sharing options...
+Sheddy Posted January 5, 2019 Share Posted January 5, 2019 .align N[,fill_value] how it works: if N > 0 then i := (CURRENT_ADDRESS div N)* N else i := CURRENT_ADDRESS; if i <> CURRENT_ADDRESS then inc(i, N); CURRENT_ADDRESS := i; opt h- f+ org $2000 .byte 1,2,3 .align $7f,0 .byte $ff 01 02 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF only 64? change to ".align $7e,0" 01 02 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF ? Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4190986 Share on other sites More sharing options...
Wrathchild Posted January 5, 2019 Share Posted January 5, 2019 Not really, does same as .cb "Hello" no good for screen display unless custom charset Haha, of course it doesn't, it adding $80 to each char and EOR that with $80 I understand now that there is no equivalent for the .cb function for ATASCII output of .sb as the latter doesn't have the same behaviour of .cb which inverts the last character. Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4191006 Share on other sites More sharing options...
phaeron Posted January 5, 2019 Share Posted January 5, 2019 opt h- f+ org $2000 .byte 1,2,3 .align $7f,0 .byte $ff only 64? You are requesting alignment to the nearest 127 byte boundary. ceil($2000 / $7F)*$7F = $203F. 2 Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4191245 Share on other sites More sharing options...
+Sheddy Posted January 5, 2019 Share Posted January 5, 2019 Oh, I see now. Thanks Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4191262 Share on other sites More sharing options...
matosimi Posted January 6, 2019 Share Posted January 6, 2019 Hi, I'm having another dilema. I have one file which contains data for 5 levels. Each level data is let's say 64 bytes long. My goal is to generate 5 binary files which will eventually be deflated and unrolled to actual level data buffer during gameplay. Are there any mads directives that could I use for this? I was thinking of .SAV, but I'm dont know how to fill the buffer with .PUT. All that i need is some command similar to what .writemem in altirra does, but instead of writing data that are in the emulator ram, I would need to write part of data within some datablock. data could look like this: org $3000 level1 :64 dta 1 level2 :64 dta 2 level3 :64 dta 3 level4 :64 dta 4 level5 :64 dta 5 and what I would like to do is something like: savetofile level1, level2-level1, "level1.bin" savetofile level2, level2-level1, "level2.bin" ... and so on (start address, length, filename) so the result will be 5 files level1.bin ... level5.bin each 64byte long containing the data (just repeated level numbers in this example) is it possible to get this? Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4191663 Share on other sites More sharing options...
snicklin Posted January 6, 2019 Share Posted January 6, 2019 @matosimi I was just wondering why you want MADS to do this? To me this seems like something that your local machine should be doing on the command line or with Perl / Python etc? Then you'd just load those files into your program to show with the Atari. Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4191666 Share on other sites More sharing options...
+Sheddy Posted January 6, 2019 Share Posted January 6, 2019 I don't think mads is the right thing for what you want unless I'm misunderstanding. Get and put are done at assembly time, not runtime? Something like the exomizer compressor might be worth looking at. There is a level compressor which can stream to a circular buffer, although the example decrunch code is not up to date and it looks quite daunting to me. Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4191670 Share on other sites More sharing options...
matosimi Posted January 6, 2019 Share Posted January 6, 2019 (edited) @matosimi I was just wondering why you want MADS to do this? To me this seems like something that your local machine should be doing on the command line or with Perl / Python etc? Then you'd just load those files into your program to show with the Atari. I'm using php for some data file conversions, I like python but there is a reason why I used php. I'm working on one game conversion and the original game itself is disk-based and the data are incompatible, so I need to rewrite all loading routines and at the same time I have to retain all the data packed in the memory and unroll only those parts that are needed at the specific level. all leveldata are in 4 assembly files each of which which consists of 5 data blocks of same size. I'm looking for some ellegant way to build the data (several DTA lines) w/o need to split each datablock source in 1 single file which would eventually result in 20 source files where each would need to be assembled to get 20 obx files and then strip the atari data block header and get 20 "bin" files. I thought I would be able to do this with single MADS source file. I want to avoid manual actions when building the game, I would like to get some batch file that could execute all actions which will finally end up in single obx(xex) file. I don't think mads is the right thing for what you want unless I'm misunderstanding. Get and put are done at assembly time, not runtime? Something like the exomizer compressor might be worth looking at. There is a level compressor which can stream to a circular buffer, although the example decrunch code is not up to date and it looks quite daunting to me. .get, .put, .sav are handled at assembly time. You can load binary file using .get, then you can perform some data transformation with .get/.put in .rept loop and afterwards you can materialize (insert) the final data to your binary output using .sav. ... It seems the correct workaround will be to put all 20 data blocks in one asm source file and assemble it to single obx file... which will then be beheaded and cut into 20 pieces by php/python script. Edited January 6, 2019 by matosimi Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4191774 Share on other sites More sharing options...
VladR Posted January 7, 2019 Share Posted January 7, 2019 @matosimi I was just wondering why you want MADS to do this? To me this seems like something that your local machine should be doing on the command line or with Perl / Python etc? Then you'd just load those files into your program to show with the Atari. Exactly. For all my Jaguar-related work, I always keep a Visual Studio open and use .NET for all the conversions and parsing and exports into the format that the assembler accepts. I found that Python sucks when it comes to debugging (honestly, anything does, when compared with VS debugger), so the time I gain by writing the script in command line is more than just lost the moment I need to figure out what the hell is going on. Also, in case of a crash, you automatically get a nice full stack trace (totally beats the Python trace), so you see it right there, what happened, without even having to debug it most of the time. While Python is OK I that regard, I personally can't recommend Perl, as I find Perl to be write-only code, whereas C# is instantly readable even after a year. 1 Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4192325 Share on other sites More sharing options...
tebe Posted January 9, 2019 Share Posted January 9, 2019 (edited) mads 2.0.8 http://mads.atari8.info - .LONGA ON|OFF, .LONGI ON|OFF (65816) - '-FV:VALUE', fill value for 'OPT F+' - lda #'AB' (65816) ; mwa #'XY' $80 (6502, 65816) example (FPU - Marco Granati) fpu_x65816 - Avocet X65816 (original) fpu_mads (conversion) fpu_mads.asm fpu_x65816.asm Edited January 9, 2019 by tebe 3 Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4194189 Share on other sites More sharing options...
+JAC! Posted January 9, 2019 Share Posted January 9, 2019 '-FV:VALUE', fill value for 'OPT F+ Rulez! Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4194253 Share on other sites More sharing options...
+JAC! Posted January 9, 2019 Share Posted January 9, 2019 ,,,then strip the atari data block header and get 20 "bin" files. ..It seems the correct workaround will be to put all 20 data blocks in one asm source file and assemble it to single obx file... which will then be beheaded and cut into 20 pieces by php/python script. I want to avoid manual actions when building the game, I would like to get some batch file that could execute all actions which will finally end up in single obx(xex) file. I don't really understand why you would want 20 separate files (maybe for separate compression), but you can deactivate the header in any case with "OPT h-", so you don't need to strip it. I and always have the cygwin tools installed, so I can use a command like "split.exe" in the batch file. I use batch files makefiles for all more complex projects and I also use multiple MADS stages, DIR2ATR and AtariRomMaker, often. echo Creating disk image. set ATR=%RELEASE%.atr atr\hias\dir2atr.exe -d -m -b MyDos4534 %ATR% atr\files if ERRORLEVEL 1 goto :dir2atr_error echo Done. :make cd asm echo Compiling menu. set EXECUTABLE=..\atr\files\%1 if exist %EXECUTABLE% del %EXECUTABLE% %MADS% -s SillyMenu.asm -o:SillyMenu.xex %2 %3 if ERRORLEVEL 1 goto :mads_error echo Packing menu. %EXOMIZER% sfx $2000 SillyMenu.xex -t 168 -o SillyMenu-Packed.xex -q echo Compiling loader. %MADS% -s SillyMenu-Loader.asm -l -o:%EXECUTABLE% %2 %3 if ERRORLEVEL 1 goto :mads_error dir SillyMenu.xex %EXECUTABLE% 1 Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4194263 Share on other sites More sharing options...
tebe Posted January 13, 2019 Share Posted January 13, 2019 (edited) mads 2.0.9 build 2 .CBM 'TEXT' convert ASCII to COMMODORE screen code example: IceBloxPlus (C64) http://www.javaonthebrain.com/java/iceplus/devices.html mads_209b2.zip IcebloxPlus.zip Edited October 27, 2019 by tebe 3 Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4196721 Share on other sites More sharing options...
+JAC! Posted October 27, 2019 Share Posted October 27, 2019 Hi tebe, small feature request: Can you please output the expected maximum and the actual value in the "Value out of range" messages? Best regards, Peter. 1 Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4379530 Share on other sites More sharing options...
tebe Posted October 27, 2019 Share Posted October 27, 2019 (edited) 7 hours ago, JAC! said: small feature request: Can you please output the expected maximum and the actual value in the "Value out of range" messages? https://github.com/tebe6502/Mad-Assembler/tree/patch-01 Value out of range (VALUE must be between X and Y) Edited October 27, 2019 by tebe 2 Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4379721 Share on other sites More sharing options...
+JAC! Posted October 27, 2019 Share Posted October 27, 2019 2 hours ago, tebe said: https://github.com/tebe6502/Mad-Assembler/tree/patch-01 Value out of range (VALUE must be between X and Y) Excellent, thank you! "Description Resource Path Location Type Value out of range (299 must be between 0 and 255) TheMenu-XEX-Starter.asm /Test/Productions/com.wudsn.productions.atari800.thecartstudio/asm/thecart-menu/xex line 49 Problem" 1 Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4379838 Share on other sites More sharing options...
tebe Posted November 18, 2019 Share Posted November 18, 2019 http://mads.atari8.info/ https://github.com/tebe6502/Mad-Assembler mads 2.1.0 - new warning message 'Buggy indirect jump' for JMP(ABS) - new directve .FILEEXISTS('filename') , TRUE (1) if file exist, FALSE (0) if not - extended error message 'Value out of range (VALUE must be between X and Y)' 3 Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4394026 Share on other sites More sharing options...
+JAC! Posted December 5, 2019 Share Posted December 5, 2019 Hi tebe, Minor thing: Using labels/locals in expressions with ".len" is not counted as usage and results in a warning: text_size = .len intro_text Unused label INTRO_TEXT Best regards, Peter. Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4404196 Share on other sites More sharing options...
+skr Posted December 7, 2019 Share Posted December 7, 2019 On 11/18/2019 at 11:32 AM, tebe said: http://mads.atari8.info/ https://github.com/tebe6502/Mad-Assembler mads 2.1.0 - new warning message 'Buggy indirect jump' for JMP(ABS) - new directve .FILEEXISTS('filename') , TRUE (1) if file exist, FALSE (0) if not - extended error message 'Value out of range (VALUE must be between X and Y)' Any chance, that there will be a mads.macosx-intel version of this? There seems to be a windows exe only and I don´t know how to use the PAS-source. Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4405866 Share on other sites More sharing options...
flashjazzcat Posted December 7, 2019 Share Posted December 7, 2019 47 minutes ago, skr said: Any chance, that there will be a mads.macosx-intel version of this? Just compiled this on Catalina: mads-macos-x64.zip Quickest way to get the thing compiled on Catalina appears to be to install Lazarus since FPC release installer is broken with the latest macOS. Once you have that and XCode command line tools installed, you need just type this in terminal: fpc -Mdelphi -v mads.pas If it would be useful to maintain macOS builds of MADS with each update, it can be done. 1 Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4405901 Share on other sites More sharing options...
MADRAFi Posted December 7, 2019 Share Posted December 7, 2019 Does anyone knows how to fix fpc? I have a linking problem. I had latest fpc installed before Catalina came out. Assembling (pipe) mp.s Linking mp ld: file not found: /usr/lib/crt1.10.5.o An error occurred while linking mp.pas(31057) Error: Error while linking mp.pas(31057) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted Error: /usr/local/bin/ppcx64 returned an error exitcode Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4405951 Share on other sites More sharing options...
+skr Posted December 7, 2019 Share Posted December 7, 2019 Thank you so much! It just works. I have all the XCode stuff ready, but didn´t know about Lazarus. Will check that. 1 Quote Link to comment https://forums.atariage.com/topic/114443-mad-assembler-mads/page/5/#findComment-4405953 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.