Login
Back to forumReply to this topicGo to last reply

Posted By

SVS
on 2008-04-04
04:50:44
 Searchin' for a char editor...

...able to visualize groups of characters in order to make an image.
I want to draw a set of 1x1 characters, some of them I'll use put together to build a 2x2 chars image for example:

AB
CD

In order to view what I'm drawing and the links between the chars, the editor should show the result of the 4 characters, while I'm modifying one of them (for example B).

All the programs I've found show the entire set, sequentialy (ABCD...), can please anybody help me?

Posted By

Luca
on 2008-04-04
05:56:26
 Re: Searchin' for a char editor...

Graphics Master is simple and cool, and has a separate 8*4 window where to test bigger elements made by several chars.

Posted By

SVS
on 2008-04-04
06:55:23
 Re: Searchin' for a char editor...

Thank you pal!

Posted By

George
on 2010-08-09
17:52:37
 Re: Searchin' for a char editor...

Does anybody know how to use this programm?
I made my greek charset, saved it to a disk. And then?
Thanks for the help in forward....

Posted By

Chicken
on 2010-08-09
18:25:45
 Re: Searchin' for a char editor...

If you want to use the redefined charset in your own program(s), you just have to tell the TED where it is (after loading it absolutely). There are TED registers you have to set. Do you want to use the charset in a BASIC program?

Posted By

George
on 2010-08-09
19:29:33
 Re: Searchin' for a char editor...

Yes, i want to make a little Text adventure in basic. Mainly playing around. First i want to redefine the chars. Do you have a small example how to use the defined keys from Graphics_masters in a Basic programm? Is there a Documentation?

I am a software-developer (c++, Delphi, VisualBasic) myself, but not that familiar the plus/4. I had this computer (my first) before 25 years as a child. Now a bought it again. I have some little projects in minds (Textadventures like D&D or "Das Schwarze Auge"), which i always wanted to do that time.

Thanks for the help in forward.

Posted By

Chicken
on 2010-08-09
20:08:12
 Re: Searchin' for a char editor...

I asked about the language because if you use redefined charsets in BASIC you have to "protect" that memory range so it doesn't get overwritten by variables etc. Therefore, it's best to place the charset at the start or at the end of the BASIC memory.
I have never used Graphics Master but setting a redefined charset is a somewhat trivial task and usually done like this:

POKE 65298,PEEK(65298)AND251: POKE 65299,DEC("HI")

HI=Highbyte of the memory location, hexadecimal value. Of course this can be POKEd as decimal values, too. But this way, it's more obvious ;)

I just checked out Graphics Master. It uses $3800- (which is at the end of the RAM on C16s) for the redefined charset.

Try loading the saved charset...

LOAD"CHARSET",8,1

then enter

POKE 65298,PEEK(65298)AND251: POKE 65299,DEC("38")

Now you should see "your" charset when you press the keys you redefined.

When you cause an ERROR now, the screen looks garbled. That's normal (due to a faulty routine).

Switching back to the ROM charset can be done by entering these POKEs:

POKE 65298,PEEK(65298)OR4: POKE 65299,208

Just try if the above works for you. We'll take care of the rest then...

Posted By

George
on 2010-08-09
20:27:00
 Re: Searchin' for a char editor...

Thanks for the help.
This maybe trivial for you, but i only see Peek's and Pokes..wink Programming this machines is a lost art. Anyway, the code doesn't work in yape.

I have a code fragment for changing a char, i can expand it to the rest. This programm could have saved me time, if we could i make work.

Thanks anyway for your help.

Posted By

Chicken
on 2010-08-09
20:41:40
 Re: Searchin' for a char editor...

Well, it should work. What happened when you entered the POKEs?

It's much easier to use a tool to redefine charsets than poking data into RAM. (Of course we all did it that way back when there were no tools around but it's really a waste of time wink ).

Try this...

MONITOR (Return)

(Now you are in TEDMON, the built in machine language monitor.)

F1000 4000 00 (Return)

L"CHARSET",08 (Return)

M3800 (Return)

Do you see other values than 00 00 00 ... here?

In my previous post there was a small mistake, it should be LOAD"CHARSET",8,1 - without the "," after "1". It's important to LOAD it ",8,1" from BASIC and not just ",8".

Edit:
Instead of trying the above, enter this little BASIC program. Make sure you have the disk with your charset attached to drive 8.

