Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amstrad/amstrad: wrong default screen resolution #12271

Open
malespiaut opened this issue Apr 18, 2024 · 6 comments
Open

amstrad/amstrad: wrong default screen resolution #12271

malespiaut opened this issue Apr 18, 2024 · 6 comments

Comments

@malespiaut
Copy link

MAME version

0.264 (unknown)

System information

OS: Arch Linux, 64-bit, kernel 6.8.5-zen1-1-zen
Locale: en_US.UTF-8
RAM: 16GB
CPU: 11th Gen Intel i7-1165G7 (8) @ 4.700GHz
GPU: Intel TigerLake-LP GT2 [Iris Xe Graphics]

INI configuration details

No response

Emulated system/software

Amstrad CPC6128 (cpc6128)

Incorrect behaviour

MAME reports a screen resolution of 704×144 while the Amstrad CPC 6128 normally have a resolution of 768×272.

While this doesn't impact gameplay, it does impact video recording via the -aviwrite option, and may be the source of some emulation bugs.

Expected behaviour

MAME should report a video resolution of 768×272 when launching the cpc6128, as it is the Full-Screen Mode 2 resolution (see: https://www.cpcwiki.eu/index.php/Video_modes).

Steps to reproduce

Launch MAME for the cpc6128 machine, and see the MAME boot message.

For video recording, launch MAME for the cpc6128 machine with the -aviwrite test.avi option, and view the test.avi result.

Additional details

No response

@angelosa
Copy link
Member

m_screen->set_raw(16_MHz_XTAL, 1024, 32, 32 + 640 + 64, 312, 56 + 15, 200 + 15);

  1. The math is wrong here for a default, where -aviwrite blindly adheres and has no provision for in-flight resolution changes;
  2. -aviwrite should be put in the air and destroyed like in skeet shooting. I seriously doubt you get much out of a CPC before it starts doing resolution changes and breaks your capture, consider using app alternatives such as OBS Studio for grabbing MAME video output instead.

@holub
Copy link
Contributor

holub commented Apr 18, 2024

MAME else adds extra resolution beyond standard border in spectrum-based drivers.
But output screen can be cutted to the lower values. As far as I remeber @ICEknigh7 knows how.

@ICEknigh7
Copy link
Contributor

ICEknigh7 commented Apr 18, 2024

I don't know how MAME does it here, but I think that any cropping should be left to the views and shaders, instead of having it hardcoded to the assumed but sometimes incorrect values.

Using a real monitor with a V-hold knob indeed allows us to see parts of the screen which MAME won't be able to display due to not having an uncropped view available, including some initial and trailing partial scanlines which I'm not sure can be emulated yet:
partial scanlines

(Image taken from a ZX Spectrum +2A, just for illustrative purposes)

@malespiaut
Copy link
Author

  1. -aviwrite should be put in the air and destroyed like in skeet shooting. I seriously doubt you get much out of a CPC before it starts doing resolution changes and breaks your capture, consider using app alternatives such as OBS Studio for grabbing MAME video output instead.

Hello @angelosa,

I was planning to use OBS / ffmpeg x11grab at first. But the advantage of an integrated video recording option is to have pixel-perfect and frame perfect recording, and without having to worry about video compression (which will be taking care of later, during post-processing).

I do understand that it is a burden for developpers, and it would be justified to remove it from MAME; but I also think that this is, in my humble opinion, a killer feature if it's being kept in and taken care of.

@angelosa angelosa changed the title [Amstrad CPC 6128] Incorrect video resolution (704×144 instead of 768×272). amstrad/amstrad: wrong default screen resolution Apr 19, 2024
@angelosa
Copy link
Member

angelosa commented May 7, 2024

I was planning to use OBS / ffmpeg x11grab at first. But the advantage of an integrated video recording option is to have pixel-perfect and frame perfect recording, and without having to worry about video compression (which will be taking care of later, during post-processing).

Very unconvinced by this statement:

  1. -aviwrite by itself creates this big and giant "unfiltered" output that first and beforemost depends on HDD space and speed throughput;
  2. it will silently fail on prolonged sessions last time I bothered with it (a long time ago);
  3. it's running in pixel aspect unfiltered, it doesn't do anything like 4:3 and it's straight unusable by anything non-canonical (cfr. pce for a laugh)
  4. Above must also imply that is doing SOFTWARE grabbing under the hood, something that was outdated 10 years ago.
  5. People don't even use the CLI option but rather the "Record AVI" hotkey where it matters (-> games that goes sub-100% performance), which I guess it's perfectly controllable thru LUA script too.
  6. OR -mngwrite/-wavwrite combo.
  7. OR (again) OBS/FFmpeg/GStreamer/v4l2loopback

@ICEknigh7
Copy link
Contributor

Yeah, OBS is the way to go for recording MAME in the proper aspect ratio. If you need a "crisp pixel" look, just use the default bgfx shader and set prescale to 3 in mame.ini.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants