Jump to content
IGNORED

Mad Pascal


Recommended Posts

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

 

Link to comment
Share on other sites

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
  }

---------------

Link to comment
Share on other sites

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.

fonts1.jpg

Link to comment
Share on other sites

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 by zbyti
Link to comment
Share on other sites

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.

Screenshot_2021-02-26_14-48-00.thumb.png.d1bd928f2b4e62c45d494666de8c611f.png

 

smile.prg

Edited by zbyti
add gfx
Link to comment
Share on other sites

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 by zbyti
different order
Link to comment
Share on other sites

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.

misterplus4-ok.jpg

viceplus4-ok.jpg

yapeplus4-nook.jpg

Link to comment
Share on other sites

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 by zbyti
mister note
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...