10 A=A+1
20 IF A=1 THEN LOAD"CHARSET",8,1
30 POKE 65298,PEEK(65298)AND251: POKE 65299,DEC("38")
40 SCNCLR
50 FOR P=0 TO 255
60 POKE 3072+P,P
70 NEXT
80 GOTO 80

This program loads the charset and then clears the screen and POKEs all chars on the screen. What do you see?

Posted By

George
on 2010-08-09
21:01:54
 Re: Searchin' for a char editor...

Hey Chicken,

its my mistake...I loaded it with DLOAD"charset".

your code works perfekt!!! You saved me a lot of time!!!!

I love the plus/4. I just bought his brothers, c16 and c116.

Thanks, we should documentated this solution for the other people.

Posted By

Chicken
on 2010-08-09
21:17:36
 Re: Searchin' for a char editor...

Thanks for the feedback!

DLOAD (which is similar to LOAD"NAME",8) will load the file to the BASIC start, which is usually $1001. LOAD"NAME",8,1 or loading in TEDMON will load to the absolute address (or load address, in this case $3800). That's why this is important.

$3800 is a good location for the charset if your program should work on a standard C16/C116 with only 16kb. If your program gets larger and you run out of memory you can still relocate the charset. For some tests and smaller programs, this will be fine.

There aren't many ppl (re-)starting coding on these machines. So feel free to ask anything, there are lots of friendly ppl here and most "problems" can be solved happy

Posted By

George
on 2010-08-09
21:51:24
 Re: Searchin' for a char editor...

Thanks for your kindness. I wish i had this help, when i was a Kid (1984).

As a pofessional Software Developer and I have programmed on every modern machine since 1992, on almost every OS (Apple, Linux, DOS, Windows) in almost every higher Language. Including Webprogramming and Databases.

But i started with this machine (Plus/4, my great love) as a kid, and was not able to understand most things, especially assembly. Book with seven seals. happy

Dealing with its Basic is nice, but very slow..happy So i have to deal with assembly in future, because it was a Kids dream of me, to programm a Text-Adventure and an arcade game of the 80's on this machine!!! (e.g Phoenix).

I don't want to offend the community here, but Is there a comfortable programming (BASIC-) environent for the Plus/4? I am thinking of developing one for my own. Programming on the real machines or in a emulator (e.g Yape) is very basic. You have to renumber the codelines, if you want to reorganized the code. The best solution for me is Coding on a PC and sending the Result direct to Emulator or better to the Commodore. Perhaps somebody has developed something in that way. (Background: I earn my daily bread with Borland Delphi at this time)

Thanks for the help, again!!!

Posted By

Litwr
on 2010-08-10
02:06:55
 Re: Searchin' for a char editor...

Maybe it will be worth to try my old program Extra Font Editor for MS-DOS (it must work under Microsoft Windows or any DOS emulator, it is with pascal sources and may be recompiled in any OS). http://litwr.narod.ru/eng.html

Posted By

Csabo
on 2010-08-10
09:41:40
 Re: Searchin' for a char editor...

Hey George,

I don't think anyone is offended by you question about a BASIC programming environment. I get the idea. However, as far as I know, no such thing exists.

I've been trying to wrap my mind around what it would take to do something like that. (I wrote Plus4IDE, which I would say is a comfortable programming environment, but unfortunately for machine language. It doesn't support BASIC.) Sure, copying around large chunks of code would be convenient. Would we use labels instead of line numbers though? (That would need special markup.) Or would there be some kind of automatic line numbering system? Properly reproducing the font, especially typing control and C= characters would also be problematic. Bottom line: for now, I think you're stuck with the built in BASIC. With some planning ahead, you should be fine though.

Other random stuff: go Delphi happy Sorry about not chiming in to this thread earlier, but I'm here now. I love adventure games, BASIC or otherwise (wrote my share of them) and I hope you really follow through with this. If you need support, ideas, etc., I'd also be happy to help.

Posted By

siz
on 2010-08-10
10:27:55
 Re: Searchin' for a char editor...

Probably you should try some cross-compilers like CC65. If you are familiar with C you could use it. You can use your favourite editor to create the sources and produce code for plus/4. You also can test the result with your favourite emulator.

Posted By

George
on 2010-08-10
11:15:03
 Re: Searchin' for a char editor...

