Character Set Editor and Generator

Questions, bug reports, features requests, ... about the Oric Software Development Kit. Please indicate clearly in the title the related element (OSDK for generic questions, PictConv, FilePack, XA, Euphoric, etc...) to make it easy to locate messages.

Post Reply
jbperin
Pilot Officer
Posts: 105
Joined: Wed Nov 06, 2019 11:00 am

Character Set Editor and Generator

Post by jbperin »

Hi all,

I'm looking for a tool that runs on Windows PC and which allow to load, edit, and export charset for Oric.

It's exactly what this program do :
http://forum.defence-force.org/viewtopic.php?f=3&t=1695&p=15021#p15022

But unfortunately, my windows defender tells me not to use this program because there's a trojan is it.

Any idea for a replacement ?

User avatar
Dbug
Site Admin
Posts: 3345
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Character Set Editor and Generator

Post by Dbug »

jbperin wrote:
Sun Jun 14, 2020 9:00 am
I'm looking for a tool that runs on Windows PC and which allow to load, edit, and export charset for Oric.
It's exactly what this program do :
http://forum.defence-force.org/viewtopic.php?f=3&t=1695&p=15021#p15022
But unfortunately, my windows defender tells me not to use this program because there's a trojan is it.
Mine says it's fine - but fail to run because of a DLL missing.
jbperin wrote:
Sun Jun 14, 2020 9:00 am
Any idea for a replacement ?
I never use tools for fonts, I just load a PNG with all the characters, edit it in my painting program with a 6x8 grid setup, save back the PNG, and use PictConv to convert it.

You can find an example there:
http://miniserve.defence-force.org/view ... rsets/6x8/

And an article about it here:
http://osdk.org/index.php?page=articles&ref=ART8

jbperin
Pilot Officer
Posts: 105
Joined: Wed Nov 06, 2019 11:00 am

Re: Character Set Editor and Generator

Post by jbperin »

Yes. Thank you.
That's a smart and convenient workflow.
Drawing in png and exporting in code.


And other question, is there a way to edit "sprite" ? Multiple characters which form a drawing when placed beside one of the other.

User avatar
Chema
Game master
Posts: 2665
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Character Set Editor and Generator

Post by Chema »

I have almost always used my own converters for creating graphics (aside from character sets or things that could be converted directly with pictconv, in that cases I do as Dbug said). I did use pictconv for the graphics in Space:1999, but when I needed to break my sprites in tiles, I decided to write one of my own. This way I can draw the character in black and white and use another color (usually green) for the pixels which should be transparent.

I also made my own code to create the tiles from a room in Blake's 7. It sections the graphic in 6x8 blocks and generates a set with the minimum number of block needed as well as their location.

Mental note: I need to share my room editor in C#.

User avatar
peacer
Flight Lieutenant
Posts: 416
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: Character Set Editor and Generator

Post by peacer »

As a developer of the utility, I need to explain.

download/file.php?id=738

Please download the utility from here. I check again and there's no virüs or suspicious file in it.

To run the program, you need to copy these files into C:\Windows\System32 directory under windows . You can find these files in the uploaded compressed file.

COMCTL32.OCX
COMDLG32.OCX

Then type CMD on windows search, right click and "run as administrator"

In the dos windows type these
regsvr32 comdlg32.ocx
regsvr32 comctl32.ocx

If you are using 64 bit windows, you need to copy these files into C:\Windows\SysWOW64 too and repeat the steps above.

These two files are Visual Basic runtime files needed for the program to run. Unfortunately I don't know easier way to setup these.

If you do these steps, the program still works perfectly. I tried on windows 10 64 bit..

Image

jbperin
Pilot Officer
Posts: 105
Joined: Wed Nov 06, 2019 11:00 am

Re: Character Set Editor and Generator

Post by jbperin »

peacer wrote:
Mon Jun 15, 2020 9:35 pm
Please download the utility from here. I check again and there's no virüs or suspicious file in it.
On my computer, when Windows Defender analyses the file charedit1.2.exe, it detects Trojan:Win32/Azden.A!cl

Your tool looks very cool on the screenshot .. that's exactly the kind of tool that could change the life of lazy programmers like me.
Chema wrote:
Mon Jun 15, 2020 12:29 pm
I can draw the character in black and white and use another color (usually green) for the pixels which should be transparent.
Please may I ask you to explain a bit further this idea ? How is that possible to use a green color in a character ?

How do you deal with transparency ? is it based on ORing pixels of the front character with the background character ?

User avatar
peacer
Flight Lieutenant
Posts: 416
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: Character Set Editor and Generator

