Welcome, Guest. Please login or register.


Author Topic: Q&A (Read 56385 times)

Offline lgb

  • EP addict
  • *
  • Posts: 3563
  • Country: hu
  • æðsta yfirmaður
    • http://lgb.hu/
Re: Q&A
« Reply #15 on: 2015.November.24. 22:54:50 »
To edit the Wiki need to have some additional rights, whether I need to register separately ?

That's a good question, I have no idea :) Often it would be useful to store information there. By its nature, the forum is a the good place to discuss things etc, but it would be cool to put the final result of such a discussions on the wiki (maybe with links to the discussion posts) as it's almost impossible to find code parts etc were discussed throughout the forums after some months/years and trying to put them together ...

Offline g0blinish

  • EP fan
  • *
  • Posts: 110
Re: Q&A
« Reply #16 on: 2015.November.25. 05:25:04 »
I took sample.asm and try to write characters to VRam. Nothing appears. What is a mistake?

Offline ergoGnomik

  • EP addict
  • *
  • Posts: 1286
  • Country: hu
  • Stray cat from Commodore alley
Re: Q&A
« Reply #17 on: 2015.November.25. 07:08:55 »
I took sample.asm and try to write characters to VRam. Nothing appears. What is a mistake?
Mistake:
  • to understand (something or someone) incorrectly
  • to make a wrong judgment about (something)
  • to identify (someone or something) incorrectly
:ds_icon_cheesygrin:

Sorry, I couldn't resist. Anyway, this is my wild guess, but you seem to expect characters on a graphic screen. I don't know Z80 assembly very well, meaning almost not at all, but go to the end of prj.asm and read carefully the explanations of the byte constants right after the LPT label.

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14709
  • Country: hu
    • http://enterprise.iko.hu/
Re: Q&A
« Reply #18 on: 2015.November.25. 07:12:21 »
What is a mistake?
In my sample.asm pixel graphics screen (320*200, 4 colors) definied at Z80 address C000h-
You write data at 4000-40FFh, then nothing changed on the screen.

Another little problem: your code not at ";there is the room for the main program", then it is done before the screen setting sent out the Nick.
If you use the JP $, then also don't see anything if you use the right C000h start address.

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14709
  • Country: hu
    • http://enterprise.iko.hu/
Re: Q&A
« Reply #19 on: 2015.November.25. 07:14:46 »
but you seem to expect characters on a graphic screen.
This is the third problem :-)

If g0blinish want I can modify the sample.asm for a character screen.

Offline g0blinish

  • EP fan
  • *
  • Posts: 110
Re: Q&A
« Reply #20 on: 2015.November.25. 07:19:51 »
ZoZoSoft, thank you, now it works:

I must teach LPTs..

Offline g0blinish

  • EP fan
  • *
  • Posts: 110
Re: Q&A
« Reply #21 on: 2015.November.25. 08:00:36 »
So, if I understand, where are mo textmode with user-defined charset ?

Offline ssr86

  • EP user
  • *
  • Posts: 355
  • Country: pl
Re: Q&A
« Reply #22 on: 2015.November.25. 08:51:08 »
So, if I understand, where are mo textmode with user-defined charset ?
The example I've posted used 2-color char128 mode with a user-defined font (atari font). :oops:

Ep has 4 (?) types of video modes:
- PIXEL - similar to amstrad cpc modes (the memory layout is different)
- LPIXEL - like pixel but with wider pixels (twice as wide, so 4-color pixels are wide like in 16-color pixel mode)
- CHAR - where you have a font and character map; the 3 modes differ in the number of characters (so memory) they use for the font (64, 128 and 256 characters in font); pixels are wide like in lpixel modes
- ATTRIBUTE - similar to zx spectrum (?) used to emulate the speccy screen (?); you have 2-color graphics + attribute map

Note: in PIXEL and LPIXEL, using VRES (makes one screen line to repeat for all display lines for the given modeline) with some bigger lpt you can get a screen with taller pixels (pixels can be 1-256 lines high - should be useful for many effects; for example one could do vertical rasters with just one line of screen data and make nick repeat that line for the whole screen). These could give you a gameboy/atari lynx resolution screen. You could also have a 80x64 resolution in 256 colors.
« Last Edit: 2015.November.25. 09:23:23 by ssr86 »

Offline geco

  • Moderator
  • EP addict
  • *
  • Posts: 7069
  • Country: hu
    • Támogató Támogató
Re: Q&A
« Reply #23 on: 2015.November.25. 09:04:27 »
- ATTRIBUTE - similar to zx spectrum (?) used to emulate the speccy screen (?); you have 2-color graphics + attribute map
Similar, but different :) You can set paper and ink colors for every 8x1 pixel instead of Speccy 8x8 pixel.
Speccy screen can be built up by Line Parameter definition for each pixel line, and attribute address of every 8 line parameter definition points to the same position in video RAM :) , and other difference is the ink and paper colour setting is different, on EP bit7-4 paper color, and bit3-0 is ink color.

Offline g0blinish

  • EP fan
  • *
  • Posts: 110
Re: Q&A
« Reply #24 on: 2015.November.25. 09:14:54 »
ouch! i missed post with sources. now trying to compile with sjasm+

Added fixed source for 1.07 RC1
« Last Edit: 2015.November.25. 09:29:05 by g0blinish »

Offline geco

  • Moderator
  • EP addict
  • *
  • Posts: 7069
  • Country: hu
    • Támogató Támogató
Re: Q&A
« Reply #25 on: 2015.November.25. 10:34:07 »
ouch! i missed post with sources. now trying to compile with sjasm+
As I see the font address is not correct, the Nick address of font has to be divided by the charmod character numbers, if you use CHR256 then the Nick address of font has to divide by 100h, if you use CHR64 then it has to be divided by 40h and so on, and this address has to be filled into LPT.

Offline ssr86

  • EP user
  • *
  • Posts: 355
  • Country: pl
Re: Q&A
« Reply #26 on: 2015.November.25. 10:49:09 »
As I see the font address is not correct, the Nick address of font has to be divided by the charmod character numbers, if you use CHR256 then the Nick address of font has to divide by 100h, if you use CHR64 then it has to be divided by 40h and so on, and this address has to be filled into LPT.
Uh, I messed that up... :oops:
However in my example the font address is at $0000 in the video segment so the bug hasn't been visible...

Offline g0blinish

  • EP fan
  • *
  • Posts: 110
Re: Q&A
« Reply #27 on: 2015.November.25. 13:34:45 »
any example of ATTRIBUTE? I stuck with modes ):

Offline geco

  • Moderator
  • EP addict
  • *
  • Posts: 7069
  • Country: hu
    • Támogató Támogató
Re: Q&A
« Reply #28 on: 2015.November.25. 13:49:48 »
any example of ATTRIBUTE? I stuck with modes ):
Here is a Spectrum Attribute mode definition, extra colours have been used

Offline geco

  • Moderator
  • EP addict
  • *
  • Posts: 7069
  • Country: hu
    • Támogató Támogató
Re: Q&A
« Reply #29 on: 2015.November.25. 14:12:28 »
Here is a Spectrum Attribute mode definition, extra colours have been used
You can use the same method for define a normal attribute mode , where 1 attribute byte stands for 8x1 pixel, just have to increase attribute video memory address for each line, or you can define it with one line and give the Nick address of Attribute in byte 4-5 and give the nick address of bitmap in byte 6-7 in the line, and just change the 0th byte to 100h-screen height value ( in pixel rows )
In this setup the Attribute data will be continuous from the specified address, and this is true for bitmap data also.