funkheld Posted March 7, 2021 Share Posted March 7, 2021 (edited) hello, this is seriell send , baud2400 : program seriel; var i : byte; baud : word absolute $fb; ascii : byte absolute $fd; procedure seriell(); assembler; asm { befehl = $fb puffer = $fd lda #2 ldx #2 ldy #0 jsr $ffba lda #2 ldx #<(befehl) ldy #>(befehl) jsr $ffbd jsr $ffc0 ldx #2 jsr $ffc9 ldy #0 lda puffer,y jsr $ffd2 jsr $ffcc loop: lda $029d cmp $029e bne loop ldx #50 loop1: jsr $eeb3 dex bne loop1 lda #2 jsr $ffc3 }; end; begin baud:=$000a; for i:=64 to 90 do begin ascii:=i; seriell; end; end. Edited March 8, 2021 by funkheld Quote Link to comment Share on other sites More sharing options...
funkheld Posted March 8, 2021 Share Posted March 8, 2021 (edited) with open , send and close is ok , baud2400 : // KERNAL_SETLFS = $FFBA; // KERNAL_SETNAM = $FFBD; // KERNAL_OPEN = $FFC0; // KERNAL_CLOSE = $FFC3; // KERNAL_CHKIN = $FFC6; // KERNAL_CHKOUT = $FFC9; // KERNAL_CLRCHN = $FFCC; // KERNAL_CHRIN = $FFCF; // KERNAL_CHROUT = $FFD2; // KERNAL_LOAD = $FFD5; // KERNAL_READST = $FE07; program seriel; var i : byte; num : word absolute $fb; ascii : byte absolute $fd; procedure seriell_open(); assembler; asm { num = $fb lda #2 ldx #<(num) ldy #>(num) jsr $ffbd lda #$02 ldx #$02 ldy #$00 jsr $ffba jsr $ffc0 }; end; procedure send(); assembler; asm { buffer = $fd ldx #$02 jsr $ffc9 lda #$00 ldx buffer txa jsr $ffd2 jsr $ffcc }; end; procedure seriell_close(); assembler; asm { lda #$02 jsr $ffc3 }; end; begin poke($fb,10); poke($fc,0); seriell_open; pause; for i:=64 to 90 do begin ascii:=i; pause; send; end; pause; seriell_close; end. Edited March 8, 2021 by funkheld Quote Link to comment Share on other sites More sharing options...
funkheld Posted March 8, 2021 Share Posted March 8, 2021 (edited) hello, this is open , send , empfang , close mit madpas for c64. greeting seriell_send to A - Z , 2400baud : // KERNAL_SETLFS = $FFBA; // KERNAL_SETNAM = $FFBD; // KERNAL_OPEN = $FFC0; // KERNAL_CLOSE = $FFC3; // KERNAL_CHKIN = $FFC6; // KERNAL_CHKOUT = $FFC9; // KERNAL_CLRCHN = $FFCC; // KERNAL_CHRIN = $FFCF; // KERNAL_CHROUT = $FFD2; // KERNAL_LOAD = $FFD5; // KERNAL_READST = $FE07; program seriel; var i,z : byte; num : word absolute $fb; ascii : byte absolute $fd; procedure seriell_open(); assembler; asm { num = $fb lda #2 ldx #<(num) ldy #>(num) jsr $ffbd lda #$02 ldx #$02 ldy #$00 jsr $ffba jsr $ffc0 }; end; procedure seriell_send(); assembler; asm { buffer = $fd ldx #$02 jsr $ffc9 lda #$00 ldx buffer txa jsr $ffd2 jsr $ffcc }; end; procedure seriell_empfang(); assembler; asm { buffer = $fd jsr $ffcc ldx #$02 jsr $ffc6 bcs error jsr $ffcf tax jsr $fe07 cmp #$00 bne error stx buffer jsr $ffcc error: }; end; procedure seriell_close(); assembler; asm { lda #$02 jsr $ffc3 }; end; begin poke($fb,10); poke($fc,0); seriell_open; pause; while True do begin for i:=1 to 26 do begin ascii:=i; for z:=0 to 30 do begin pause; end; seriell_send; end; end; pause; seriell_close; end. seriell_empfang A - Z , 2400baud : char is the screen adresse $0400 // KERNAL_SETLFS = $FFBA; // KERNAL_SETNAM = $FFBD; // KERNAL_OPEN = $FFC0; // KERNAL_CLOSE = $FFC3; // KERNAL_CHKIN = $FFC6; // KERNAL_CHKOUT = $FFC9; // KERNAL_CLRCHN = $FFCC; // KERNAL_CHRIN = $FFCF; // KERNAL_CHROUT = $FFD2; // KERNAL_LOAD = $FFD5; // KERNAL_READST = $FE07; program seriel; var i : byte; num : word absolute $fb; ascii : byte absolute $fd; procedure seriell_open(); assembler; asm { num = $fb lda #2 ldx #<(num) ldy #>(num) jsr $ffbd lda #$02 ldx #$02 ldy #$00 jsr $ffba jsr $ffc0 }; end; procedure seriell_send(); assembler; asm { buffer = $fd ldx #$02 jsr $ffc9 lda #$00 ldx buffer txa jsr $ffd2 jsr $ffcc }; end; procedure seriell_empfang(); assembler; asm { buffer = $fd jsr $ffcc ldx #$02 jsr $ffc6 bcs error jsr $ffcf tax jsr $fe07 cmp #$00 bne error stx buffer jsr $ffcc error: }; end; procedure seriell_close(); assembler; asm { lda #$02 jsr $ffc3 }; end; begin poke($fb,10); poke($fc,0); seriell_open; pause; while True do begin seriell_empfang; pause; poke($0400,ascii); end; pause; seriell_close; end. Edited March 8, 2021 by funkheld Quote Link to comment Share on other sites More sharing options...
funkheld Posted March 13, 2021 Share Posted March 13, 2021 Hi good afternoon. I would like to move the start of a program for the C64 to 4096, please. how is it going? Thank you. Quote Link to comment Share on other sites More sharing options...
tebe Posted March 13, 2021 Author Share Posted March 13, 2021 Syntax: mp <inputfile> [options] -diag Diagnostics mode -define:symbol Defines the symbol -ipath:<x> Add <x> to include path -target:<x> Target system: a8 (default), c64, c4p -code:address Code origin hex address -data:address Data origin hex address -stack:address Software stack hex address (size = 64 bytes) -zpage:address Variables on the zero page hex address (size = 26 bytes) [code] -code 2000 Quote Link to comment Share on other sites More sharing options...
funkheld Posted March 13, 2021 Share Posted March 13, 2021 will not be compiled -target:c64 -code:2000 -target: c64 -code: 2000 -target c64 -code 2000 Quote Link to comment Share on other sites More sharing options...
zbyti Posted March 16, 2021 Share Posted March 16, 2021 (edited) @tebe BIG THX for resource implementation for C64/C+4. Below example code which shows mutlipaint multicolour gfx on Plus/4. gfx.rc TRON_TITLE_SCREEN rcdata 'tron.prg' 2 main.pas {$r gfx.rc} const TRON_TITLE_SCREEN = $5800; var SETBITMAP : byte absolute $ff06; SETMCOLOR : byte absolute $ff07; BITMAPADDR : byte absolute $ff12; VIDEOMATRIX : byte absolute $ff14; BACKGROUND : byte absolute $ff15; COLOUR1 : byte absolute $ff16; BORDER : byte absolute $ff19; begin SETBITMAP := SETBITMAP or $20; SETMCOLOR := (SETMCOLOR and $40) or $18; // (01011xxx) $5800 = 11 * $800; VIDEOMATRIX := %01011000; // (xx011xxx) $6000 = 3 * $2000; bit 2 set to 0 means reading from RAM BITMAPADDR := %00011000 or (BITMAPADDR and %00000011); BORDER := 0; BACKGROUND := 0; COLOUR1 := 1; repeat until false; end. GFX made by Carrion. Edited March 16, 2021 by zbyti gfx author 2 Quote Link to comment Share on other sites More sharing options...
zbyti Posted March 17, 2021 Share Posted March 17, 2021 (edited) How to play TEDzakker tunes? msx.rc MUSIC rcdata 'demo.tzp.prg' 2 music-irq.pas {$r msx.rc} // TEDzakker demo music const MUSIC = $4000; var DETIRQSRC : byte absolute $ff09; //detect IRQ source, and clear IRQ flag SETIRQSRC : byte absolute $ff0a; //set IRQ source RC : byte absolute $ff0b; //raser counter bits 0-7 BACKGROUND : byte absolute $ff15; BORDER : byte absolute $ff19; VCOUNT : byte absolute $ff1d; //vertical line bits 0-7 IRQVEC : word absolute $fffe; procedure myRasterIrq; assembler; interrupt; asm { phr lda DETIRQSRC \ sta DETIRQSRC inc BORDER; jsr $4003; dec BORDER; plr }; end; begin pause; asm { sei sta $ff3f phr \ lda #0 \ jsr $4000 \ plr }; RC := 4; SETIRQSRC := 2; DETIRQSRC := DETIRQSRC and %01111111; IRQVEC := word(@myRasterIrq); asm { cli }; repeat until false; end. or simply: {$r msx.rc} // TEDzakker demo music const MUSIC = $4000; begin asm { phr \ lda #0 \ jsr MUSIC \ plr }; repeat pause; asm { phr \ jsr MUSIC+3 \ plr }; until false; end. TEDzakker.mp4 Edited March 17, 2021 by zbyti subtune Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted March 17, 2021 Share Posted March 17, 2021 Forgive the ignorance, this is an Atari programming forum and so how is this if use to us, is the player library cross platform? Quote Link to comment Share on other sites More sharing options...
zbyti Posted March 17, 2021 Share Posted March 17, 2021 (edited) @Wrathchild this thread is more about Mad Pascal programming. I asked @tebe where I should put C+4 code examples and he didn't mind having it all in one thread even if it is an Atari dedicated forum. If you have a big problem with that I can stop publishing my examples, just say. Edited March 17, 2021 by zbyti typo 1 Quote Link to comment Share on other sites More sharing options...
danwinslow Posted March 17, 2021 Share Posted March 17, 2021 Well, there IS a commodore forum here, you could start a thread over there. That said, I don't care all that much but I keep looking at this thread thinking I'll see something cool for atari with MP but, nope, it's still you and Funkheld talking about commodore stuff. 1 Quote Link to comment Share on other sites More sharing options...
zbyti Posted March 17, 2021 Share Posted March 17, 2021 (edited) 25 minutes ago, danwinslow said: I keep looking at this thread thinking I'll see something cool for atari with MP but, nope... Solution is very simple If you want to see something fancy for Atari and Mad Pascal take your time and write something cool. I don't remember I learn something from your code, where I can find your wisdom? I am trying present newbies Mad Pascal syntax with simple examples not Atari hardware specific code. If you were more careful, you would have noticed that I present new Mad Pascal resource feature: offset for resources --- Ok. Enough of this, I don't need to waste my time to pass the knowledge on to others, I can keep it for myself. over :] Edited March 17, 2021 by zbyti typo Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted March 17, 2021 Share Posted March 17, 2021 (edited) 51 minutes ago, zbyti said: Ok. Enough of this, I don't need to waste my time to pass the knowledge on to others, I can keep it for myself. What a dumb attitude... hopefully you are sharing and promoting Mad Pascal stuff in a Commodore forum somewhere and all power to you if you are. But were we to trot over there and post VBXE examples I image we'd get a lukewarm response. Edited March 17, 2021 by Wrathchild 2 Quote Link to comment Share on other sites More sharing options...
zbyti Posted March 17, 2021 Share Posted March 17, 2021 3 minutes ago, Wrathchild said: What a dumb attitude... This is the only reasonable attitude when dealing with fanatics rather than programmers Quote Link to comment Share on other sites More sharing options...
danwinslow Posted March 17, 2021 Share Posted March 17, 2021 Now now, don't get your feathers ruffled and start calling us 'not programmers'. I've been programming my whole life. Programmers are almost always fanatics of one sort or another. I was just saying that it's very common for people to not like a bunch of off-the-forum topic posting, especially since there *is* a forum here for the subject. You can do what you want. 1 Quote Link to comment Share on other sites More sharing options...
funkheld Posted March 25, 2021 Share Posted March 25, 2021 Hello thanks für c+4 demo. greeting Quote Link to comment Share on other sites More sharing options...
tebe Posted March 28, 2021 Author Share Posted March 28, 2021 new MP, https://github.com/tebe6502/Mad-Pascal - unit ZX0 - block ASM without { } is supported zx0_sample.7z 3 3 Quote Link to comment Share on other sites More sharing options...
zbyti Posted March 29, 2021 Share Posted March 29, 2021 9 hours ago, tebe said: - block ASM without { } is supported This means that Lazarus IDE IntelliSense now will work correctly with asm blocks. 1 Quote Link to comment Share on other sites More sharing options...
Gury Posted March 29, 2021 Share Posted March 29, 2021 Great additions... I am very interested in zx0 decompression library which is offered in new version. zx0 seems like a good compression method for mic images. Is there a way to provide an utility for compressing such images? Quote Link to comment Share on other sites More sharing options...
tebe Posted March 29, 2021 Author Share Posted March 29, 2021 https://github.com/einar-saukas/ZX0 win\zx0.exe win\dzx0.exe (decompressor) 3 Quote Link to comment Share on other sites More sharing options...
Gury Posted March 29, 2021 Share Posted March 29, 2021 Looks interesting and useful, thanks for info. Quote Link to comment Share on other sites More sharing options...
xxl Posted March 29, 2021 Share Posted March 29, 2021 sweet. time for SuperPacker and ZX0: D Quote Link to comment Share on other sites More sharing options...
funkheld Posted April 1, 2021 Share Posted April 1, 2021 hello zbyti. Thanks for your new work for the new plus4 demos. Wonderful how you can do that. have already learned a lot. what I'm looking for is a key query, which key was pressed, which works in plus4. i can already receive data for rs232 from plus4. Thank you. greeting Quote Link to comment Share on other sites More sharing options...
Gury Posted April 10, 2021 Share Posted April 10, 2021 zbyti, thanks for your contribution on documentation. It will be of much help to me and others when using Mad Pascal. Quote Link to comment Share on other sites More sharing options...
zbyti Posted April 10, 2021 Share Posted April 10, 2021 (edited) @Gury beware, some part of this documentation is useful on other 8-bit platforms too! I asked someone for help in English documentation but I can't see any progress. As far as I know Polish documentation is up to date and covers new features added by @tebe. Your contribution is also significant, I like your games examples :] But In this thread I see guys who not contribute to the language but have contribution to my enthusiasm You know... Every time they see example not for Atari little panda dies Edited April 10, 2021 by zbyti Polish 1 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.