BMC64 does not save video modes correctly using DPI (I believe is a bug)
I'm using VGA666 DPI to VGA adapter to get 15Khz RGB signal for both modes: American (60 Hz) and European (50Hz).
DPI 50Hz mode works OK, but when I swap to a 60 Hz machine from the Menu, the screen refresh is still 50 Hz.
Also, looking at the config.txt file, it seems BMC64 keep writing the same parameters each time I switch between modes, making a long list of the same thing:
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
dpi_timings 1920 1 182 247 250 240 1 3 7 12 0 0 0 60 0 40860000 1
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
Strangely, the dpi_timings parameteres for 50 Hz were written once, in the first "DPI/50Hz" boot. When I try to swap to 60Hz machine from the Menu, using the parameters below in machine.txt, BMC does not change that line in config.txt before rebooting, it gets stucked at 50 Hz, meaning no NTSC machine emulation.
So, it seems there are two bugs:
- BMC64 keep writing
config.txtwith the same parameters over and over (exceptdpi_timings). - BMC64 does not write
dpi_timingswhen in 60 Hz machine emulation.
The only way I can get 60 Hz machine emulation, was editing config.txt by hand, deleting the parameters at the bottom of the file and "copy&pasting" the same parameters for 60Hz emulation than the machines.txt.
I've also found that the scaling_params were writeen in cmdline.txt, but it seems once written, it didn't change even if you switch to a different machine.
Just for the record, I'm using the following parameters (50 Hz parameters are the same than the README document):
[C64/NTSC/DPI/VGA666:1920x240@60hz]
enable_dpi=true
machine_timing=ntsc-custom
cycles_per_second=1025671
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
dpi_timings 1920 1 182 247 250 240 1 3 7 12 0 0 0 60 0 40860000 1
scaling_params=384,240,1920,240
[C64/PAL/DPI/VGA666:[email protected]]
enable_dpi=true
machine_timing=pal-custom
cycles_per_second=985257
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
dpi_timings=1920 1 56 176 208 282 1 5 2 23 0 0 0 50 0 36908040 1
scaling_params=384,282,1920,282
Are you sure the problem isn't that there is an = sign missing on your dpi_timings line for your 60hz mode?
I see this in your example:
dpi_timings 1920 1 182 247 250 240 1 3 7 12 0 0 0 60 0 40860000 1
You need an = sign after dpi_timings. Otherwise, the parser will probably go off the rails.
Let me know if this fixes one or both of the problems.
On Fri, May 26, 2023 at 3:06 PM K-rnivoro @.***> wrote:
I'm using VGA666 DPI to VGA adapter to get 15Khz RGB signal for both modes: American (60 Hz) and European (50Hz).
DPI 50Hz mode works OK, but when I switch to 60 Hz, the screen refresh is still 50 Hz. Looking at the config.txt file, it seems BMC64 keep writing the same parameters each time I switch between modes, making a long list of the same thing:
enable_dpi_lcd=1 display_default_lcd=1 dpi_group=2 dpi_mode=87 dpi_timings 1920 1 182 247 250 240 1 3 7 12 0 0 0 60 0 40860000 1 enable_dpi_lcd=1 display_default_lcd=1 dpi_group=2 dpi_mode=87 enable_dpi_lcd=1 display_default_lcd=1 dpi_group=2 dpi_mode=87 enable_dpi_lcd=1 display_default_lcd=1 dpi_group=2 dpi_mode=87 enable_dpi_lcd=1 display_default_lcd=1 dpi_group=2 dpi_mode=87
Strangely, the dpi_timings parameteres for 50 Hz were written once, in the first boot. When I try to change to 60Hz machine (using the modes below), BMC does not change that line in config.txt. It gets stucked at 50 Hz, meaning no NTSC machine emulation.
So, it seems there are two bugs:
- BMC64 writes config.txt with the same parameters over and over (except dpi_timings).
- BMC64 does not write dpi_timings when in 60 Hz machine emulation.
The only way I can get 60 Hz machine emulation, was editing config.txt by hand, deleting the info at the bottom of the file and "copy&pasting" the same parameters for 60Hz emulation than the machines.txt.
BTW, I'm using these parameters (the 50 Hz parameters are the same than the README):
@.*** enable_dpi=true machine_timing=ntsc-custom cycles_per_second=1025671 enable_dpi_lcd=1 display_default_lcd=1 dpi_group=2 dpi_mode=87 dpi_timings 1920 1 182 247 250 240 1 3 7 12 0 0 0 60 0 40860000 1 scaling_params=384,240,1920,240
@.*** enable_dpi=true machine_timing=pal-custom cycles_per_second=985257 enable_dpi_lcd=1 display_default_lcd=1 dpi_group=2 dpi_mode=87 dpi_timings=1920 1 56 176 208 282 1 5 2 23 0 0 0 50 0 36908040 1 scaling_params=384,282,1920,282`
— Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/236, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKEYJNGK6FJCSDHAAKDXID5MHANCNFSM6AAAAAAYQS4RI4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Randy Rossi
- "There are only two things that are hard about computer science; Naming things, Cache Invalidation, and Off-by-one errors."
How dumb I've been!! The = sign missing was causing most of the trouble. Thanks Randy!
However I can still see two weird things:
- In 50 Hz mode,
Apply scaling parameters at bootis alwaysNo, despite changing it toYesand save it. However in 60 Hz works as expected. That forces me to change it toYesmanually everytime I want to use the "PAL" C64 because it started in a non integer scaling relation. dpi_timingsis written once inconfig.txt, but the rest of the parameteres are written every time I switch the machine making a long list of:
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
(and so on...)