Page 1 of 1

how can you load trse data to $a000 without an array with poke or pointer?

Posted: Fri Nov 29, 2019 10:39 am
by funkheld
Hi good afternoon.

how can you load trse data to $a000 without an array with poke or pointer?

Thank you.
greeting

Re: how can you load trse data to $a000 without an array with poke or pointer?

Posted: Fri Nov 29, 2019 12:32 pm
by AndyH
Yea, you can load data to $a000 at runtime. Use pointers but it is great with exomize to unpack data to.

Hey, there's a facebook group for TRSE and the author of the software can be found there. You should drop by and ask some questions :)

https://www.facebook.com/groups/742955836046459/

Re: how can you load trse data to $a000 without an array with poke or pointer?

Posted: Sat Nov 30, 2019 1:59 am
by funkheld
Yea, you can load data to $a000 at runtime. Use pointers but it is great with exomize to unpack data to
data are same order wie the program data.bin >>>>not funktion

not funktion!!!!!
@define daten "$a000"
daten: incbin("daten.bin",@daten);

not funktion!!!!
zpdaten: pointer;

zpdaten:=@daten / zpdaten:=$a000

daten: incbin("daten.bin",^zpdaten);

daten: incbin("daten.bin",zpdaten);

greeting

Re: how can you load trse data to $a000 without an array with poke or pointer?

Posted: Sat Nov 30, 2019 3:31 am
by AndyH
$A000 is a space usually used for cartridge. I get same results with prg if I try to put data there.

I’m sure someone here can explain why, but I suspect you need to make a crt instead and put something the Vic expects in there.

As said, I used that space as ram at runtime without problems, but have to leave it empty in the PRG.

Re: how can you load trse data to $a000 without an array with poke or pointer?

Posted: Sat Nov 30, 2019 5:03 am
by funkheld
when i play in basic or forth games i use the address for data. I can then with poke einlese.
I can also put in a compiled asm and then start with sys40960.

why this trse so seriously manages the area $ a000 I do not provide.

this is ok, but I wanted to load it directly to save the space for the array.
then call $a000 and call $a020 !

-----------------------------------------------------------------
shiftli : array [21] of byte = (162, 0, 189, 0, 20, 189, 0, 20, 10, 62,
8, 20, 62, 0, 20, 232, 224, 8, 208, 238, 96, );

shiftre : array [18] of byte = (162, 0, 189, 0, 20, 74, 126, 8, 20, 126,
0, 20, 232, 224, 8, 208, 241, 96, );

zpas:=$a000;
for a:=0 to 21 do
begin
zpas[a]:=shiftli[a];
end;

zpas:=$a020;
for a:=0 to 18 do
begin
zpas[a]:=shiftre[a];
end;
-----------------------------------------------------------------

Thank you.
greeting

Re: how can you load trse data to $a000 without an array with poke or pointer?

Posted: Sat Nov 30, 2019 5:56 am
by AndyH
Must be an issue with what TRSE is doing I guess. I would try asking the question on that Facebook group I linked to above. The author of TRSE can be found there.

Re: how can you load trse data to $a000 without an array with poke or pointer?

Posted: Sat Nov 30, 2019 6:25 am
by AndyH
Probably need a Vic 20 expert to chime in, but I thought I'd try a simple program in CBM PRG Studio that can output to the Vic 20 with all 8K blocks enabled as RAM:

Code: Select all

; 10 SYS8192

*=$1201

        BYTE    $0B, $12, $0A, $00, $9E, $38, $31, $39, $32, $00, $00, $00

*=$2000

        lda test
        lda test+1
        rts

*=$a000
test      byte $01,$02,$03,$04
I get the same happening as I do with TRSE, the Vic 20 (in Vice) just hangs. It does not like any address in block 5 being occupied. This is also producing a PRG and passing that in to xvic so perhaps it is to do with that?

The only way to get the above to run is to remove *=$a000 or point it somewhere other than block 5. I can still write to address $a000 after the program has started but that is all I could get to work.

I don't know how you are doing it in BASIC or forth, sorry. Maybe someone on Denial will know the answer?

Re: how can you load trse data to $a000 without an array with poke or pointer?

Posted: Sun Dec 01, 2019 12:44 pm
by funkheld
I will use the trse again only if it is all right or if he has repaired everything.
The things there are too uncertain for me.

greeting

Re: how can you load trse data to $a000 without an array with poke or pointer?

Posted: Sun Dec 01, 2019 3:50 pm
by AndyH
Yea, in this case it does not seem to be TRSE as the same happens with another assembler. Could just be something simple of course. TRSE is constantly evolving and you get out what you put into it, but maybe it's not for you. All the best.

Re: how can you load trse data to $a000 without an array with poke or pointer?

Posted: Mon Dec 02, 2019 7:38 am
by funkheld
Hi good afternoon.

why do not you come here 255?

greeting

Code: Select all

program cpbyte;

var  
  a,b: byte =0;
  zpz : pointer;

begin

  zpz:=37888;
  for a:=0 to 255 do
	begin 	     
    zpz[a]:=4;
  end;
  
  a:=255;
  b:=0;
	
  copybytesshift(a,b,8,8,8);
  moveto(0,1,$10);
 printdecimal(b, 4);
	
 copybytesshift(a,b,7,7,8);
  moveto(0,2,$10);
 printdecimal(b, 4);
	
  copybytesshift(a,b,6,6,8);
  moveto(0,3,$10);
 printdecimal(b, 4);
	
  copybytesshift(a,b,5,5,8);
  moveto(0,4,$10);
	printdecimal(b, 4);
	
  copybytesshift(a,b,4,4,8);
  moveto(0,5,$10);
  printdecimal(b, 4);
	
  copybytesshift(a,b,3,3,8);
  moveto(0,6,$10);
 printdecimal(b, 4);
	
  copybytesshift(a,b,2,2,8);
  moveto(0,7,$10);
 printdecimal(b, 4);
	
  copybytesshift(a,b,1,1,8);
  moveto(0,8,$10);
 printdecimal(b, 4);
	
 loop();
end.