Hi Csabo,
thanks for getting my idea about the Basic-Environment.

I would keep it very near to the original, but coding should be comfortable in an Editor with a Mouse, Copy&Paste and Saving the Code imidiately, so that you concentrate on the essence: Coding.
The other thing is, that i am used to the PC-Keyboard after all that years.

First of all i would ban the codelines and replace them with tags. e.g.

Basic 3.5 Code:
10 Print "Hello"
20 Goto 10

Our Basic-Code
##Main
Print "Hello"
Goto ##Main

After "compiling" the Enviroment adds Numbers to the code and would make something like this:

10 REM Main
20 Print "Hello"
30 Goto 10

Then you can send it to the Emulator or the real machine.

GoSubs would be treated the same way....I think that would be a great improvement.

Another idea is to integrate a help system for the Basic-Commands, and especially for Poking and peeking, which will be updatable from the Internet. So everybody could contribute to the Help file by adding or correcting it. (Wikipedia-Like) You mark a word, you pres F1 and get your information (Syntax, Parameterlist, and so on).

Thank your for your support, Csabo. I certanliy will come around with some stupid 'Beginners'-Questions for my first adventure. Mainly how to load graphics to the machine and how to make a background melodies and cool sounds.

Greetings
George

Posted By

Gaia
on 2010-08-11
02:13:13
 Re: Searchin' for a char editor...

George, keep up the spirit and feel free to ask for help or assistance.

On the x-dev BASIC IDE: such a thing does exist albeit not for the plus/4, only for the c64 and the vic20 here:

http://www.ajordison.co.uk/

Perhaps we could convince the author to support the plus/4, too. In the meantime, in case your code does not contain any BASIC 3.5 specific keywords, you can target the plus/4 as well just as if it was a c64.

Posted By

MMS
on 2010-08-11
03:42:36
 Re: Searchin' for a char editor...

Just one remark regarding CC65.
Maybe i was just dumb (or did something wrong), but for me it seems the plus4 library is not complete, like graphics support. I mean it is created, but missing parts.
(some more experienced programmer may confirm if it is true or not )

There is also a Pascal (called G-Pascal), it was a big hype at the time of release, maybe I can find my booklet I printed years ago (but never had the time to try it out).
UPDATE: never mind, I found it on Internet happy
http://www.lyonlabs.org/commodore/onrequest/G-Pascal.pdf

It may manage labels and structured programming, and I always felt Pascal is similar to Basic happy
http://plus4world.powweb.com/sd.php?pid=12957
(there is also an editor for that. As I know, it can compile self-running assembly code, but who knows what compile means in different programs? worth a try)

I remember a kind of BASIC development cross-tool for C64 (maybe the one linked above? I am not sure, but that one looks great). Even if C64 only, could be used during development phase (with the limitation: no v3.5 commands, but POKE and PEEK).

There was also Pascal cross-compiler, but cannot find right now. Lemme check...

BTW, if I remember well, both the latest Plus4EMU and Yape allows in Windows environment cursor positioning by Mouse click, and also clipboard copy/paste is possible. It will do most of the things you need for more fluent programming.

Posted By

George
on 2010-08-11
05:03:28
 Re: Searchin' for a char editor...

Thanks for your hints. Very interesting.

I want to stay to Basic (at first, later will try out assembly). I programm in Delphi (Pascal) every day and this is just my beloved hobby for reminding me the 80's.

I use Notepad++ with the Copy&paste feature of Yape already. Maybe i will write my own small tool for automating some things. E.g Numbering the codelines ist very annoying. Often i use for 2 lines the same Codeline und i am wondering why the code does not work..wink

Posted By

Litwr
on 2010-08-11
05:52:35
 Re: Searchin' for a char editor...

[to George] Be careful with cc65. IMHO it has several *inconviniences". For example it has ORG directive but it does not work. So I prefer other pc assemblers for +4.

Posted By

MMS
on 2010-08-11
07:41:14
 Re: Searchin' for a char editor...

George, why you do not use the automatic numbering of the codelines?
I think it is Auto command. (eg. AUTO 10)
Or the renumbering feature of v3.5, if you neeed to extend the code later. (eg. RENUMBER 10)

OK, no labels to refer, but better than nothing.

Posted By

George
on 2010-08-11
08:54:06
 Re: Searchin' for a char editor...

