MVS Homebrew Development

Razoola

Divine Hand of the UniBIOS,
Staff member
20 Year Member
Joined
Nov 12, 2002
Posts
4,662
Have you thought about actually using the NGCD Z80 and then passing the information over to the 68k for the rendering of graphics etc?

What you are doing is something I have though about myself but I would not have gone for Z80 games and instead done a 68K based game and not used emulation but instead reworked/rewrite the graphical/musical parts to work on the NeoGeo.
 

BEY

n00b
Joined
Oct 11, 2013
Posts
9
Have you thought about actually using the NGCD Z80 and then passing the information over to the 68k for the rendering of graphics etc?

What you are doing is something I have though about myself but I would not have gone for Z80 games and instead done a 68K based game and not used emulation but instead reworked/rewrite the graphical/musical parts to work on the NeoGeo.


In NEOPHOENIX (or NGCDSGA concept) it's impossible rendering gfx "on the fly" like in MAME because 12Mhz isn't enough, so the tricks are:
1.Estract GFX and palette from game.rom to C-array
2.Load tile from C-array to NG RAM
3.Convert sample game sound WAV to APDCM-A and fit files into M1, V1 NG music/sound file
4.Write the emulator (MAME source code gave a lot of help!)
5.Cry a lot when you realize to rewrite all code from C to asm 68K (some volunteer??!)


Ciao
BEY
 

Razoola

Divine Hand of the UniBIOS,
Staff member
20 Year Member
Joined
Nov 12, 2002
Posts
4,662
Yes I get that totally, it still does not stop you potentially using the Z80 on the NGCD to do Z80 emulation work for you.

Raz
 

BEY

n00b
Joined
Oct 11, 2013
Posts
9
.....using the Z80 on the NGCD to do Z80 emulation work for you.
Raz

It sounds like a dream but it's impossible because NG Z80 can't write into RAM but only manage sound stream from V1/M1 ROM to YM2610.
I don't think it's possible do anything else with this 8Bit CPU into NeoGeo's architecture.

Ciao
BEY
 

Razoola

Divine Hand of the UniBIOS,
Staff member
20 Year Member
Joined
Nov 12, 2002
Posts
4,662
It sounds like a dream but it's impossible because NG Z80 can't write into RAM but only manage sound stream from V1/M1 ROM to YM2610.
I don't think it's possible do anything else with this 8Bit CPU into NeoGeo's architecture.

Ciao
BEY

On the CD system the Z80 can write to ram (it can even self modily its own code if it wanted, so you have 64kb) The 68k can see that ram when it is opened for writing (like when z80 M ROM is loaded from CD). The issue is I don't think its possible to have the z80 running and the 68k being able to see the RAM at the same time. The z80 would have to do slices of work and then stop with the 68k then looking at the results and then updating graphics as needed. Sound might be a problem but you could have a situation with the z80 doing slices of work while the 68k is converting the results of the previous slices work (because it copied the z80 workram into the 68k workspace).

Raz
 

BEY

n00b
Joined
Oct 11, 2013
Posts
9
On the CD system the Z80 can write to ram (it can even self modily its own code if it wanted, so you have 64kb) The 68k can see that ram when it is opened for writing (like when z80 M ROM is loaded from CD). The issue is I don't think its possible to have the z80 running and the 68k being able to see the RAM at the same time. The z80 would have to do slices of work and then stop with the 68k then looking at the results and then updating graphics as needed. Sound might be a problem but you could have a situation with the z80 doing slices of work while the 68k is converting the results of the previous slices work (because it copied the z80 workram into the 68k workspace).

Raz

Really interesting,
Phoenix ROM is about 16Kb (only game with no gfx) so we can fit in Z80 64Kb ram + reserved area for Phoenix PCB stats:
0000-3fff 16Kb Program ROM
4000-43ff 1Kb Video RAM Charset A (4340-43ff variables)
4400-47ff 1Kb Work RAM
4800-4bff 1Kb Video RAM Charset B (4840-4bff variables)
4c00-4fff 1Kb Work RAM
5000-53ff 1Kb Video Control write-only (mirrored)
5400-47ff 1Kb Work RAM
5800-5bff 1Kb Video Scroll Register (mirrored)
5c00-5fff 1Kb Work RAM
6000-63ff 1Kb Sound Control A (mirrored)
6400-67ff 1Kb Work RAM
6800-6bff 1Kb Sound Control B (mirrored)
6c00-6fff 1Kb Work RAM
7000-73ff 1Kb 8bit Game Control read-only (mirrored)
7400-77ff 1Kb Work RAM
7800-7bff 1Kb 8bit Dip Switch read-only (mirrored)
7c00-7fff 1Kb Work RAM

Now the 68K SW interface can handle this area:

void Z80_WRMEM(dword A,byte V)
{
// $0000-$3800($3FFF) ROM
if (A < 0x4000)
return;
else
// $4000-$4FFF RAM/VRAM
if (A < 0x5000)
{
*0x3c0000 = Phoenix_Tile_addr;
*0x3c0002 = Palette;
.....code...code.....a lot of code.....
}

..and substitute real Phoenix PCB location Ex. 0x4000 in Z80 68K RAM area equivalent.
As you say I don't know if it can work (z80 slices work and sound managment), your analysis it's good, surely not easy to do.


Ciao
BEY
 
Last edited:

Razoola

Divine Hand of the UniBIOS,
Staff member
20 Year Member
Joined
Nov 12, 2002
Posts
4,662
Yes it would not be easy to do and there would be issues to overcome, I was just putting the idea out there for you to think about.

Given the game code is only 16kb you say another option would be to write a tool (for PC) that would read each Z80 opcode and rebuild the game ROM using 68kopcodes. Again this is not easy and the tool would need to understand what is an opcode and what is data in the ROM. The rewards using this method would be great however as you could use it on other games. You would need a very good understanding of both Z80 and 68K asm to pull it off. If you do not have that knowledge creating such a tool would be a great way to learn both processors.
 
Last edited:

BEY

n00b
Joined
Oct 11, 2013
Posts
9
NeoPhoenix Rel.0.10 W.I.P.
I've started to code some functions from C to ASM 68K, this is better than the first release (100% full C).
Thanks Raz.

Grazie
Ciao
BEY
www.IoCero.com
 

Razoola

Divine Hand of the UniBIOS,
Staff member
20 Year Member
Joined
Nov 12, 2002
Posts
4,662
blaster just gave me a link to a real sweet NeoGeo CD demo he recently completed. Great to know pc2neo was helpful in the creation of this demo.

I give you 'DIFF' by Citavia, 3D anyone?

 
Last edited:

xsq

Thou Shalt Not, Question Rot.,
Joined
Jan 17, 2013
Posts
7,414
wow, nice demo. didn't know the NGCD could do that!
 

Heinz

Parteizeit
15 Year Member
Joined
Feb 13, 2005
Posts
22,297
I like watching those C64 demo videos, very cool to see similar stuff on the glorious Neo!
 

kuze

Akari's Big Brother
10 Year Member
Joined
Apr 20, 2013
Posts
2,549
Very cool indeed! Awesome to see folks continuing to push the boundaries of the Neo in 2016.
 
Top