Post by peacer »

This brings me suspicion for that and I feel bad about this. Windows defender is known as false alarms and false positive warnings.. The first thing I do after a format is to stop windows defender running and I setup other professional antivirus utilities. My personal taste is NOD32 antivirus.

I uploaded the file to online multiple virus check site https://www.virustotal.com/ . Out of 73 antivirus softwares, Only microsoft says it is suspicious Trojan:Win32/Azden.B!cl whcih is same as windows defender algorhytm and 5 out of 73 antivirüs thinks it as "suspicious".

Being suspicious does not mean it is malicious. I myself using nod32 antivirus and it says it is safe. Along with this, many other antivirus softwares including Avast, AVG, bitdefender, Comodo, f-prot, McAfee, Symantec, Kaspersky, Webroot etc claims that it is safe...

I believe it is because I programmed the utility in Visual basic 6 and its not a modern programming enviroment of windows 10 so microsoft is annoyed as wrong positive alarm..

Can other friends confirm that any other antivirus software gives alrm about that?

jbperin
Pilot Officer
Posts: 105
Joined: Wed Nov 06, 2019 11:00 am

Re: Character Set Editor and Generator

Post by jbperin »

I downloaded the archive on my computer at work and analysed the content with MacAfee ..

No trojan is detected.

I don't have admin rights at work so I couldn't run the rest of the procedure .. but it looks safe.

I would advocate that you stop programming with Visual Basic. :D

User avatar
peacer
Flight Lieutenant
Posts: 416
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: Character Set Editor and Generator

Post by peacer »

:) The guilty one is Oric himself :) I learned how to program with Oric basic...

I switched to gwbasic when I first got my PC at 1990's... then Quick basic.. Then Visual basic :)

C and other advanced languages were always seems cold and diffucult to me.. I am a medical dr and visual basic is top level for me for now :)

User avatar
Chema
Game master
Posts: 2665
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Character Set Editor and Generator

Post by Chema »

jbperin wrote:
Tue Jun 16, 2020 12:19 pm

Please may I ask you to explain a bit further this idea ? How is that possible to use a green color in a character ?

How do you deal with transparency ? is it based on ORing pixels of the front character with the background character ?
Sure. It is quite easy. For each sprite you need the graphic and the mask, for instance:
manta.png
manta.png (260 Bytes) Viewed 665 times
The mask has pixels set to 1 (white) where there has to be transparency. When you draw the graphic over a background you first perform an AND with the mask (so the non-transparent parts are removed) then an OR with the graphic.


In Blake's 7 and Skooldaze what I did was draw the graphics this way:
00-lookRight.png
00-lookRight.png (731 Bytes) Viewed 665 times
Then create a script that does the following:
1/ Initialize two sets of tiles, one for the graphics with one tile set to all 0s and one for the masks with all 1s
2/ Create the graphic and mask from the above picture. I do this this way (it is a Matlab script):

Code: Select all

    
    % im is the image
    im=rgb2gray(im);
    graphic=im>0;
    mask=(im==150); % This corresponds to the green color (results in gray)
    graphic=(graphic) & not(mask);
Yeah, I know it is ugly and dirty, but I came up with it once and...
3/ Sections the graphic in tiles and add each tile to the list if it is not there already. The same for the mask.
4/ Creates all the data to be used by the program

In my case, this ends up as a tile map:

Code: Select all

.byt 0, 1, 2, 3, 0
.byt 4, 5, 6, 7, 8
.byt 9, 10, 11, 12, 13
.byt 14, 15, 16, 17, 0
.byt 18, 19, 20, 21, 0
.byt 22, 23, 24, 25, 0
.byt 26, 27, 28, 29, 0
where each code represents a graphic tile and a mask tile:

Code: Select all

; Tile graphic 1
.byt $0, $0, $0, $0, $0, $0, $0, $2
; Tile graphic 2
.byt $0, $0, $0, $0, $0, $0, $14, $22
...
; Tile mask 1
.byt $ff, $ff, $ff, $ff, $ff, $ff, $78, $60
; Tile mask 2
.byt $ff, $ff, $ff, $ff, $ff, $ff, $40, $40
...
Obviously you can store the image data in other formats (not in tiles, for instance, but as a single block).

Hope it is clear.

Cheers!

jbperin
Pilot Officer
Posts: 105
Joined: Wed Nov 06, 2019 11:00 am

Re: Character Set Editor and Generator

Post by jbperin »

Chema wrote:
Tue Jun 16, 2020 9:18 pm
Hope it is clear.
Yes it is. Thank you very much Chema for this explanation. it's very smart.

Post Reply