Hi MMS,

if you make an error in Notpad++ and you have the Linenumber twice in the code and you copy it to YAPE, then tha last line overwrites the first line. And i don't know if all GOTO N expressions are updated too. (I guess no, have to try it after my work). On Screen everything looks ok.

Now imagine, you code after 2 hours a nice Programm, than you don't see this tricky things any more (Coder Blindness). And Basic is not a very userfriendly Language. And its not possible (without extra programm) to scroll up and down on the machine.

I decided it today...i will write my own tool.

Bill Herd said it wisely in his interview: As engineer you use the best possible Tools for your Task. My Task is write a programm on this wonderfull machine using the modern technology of today.

I hope most of you agree with me.


I

Posted By

Csabo
on 2010-08-11
09:54:45
 Re: Searchin' for a char editor...

Sounds good to me! I hope you follow my example and make it open source (all my tools are). If it's in Delphi, I can even help out. I suggest Google Code for hosting, I only uploaded Plus4IDE there, but I should put up the other projects too.

Posted By

George
on 2010-08-11
10:49:44
 Re: Searchin' for a char editor...

Of course.

I came across your tool and happily thought at first it would support Basic to.

Posted By

MMS
on 2010-08-11
12:39:43
 Re: Searchin' for a char editor...

Hi George,

Certainly I do agree with you happy, you know the best what is good for you.

In fact I am just a little "yellow", that you can program such tools youself happy
I also have a degree of programmer, but as I did not use and not updated my knowledge in the last 14 years, it became obsolete and really faded out. (since 14 years I work in quality assurance, and despite I planned several times a recover action on Plus/4 assembly, I never realized it.) So I focus now just on graphics.

OK, I decided too : I will make a new GFX slideshow release :-D
(cross your fingers for my programing skills, haha!)

Posted By

George
on 2010-08-11
13:36:06
 Re: Searchin' for a char editor...

Hi MMS,

dont expect something genius from me. I am not one of the most talented Coders around. But i gained some experience over the past, lets say, 18 years. And everyday training makes the master, right?

I want to share my first (very rapid) prototype after 1 hour work with you:

http://www.patsos.de/plus4/cbasic35.jpg

1) On the left is the Code with tags without the linenumbers
2) On the right you have the Result when pressing the "covert and copy" button. It copies the code directly to the clipboard too.
3) If you copy the result into YAPE, it works perfect.

I want to built in a feature for looking up the Basic Keywords (Syntax, paramerlist) and pasting them in with a click. Because i am an old guy and i forget things really fast..wink

Posted By

George
on 2010-08-11
13:42:41
 Re: Searchin' for a char editor...

MMS,
i wish you good luck with your new release "GX slideshow".
Perhaps you can give me also some Beginner's tips later.

Posted By

Csabo
on 2010-08-12
09:01:47
 Re: Searchin' for a char editor...

Very nice start! So it's not going to generate PRG files? I think you can only copy/paste one pageful of information into YAPE. The linking/tokenization shouldn't be a big deal.

As for the autocomplete, you could copy the information from here:
http://plus4world.powweb.com/kb.php?cat=490041

Posted By

George
on 2012-08-04
20:32:03
 Re: Searchin' for a char editor...

Hi Csabo,

I don't want this tool create prg's. That is not the idea.

I just want this tool to be a coding-helper und sending the prepared code direkt to the emulator or real machine (Later perhaps). Copy&paste is the quickest wayfor me for the moment. Perhaps there is way sending it with a Button-Click to the YAPE-Windows by Sendkeys-Events.

Thanks for the l

05.08.2012:
Well i am coming back to this topic by redefinig chars.
I made my charset with graphics editor und i do load it with the code from chicken (see above) or the code in the instructions.
Works fines until i go in graphicsmode (GRAPHIC 1,1 or 3,1).
In this case the charset is the old one again. In Graphic 3,1 mode the chars are displayed in a very wierd mode.
Anybody a hint?

Posted By

Csabo
on 2012-08-04
21:03:30
 Re: Searchin' for a char editor...

Two things: GRAPHICS 3 is multicolor, so if you use CHAR, the BASIC will transform the characters. It does a hires-to-multi conversion, that's the only way it's possible to do a CHAR 1, or CHAR 2, or CHAR 3 (since those will all be in different colors). So, basically, if you want to use multicolor, you need to draw the set that way (half the resolution).

