|
Joined: Feb 2005
Posts: 449
Senior Member
|
Senior Member
Joined: Feb 2005
Posts: 449 |
I see the problem was in the Z80 tables... Just a silly question: what are the Z80 cycle tables doing outside the Z80 CPU core?
|
|
|
|
Joined: Mar 2001
Posts: 17,005 Likes: 94
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,005 Likes: 94 |
Aaron needed to do that to emulate the super-weird Sega System 1 timing where opcode fetches are slower than operands or something like that.
|
|
|
|
Joined: Apr 2004
Posts: 1,557 Likes: 4
Very Senior Member
|
Very Senior Member
Joined: Apr 2004
Posts: 1,557 Likes: 4 |
They are basically all hacks until waitstates can be properly supported in the core.
|
|
|
|
Joined: Mar 2006
Posts: 1,076 Likes: 5
Very Senior Member
|
Very Senior Member
Joined: Mar 2006
Posts: 1,076 Likes: 5 |
I never understood why waitstates are so difficult to support. Then again, I never really looked at the way the code works.
I sort of envision it working as an AM_WAITSTATE(cycles_to_steal) call within cpu-specific memory and i/o regions (this would be for 'simple' fixed waitstates for specific memory or i/o accesses, where the cpu clock divider and specific chip/device states are irrelevant; the ibm-pc is an example of this); and an AM_WAITSTATE_FCT(function_name) for more complicated spots which use different/optional waitstates depending on cpu mode/divider/value_written/etc. The function would be passed the masked offset within cpu space, data for a write or read, and a cpu and device pointer(for AM_WAITSTATE_DEV?), etc. and would return the number of cycles to steal/waitstates for that particular access. A good example of a (future)device which needs this is the PHP1500 tms5200-based speech module for the TI99/4(A), since the /READY line from the tms5200 controls the WAIT input for the main cpu; the tms5200 will halt the cpu during all reads and writes from/to it. (the exact number of cycles reads and writes take is determined by the state tables of the tms5200 and its zero or more VSM chips. This is one of those 'un-fun but inevitably needed' things to emulate.)
In addition, devices (and code in /machine/ ?) could 'force' waitstates (along with forcing cpu to catch up before waitstates are taken) using a cpu tag; this is important for the DMA chip in the ibm-pc iirc, and is also important for sprite chips which halt one or more cpus, used in all sorts of places.
This is all theoretical though, as I have NO idea how complex this would be to code. Judging by the fact that it hasn't been done, I guess its in the 'brain-bleeding' difficulty area. Feel free to correct me if I'm wrong, though.
LN
Last edited by Lord Nightmare; 04/17/09 05:55 PM. Reason: add example
"When life gives you zombies... *CHA-CHIK!* ...you make zombie-ade!"
|
|
|
|
Joined: Jul 2007
Posts: 4,625
Very Senior Member
|
OP
Very Senior Member
Joined: Jul 2007
Posts: 4,625 |
SVN 4525 windows build Kaypro4 driver If I start with windows GUI, I get a crash AppName: messui.exe AppVer: 0.130.1.0 ModName: messlib.dll ModVer: 0.0.0.0 Offset: 0029f35b Same problem on command line. Content of kaypro4.zip: omni_ii_u43.bin onmi_ii_u47.bin NGPC driver Cannot audit/find driver. Content of ngpc.zip: ngp_bios.ngp ngpcbios.rom
Last edited by Anna Wu; 04/20/09 06:09 AM.
|
|
|
|
Joined: Aug 2004
Posts: 1,458 Likes: 9
Very Senior Member
|
Very Senior Member
Joined: Aug 2004
Posts: 1,458 Likes: 9 |
You have wrong roms in kaypro4.zip
Both drivers are under construction and are bound to have problems.
|
|
|
|
Joined: Apr 2004
Posts: 1,557 Likes: 4
Very Senior Member
|
Very Senior Member
Joined: Apr 2004
Posts: 1,557 Likes: 4 |
The neogeo pocket driver is not enabled yet (the main cpu core is not in subversion).
|
|
|
|
Joined: Jul 2007
Posts: 4,625
Very Senior Member
|
OP
Very Senior Member
Joined: Jul 2007
Posts: 4,625 |
OK, i was too hasty. Thanks ! 
|
|
|
|
Joined: Jul 2007
Posts: 4,625
Very Senior Member
|
OP
Very Senior Member
Joined: Jul 2007
Posts: 4,625 |
You have wrong roms in kaypro4.zip
Both drivers are under construction and are bound to have problems. OK, i add : 81-146.u43 81-232.u47
|
|
|
|
Joined: Apr 2004
Posts: 1,557 Likes: 4
Very Senior Member
|
Very Senior Member
Joined: Apr 2004
Posts: 1,557 Likes: 4 |
The neogeo pocket driver is not enabled yet (the main cpu core is not in subversion). Have fun with the drivers  They are enabled now.
|
|
|
Forums9
Topics9,189
Posts120,317
Members5,044
|
Most Online1,283 Dec 21st, 2022
|
|
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!
|
|
|
|