Author Topic: Change the 8256 ASCII character on the Joyce.  (Read 4511 times)

0 Members and 1 Guest are viewing this topic.

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.429
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #25 on: 12:48, 03 September 20 »
It means it tried to read more data than it really is.



like
0
No reactions

Offline funkheld

  • 464 Plus
  • *****
  • Posts: 386
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #26 on: 12:51, 03 September 20 »
hello, thanks for the help.


greeting
like
0
No reactions

Offline funkheld

  • 464 Plus
  • *****
  • Posts: 386
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #27 on: 12:54, 03 September 20 »

hello, I implemented something small from asm.


in asm it works as com.
in basic the "A" is not converted.


thank you.
greeting


asm:
Code: [Select]

  LD HL,#10E         
  LD DE,#E290       
  LD BC,#0864         
  LDIR                 
  JP #E290             


  LD HL,(#0001)         
  LD DE,#0057       
  ADD HL,DE                 
  LD (#E29E),HL       
  LD BC,#E2A2         
  CALL #0000           
  JP (HL)                 
  NOP                   
  LD DE,#BA08   ; A = 65*8     
  LD HL,#E2AE         
  LD BC,#0008       
  LDIR                 
  RET   


db 255,129,129,129,129,129,129,255


basic:
Code: [Select]

10 MEMORY &HEFFF
20 plane%=&HF000
30 READ j%
40 FOR i%=0 TO j%-1
50 READ d%
60 POKE plane%+i%,d%
70 NEXT
80 CALL plane%
85 PRINT "A"
90 WHILE INKEY$<>"":WEND:WHILE INKEY$<>" ":WEND
100 END
10000 DATA 52
10010 DATA 33 ,14 ,1 ,17 ,144 ,226 ,1 ,100 ,8 ,237
10020 DATA 176 ,195 ,144 ,226 ,42 ,1 ,0 ,17 ,87 ,0
10030 DATA 25 ,34 ,158 ,226 ,1 ,162 ,226 ,205 ,0 ,0
10040 DATA 233 ,0 ,17 ,8 ,186 ,33 ,174 ,226 ,1 ,8
10050 DATA 0 ,237 ,176 ,201 ,255 ,129 ,129 ,129 ,129 ,129
10060 DATA 129 ,255 
like
0
No reactions

Offline JohnElliott

  • CPC664
  • ***
  • Posts: 131
  • Country: gb
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #28 on: 15:22, 03 September 20 »
Because the machine code you're trying to run was assembled to load at 0100h, but you're loading it at 0F000h without changing any of the addresses.

You need to drop the first 14 bytes (which try to copy code from 010Eh to 0E290h) and then relocate the rest to be based at 0F000h not 0E290h.
« Last Edit: 15:25, 03 September 20 by JohnElliott »
like
0
No reactions

Offline JohnElliott

  • CPC664
  • ***
  • Posts: 131
  • Country: gb
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #29 on: 15:29, 03 September 20 »
Hello thanks for the information.


there is another mistake.
what kind of message is that.
As robcfg explains, there were more READ operations than DATA items to be read. For example, this would give the same error:
Code: [Select]
10 READ a: READ b: READ c  ' Three READs
20 DATA 10,20              ' But only two DATA items

Since the program as I posted it does not give this error (I've just tested it) I suspect you must have introduced a typo somewhere along the line.
like
0
No reactions

Offline funkheld

  • 464 Plus
  • *****
  • Posts: 386
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #30 on: 20:18, 03 September 20 »
hello, data demo is ok now.


greeting
like
0
No reactions

Offline funkheld

  • 464 Plus
  • *****
  • Posts: 386
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #31 on: 09:37, 04 September 20 »
Hi good afternoon.
who can convert this asm for me once so that it also runs under basic mallard-basic.

I want to take the asm to learn to convert ascii.

I have already done it myself after the advice above, probably wrong.


thank you.
greeting


Code: [Select]
LD HL,#10E           
LD DE,#E290         
LD BC,#0864           
LDIR                   
JP #E290   
           
LD HL,(#0001)         
LD DE,#0057         
ADD HL,DE                   
LD (#E29E),HL         
LD BC,#E2A2           
CALL #0000             
JP (HL)   
               
NOP                   
LD DE,#BA08   ; A = 65*8       
LD HL,#E2AE           
LD BC,#0008         
LDIR   
               
RET
 
db 255,129,129,129,129,129,129,255
« Last Edit: 09:39, 04 September 20 by funkheld »
like
0
No reactions

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 806
  • Country: gb
  • PCW since '85, more CP/M than Loco
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #32 on: 15:26, 04 September 20 »
Hello,

I'm not sure what you mean by ALSO run under Mallard BASIC, you will need different code for different methods.   The code you show here may still be appropriate for putting in a .COM file, but clearly is NOT OK for BASIC.

As John Elliot suggested a few messages above, you need to remove the first bit, which relates to moving the code from low RAM (just aboue &H0100) where the .COM file is to high memory where it can do the Bank swap.   This code should NOT be there as the BASIC loader will put it in the right space anyway.   Anywhere from &HC000.   Exactly where is up to you, and whatever else you might put up there.

The rest of the code may be OK, but you need to change the &HE2?? addresses to be correct for the actual location of the code and the data.   You should set your compiler with ORG of &HE2?? I assume?

Geoff
« Last Edit: 15:28, 04 September 20 by GeoffB17 »
like
0
No reactions

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 769
  • Country: gb
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #33 on: 19:22, 04 September 20 »
[deleted post]
like
0
No reactions

Offline funkheld

  • 464 Plus
  • *****
  • Posts: 386
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #34 on: 20:45, 04 September 20 »

Unfortunately, I cannot find a solution with the suggestions given.
do not get to the goal to change the ascii with little asm code for an inline.


thank you.
greeting
like
0
No reactions

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 806
  • Country: gb
  • PCW since '85, more CP/M than Loco
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #35 on: 21:44, 04 September 20 »
If you could post the asm code, AND the BASIC code, then I can have a look.   But the asm code on it's own isn't a massive help, esp if it contains a number of possible errors without the BASIC calling code to clarify things.

May be something simple.

Oh, I'd be interested to know what you're actually trying to do - eventually.   I assume you have some purpose in mind, other than simply changing as 'A' keypress into something else, when there are MUCH easier ways of doing that.

Geoff
like
0
No reactions

Offline JohnElliott

  • CPC664
  • ***
  • Posts: 131
  • Country: gb
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #36 on: 21:51, 04 September 20 »
If you want to redefine characters from Mallard BASIC then the program I already posted upthread will do that just fine.
like
0
No reactions

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 806
  • Country: gb
  • PCW since '85, more CP/M than Loco
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #37 on: 22:34, 04 September 20 »
John,

Absolutely - but I'm not sure that THATS what he's actually wanting to do.

Geoff
like
0
No reactions

Offline funkheld

  • 464 Plus
  • *****
  • Posts: 386
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #38 on: 09:41, 05 September 20 »

Hi good afternoon.


i want to change the letters while the basic program is running.
there should be a moving change of the letter during the game, even if it is slow.


greeting
like
0
No reactions

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 806
  • Country: gb
  • PCW since '85, more CP/M than Loco
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #39 on: 15:54, 05 September 20 »
OK.  You could achieve that by saving the original char data, then gradually changing the char and reprinting it, and put the char back at the end.   Not too bad if it's 1 char only.   Or, you could leave the char matrix alone and work on the screen RAM directly, and gradually fade the image (even a complete block of the screen or all the screen) out and then back into another image.   There was a system mentioned here not long ago for displaying SPC images/pictures and creating a slideshow that did just that, with various options.   I've not delved into the code to see how it was done but the methods there might be useful to you?

Also mentioned here a while back was the package WALBASIC, this is a system originating in France and provides an extension to Mallard BASIC (a large machine code extension using a loader process as used in other progs we've used here) which provides various graphics functions that are then activated using calls within the normal BASIC prog.  This includes setting or unsetting specific 'points' i.e. dots on the screen, which could include drawing letters and in effect fading them into something else.   Again, this would be accessing the screen RAM directly - but I don't think there was anything built-in to do the fading, unlike the SPC process.

I have the code for the WALBASIC, just the .COM files for the SPC stuff as I had no reason to dive into that!

Geoff
like
0
No reactions

Offline funkheld

  • 464 Plus
  • *****
  • Posts: 386
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #40 on: 17:21, 05 September 20 »
hello thanks for the info.


-------------------------------
OK.  You could achieve that by saving the original char data, then gradually changing the char and reprinting it, and put the char back at the end. 
-------------------------------


how can a solution look like in asm for inline


greeting



like
0
No reactions

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 806
  • Country: gb
  • PCW since '85, more CP/M than Loco
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #41 on: 20:55, 06 September 20 »
So, I'm still guessing somewhat about things you're not saying.

I think you want to change numerous chara (how many at the same time ?) and you want to change them into something else (another letter ?), different letters ?  one word into a different word ?

You want to do this change gradually, while other things are happening on the screen, so you'll have two (or more ?) processes running at the same time, swapping between the two (repeatedly ?).

Will it always be swapping one letter into another, i.e. A -> B, or might it be sometimes be A -> K (for example).  Do you want one letter to fade right away, then the new letter to fade in (I think the latter would be simpler ?).

I'd guess that the other action taking place could also involve the screen.   So rather than swap to the screen banks for each action, it might save a lot of swapping if you swap to screen and so something re letter change, then do something re the other action, and then swap back.   Or are you not too worried about speed?

Just a start?

Geoff
like
0
No reactions

Offline funkheld

  • 464 Plus
  • *****
  • Posts: 386
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #42 on: 09:53, 07 September 20 »

Hi, Thank You.


the speed does not matter.


it should be something like a letter scrolling, 8 bytes of a letter scrolling up or down. the scrolling should be visible.


greeting
like
0
No reactions

Offline JohnElliott

  • CPC664
  • ***
  • Posts: 131
  • Country: gb
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #43 on: 19:51, 07 September 20 »
That's perfectly doable with the program I gave you earlier. Either define eight different patterns for "A", or redefine "A" with a different pattern each time you want to draw it. Here's an example of the first approach. Change line 20 to
Code: [Select]
20 FOR c=160 TO 167:POKE &HC099,c
so that it only defines 8 characters. Then replace lines 70-210 with
Code: [Select]
70 DATA &H18, &H3c, &H66, &H66, &H7e, &H66, &H66, &H00
80 DATA &H00, &H18, &H3c, &H66, &H66, &H7e, &H66, &H66
90 DATA &H66, &H00, &H18, &H3c, &H66, &H66, &H7e, &H66
100 DATA &H66, &H66, &H00, &H18, &H3c, &H66, &H66, &H7e
110 DATA &H7e, &H66, &H66, &H00, &H18, &H3c, &H66, &H66
120 DATA &H66, &H7e, &H66, &H66, &H00, &H18, &H3c, &H66
130 DATA &H66, &H66, &H7e, &H66, &H66, &H00, &H18, &H3c
140 DATA &H3c, &H66, &H66, &H7e, &H66, &H66, &H00, &H18
160 FOR c=160 TO 167: PRINT CHR$(c);CHR$(8);:NEXT:GOTO 160

The eight DATA lines define an "A", scrolled up by zero, one, two, ... seven pixels. These shapes are loaded into characters 160-167, and then line 160 draws them one after the other in the same place.
like
0
No reactions

Offline funkheld

  • 464 Plus
  • *****
  • Posts: 386
    • Awards
Re: Change the 8256 ASCII character on the Joyce.
« Reply #44 on: 10:26, 08 September 20 »
hello, thanks for help.



works wonderfully.
[size=78%]thank you.[/size]
like
0
No reactions