Second, all the code and POKEs in this thread are regarding character mode only. In GRAPHICS mode (either hires or multi), you need to do something different. There's a POKE for it... something around POKE 7xx, (the address of your set), but honestly I don't remember it. If no-one else comes around with what that POKE is, maybe look at the ROM code for CHAR or just find an existing program that does this and check the code out there.

Posted By

ajordison
on 2012-08-05
03:31:13
 Re: Searchin' for a char editor...

@gaia. The current CBM prg studio has some C16/plus4 support but the new version (available from 10th August) has improved support for these machines (as well as PETs), especially for the screen editor.

www.ajordison.co.uk

Posted By

George
on 2012-08-05
08:51:04
 Re: Searchin' for a char editor...

@Csabo Thank you for the hints.

1) I know, Mulitcolor has the poor resolution on 160x200, so i did the chars half resolution in the right way.

2) I have suppose this. I used the code from the Graphics-Master Manual (with the correction) also, but when i switch to Graphicmode 3, the screen is totally messed up in Yape.

@Arthur jordison
Nice IDE. Great work. Comes very close to what i had in in mind too, but never had time to polish it like yours. Im my far more simple Tool (for my own needs so far) I tuned v3.5 Basic a little, so that you have Tag support (GOTO ##MAIN) and you can define Procedures and functions also. No anoying Codelining anymore. With a button-Click Everything is tranformed to real 3.5 Basic and you can copy& paste the code into Yape. Next step will be defining Mnemoincs which will be replaced with will be replaced into Basic commands (e.g. SWITCH_TO_HIRES_MULICOLOR = Graphic 3,1). This is my personal vision how to programm easily on this machine.

Posted By

MMS
on 2012-08-05
15:12:33
 Re: Searchin' for a char editor...

I know the troubles George mentioned, as I also faced them during my work too. Supposely we should do the hard task of demo coders do it as a daily practice to create multicolor charset and POKE them directly, or create a standard routine for us, getting X, Y and the string, and put the proper chars to the place.

A little OFF
I had a chance to try out George's editor, and it was just great during my trial demo prgs to use Tag support, I felt like coding Pascal or what happy
@George I think after the next release you may make it public, as it is a great peace of code.
Mnemonics is just a great idea. I do not know, if you know the good old C64 BASIC extension, SIMON's BASIC has a lot of good ones, so you may define the same ones, thus SIMON's BASIC code become compatible at once with your editor (OK, except sprite and music commands happy )
http://en.wikipedia.org/wiki/Simons'_BASIC
http://www.bombjack.org/commodore/commodore/Simons_BASIC_Extensions.pdf

@ajordison
I downloaded your tool, and a very nice package, though a little too complex for my simple mind at first glance, hehe happy I need some time to understand and utilize all of it's capabilities.
You mentioned pBASIC on your page. If you integrate it into the CBM PRG Studio, it may produce faster code, like Austrospeed complier? In case the CBM studio will work well for me, I will be ready to donate this and even the pBASIC, if it will support BASIC 3.5. You mentioned it is a huge work. What after the allowance of the owner of Austrospeed Compiler, it would be linked somehow to the PRG creation process? (create a temp D64 file, call it from Emulator, and copy out the final compiled PRG file). It may speed up the development time, and less effort needed (just maybe some extra donation from "someone" to Austrospeed owner happy )
I can confirm, that it greatly improves the speed, though for me it looks it copies the complete ROM (increment of code size is huge), and seems GFX commands do not speed up at all (unfortunately).

interesting discussion at C64 on the same matter:
http://noname.c64.org/csdb/forums/?roomid=11&topicid=90966
in fact they mention the C language and CC65. It theoretically can produce much faster code than BASIC.
(although C is not my favourite)
Did anyone had any success on that package on Plus/4? or am i the only one who is interested in that too? happy

Posted By

George
on 2012-08-05
16:09:52
 Re: Searchin' for a char editor...

Yes a code example would be very nice. I need it the Colors for this here:
http://www.patsos.de/plus4/Polybius1.JPG

@MMS: Thanks for the feedback. I developed it further, supports functions and procedures now. It also has a small Screeneditor for placing Text on 40x20 grid (for Title Screens) and gives back the Basic Code with char x,y Commads. Very basic stuff for developing Basic-Code.
The mnemonics will be definable in a Ini-file.
My whole idea is, that you put in your dream-Code and the tool puts out normal 3.5 basic Code.

My far goal is to make a smll SciFi-Textadventure in the style of Snatcher or Policenauts. Picture an text combned. Many studywork has to been done first. The plussy is a difiicult machine to programe for.

Posted By

MMS
on 2012-08-06
09:28:30
 Re: Searchin' for a char editor...

@George,
Sounds good :-:

BTW, I was a little lost with Snatcher or Policenauts. I have no console background, but Google helped me a lot. nice idea happy lot of nice artworks to be converted, though IHFLI would fit the best, and maybe 80 column text mode (Maybe MSX2 Snatchr fits the most to HIRES capabilities of Plus/4)

I want to do the same in fantasy area happy
I want some assembly code integrated, like flexible (changing) split screen (if you need more or less text), possibly a mouse driver + sprite cursor... Eh, still a lot to do, first I want to release a preview to see the first reactions.
In fact, the issue with multicolor characters do not impact the BASIC, if you use the split screen and keep text screen in 8x8 hires mode. If BASIC does the conversion automatically, then comes the own code (or POKes) in picture, but anyhow a nice own characterset needed.

Did you try Plus4Emu? Still, for faithful reproduction of demos, still my preference.

Well, I know a lot of computers even more complex to program, we should not go too far, VIC-20 and C64 are there, and at Amiga you need master's degree to program anything (eheheh)

Posted By

ajordison
on 2012-08-06
17:15:06
 Re: Searchin' for a char editor...

@MMS - You can contact me directly at ajordison[at]yahoo.co.uk if there's anything you need help with. pBasic isn't a commodore basic compiler but a language a bit like bbc basic, but without the line numbers. I had a look at the austrospeed compiler but it's been out of development now for a while. I might develop pBasic a little more but to be honest there's not much interest in it sadly. Plus it's a lot of effort!

Posted By

Csabo
on 2012-08-06
17:32:40
 Re: Searchin' for a char editor...

Sorry guys, but this topic is getting a little hard to follow... Are we still talking about the BASIC problem that George has, or has that been resolved?

In case it's still to be solved: Are you sure it's a YAPE bug and not a programming error (my guess would be that it's the latter)? Can you post a stripped down example?

Posted By

gerliczer
on 2012-08-07
02:28:08
 Re: Supposed YAPE bug of George

Hi George,

Although it is not a certainity, I have an idea about the nature of the messed up graphic screen. If you are doing what the Graphics Master instruction leaflet tells as it is written then it is maybe the charset data that interferes with your graphics. You see, the graphic screen of COMMODORE BASIC 3.5 resides at $2000-$3F3F in the memory. In the C=16 $3FFF is the end of the memory, therefore programs using character screen usually put the redefined character generator around there, although AFAIR one must be careful doing this because the reset and interrupt vectors may be overwritten. I checked only the BASIC lines 10 and 20, and those are setting the top of memory to $3800. I didn't read the following lines but I'm sure that they set the chargen to this location, after all Graphics Master is a program for the Commodore 16. Unfortunately for you these two things, the graphic screen and the character generator, overlap which is the cause of the messed up screen. At least, this is what I think.

Posted By

George
on 2012-08-07
04:38:16
 Re: Searchin' for a char editor...

Thanks Csabo,
i triple checked the code of the Graphics Editor manual.
As i said, in Textmode it works fine. If you switch to graphicsmode 3 the screen gets messed up.

I will post the code with screenshots later, when i am at home again. (good idea for the forum would be, to be able to post Screenshots here)

Yesterday i had another idea, once i have only a few charakters to draw: i could define a speficic routine for drawing each character in vector mode. I thought out a cryptic notation how to draw every char in a 8x8. I let you know about the result, if i have tested the perfomance.

Posted By

Csabo
on 2012-08-07
09:32:13
 Re: Searchin' for a char editor...

Ok, I looked it up from the ROM code, it was actually very easy to find. The POKE you need is POKE 740, (address of charset). So, here's a very simple example showing you in action, how to use a custom charset on the graphics screen (RETURN after each line):

MONITOR
>1008 FC CC CC FC CC CC CC 00
X
POKE 740, DEC("10")
GRAPHIC 4,1
CHAR 1, 0, 0, "A"

And voila, instead of the "ugly" default "A", you'll have the nice blocky "A" we defined as part of our custom charset on $1000. Simple, easy, there's nothing to it. Just compare your code with the above.

Posted By

George
on 2012-08-07
11:48:24
 Re: Searchin' for a char editor...

Thank you for the help. Just for my understanding:

1) POKE 740, DEC("10") defines the HI-Byte of start adress of custom charset at $1000.

2) You define the new "A" at $1008, Because "A" is the second char in the charlist.

