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

Emulation running, but screen rendered black #534

Open
sasq64 opened this issue Nov 5, 2024 · 6 comments
Open

Emulation running, but screen rendered black #534

sasq64 opened this issue Nov 5, 2024 · 6 comments

Comments

@sasq64
Copy link

sasq64 commented Nov 5, 2024

I can step in the debugger and see that the emulation is running.

Disk-image seems to load correctly.

The only log warning I get is not finding palette files, but the code sets a default palette then.

Pixels rendered are all black though. I am using 32-bit gfx mode though which seems to be a bit non-standard and untested.

Also Note: I went back to an older version of the core, and that does produce video.

@sonninnos
Copy link
Collaborator

Never managed to make that happen here, since palettes are embedded, and no external files are used or read. Please provide clear steps and log.

@sasq64
Copy link
Author

sasq64 commented Nov 5, 2024

Setting vice_drive_true_emulation = enabled
Setting vice_c64_model = C64C PAL
Setting vice_gfx_colors = 24bit
Trying to load 'connection-8580.prg' ((null))
RETRO:Arg0: x64
RETRO:Arg1: connection-8580.prg
RETRO:Reading configuration file './vice/'.
RETRO:--------------------------------------------------------------------------------
RETRO:VICE x64 (C64) 3.8 8afb6a3a40, Nov  5 2024 15:24:47
RETRO:--------------------------------------------------------------------------------
RETRO:VICE system file directory: ./vice.
RETRO:DriveROM: 'dos2000-cs-33cc6f.bin' ROM image not found. Hardware-level 2000 emulation is not available.
RETRO:DriveROM: 'dos4000-fd-350022.bin' ROM image not found. Hardware-level 4000 emulation is not available.
RETRO:DriveROM: 'bootromCMDHD-v2-80.bin' ROM image not found. Hardware-level CMDHD emulation is not available.
RETRO:Drive: Finished loading ROM images.
RETRO:Sound: Available sound devices: retro
RETRO:Missing name for system file.
RETRO:Main CPU: starting at ($FFFC).
RETRO:Main CPU: RESET.
RETRO:AUTOSTART: Autodetecting image type of 'connection-8580.prg'.
RETRO:Filesystem Image Probe: Import GCR: Unknown GCR image version 48.
RETRO:Filesystem Image: Unknown disk image 'connection-8580.prg'.
RETRO:Tape: Cannot open file 'connection-8580.prg'
RETRO:no CRT header found.
RETRO:CART: '/Users/sasq/projects/demotv/connection-8580.prg' is not a valid CRT file.
RETRO:AUTOSTART: Loading PRG file 'connection-8580.prg' with direct RAM injection.
RETRO:AUTOSTART: Resetting the machine to autostart '*'
RETRO:AUTOSTART: 'connection-8580.prg' recognized as program/p00 file.
RETRO:Reading configuration file './vice/'.
RETRO:Set resource: DosName1541ii => "dos1541ii-251968-03.bin"
RETRO:Set resource: DosName1571 => "dos1571-310654-05.bin"
RETRO:Set resource: DosName1581 => "dos1581-318045-02.bin"
RETRO:Set resource: KernalName => "kernal-901227-03.bin"
RETRO:Set resource: Drive8Type => 1542
RETRO:Set resource: SoundFragmentSize => 1
RETRO:Set resource: AutostartPrgMode => 1
RETRO:Set resource: AutostartDelayRandom => 0
RETRO:Set resource: FSDeviceLongNames => 1
RETRO:Set resource: Mouse => 1
RETRO:Set resource: VICIIPaletteFile => ""
RETRO:Set resource: VICIIExternalPalette => 1
RETRO:Set resource: VICIIFilter => 1
RETRO:Missing name for system file.
RETRO:Set resource: VICIIPALBlur => 0
RETRO:Set resource: VICIIPALOddLinePhase => 0
RETRO:Set resource: VICIIPALOddLineOffset => 0
RETRO:Set resource: VICIIColorGamma => 0
RETRO:Set resource: VICIIColorTint => 0
RETRO:Set resource: VICIIColorSaturation => 0
RETRO:Set resource: VICIIColorContrast => 0
RETRO:Set resource: VICIIColorBrightness => 0
RETRO:Set resource: UserportDevice => 3
RETRO:Set resource: AutostartWarp => 0
RETRO:Set resource: VirtualDevice4 => 0
RETRO:Set resource: VirtualDevice8 => 0
RETRO:Set resource: VirtualDevice9 => 0
RETRO:Set resource: Drive8TrueEmulation => 1
RETRO:Set resource: Drive9TrueEmulation => 1
RETRO:Set resource: AttachDevice8d0Readonly => 0
RETRO:Set resource: AttachDevice8d1Readonly => 0
RETRO:Set resource: EasyFlashWriteCRT => 0
RETRO:Set resource: DriveSoundEmulation => 0
RETRO:Set resource: DatasetteSound => 0
RETRO:Set resource: VICIIAudioLeak => 0
RETRO:Set resource: SFXSoundExpander => 0
RETRO:Set resource: SidEngine => 0
RETRO:Set resource: SidModel => 0
RETRO:Set resource: SidResidSampling => 0
RETRO:Set resource: SidResidPassband => 0
RETRO:Set resource: SidResidGain => 0
RETRO:Set resource: SidResidFilterBias => 0
RETRO:Set resource: SidResid8580Passband => 0
RETRO:Set resource: SidResid8580Gain => 0
RETRO:Set resource: SidResid8580FilterBias => 0
RETRO:Set resource: SidStereo => 0
RETRO:Set resource: REU => 0
RETRO:Set resource: Printer4 => 0
RETRO:Arg0: x64
RETRO:Arg1: connection-8580.prg
RETRO:AUTOSTART: Autodetecting image type of 'connection-8580.prg'.
RETRO:Filesystem Image Probe: Import GCR: Unknown GCR image version 48.
RETRO:Filesystem Image: Unknown disk image 'connection-8580.prg'.
RETRO:Tape: Cannot open file 'connection-8580.prg'
RETRO:no CRT header found.
RETRO:CART: '/Users/sasq/projects/demotv/connection-8580.prg' is not a valid CRT file.
RETRO:AUTOSTART: Loading PRG file 'connection-8580.prg' with direct RAM injection.
RETRO:AUTOSTART: Resetting the machine to autostart '*'
RETRO:AUTOSTART: 'connection-8580.prg' recognized as program/p00 file.
RETRO:Image for autostart: 'connection-8580.prg'
RETRO:Main CPU: RESET.
RETRO:Sound: Opened device 'retro', speed 0Hz, fragment size infms, buffer size infms, stereo
RETRO:Unit 8: RESET.
RETRO:Sound: Closing device 'retro'
RETRO:Sound: Opened device 'retro', speed 0Hz, fragment size infms, buffer size infms, stereo
RETRO:AUTOSTART: Autodetecting image type of 'connection-8580.prg'.
RETRO:Filesystem Image Probe: Import GCR: Unknown GCR image version 48.
RETRO:Filesystem Image: Unknown disk image 'connection-8580.prg'.
RETRO:Tape: Cannot open file 'connection-8580.prg'
RETRO:no CRT header found.
RETRO:CART: '/Users/sasq/projects/demotv/connection-8580.prg' is not a valid CRT file.
RETRO:AUTOSTART: Loading PRG file 'connection-8580.prg' with direct RAM injection.
RETRO:AUTOSTART: Resetting the machine to autostart '*'
RETRO:AUTOSTART: 'connection-8580.prg' recognized as program/p00 file.
RETRO:Main CPU: RESET.
RETRO:Unit 8: RESET.
RETRO:AUTOSTART: Injecting program data at $0801 (size $24da)
RETRO:AUTOSTART: Ready
RETRO:AUTOSTART: Starting program.
RETRO:AUTOSTART: Restoring FileSystemDevice8 to 1.
RETRO:AUTOSTART: Restoring FSDevice8ConvertP00 to 1.
RETRO:AUTOSTART: Restoring FSDeviceLongNames to 1.
RETRO:AUTOSTART: Done.

@sasq64
Copy link
Author

sasq64 commented Nov 5, 2024

Also logging program counter to see that its not just stuck in the kernal

@sasq64
Copy link
Author

sasq64 commented Nov 5, 2024

Doing this in the video callback to check for pixels;

    void video_refresh(void const* data, unsigned width, unsigned height, size_t pitch)
    {
          uint32_t total = 0;
          auto*ptr = (uint8_t*)data;
          for(int i=0; i<(width * height * 4); i += 4) {
              total += ptr[i] + ptr[i+1] + ptr[i+2] + ptr[i+3];
          }
          if (total != 0) {
              printf("PIXELS: %x\n", total);
          }   
       }

@sonninnos
Copy link
Collaborator

I'm not getting whatever this is, not with my current config and not with a fresh config:

RETRO:Missing name for system file.

@sasq64
Copy link
Author

sasq64 commented Nov 5, 2024

vice_opt.ExternalPalette is the empty string for some reason, so it tries to load it.
But I fixed that so it is "default" instead. The warnings go away but the same result.

It does kind of seem like the C64 emulation actually produces a black screen, so maybe something is wrong with the machine setup (kernal, basic ?) But emulation doesn't crash, Program Counter is jumpin between Exxx and 08xx for instance.

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

2 participants