Einzelnen Beitrag anzeigen
  #5521  
Alt 09.09.2023, 14:00
fhub fhub ist offline
Lebende Foren Legende
 
Registriert seit: 19.04.2010
Beiträge: 2.953
Abgegebene Danke: 614
Erhielt 7.379 Danke für 1.649 Beiträge
Aktivitäten Langlebigkeit
7/20 15/20
Heute Beiträge
0/3 sssss2953
AW: Re: Mess Emulator für diverse Schachcomputer ist fertig!

Hi 'hap',
 Zitat von hap Beitrag anzeigen
Fidelity Elite Premiere ist jetzt emuliert, danke an Berger.
thanks to you and Berger for this new engine!

I had a problem porting back the Premiere to my version 0.220 with 'memory_share_creator'.
I've solved (?) it with a similar method that I've already used for some Saitek engines long time ago:

1) changed
m_nvram(*this, "nvram", 0x10000, ENDIANNESS_BIG),
to
m_nvram(*this, "nvram"),

2) changed
memory_share_creator< u16 > m_nvram;
to
required_device m_nvram;
and
std::unique_ptr< u16[] > m_nvram_data;

3) changed
m_rombank->configure_entries(0, 2, memregion("maincpu")->base(), 0x20000);
m_nvrambank->configure_entries(0, 2, m_nvram, 0x8000);
to
m_rombank->configure_entries(0, 2, memregion("maincpu")->base(), 0x20000);
m_nvram_data = make_unique_clear< u16[] >(0x10000);
save_pointer(NAME(m_nvram_data), 0x10000);
m_nvram->set_base(m_nvram_data.get(), 0x10000);
m_nvrambank->configure_entries(0, 2, m_nvram, 0x8000);

With these changes the compilation is ok and also the Premiere seems to be working correctly, but to be sure that there are no hidden errors or side-effects, I'm better asking for your 'ok'.

I'm not sure about the type 'u16', but I guess it's correct because of BIG endianness?
but I guess it's correct because of BIG endianness?
And also I'm not sure if the values 0x10000 are correct in the 3 lines with 'm_nvram_data'?

Regards,
Franz
__________________
Meine Webseite: https://fhub.jimdofree.com/

Geändert von fhub (09.09.2023 um 14:09 Uhr)
Mit Zitat antworten
Folgender Benutzer sagt Danke zu fhub für den nützlichen Beitrag:
kamoj (09.09.2023)