So in Basic i guess
A=A+1
IF A=1 THEN LOAD"CHARSET",8,1 : Rem Loads charset at $3800
POKE 740,DEC("38"): REM Set HI-Byte
GRAPHIC 3,1
CHAR 1,0,0,"A"

Update:
Well i works if put every single command Hand by hand. The "A" is displayed.
If i run the code by a Basicprogramm, Memory 3800- is 00 everywhere.
Any ideas?

Posted By

gerliczer
on 2012-08-07
12:16:10
 Re: Searchin' for a char editor...

George,

If you do it in the sequence you wrote, it is no wonder that you get all zeroes. First you load the characters into the RAM from $3800 up to $3FFF, then with the GRAPHIC 3,1 command you fill the memory from $2000 to $3F3F with zeroes. You must definitely change the character generator's address.

If this program is intended to run on machines with more than 16kB RAM, then you could place it at $1000 or $1800, because the GRAPHIC command relocates the BASIC program behind the graphic memory but you _must_ do that after issuing the screen mode change command. If this program should run on an unexpanded C=16, then tough luck. I don't think that it is possible without any assembly magic.

Changing the address of the charset is not too hard. You must change the load address of the file which are its first two bytes. Now it is $00 $38. You have to change the second byte to the address you find most appropriate. One more thing. Do not change those zero page values that the Graphics Master instruction suggests to modify if you put the chargen into the $1000-$1FFF area.

