mamedev / mame

MAME
https://www.mamedev.org/
Other
7.76k stars 1.95k forks source link

MAME failing self test in Apple 2c with Rom 0 (apple2c0) firmware #12468

Closed univta0001 closed 2 weeks ago

univta0001 commented 3 weeks ago

MAME version

0.266 (mame0266)

System information

Windows 10 Home 22H2 Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz 3.40 GHz 16.0 GB

INI configuration details

#
# UI SEARCH PATH OPTIONS
#
historypath               history;dats;.
categorypath              folders
cabinets_directory        cabinets;cabdevs
cpanels_directory         cpanel
pcbs_directory            pcb
flyers_directory          flyers
titles_directory          titles
ends_directory            ends
marquees_directory        marquees
artwork_preview_directory "artwork preview;artpreview"
bosses_directory          bosses
logos_directory           logo
scores_directory          scores
versus_directory          versus
gameover_directory        gameover
howto_directory           howto
select_directory          select
icons_directory           icons
covers_directory          covers
ui_path                   ui

#
# UI MISC OPTIONS
#
system_names              
skip_warnings             0
unthrottle_mute           0

#
# UI OPTIONS
#
infos_text_size           0.75
font_rows                 30
ui_border_color           ffffffff
ui_bg_color               ef101030
ui_clone_color            ff808080
ui_dipsw_color            ffffff00
ui_gfxviewer_color        ef101030
ui_mousedown_bg_color     b0606000
ui_mousedown_color        ffffff80
ui_mouseover_bg_color     70404000
ui_mouseover_color        ffffff80
ui_selected_bg_color      ef808000
ui_selected_color         ffffff00
ui_slider_color           ffffffff
ui_subitem_color          ffffffff
ui_text_bg_color          ef000000
ui_text_color             ffffffff
ui_unavail_color          ff404040

#
# SYSTEM/SOFTWARE SELECTION MENU OPTIONS
#
hide_main_panel           0
use_background            1
skip_biosmenu             0
skip_partsmenu            0
remember_last             1
last_used_machine         88games
last_used_filter          Unfiltered
system_right_panel        image
software_right_panel      image
system_right_image        snap
software_right_image      snap
enlarge_snaps             1
forced4x3                 1
info_audit_enabled        0
hide_romless              1

Emulated system/software

mame apple2c0 -resolution0 800x800 -skip_gameinfo

Incorrect behaviour

When the mame runs the self test for the Apple 2C rom 0x00, it is failing in the self test with the error message "GLU" mame_glu

Expected behaviour

The expected behaviour is MAME should pass the self test.

Steps to reproduce

  1. Start mame using (mame apple2c0 -flop1 )
  2. Press CTRL-LEFT_ALT-RIGHT_ALT-F12 (This will start the self test)
  3. Expected to get System OK message

Additional details

Apple2c0

univta0001 commented 3 weeks ago

Hi, i think i found out why MAME failed the self test. There are two problems in it

1) The soft-switch 0xc07E result is inverted. When reading 0xC07E soft switch, it should return value with high bit set if IOUDISON is on which is IOU is disabled. 2) The soft-switch 0xc07F result is inverted. Although the Apple Technical Reference Manual mentioned that when reading 0xC07F should return value with high bit set if DHIRES is on, it seems like the other way around. By inverting the value that is mentioned in the manual, the self test works.

rb6502 commented 3 weeks ago

Thanks, this has been fixed. Any idea if that's the same on the IIe? The enhanced IIe's self-test passes both ways, which is inconclusive.

univta0001 commented 2 weeks ago

If I am not wrong, enhanced IIe's self-test do not have any IOU tests. Furthermore, it seems like in Apple IIe IOU softswitches are not used at all. For e.g. softswitches 0xC05E and 0xC05F can be used to turn on / off the DHIRES whether IOU is on / off using 0xC07E / C07F softswitches.