Page 2 of 5

Re: TSConf ZEsarUX emulation

PostPosted: Wed, 12.07.2017 10:44:37
by chernandezba
Thanks
So, you have a total window of 360x288 and you enlarge border size (and reducing pixel size) depending on the video mode, so:

00 - 256x192: border size: 104x96
01 - 320x200: border size: 40x88
10 - 320x240: border size: 40x48
11 - 360x288: border size: 0x0

I think on emulation I will make a window size of 720x576 (to have a 4:3 aspect ratio window), drawing "central" pixels and border with a size of 2x2 and text mode pixels with a size of 1x2.

Re: TSConf ZEsarUX emulation

PostPosted: Wed, 12.07.2017 14:16:40
by TS-Labs
That's correct.

Re: TSConf ZEsarUX emulation

PostPosted: Wed, 12.07.2017 16:11:56
by chernandezba
Great! :)

Thanks!

Re: TSConf ZEsarUX emulation

PostPosted: Thu, 13.07.2017 13:57:01
by chernandezba
I have successfully emulated text mode and resizing the window to 720x576.
More questions...

1. what are the display formats for modes 16c and 256c?
2. Can I have normal ZX video mode but with other resolutions, like 320x200? What format would be in this case?

Re: TSConf ZEsarUX emulation

PostPosted: Fri, 14.07.2017 00:50:41
by TS-Labs
chernandezba wrote:1. what are the display formats for modes 16c and 256c?

256c.
Bits 7..0 are index to CRAM.
Each line address is aligned to 512.
GXOffs and GYOffs add offset to X and Y start address in pixels.

16c.
Bits are index to CRAM, where PalSel.GPAL is 4 MSBs and the pixel are 4 LSBs of the index.
Pixels are bits7..4 - left, bits3..0 - right.
Each line address is aligned to 256.
GXOffs and GYOffs add offset to X and Y start address in pixels.

chernandezba wrote:2. Can I have normal ZX video mode but with other resolutions, like 320x200? What format would be in this case?

No you can't because ZX screen addressing makes this idea senseless in either way.
You can select any frame size when ZX mode is on without harming any animals, but you'll see just messed up screen.

Re: TSConf ZEsarUX emulation

PostPosted: Mon, 17.07.2017 13:07:25
by chernandezba
Perfect. Thanks!

Re: TSConf ZEsarUX emulation

PostPosted: Tue, 25.07.2017 21:28:49
by chernandezba
Hi
Doing today some TSConf improvements: now the ZX mode is drawn correctly, with the pixel size 2x2. No hi-colour (typical rainbow) effects, but it will come soon.
I want to add and test 256c and 16c modes, but I see all demos/games come with .spg extension. I did a fast look to the Unreal emulator code , and although spf format doesn't seem difficult, I have to dedicate some time to add .spg reading...

So, do you know if there are some demos in .tap or .tzx format for 256c and 16c modes?

Thanks
Cesar

Re: TSConf ZEsarUX emulation

PostPosted: Tue, 25.07.2017 21:59:40
by TS-Labs
chernandezba wrote:do you know if there are some demos in .tap or .tzx format for 256c and 16c modes?

Sorry, no =)

Re: TSConf ZEsarUX emulation

PostPosted: Wed, 26.07.2017 07:59:37
by VBI
we have few demo in TRD format.
all other - in SPG.
sorry, mate ;)

Re: TSConf ZEsarUX emulation

PostPosted: Wed, 26.07.2017 12:21:46
by chernandezba
Thanks. I don't emulate TRD support but I can handle it using esxdos...

I will try also to do a fast SPG loading emulation

Cheers

Re: TSConf ZEsarUX emulation

PostPosted: Wed, 26.07.2017 12:22:31
by chernandezba
And... no other examples in source code format (asm) so I could compile and test them?

Re: TSConf ZEsarUX emulation

PostPosted: Wed, 26.07.2017 12:36:44
by TS-Labs

Re: TSConf ZEsarUX emulation

PostPosted: Wed, 26.07.2017 12:46:32
by chernandezba
Great! That will be very useful!
Thanks

Re: TSConf ZEsarUX emulation

PostPosted: Thu, 27.07.2017 13:19:57
by chernandezba
Currently working on spg snapshot loading... Thanks to the Unreal sources it will be easy... Haven't suceeded to load anything without crashing, but I'm sure I will be able to do it soon... ;)

Re: TSConf ZEsarUX emulation

PostPosted: Thu, 27.07.2017 14:33:19
by TS-Labs
:ok2:

Re: TSConf ZEsarUX emulation

PostPosted: Thu, 27.07.2017 15:15:53
by chernandezba
I have been able to load bomberman evolution snapshot.... but no video, it uses 16c video mode and I don't get anything on the screen but I can listen to the AY tune :)
Can you explain me a bit more how are 256c and 16c modes organized? Which ram pages are involved? Only Ram 7 or 5? Or other pages are used?
Thanks

Re: TSConf ZEsarUX emulation

PostPosted: Thu, 27.07.2017 17:08:23
by VBI
chernandezba, all ports
for video memory we may use ANY page, but:
for 16c mode: (page % 8) == 0
for 256c mode: (page % 16) == 0

about video
Image

Re: TSConf ZEsarUX emulation

PostPosted: Thu, 27.07.2017 17:40:56
by chernandezba
Thanks!
So.. the starting ram page for video comes from port 01AF ?

Re: TSConf ZEsarUX emulation

PostPosted: Thu, 27.07.2017 17:49:28
by chernandezba
Forget the last message... I already knew that ;)

Re: TSConf ZEsarUX emulation

PostPosted: Thu, 27.07.2017 18:05:48
by VBI
chernandezba, yes, VPage
and GXOffs and GYOffs shows window from video memory, like red chessboard from upper image

Re: TSConf ZEsarUX emulation

PostPosted: Thu, 27.07.2017 18:33:06
by TS-Labs
chernandezba wrote:bomberman evolution snapshot.... but no video, it uses 16c video mode and I don't get anything on the screen

It switches video modes dynamically within the frame =)
To emulate line interrupts is essential.

Re: TSConf ZEsarUX emulation

PostPosted: Thu, 27.07.2017 21:42:32
by chernandezba
Still a lot to do but... some games can be "seen" ;)

https://youtu.be/rFJsh_TtnsM

Re: TSConf ZEsarUX emulation

PostPosted: Fri, 28.07.2017 04:19:04
by TS-Labs
Well... May be I could help with writing some unit tests?
What I can offer are small code examples which demonstrate certain single features.

Re: TSConf ZEsarUX emulation

PostPosted: Fri, 28.07.2017 08:56:49
by VBI
chernandezba, "That's one small step for a man, one giant leap for mankind"! ;)
nice!

Re: TSConf ZEsarUX emulation

PostPosted: Fri, 28.07.2017 09:20:21
by chernandezba
VBI wrote:chernandezba, "That's one small step for a man, one giant leap for mankind"! ;)
nice!


Thanks! :)