Posted By

George
on 2012-08-07
16:23:15
 Re: Searchin' for a char editor...

Hi gerliczer,

Thanks. It works. Definately not a task for a beginner.
Here the Result: http://www.patsos.de/plus4/Polybius2.JPG

The Polybius Charsetfile was made with Graphics-Master.
Changig the Load-Adress was a little tricky. I made it with an Hex-editor in windows.
This code works in Yape:

5 graphic 3,1
10 A=A+1
20 IF A=1 THEN LOAD"POLYBIUS",8,1
60 POKE 740,DEC("10")
80 char 1,0,0,"A"
90 Getkey a$


How do you change the Load-Adress without an Hexeditor on a plus/4?

Posted By

gerliczer
on 2012-08-07
13:24:13
 Re: Searchin' for a char editor...

Changing the load address can be done either with a disk editor or loading the file from monitor, transferring its contents to the desired new address and saving from there. Since software development is virtually impossible without a disk drive on the real machine, it is much easier to use a disk editor. My favourite is Disk Demon. Example of the other method: MONITOR(Return) L"POLYBIUS 3800",8(Return) T3800 3FFF 1000(Return) S"POLYBIUS 1000",8,1000,1800(Return).

Posted By

MMS
on 2012-08-07
18:08:50
 Re: Searchin' for a char editor...

During testing of George's issue, I had a rather strange and annyoing new inding (I have never tried it out before)
When I activate split screen (GPAPHIC2 or GRAPHIC4) in Emulators (YAPE and Plus4EMU) the CHAR command does not work at the area of TEXT screen though it works well at the graphical area. Based on the BASIC programming book, CHAR should work on both area. Any color setting has the same effect.

What's wrong? Is it the same behaviour on real machines?
(PRINT works well at text area, but harder to manage positioning)

Posted By

Csabo
on 2012-08-07
21:11:45
 Re: Searchin' for a char editor...

I don't think that's odd... It's either character based (GRAPHIC 0) or bitmap based (all other GRAPHIC modes).

Entering
GRAPHIC 2, 1 : CHAR 1, 0, 20, "A" : GRAPHIC 1
reveals that it goes to the correct place on the bitmaps, as expected. Does the programming book you're referring to really claim that the CHAR command would check the Y coordinate and switch modes accordingly if Y >= 20?



Back to topReply to this topic


Copyright © Plus/4 World Team, 2001-2024