Jump to content

Recommended Posts

If you exported (in Multipaint) gfx to text format and you checked "comments" an "byte" you find those comments in your exported file, then you must only replace ".db" with ".byte" and C&P respective blocks of data to Mad Pascal code.

Share this post


Link to post
Share on other sites
Quote

 

Hi, Thank You.
worked wonderfully.
a great thing what you do with the plus4 everything.

you have a lot of ideas.

I'm also interested in the hires mode.
do you have an idea for that too?

Thank you

Share this post


Link to post
Share on other sites
1 hour ago, funkheld said:

I'm also interested in the hires mode.
do you have an idea for that too?

As far as I know its all about different register ($ff06/$ff07) settings. I'm not tested this yet.

Share this post


Link to post
Share on other sites

i have not yet understood the relationship between the colors in multicolor mode.

 

 

have you ever seen why one of my programs is not running on the yape?
how do you know that yape is better than winvice?
what test experience did you have?

 

Thank you.

 

Edited by funkheld

Share this post


Link to post
Share on other sites

Another C+4 simple example (can be easy converted to A8) for beginners.

 

const
  ATTRIBUTE_ADDR = $0800; SCREEN_ADDR = $0c00; OFFSET = SCREEN_ADDR - ATTRIBUTE_ADDR;
  CHARSET = $d000; EMPTY = $20;

var
  BACKGROUND                         : byte absolute $ff15;
  BOREDER                            : byte absolute $ff19;

//-----------------------------------------------------------------------------

procedure printBigCharXY(x, y, ch, c: byte);
var
  curPoint, charRow     : word;
  tmp, i0b, i1b         : byte;
begin
  curPoint := SCREEN_ADDR + x + (y * 40);
  charRow := CHARSET + (8 * ch);

  for i0b := 0 to 7 do begin
    tmp := Peek(charRow + i0b);
    for i1b := 7 downto 0 do begin
      if (tmp and 1) = 1 then begin
        poke(curPoint + i1b, $a0);
        poke(curPoint - OFFSET + i1b, c);
      end;
      tmp := tmp shr 1;
    end;
    Inc(curPoint,40);
  end;
end;

//-----------------------------------------------------------------------------

procedure printBigXY(x, y, c: byte; s: string);
var
  i0b : byte;
begin
  for i0b := 1 to length(s) do printBigCharXY(x + (8 * (i0b - 1)), y, ord(s[i0b]), c);
end;

//-----------------------------------------------------------------------------

begin

  FillChar(pointer(SCREEN_ADDR), 24 * 40, EMPTY);
  FillChar(pointer(ATTRIBUTE_ADDR), 24 * 40, 0);

  printBigXY(3, 3, $11, 'tron'~);
  printBigXY(11, 12, $11, '+4'~);

  repeat until false;

end.

Screenshot_2021-02-27_12-24-21.thumb.png.59b5820dc4c3cdfac457c6793347a5a5.png

Edited by zbyti
add screen
  • Like 1

Share this post


Link to post
Share on other sites

Hi, Thank You.
this function is ok.

 

why is this "'....~" ?

 

why ist this function

FillChar(pointer(ATTRIBUTE_ADDR), 24 * 40, 0);

when i take it out the screen is the same.

 


greeting

Edited by funkheld

Share this post


Link to post
Share on other sites

From changelog

Quote

02/23/2021
- added PETSCII character conversion for strings ended with ''~

About fill ATTRIBUTE_ADDR area... Its a part of my screen init routine. C+4 have screen memory and colour map.

 

Stop asking so much questions, as always I recommend to read documentation for Mad Pascal and microcomputer are you now interested in.

Edited by zbyti
typo

Share this post


Link to post
Share on other sites
13 minutes ago, funkheld said:

hello, can this "file" also be used for the Plus4 from Madpascal?

I don't understand, please write your question in german, I use Google Translate DE->EN.

Share this post


Link to post
Share on other sites

I don't think so, support for Commodore family is in a very preliminary state, most Mad Pascal libraries are still A8 only.

Edited by zbyti

Share this post


Link to post
Share on other sites

Hi good afternoon.

 

does it continue for the c64?
I would also be very happy with the madpascal.

 there aren't that many demos for the c64 yet.
the c64 is much more known than the plus4

 

Thank you.

Share this post


Link to post
Share on other sites

Hello Mad Pascal Community,

 

in my project i'd like to - at some certain conditions, for initialization purposes - start another binary located on the disk; like a binary load. 

Could this be done easily in Mad Pascal?

 

Currently i'm using the xBootDos by @XXL, which by description should support such a call - like XIO 40, #1,0,0,"D:FILE.EXE" 

(btw, thx again for xBootDOS, gives me so much RAM i don't have to despair :) )

 

Best regards to everybody -   and thank you very much @TeBe for that great great compiler!

 

Share this post


Link to post
Share on other sites
Posted (edited)

hello, good day you specialist.

 

I'll try the c64 and madpascal.
have a first problem with this asm:
can you please do the procedure with data transfer for me
madpascal?

I can then use them later as a procedure sample.

Thank you.


please transfer data to the asm procedure:
befehl:  !byte 10,0
puffer:  !byte 0

------------------------------------
madpascal-procedure:
asm:
    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

waitforchar:
    lda $029d
    cmp $029e
    bne waitforchar
    ldx #50

loop:
    jsr $eeb3  
    dex
    bne loop

    lda #2
    jsr $ffc3

end-asm
-------------------------------------

Edited by funkheld

Share this post


Link to post
Share on other sites
Posted (edited)

DIY

 

if you see:

    lda #2
    ldx #2
    ldy #0
    jsr $ffba

you can write:

procedure someCall(a ,x, y : byte); assembler;
asm {
  lda a
  ldx x
  ldy y
  jsr $ffba
};
end;

for lda/sta use poke, or poke and peek, or absolute variables.

 

for branch instructions use pascal loops with proper conditions or if/else statement.

 

and so on...

Edited by zbyti
typo

Share this post


Link to post
Share on other sites
On 3/3/2021 at 4:39 PM, Atlan_Roland said:

Hello Mad Pascal Community,

 

in my project i'd like to - at some certain conditions, for initialization purposes - start another binary located on the disk; like a binary load. 

Could this be done easily in Mad Pascal?

 

Currently i'm using the xBootDos by @XXL, which by description should support such a call - like XIO 40, #1,0,0,"D:FILE.EXE" 

(btw, thx again for xBootDOS, gives me so much RAM i don't have to despair :) )

 

Best regards to everybody -   and thank you very much @TeBe for that great great compiler!

 

To answer my own question:


There actually is a XIO call procedure in MP, unit CIO !  

 

procedure XIO(cmd, chn, ax1, ax2: byte; device: PByte); assembler;

 

Thanks @Tebe :)

 

 

Share this post


Link to post
Share on other sites

 

thanks for the information.

buffer and befehl must be an address.

 

Thank you

 

befehl:  !byte 10,0
 puffer:  !byte 0

 

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

  ldx #<(befehl)
  ldy #>(befehl)

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

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

lda puffer,y

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

Share this post


Link to post
Share on other sites

Mad Pascal provide you built-in  functions:

function Lo(x): byte;
function Hi(x): byte

 

Share this post


Link to post
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.

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...