hello, good day from Germany and neo6502 Emu.

Started by funkheld, September 15, 2024, 06:40:14 PM

Previous topic - Next topic

funkheld

uses crt, neo6502, neo6502math, neo6502system;

const
BUF = $1000;

var
    a,b,c,d:byte;
s:TString;
e: boolean;
buffer : array[0..0] of byte absolute BUF;
src , dest :cardinal;
len01,len02 : word;
x,y,z : word;

function LoadPalette(fname :Tstring):boolean;
var
  w :word;
  b :byte;
begin
    fname := concat(fname,'.pal');
    NeoLoad(fname, BUF);
    result := NeoMessage.error = 0;
    if result then begin
      w := 0;
      for b := 0 to 255 do begin
        NeoSetPalette(b, buffer[w], buffer[w + 1], buffer[w + 2]);
        inc(w,3);
      end;
    end;
end;
 
begin

x:=100;
y:=50;
a:=2;


src:=$900000;
dest:=$800000;
len01:=$8000;
len02:=$2c00;

LoadPalette('neo_safety');

z:=$ffff;
e:=NeoLoad('slide0.c0',z);
        NeoBlitterCopy(src,dest,len01);

e:=NeoLoad('slide0.c1',z);
        NeoBlitterCopy(src,dest+32768,len01);

e:=NeoLoad('slide0.c2',z);
        NeoBlitterCopy(src,dest+32768+32768,len02);

e:=NeoLoad('graphics.gfx',z);
NeoUpdateSprite(1,x,y,0,a,0);


    repeat
NeoWaitForVblank;

        d:=NeoGetJoy();

if d=1 then
begin
x:=x-1;
NeoUpdateSprite(1,x,y,0,a,0);
                end;

if d=2 then
begin
x:=x+1;
NeoUpdateSprite(1,x,y,0,a,0);
                end;

if d=4 then
begin
y:=y-1;
a:=1;
NeoUpdateSprite(1,x,y,0,a,0);
                end;

if d=8 then
begin
y:=y+1;
a:=2;
NeoUpdateSprite(1,x,y,0,a,0);
                end;
 
     until false;
end.

LubOlimex

Hello there, glad you joined the forum.

Please provide a description and use more words in the posts, else you might get flagged as a bot!

Technical support and documentation manager at Olimex

funkheld

Hello, good day.
The description has disappeared, the text was still there yesterday.

I am 76 years old and come from Germany.
I found the emulator for the neo6502 2 weeks ago.
The neo6502 is a wonderful device. I really appreciate something like that.
I think it's great that something like that exists.

I ordered the neo6502 device from digi-key with the wifi included.
It's still on the way, I already have this wifi.
I've already created a few things with the emulator, wonderful.
I know this mad-pascal.
It's great that you're using this mad-pascal for the neo6502 and
have already expanded it so well. Thank you.

I've already tested the graphics for loading your own image and a sprite.

I'm looking for help on how to use the addresses $800000 and $900000 with the poke/peek or asm for experiments with mad-pascal.

Can you also install the RS232 in the neo6502?

Programming is great fun.

Thanks.
greeting

uses crt, neo6502, neo6502math, neo6502system;

const
  BUF = $1000;

var
        a,b,c,d:byte;
s:TString;
e: boolean;
buffer : array[0..0] of byte absolute BUF;
src , dest :cardinal;
len01,len02 : word;
x,y,z : word;

function LoadPalette(fname :Tstring):boolean;
var
  w :word;
  b :byte;
begin
    fname := concat(fname,'.pal');
    NeoLoad(fname, BUF);
    result := NeoMessage.error = 0;
    if result then begin
      w := 0;
      for b := 0 to 255 do begin
        NeoSetPalette(b, buffer[w], buffer[w + 1], buffer[w + 2]);
        inc(w,3);
      end;
    end;
end;
 
begin

x:=100;
y:=50;
a:=2;

src:=$900000;
dest:=$800000;
len01:=$8000;
len02:=$2c00;

LoadPalette('neo_safety');

z:=$ffff;
e:=NeoLoad('slide0.c0',z);
NeoBlitterCopy(src,dest,len01);

e:=NeoLoad('slide0.c1',z);
NeoBlitterCopy(src,dest+32768,len01);

e:=NeoLoad('slide0.c2',z);
NeoBlitterCopy(src,dest+32768+32768,len02);

e:=NeoLoad('graphics.gfx',z);
NeoUpdateSprite(1,x,y,0,a,0);

repeat
NeoWaitForVblank;

d:=NeoGetJoy();

if d=1 then
begin
x:=x-1;
NeoUpdateSprite(1,x,y,0,a,0);
end;

if d=2 then
begin
x:=x+1;
NeoUpdateSprite(1,x,y,0,a,0);
end;

if d=4 then
begin
y:=y-1;
a:=1;
NeoUpdateSprite(1,x,y,0,a,0);
end;

if d=8 then
begin
y:=y+1;
a:=2;
NeoUpdateSprite(1,x,y,0,a,0);
end;
 
until false;
end.