Enterprise Forever

:UK => Enterprise DevCompo => Enterprise DevCompo #2 => Topic started by: geco on 2016.November.21. 08:29:17

Title: Q&A
Post by: geco on 2016.November.21. 08:29:17
The place of Questions & Answers
Title: Re: Q&A
Post by: geco on 2016.November.21. 14:40:32
There were a small addon on the Hungarian forum, the best programs which are using Entermice should get extra prize also.
Title: Re: Q&A
Post by: ssr86 on 2016.November.21. 15:17:06
Ok, the idea is good. Will see how it turns out in the end.
Title: Re: Q&A
Post by: g0blinish on 2016.November.24. 11:30:37
do you know a way how to generate gradient black-white for 64 values?
Title: Re: Q&A
Post by: ssr86 on 2016.November.24. 12:31:51
I think it would be somewhat hard to do black-white gradient in 16c mode, as there aren't much of grays in the palette (and those that are arent' real grays anyway I think). However in 4c pixel or the 8x2 char mode you could use dithering for additional colors on the tv display.
Anyway you would need a lpt with a couple of blocks and each block would have a different palette and screen data address. So for 64 levels and 256 pixel high screen you would need 64 modeblocks each for 4 lines of display.
You would have to figure out the right colors for each block to get smooth transitions.
Title: Re: Q&A
Post by: IstvanV on 2016.November.24. 14:05:33
It is possible to convert a gradient from a picture with epimgconv. For example, this gradient:
[attachimg=1]
converted with the following command:

epimgconv -mode 0 -size 8 64 -quality 9 -chromaerr 0.5 -color1 109 -dither 1 0.875 -scalemode 1 -nointerp 1 -outfmt 1 gradient.png gradient.pic

looks like this:
[attachthumb=2]
[attachurl=3]

To extract the colors from the converted picture, you need to skip the first 17 bytes, then use the values from positions 0x11, 0x13, 0x15 and so on, ignoring the 0x6D bytes:
[attachthumb=4]

Another method is to convert to 256 colors (-mode 5) and use only one column of the output file. Some experimenting with the dither parameters and chromaerr may also give a better result.
Title: Re: Q&A
Post by: ssr86 on 2016.November.24. 19:04:59
I've tried playing with the image posted by Istvan and I got something like this (note that these aren't 64 levels...):
in 4-colors:
[attachimg=1]
in 16-colors (only 8 colors used):
[attachimg=2]
[attachimg=3]
[attachimg=4]
palette:
COLOR00=#38
COLOR01=#f8
COLOR02=#07
COLOR03=#c7
COLOR04=#3f
COLOR05=#c0
COLOR06=#00
COLOR07=#ff
Title: Re: Q&A
Post by: g0blinish on 2016.November.28. 12:27:45
and again about gradient - please help with parameters:

epimgconv  -mode 15 -outfmt 0 -size 320 64 -quality 9 -chromaerr 0.5 -color1 109 -dither 1 0.875 -scalemode 1 -nointerp 1 plasmapalette2.jpg tt.com

got a message:
*** epimgconv error: invalid image size for output format

Title: Re: Q&A
Post by: IstvanV on 2016.November.28. 13:03:23
The -size parameter expects the width in characters, so you probably need to use -size 32 16 to keep the original size of the image. But if the goal is to generate a gradient as a single palette color per line, then the image should be rotated by 90 degrees first.
Title: Re: Q&A
Post by: g0blinish on 2016.November.28. 13:10:18
I used -size and got same message.

A purpose is to generate gradient for 200 color.
Title: Re: Q&A
Post by: IstvanV on 2016.November.28. 13:37:03
16 colors:
[attachthumb=1]
[attachurl=2]
epimgconv -mode 2 -outfmt 0 -size 40 200 -quality 9 -chromaerr 0.5 -dither 4 0 -scalemode 1 -nointerp 0 plasmapalette2r.png tt_16.com

256 colors:
[attachthumb=3]
[attachurl=4]
epimgconv -mode 5 -outfmt 0 -size 40 200 -quality 9 -chromaerr 0.5 -dither 4 0 -scalemode 1 -nointerp 0 plasmapalette2r.png tt_256.com

256 colors with random dither:
[attachthumb=5]
[attachurl=6]
epimgconv -mode 5 -outfmt 0 -size 40 200 -quality 9 -chromaerr 0.5 -dither 5 0 -scalemode 1 -nointerp 0 plasmapalette2r.png tt_256r.com

[attachurl=7]

For a single color per line, use a column of the 256 color picture that looks good. In tt_256(r).com, the pixel data begins at 220h (310h memory address when loaded) and one line is 80 bytes. So, the first column is at file offsets 220h, 270h, 2c0h, and so on.
Title: Re: Q&A
Post by: g0blinish on 2016.November.28. 14:38:12
Thank you!
what is offset of color values in file? Faster is cut from com.
Title: Re: Q&A
Post by: IstvanV on 2016.November.28. 14:53:02
Thank you!
what is offset of color values in file? Faster is cut from com.

In tt_16.com:
- palette of first line: 1C8h-1CFh
- palette of second line: 1D8h-1DFh
- palette of last (200th) line: 0E38h-0E3Fh
- pixel data of first line: 0E90h-0EDFh
- pixel data of last (200th) line: 4CC0h-4D0Fh

