Help with ZX81 loading screen for new emulator

Emulator and emulator development specific topics
User avatar
kpalser
Posts: 57
Joined: Sun Jun 03, 2012 2:18 pm
Location: Dundee, Scotland

Re: Help with ZX81 loading screen for new emulator

Post by kpalser » Sat Aug 03, 2013 1:05 am

In my quest for improving the accuracy of the video emulation, I made an observation and hit a point that is still bugging me.

Firstly, I noticed for the sudo hires Forty Niner game that the internal vertical window has to be up to around 21.3ms. If not, the program controlled vertical sync is not reached before the CRT enforced internal sync. The result in the latter case is a (strangely satisfying) vertical roll of the image (see http://youtu.be/0pGeqmYBvQM).

After the internal limit is increased to stop the roll you can clearly see artefacts at the top of the image caused by the hysnc pulses outside the hsync window.
artifacts.png
artifacts.png (11.12 KiB) Viewed 2268 times
My understanding is that you would not normally see this area of this active part of the video signal (see overscan and safe area in http://lipas.uwasa.fi/~f76998/video/modes/). Just on the off chance, could anyone of you kind gents that have access to an old CRT display fire up Forty Niner on a real zeddy and adjust the vertical hold to see if the same artefacts are present?

sirmorris
Posts: 2813
Joined: Thu May 08, 2008 5:45 pm

Re: Help with ZX81 loading screen for new emulator

Post by sirmorris » Sat Aug 03, 2013 10:03 am

Amazing work - keep it up!

If you're interested in zxpand emulation once you have the video nailed then be sure to contact me B-)

User avatar
PokeMon
Posts: 2225
Joined: Sat Sep 17, 2011 6:48 pm

Re: Help with ZX81 loading screen for new emulator

Post by PokeMon » Sat Aug 03, 2013 6:03 pm

I don't know 49ers on a ZX81 nor do I have a source of it.
It is correct that there is per definition an action safe are and a title safe area. This is convention during TV / film production to be sure to have all important information on customers screen regardless of the used format (4:3, 16:9, 4:3 on a 16:9 tv, 16:9 on a 4:3 tv).

See a nice illustration here:
http://scanline.ca/overscan/

Yes and per convention 25 scanlines of 312.5 are reserved to be non-visible on a TV (including vsync with 7-8 scanlines). This spare area is normally handled to be divided symmetrical in top and down window. So the first 12.5 and the last 12.5 scanlines are invisible. At least. Could be more invisible depending from TV to TV and screen size/format.

User avatar
kpalser
Posts: 57
Joined: Sun Jun 03, 2012 2:18 pm
Location: Dundee, Scotland

Re: Help with ZX81 loading screen for new emulator

Post by kpalser » Sat Aug 03, 2013 7:13 pm

PokeMon, Thanks for the extra info and link!

Sirmoris, Love to expand the emulation to include zexpand in the future, thanks for the interest. I will find the time...

The emulator is quite a long term project. Since I coincidently moved to Dundee three years ago, I have interviewed workers and shop floor managers on the ZX80/81 production line. Needless to say there are lots of anecdotes. I also got a guided tour of the old Timex factory (now JTC). Unfortunately it has been gutted and does not preserve any of the layout. With some good exceptions, on the whole it's fair to say that much of the population of Dundee couldn't give two hoots about Sinclair products. The dramatic departure of Timex from the town didn't leave fond memories. Another coincidence is the building on the city quay were I am currently employed, which used to be occupied by Sir Sinclair's son - we found a broken C5 when the company moved in.

The objective is to produce an emulator running on iOS devices, as Apple has relaxed it's criteria on emulator submissions. I also contacted Nine Tiles to pave the path of having a workable arrangement to incorporate the ROM code, which is still very much their IP. The emulation aspect would only be 50% of the app. I want it to incorporate a history of the computer, interviews and all.

User avatar
1024MAK
Posts: 2442
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Help with ZX81 loading screen for new emulator

Post by 1024MAK » Sat Aug 03, 2013 8:20 pm

Sounds better and better 8-)

Good luck and I hope you do find the time to finish it :mrgreen:

Mark

sirmorris
Posts: 2813
Joined: Thu May 08, 2008 5:45 pm

Re: Help with ZX81 loading screen for new emulator

Post by sirmorris » Sat Aug 03, 2013 10:52 pm

.. and don't forget Android...! ;)

Rink
Posts: 165
Joined: Wed Jun 27, 2012 5:48 pm

Re: Help with ZX81 loading screen for new emulator

Post by Rink » Sun Aug 04, 2013 2:12 pm

kpalser wrote: The objective is to produce an emulator running on iOS devices, as Apple has relaxed it's criteria on emulator submissions.
Can you elaborate? PM me if you don't want to drag the thread off-topic but I'm interested. Last I saw, they were still pretty tight on anything which lets you load executable code (e.g. Roms) from any source other than the App Store. But I'd love to hear different - there're a few things I wanted to do which I haven't because of the high chance of having the app rejected.

Cheers.

User avatar
kpalser
Posts: 57
Joined: Sun Jun 03, 2012 2:18 pm
Location: Dundee, Scotland

Re: Help with ZX81 loading screen for new emulator

Post by kpalser » Sun Aug 04, 2013 8:26 pm

This response is mainly for Rink but the points at the end might be of general interest.

To be be fair the the changes in the iOS app store are no longer recent. For a while now Apple have allowed interpreted code to run on their iOS devices. There were restrictions on the languages that could be used to compile apps (c/c++,objective-c) and Apple originally rejected a number of apps i.e. the C64 emulator because its BASIC allowed users to enter their own programs that were not precompiled into the app code. Apple changed its policies: http://arstechnica.com/apple/2010/09/ap ... analytics/ - see "In particular, we are relaxing all restrictions on the development tools used to create iOS apps, as long as the resulting apps do not download any code,". So the limitation is users are not allowed to download files and execute them via the app or iTune interaction. Files and ROMs must be stored already in the app executable package and sand boxed of course. Hence forget about clever ideas of letting users load new programs into your app in any form (including the phone listening to the loading tones of an old data tape). However, if you want to be able to key in the programs manually via BASIC this it seems acceptable using the C64 app as an example case.

I work at a company who has a team for producing mobile apps. I had a long discussion with the experienced director of the team when submitting another iOS and Android app I worked on and brought up the topic of my emulator. I was told: If you want to reduce the chance of getting your app rejected then emphasise points in the supporting documentation. In our case the precautions that you have made in not allowing downloads and sandboxing the app. And include documents or links that help demonstrate that you have the rights to use elements in the emulator that you did not write.

To be honest I would be more worried about the ZX80/81 ROM still not being technically freely distributable in the public domain. Amstrad did the emulation community a big favour by making them free for the CPC and Spectrum ROMs. But they never had the rights to the ZX80 & ZX81 ROMs. I contacted Nine Tiles about the rights when I started the emulator. They seemed OK with the idea of incorporating the ZX81 ROM as long as there was the possibility of some form of percentage of revenue going their direction. For example the "Freemium" model. If you need me to ask my contact there again, let me know. As for those emulator apps that are floating around I suspect many have never felt the need to ask permission - formally submitting an application to an electronic store is another ball park. I take everything seriously - the Timex production line workers I interviewed were given consent forms.

Maybe if enough of us got together to pool our hobbiest resources and bought the ROM rights outright and made them free distributable…

Rink
Posts: 165
Joined: Wed Jun 27, 2012 5:48 pm

Re: Help with ZX81 loading screen for new emulator

Post by Rink » Tue Aug 06, 2013 2:20 pm

Awww. I was hoping you were going to tell me they'd relaxed their rules about downloading code. Oh well.

Yeah, I've seen a few BASIC emulators on there and things like Codea which let you type in programs but are heavily limited in how they can import code. I think a bit of common sense is needed here: if someone were to publish a ZX81 emulator on there which allows you to download tape images, it wouldn't exactly be a threat to the App Store or Apple's profit margins. Even if they said that only paid apps could do it - the ability to transfer tape files to the app would help sell more copies of the app (netting Apple their 30%).

I could understand them worrying about an app which could download code and run it sufficiently fast as to compete with native applications... but since they insist on reviewing every single app before it is published on the store (and every single update to those apps), they do have the opportunity to act on a case-by-case basis if they wanted to.

It's one of the (relatively few) things I'm not happy with on iOS. The other is that I'm not allowed (even as a paid-up developer AND member of an enterprise developer account also) to communicate with external devices without joining the MFI program... And they denied my request there. :(

Post Reply