+JAC! Posted September 3, 2022 Share Posted September 3, 2022 On 8/15/2022 at 6:26 PM, bocianu said: long awaited volatile and inline ! What is the purpose of the volatile modifier? Tell the compiler the the variable will be modfied outside of the compiler's control? Quote Link to comment Share on other sites More sharing options...
tebe Posted September 4, 2022 Author Share Posted September 4, 2022 [volatile] disable from optimization var a, b, c: byte; [volatile] timer: byte; begin a := timer; b := timer; c := timer; end. 1 Quote Link to comment Share on other sites More sharing options...
bocianu Posted September 4, 2022 Share Posted September 4, 2022 10 hours ago, JAC! said: What is the purpose of the volatile modifier? Tell the compiler the the variable will be modfied outside of the compiler's control? Yup. Like reading random register. Without it, when you read it couple times in a row, optimization algorithm would optimize it, and you get just one value. 2 1 Quote Link to comment Share on other sites More sharing options...
tebe Posted September 14, 2022 Author Share Posted September 14, 2022 Amarok create version for MP 2 Quote Link to comment Share on other sites More sharing options...
tebe Posted September 18, 2022 Author Share Posted September 18, 2022 https://github.com/Ripjetski6502/A8MadPascalLibrary 2 2 Quote Link to comment Share on other sites More sharing options...
Gury Posted September 18, 2022 Share Posted September 18, 2022 Fantastic work! I tried example programs, this library really shines in its purpose 👍 Quote Link to comment Share on other sites More sharing options...
tebe Posted September 25, 2022 Author Share Posted September 25, 2022 (edited) https://github.com/tebe6502/Mad-Pascal/tree/master/samples/a8/sound/sap_lzss add new resource, SAPR, SAPRPLAY (LZSS SAP-R) player is unroll and keep zero page intact https://github.com/tebe6502/Mad-Pascal/blob/master/samples/a8/sound/sap_lzss/lzss_play.obx https://github.com/tebe6502/Mad-Pascal/blob/master/samples/a8/sound/sap_lzss/lzss_play_stereo.obx Edited September 25, 2022 by tebe 5 Quote Link to comment Share on other sites More sharing options...
+MrFish Posted September 25, 2022 Share Posted September 25, 2022 1 hour ago, tebe said: https://github.com/tebe6502/Mad-Pascal/blob/master/samples/a8/sound/sap_lzss/lzss_play_stereo.obx Sounds great, but the channels are out of sync when it starts to repeat. Quote Link to comment Share on other sites More sharing options...
tebe Posted September 27, 2022 Author Share Posted September 27, 2022 SizeOf fixed (RECORD with FORWARDTYPE) https://github.com/tebe6502/Mad-Pascal/tree/master/samples/a8/get_mem 4 Quote Link to comment Share on other sites More sharing options...
tebe Posted October 9, 2022 Author Share Posted October 9, 2022 new unit SHA1 https://github.com/tebe6502/Mad-Pascal/blob/master/lib/sha1.pas samples https://github.com/tebe6502/Mad-Pascal/tree/master/samples/a8/math 1 Quote Link to comment Share on other sites More sharing options...
amarok Posted October 12, 2022 Share Posted October 12, 2022 (edited) I prepared a program in MadPascal which is able to render unicode texts encoded in UTF-8 format. The program uses unifont glyphs available on https://unifoundry.com/unifont/ As an example there was used "Article 1 of the Universal Declaration of Human Rights" translated into multiple languages. The source codes of the program are available on my gitlab: https://gitlab.com/amarok8bit/unicode Program is relative simple because the main goal was just to check how unicode content might be rendered on Atari 8-bit computer. Nothing special, I suppose... Edit: I attached atr file containing above program and texts. unicode.atr Edited October 12, 2022 by amarok 8 Quote Link to comment Share on other sites More sharing options...
tebe Posted October 18, 2022 Author Share Posted October 18, 2022 (edited) new unit VBXEANSI https://github.com/tebe6502/Mad-Pascal/blob/master/lib/vbxeansi.pas samples https://github.com/tebe6502/Mad-Pascal/tree/master/samples/a8/graph_vbxe_ansi DISPANSI.OBX (max 100 files *.ANS in directory) Press W - scroll UP Press S - scroll Down Press SPACE - next file Press ESC - exit program p.s. thanks to Joseph Zatarski dispansi.atr Edited October 19, 2022 by tebe 5 Quote Link to comment Share on other sites More sharing options...
+Stephen Posted October 19, 2022 Share Posted October 19, 2022 16 hours ago, tebe said: new unit VBXEANSI https://github.com/tebe6502/Mad-Pascal/blob/master/lib/vbxeansi.pas samples https://github.com/tebe6502/Mad-Pascal/tree/master/samples/a8/graph_vbxe_ansi DISPANSI.OBX (max 100 files *.ANS in directory) Press W - scroll UP Press S - scroll Down Press SPACE - next file Press ESC - exit program Awesome! I started working on something similar but trying to code in straight assembly really makes it difficult! Definitely interested in viewing the source for this. Quote Link to comment Share on other sites More sharing options...
tebe Posted October 19, 2022 Author Share Posted October 19, 2022 1 hour ago, Stephen said: Awesome! I started working on something similar but trying to code in straight assembly really makes it difficult! Definitely interested in viewing the source for this. A clearer approach to the subject of ANSI decoding https://anotherdroidbbs.wordpress.com/2019/05/12/free-pascan-ansi-viewer/ dispansi.pas 1 1 Quote Link to comment Share on other sites More sharing options...
tebe Posted November 1, 2022 Author Share Posted November 1, 2022 unit DISPANSI remove, unit VBXE merged with ANSI (code rewritten, VBXE on $d600 ; $d700) simplified VBXE support, CRT (40 columns + color map), ANSI (80 columns), added page scroll for both modes DISPANSI.ATR (Sparta DOS X disk), DISPANSI.EXE runs slideshow all *.ANS files or from the command line X VANSI.EXE FILENAME.ANS ansi_test.obx ansi_test.pas crt_colors.obx crt_colors.pas crt_colors_C64.prg crt_test.obx crt_test.pas crt_vbxe_detect.obx crt_vbxe_detect.pas DISPANSI.ATR dispansi.obx dispansi.pas IBMPC.FNT vbxe_ansi.obx vbxe_ansi.pas vbxe_ansi.rc 3 1 Quote Link to comment Share on other sites More sharing options...
Atlan_Roland Posted November 21, 2022 Share Posted November 21, 2022 Hi @tebe, I'm having a problem in current revisions of mp from your github: -- XIO(40,1,0,0,'D:OVERLAY.XEX'); // put overlay routines into XMS (which then starts city) -- gives a compile error: Mad Pascal Compiler version 1.6.6 [2022/11/19] for 6502 Compiling U_Loader.Pas U_Loader.Pas (1520,23) Error: Incompatible types: got STRING expected "^BYTE" -- the last version i got that works is "Mad Pascal Compiler version 1.6.6 [2022/10/16] " is that some error in the current branch or do i have to address the file parameter different now - and if, how? Quote Link to comment Share on other sites More sharing options...
tebe Posted November 22, 2022 Author Share Posted November 22, 2022 13 hours ago, Atlan_Roland said: I'm having a problem in current revisions of mp from your github: -- XIO(40,1,0,0,'D:OVERLAY.XEX'); // put overlay routines into XMS (which then starts city) -- gives a compile error: Mad Pascal Compiler version 1.6.6 [2022/11/19] for 6502 Compiling U_Loader.Pas U_Loader.Pas (1520,23) Error: Incompatible types: got STRING expected "^BYTE" https://github.com/tebe6502/Mad-Pascal/blob/master/lib/cio.pas PByte -> PString 1 Quote Link to comment Share on other sites More sharing options...
tebe Posted December 11, 2022 Author Share Posted December 11, 2022 new unit xSFX (sound effect player) https://github.com/tebe6502/Mad-Pascal/blob/master/lib/xsfx.pas new SFX examples from Arkanoid https://github.com/tebe6502/Mad-Pascal/tree/master/samples/a8/sound/sfx 5 1 Quote Link to comment Share on other sites More sharing options...
bocianu Posted December 11, 2022 Share Posted December 11, 2022 I've released the sources for my latest production at Silly Venture, which by some miracle took first place in the INTRO 16K category. ac23inv.xex Maybe the source will be useful to someone: https://gitlab.com/bocianu/atasciicompo3 Of particular note is the unique scripting language for describing the presentation itself, which was created for this production. It makes use of the MADS assembler macros: https://gitlab.com/bocianu/atasciicompo3/-/blob/main/script.asm 6 1 Quote Link to comment Share on other sites More sharing options...
+JAC! Posted December 12, 2022 Share Posted December 12, 2022 11 hours ago, bocianu said: I've released the sources for my latest production at Silly Venture, which by some miracle took first place in the INTRO 16K category. No miracle, but obvious hard work on your side. I also like it the most, because it was different, consistent and very entertaining. A good example that MAD Pascal is good and fast enough to do demos with it. And the usage of macros for the scriping is something (I've also done in the past for ISO / VCS demos) that demos how flexible the combination of MADS & MP is. 3 1 Quote Link to comment Share on other sites More sharing options...
Atlan_Roland Posted January 17, 2023 Share Posted January 17, 2023 Question about the usage of accessing extended memory with a custom VBI I'm using Mad Pascals TMemoryStream for accessing extended memory quite intensively This all works very fine, up until i have a custom VBI installed too: When i don't turn off the VBI before a TMemoryStream read/write, the program will eventually crash, sooner or later. (even if its just an empty VBI routine, like in the example code) How would i be able to have a custom VBI running while accessing the extended memory with TMemoryStream? var xms: TMemoryStream; tb: array [0..0] of byte [..] procedure vbl; interrupt; begin asm ; for example a VBI that doesn't do anything. jmp xitvbv end; end; begin SetIntVec(iVBL, @vbl); [..] ..in a main loop i got this xms.Readbuffer command, that works great without a VBI, but otherwise breaks randomly xms.position:=XMS_TILESTORE2 + word(i * 192) + byte(random(4)*48); //nmien:=128; // if I don't turn off the VBI before the read, it will sooner or later crash. xms.ReadBuffer(tb,48); // get new animation frame from xms //nmien:=128+64; //VBI back on [..] Quote Link to comment Share on other sites More sharing options...
tebe Posted January 17, 2023 Author Share Posted January 17, 2023 Is your VBL routine or program code in the $4000..$7FFF area ? 1 Quote Link to comment Share on other sites More sharing options...
Atlan_Roland Posted January 18, 2023 Share Posted January 18, 2023 (edited) thank you very much! i forgot about the VBL routine (which just JSRs to code already off the banking area) itself that was still compiled by MP to a region that got banked out. I solved it now like this: created a resource file with the VBL code (which is just a JSR), that I include in my pascal source and assign it to an addr. off the $4000..$7FFF area. vbl.asm: ;jsr QuickMusic_VBI jsr $0980+$20+$0F jmp xitvbv vbl.rc: MYVBL RCASM 'C:\jac\wudsn\Workspace\Ultima\Resources\vbl.asm' [..] {$r 'vbl.rc'} const MYVBL=$2000; // put the VBL outside the banking area SetIntVec(iVBL, pointer(MYVBL)); thank also to @Zolaerla for pointing me in the right direction! Edited January 18, 2023 by Atlan_Roland Quote Link to comment Share on other sites More sharing options...
tebe Posted April 2, 2023 Author Share Posted April 2, 2023 MP 1.6.7 (branch DEV) https://github.com/tebe6502/Mad-Pascal/tree/dev https://github.com/tebe6502/Mad-Pascal/tree/dev/samples/common 2 1 Quote Link to comment Share on other sites More sharing options...
Atlan_Roland Posted April 5, 2023 Share Posted April 5, 2023 testing the dev branch: following example works in stable branch; not anymore in 1.6.7: type tNPC = record // record needs to be in a certain order, as functions also access values directy with direct peek/pokes. person: byte; ai: byte; covered_tile: byte; x,y,z: byte; to_x,to_y,to_z: byte; path_idx: byte; // 255: finished path | 128: recalculate path tilt: byte; // tilt counter dialog: byte; knows_avatar: byte; // met avatar before? additional info: is_dead()? =255? end; var npc : array [0..31] of ^tNPC absolute NPC_ARRAY; // 64 byte; pointer to NPC objects [..] for i:=0 to 30 do npc[i].knows_avatar:=0; --> Mad Pascal Compiler version 1.6.7 [2023/04/04] for 6502 Compiling CITY.PAS inc/npc_procedures.pas (184,10) Error: Assignments to formal parameters and open arrays are not possible Question: Is it by design that access to a structure like above won't be possible anymore? 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.