In tt_256(r).com:
- pixel data of first line: 220h-26Fh
- pixel data of last (200th) line: 4050-409Fh
- pixel at X (0 to 79), Y (0 to 199) position: Y * 50h + X + 220h

These are all file (not memory) offsets.
Title: Re: Q&A
Post by: g0blinish on 2016.November.28. 15:08:24
I understand. I do not need all data, just color values for gradient.
Title: Re: Q&A
Post by: IstvanV on 2016.November.28. 15:17:14
I understand. I do not need all data, just color values for gradient.

You can use one column (every 80th byte) of tt_256.com for that purpose, choose whichever looks the best. For example, the first (leftmost) column is stored at offsets 220h, 270h, 2c0h, 310h, and so on.
Title: Re: Q&A
Post by: g0blinish on 2016.November.29. 06:20:45
yay! it works!)

IstvanV, thank you for help!
Indeed, converter seems better with GUI like bmp2scr.
Title: Re: Q&A
Post by: IstvanV on 2016.November.29. 10:24:09
Indeed, converter seems better with GUI like bmp2scr.

Actually, the Plus/4 version of the converter does have a GUI with a built-in emulator to display the converted image:
[attachthumb=1]

[attachthumb=2]

[attachthumb=3]
I had plans to implement something similar with epimgconv, although it would take some work, an the EP converter supports many output formats and even image sizes that would not fit on the screen.
Title: Re: Q&A
Post by: Zozosoft on 2016.November.29. 10:25:15
I had plans to implement something similar with epimgconv,
Good idea!
Title: Re: Q&A
Post by: g0blinish on 2016.November.29. 10:29:59
Yes, good!

I wrote .xpm parser 4 colors, but code may wish better
Title: Re: Q&A
Post by: ssr86 on 2016.December.05. 14:04:34
Enterprise DevCompo #2 plakátok

Magyar nyelvű (http://enterpress.news.hu/ep_devcompo.html)

Angol nyelvű (http://enterpress.news.hu/ep_devcompo_en.html)
* if there's only one category then it's like there are none, so may be skipped
* "Winners" - the context suggests that "Awards"/"Prizes" would be more fitting
* word "program" is used without specyfying that it can be anything - an intro/demo/game port/new game in basic or asm
* "A short video demonstration of the entry"
* the sentence "It can only be called by ...." - I think that you've meant that only works not yet published on the Enterprise can enter the competition.
* instead of "Enterprise-related" I think that "Enterprise-specific" would be better
* conditions in the form of list with: program, short video, screenshots (menu, ingame), note about the authors/resources
Title: Re: Q&A
Post by: ssr86 on 2017.May.17. 01:26:07
Ok, so the deadline has been reached and the voting should start soon.
Big thank you to all who contributed.
Sorry I didn't make it in time with my entry. 
Title: Re: Q&A
Post by: Zozosoft on 2017.May.17. 07:28:18
I think If needed can be added some more days. For example until the Enterprise club day starting at May 20. 14:00. We will view the programs in the club.
Title: Re: Q&A
Post by: g0blinish on 2017.May.17. 08:38:13
when voting will start?
Title: Re: Q&A
Post by: geco on 2017.May.17. 09:09:09
when voting will start?
Now :)
Title: Re: Q&A
Post by: geco on 2017.May.22. 08:38:23
Please vote, we have only 8 (forum) + 1 (mail) votes.
Title: Re: Q&A
Post by: Sdw on 2017.May.23. 17:34:14
Sorry for not voting!

I saw that other contributors have voted by simply ignoring casting votes for their own entries, which seems like a good idea.

But I must say that I find it very hard to give a fair score to the conversions, as I don't quite know what to look for.
* Is it if the converted game is fun and great to play? This is important, but doesn't really come in as a factor on how good the coder is.
* Is it how much enhancements has been made from the original (in which case one needs to find that and play it to compare)?
* Is it how hard it is to do the conversions (ie. how hard it was to reverse-engineer the original code etc.) which is also very hard to determine unless you know the original code.

So that's why I didn't vote at all.
Title: Re: Q&A
Post by: geco on 2017.May.24. 08:47:28
Sorry for not voting!

I saw that other contributors have voted by simply ignoring casting votes for their own entries, which seems like a good idea.

But I must say that I find it very hard to give a fair score to the conversions, as I don't quite know what to look for.
* Is it if the converted game is fun and great to play? This is important, but doesn't really come in as a factor on how good the coder is.
* Is it how much enhancements has been made from the original (in which case one needs to find that and play it to compare)?
* Is it how hard it is to do the conversions (ie. how hard it was to reverse-engineer the original code etc.) which is also very hard to determine unless you know the original code.

So that's why I didn't vote at all.
No problem, but if you like to vote, just the conversions was the reason to skip it, you can skip conversions in your votes :) , anyway for conversions you can use for voting how much did you like the changes from the original versions.
I think voting is very subjective, everybody has her/him own values to make decision.
For example when I voted for small entries, I decided based on code size, and visuals (what I saw) , and thought about how hard was the programming to fit into it's size.