PDA

View Full Version : V30 8080 code



evildragon
August 23rd, 2007, 10:05 PM
I keep reading that the V30 has 8080 code support, but I can't seem to trigger it..

I couldn't find the documentation for the V30, so I just tried giving it 8080 code, but the result is invalid opcodes..

Am I missing something? Or is it a "mode" and has to be triggered? And if it's triggered, can X86 code even be executed, or does that turn off? (like single-tasking)

See, I want to take a stab at emulation, and wanted to emulate a GameBoy (the original 4-shade grey model).. And I thought using the V30's 8080 mode would be better for Z80 emulation, and use any extra resources for audio emulation (im thinking about passing the audio either to an OPL chip or actually try to emulate the PSG), and emulate graphics..

It would probably be very slow, but it's a learning curve for me, and want to give it a shot...

mbbrutman
August 24th, 2007, 06:02 AM
"I keep reading that the V30 has 8080 code support, but I can't seem to trigger it.."

What did you do to try to trigger it? There's a special opcode that is used to throw it into 8080 mode.


I couldn't find the documentation for the V30, so I just tried giving it 8080 code, but the result is invalid opcodes..

I don't see how you are going to do an emulator for a Z80 using an 8080 being emulated by V30 without some sort of documentation.

Why not just get a C compiler and try writing a Z80 emulator from scratch first? You'll learn a lot more that way. Using the hardware 8080 will be faster, but much harder to control and debug.

evildragon
August 24th, 2007, 06:47 AM
I just tried giving it 8080 opcodes flat out.. I could find the special code at all.

Terry Yager
August 24th, 2007, 04:25 PM
Not sure exactly how it works, but I have a couple of different programs that switch-in the 8080 mode to run CP/M-80 software. I'll dig out the computer I have 'em on and shoot ya a copy.

--T

evildragon
August 24th, 2007, 04:40 PM
ok, thanks.. is it in CPM format? because i don't know how to write a floppy that CPM can read or use..

Terry Yager
August 24th, 2007, 05:04 PM
Nah, they're just standard DOS apps.

--T

evildragon
August 24th, 2007, 05:23 PM
Nah, they're just standard DOS apps.

--T
i should have no problem then :p

Terry Yager
August 24th, 2007, 05:43 PM
I gotta agree with Mike though. Why (aside from kewl geek factor) would you want to write code to emulate an emulator emulating an emulator emulating an emulator, when you can just grab-up one of the many Z80 emulators already available, and run your GB code on that? A couple of the more popular share/freeware ones are 22NICE and My Z80, both of which should be available on Gaby's page: www.gaby.de

--T

evildragon
August 24th, 2007, 06:06 PM
I gotta agree with Mike though. Why (aside from kewl geek factor) would you want to write code to emulate an emulator emulating an emulator emulating an emulator, when you can just grab-up one of the many Z80 emulators already available, and run your GB code on that? A couple of the more popular share/freeware ones are 22NICE and My Z80, both of which should be available on Gaby's page: www.gaby.de

--T
because if the V30 was the one doing the 8080 code instead of C on the X86 side, it would be faster?

mbbrutman
August 24th, 2007, 06:16 PM
8080 != Z80

Terry Yager
August 24th, 2007, 06:45 PM
8080 != Z80

8080 = really slow, really dumb Z80! Even if you were to get such a program written, the overhead would prob'ly bog the system down to the point of un-usability (can we say data-bound?). What is the speed of the (8250?) I/O chip/bus? That would be a major bottleneck (can we say I/O-bound?)...

--T

evildragon
August 24th, 2007, 06:53 PM
as it is, with No$GMB, the XT version, it's slow, performing at 13% speed of a real gameboy, and that was written in assembly..

surely with the 8080 mode, it can atleast get faster, which would be nice to have..

Terry Yager
August 24th, 2007, 07:45 PM
Any extra speed gained by running native code on a faster CPU would be offset to some degree by the additional layers of complexity in the code, and by emulating a faster, superior CPU on an older, slower design. (The Z80 is the bastard child of the 8080, not the other way round).

--T

mbbrutman
August 25th, 2007, 06:40 AM
8080 = really slow, really dumb Z80!

Once again, Z80 != 8080.

The Z80 has two register sets.

Terry Yager
August 25th, 2007, 07:26 PM
Whatever... There's plenty of info available, in a number of media, for anyone who wants to persue a serious project involving Z80 or 8080 coding.*

--T

*Flameage edited out.

Terry Yager
August 25th, 2007, 08:56 PM
Here's one of the Z80 emulators I promised ya. The other's too large to u/l here, but I'll shoot it to your email if ya pm me with an addy.*

--T

*More flaming removed.

evildragon
August 25th, 2007, 09:03 PM
...But, just in case you really are the newless kl00b you pretend to be, despite your A+ Certification, we'll give you the benefit of the doubt for now. Here's one of the Z80 emulators I promised ya. The other's too large to u/l here, but I'll shoot it to your email if ya pm me with an addy.

--T
I know I have a bad history on the internet, that I know, and I regret ever screwing up in the past. I'm trying to start fresh, that's why I was asking for help in programming a CPU I like, but can't find any documentation or books on.

A+ certs is nothing (only my MS certs actually mean anything to the work world) they don't teach anything in programming.. I don't have any certs in programming, and don't want them, as programming is just a side project I want to learn, to get my mind off of my personal life (which is crap btw, when you don't have a family).

Terry Yager
August 25th, 2007, 09:15 PM
IKWYM. I don't have A+, but I read a book on it once, and I'm pretty confident that I could pass the exam with one lobe tied behind my cranium. Most of it seemed to be pretty basic stuff.

BTW, if you've read very many of my past posts, you'll know that I don't use the term 'troll' as a pejorative. I rather enjoy a good troll myself. It's the lame-ass amaturish ones that get under my skin.

--T

evildragon
August 25th, 2007, 09:17 PM
IKWYM. I don't have A+, but I read a book on it once, and I'm pretty confident that I could pass the exam with one lobe tied behind my cranium. Most of it seemed to be pretty basic stuff.

BTW, if you've read very many of my past posts, you'll know that I don't use the term 'troll' as a pejoritive. I rather enjoy a good troll myself. It's the lame-ass amaturish ones that get under my skin.

--T
The A+ stuff is quite easy. Where it gets hard though is when you get near MCSA and have to learn DNS zones, forwarders, transfers, etc. To some it's easy, to others it's not.

But that's off topic. The download you gave me is going to be of use to get the V30 in 8080 mode.

Terry Yager
August 25th, 2007, 09:44 PM
Just remember that you have change the ext of CP/M .COM files before running them, so the emulator will recognize 'em.

--T

evildragon
August 25th, 2007, 10:40 PM
Yea, .CPM? I had a feeling about that when all files that were executable were .CPM, and non were .COM...

Terry Yager
August 26th, 2007, 09:25 AM
BTW, have you seen the Z80 homepage here: http://www.z80.info Most of what you need may be found there.

--T

evildragon
August 26th, 2007, 09:30 AM
BTW, have you seen the Z80 homepage here: http://www.z80.info Most of what you need may be found there.

--T
No, but I have now bookmarked it, I'm going to be interested in some of those things. Thanks..