funkheld Posted February 25, 2021 Share Posted February 25, 2021 Hi good afternoon. i play with the plus4. how can you compile your pas programs for the plus4. how does the start header look like for a program with plus4? my madpascal runs under win10. Thank you. Quote Link to comment Share on other sites More sharing options...
zbyti Posted February 25, 2021 Share Posted February 25, 2021 Header https://github.com/tebe6502/Mad-Pascal/blob/master/base/c4p/c4p.hea Run linux/shell script: #!/bin/bash mp="$HOME/Programs/MadPascal/mp" mads="$HOME/Programs/mads/mads" base="$HOME/Programs/MadPascal/base" if [ -z "$1" ]; then echo -e "\nPlease call '$0 <argument>' to run this command!\n" exit 1 fi $mp $1 -t c4p -z 2 -o name=${1::-4} if [ -f $name.a65 ]; then [ ! -d "output" ] && mkdir output mv $name.a65 output/ $mads output/$name.a65 -x -i:$base -o:output/$name.prg else exit 1 fi if [ ! -z "$2" ]; then plus4emu output/$name.prg fi Quote Link to comment Share on other sites More sharing options...
funkheld Posted February 25, 2021 Share Posted February 25, 2021 (edited) Hi, Thank You. how do I bring this shell script in so that I can compile in win10? mp.exe raster_irq.pas .......? Edited February 25, 2021 by funkheld Quote Link to comment Share on other sites More sharing options...
zbyti Posted February 25, 2021 Share Posted February 25, 2021 (edited) mp.exe raster_irq.pas -t c4p -o ... ... the rest as usual. Edited February 25, 2021 by zbyti Quote Link to comment Share on other sites More sharing options...
funkheld Posted February 25, 2021 Share Posted February 25, 2021 Hi, Thank You . works wonderfully. is there an extension of the commands for the TED, please? i would like to switch to graphics mode, does that work with madpas? the memory for the graphic is then at 0x2000. thanks --------------- asm{ lda $ff06 ora #%00100000 sta $ff06 lda $ff07 ora #%00010000 sta $ff07 lda $ff12 ora #%00001000 sta $ff12 } --------------- Quote Link to comment Share on other sites More sharing options...
funkheld Posted February 25, 2021 Share Posted February 25, 2021 Hello, can you write that with mads, please? Or does it look different with the Plus4? mads.exe raster_irq.a65 -x -i:base -o:raster_irq.prg Thank you Quote Link to comment Share on other sites More sharing options...
zbyti Posted February 25, 2021 Share Posted February 25, 2021 You must replace "base" with proper path to your Mad Pascal "base" folder. I don't know much about TED yet. Can't help in this matter. Soon I'll be using multicolour bitmap in my game, if I succeeded I share my Mad Pascal code here. Quote Link to comment Share on other sites More sharing options...
funkheld Posted February 25, 2021 Share Posted February 25, 2021 Hello, thanks for the help. I'm looking forward to more great articles from madpascal on plus4. Thank you. Quote Link to comment Share on other sites More sharing options...
funkheld Posted February 26, 2021 Share Posted February 26, 2021 Hi good afternoon. I saw this "victory" for the plus4. why is the text displayed so nice and small? Thank you. Quote Link to comment Share on other sites More sharing options...
funkheld Posted February 26, 2021 Share Posted February 26, 2021 Just now, funkheld said: Hi good afternoon. I saw this "siege-demo" for the plus4. why is the text displayed so nice and small? Thank you. Quote Link to comment Share on other sites More sharing options...
funkheld Posted February 26, 2021 Share Posted February 26, 2021 Hi good afternoon. I wanted to make the new fonts visible, please. but only five appear. Why? why are the letters so nice and small? Thank you. var RAMROMSEL : byte absolute $ff12; CHBAS : byte absolute $ff13; SCREEN : pointer; fonts: array [0..(8 * 6 - 1)] of byte = ( 24,24,36,36,36,60,102,90, // ship up 0,3,62,197,197,62,3,0, // ship left 0,192,124,163,163,124,192,0, // ship right 90,102,60,36,36,36,24,24, // ship down 0,60,110,98,70,118,60,0, // obstacle 1 0,60,118,70,98,110,60,0 // obstacle 2 ); procedure initFonts; begin Move(pointer($d000), pointer($6000), $400); Move(fonts, pointer($6000), SizeOf(fonts)); RAMROMSEL := RAMROMSEL and %11111011; CHBAS := (CHBAS and %11) or 24 shl 2; end; begin initFonts; SCREEN := pointer($0c00); FillByte(SCREEN, 40 * 25, $a0); writeln('@ABCDE'); repeat until false; end. Quote Link to comment Share on other sites More sharing options...
zbyti Posted February 26, 2021 Share Posted February 26, 2021 (edited) 1 hour ago, funkheld said: but only five appear. Why? Because of that: fonts: array [0..(8 * 6 - 1)] of byte I'v done only 6 new chars, 8 bytes for one char. But this: Move(pointer($d000), pointer($6000), $400); give you full (1KB) set copied from ROM to RAM. this: Move(fonts, pointer($6000), SizeOf(fonts)); change/replace only 6 chars of copied set. Edited February 26, 2021 by zbyti Quote Link to comment Share on other sites More sharing options...
zbyti Posted February 26, 2021 Share Posted February 26, 2021 And VICE is not good Commodore Plus 4 emulator, use yape or better use plus4emu. Quote Link to comment Share on other sites More sharing options...
zbyti Posted February 26, 2021 Share Posted February 26, 2021 (edited) Mad Pascal don't support resource directive for Commodore family yet, so I must used some workaround I used Multipaint and his format. 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; var tmp : pointer absolute $60; procedure gfxData; assembler; asm { org $4000 ; bitmap: .byte ... org $6000 ; colors 2 .byte ... org $6400 ; colors 1 .byte ... }; end; {* multipaint format / txt export http://multipaint.kameli.net/ *} begin SETBITMAP := SETBITMAP or $20; SETMCOLOR := (SETMCOLOR and $40) or $18; // (xx010xxx) $4000 = 2 * $2000; (xx111xxx) $e000 = 7 * $2000 BITMAPADDR := %00010000; // (01100xxx) $6000; (01101xxx) $6800; (01110xxx) $7000; ... VIDEOMATRIX := %01100000; { ; border .byte 6 ; background 1: .byte 0 ; background 2: .byte 65 } BORDER := 6; BACKGROUND := 0; COLOUR1 := 65; tmp := @gfxData; // opt workaround repeat until false; end. smile.prg Edited February 26, 2021 by zbyti add gfx Quote Link to comment Share on other sites More sharing options...
funkheld Posted February 26, 2021 Share Posted February 26, 2021 with yape your test.prg does not work with yape. with vice the test.prg is ok greeting Quote Link to comment Share on other sites More sharing options...
funkheld Posted February 26, 2021 Share Posted February 26, 2021 test.prg with vice. greeting Quote Link to comment Share on other sites More sharing options...
zbyti Posted February 26, 2021 Share Posted February 26, 2021 @funkheld It is exactly the opposite Add on the end of my example program: repeat until false; VICE is the worst C+4 emulator. Quote Link to comment Share on other sites More sharing options...
funkheld Posted February 26, 2021 Share Posted February 26, 2021 ------------------------------ change/replace only 6 chars of copied set. ------------------------------- why do I only see 5 chars? Quote Link to comment Share on other sites More sharing options...
zbyti Posted February 26, 2021 Share Posted February 26, 2021 (edited) 5 minutes ago, funkheld said: ------------------------------ change/replace only 6 chars of copied set. ------------------------------- why do I only see 5 chars? I don't know... I see 6 chars. try: writeln('@ACBDE'); Edited February 26, 2021 by zbyti different order Quote Link to comment Share on other sites More sharing options...
funkheld Posted February 26, 2021 Share Posted February 26, 2021 (edited) hello...is ok. greeting. Edited February 26, 2021 by funkheld Quote Link to comment Share on other sites More sharing options...
funkheld Posted February 26, 2021 Share Posted February 26, 2021 test code with: winvive = ok yape = no ok mister-fpga-core plus4 = ok var SCREEN : pointer; GSCREEN : pointer; BORDERCOLOR : byte absolute $ff15; BGCOLOR : byte absolute $ff19; a,b,c : word; const SCREEN_ADDR = $0c00; EMPTY = $20; begin GSCREEN := pointer($2000); SCREEN := pointer($0c00); FillChar(pointer(SCREEN_ADDR), 25 * 40, 14); asm { lda $ff06 ora #%00100000 sta $ff06 lda $ff07 ora #%00010000 sta $ff07 lda $ff12 ora #%00001000 sta $ff12 }; FillByte(GSCREEN, 8000,8); repeat until false; end. Quote Link to comment Share on other sites More sharing options...
zbyti Posted February 26, 2021 Share Posted February 26, 2021 (edited) How do you know what is correct and what is not? Do you understand your code? Quote Still to do: FPGATED is not ready yet. I just released it in this state because I did not want to keep it in a secret longer before someone else creates it. I have plans to continue. - write a plus4 shell using Papilio Pro platform - Jostick emulation on keyboard (as TEDwing doesn't have joystick ports) - scandoubler for VGA displays - fix internal video shift mechanism for proper FLI emulation - Chorma/Luma signal generation - Try it in a real C16 or Plus4! Please head over to the Commodore Atari Age subforum for your emulators tests. Edited February 26, 2021 by zbyti mister note Quote Link to comment Share on other sites More sharing options...
funkheld Posted February 26, 2021 Share Posted February 26, 2021 Hi good afternoon. where do you get your smile-graphic to load it with your program? Thank you. Quote Link to comment Share on other sites More sharing options...
zbyti Posted February 26, 2021 Share Posted February 26, 2021 png from internet converted via Multipaint. Quote Link to comment Share on other sites More sharing options...
funkheld Posted February 26, 2021 Share Posted February 26, 2021 Hello, I have now used multipaint to create a color image in text format for the plus4. where are these values in the text ? --------------------------------- org $4000 ; bitmap: .byte org $6000 ; colors 2 .byte org $6400 ; colors 1 .byte ---------------------------------- greeting 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.