1

Found a little time for my hobby today and I want to made a Z80 emulator for NeoGeo for Galaga rom (like MAME).
Now Z80 core work fine into NeoGeo CD with galaga rom but I have to add graphics interface from Galaga VRAM hardware map and NeoGeo VRAM.

In this Rel: 0.01 NG video output is about only ASCII char set for my emulator tests.

27_NEOGEO%20SPECIAL%20ARCADE@HOME_iocero_2013_10_23_16_04_02_NeoGalEmu1.jpg
27_NEOGEO%20SPECIAL%20ARCADE@HOME_iocero_2013_10_23_16_04_25_NeoGalEmu2.jpg

Link NEOGEO CD ISO --> http://www.filedropper.com/neogalagaemu


Can anyone help me to write a software interface with this features:

background
Input: Galaga VRAM buffer Output: generate bitmap and write on NeoGeo VRAM

Sprites
Input: Galaga VRAM buffer Output: generate bitmap and write on NeoGeo VRAM

THX ALL!
Regards
BEY
From St@ff www.IoCero.com
RetroIsTheOnlyFuture!

2

Hello BEY,

Unfortunately, upload to graphics RAM on the Neo CD is very slow.
I don't know precisely the bandwidth, but copying 128x128 pixels already takes up at least 2 vblanks. That's with CPU copy.
I'm not sure if DMA can be done while the video is active, I'll have to check later this week.

Could you give the bitmap size on which you'd like to draw the frames ? You'll also be limited to 16 colors.

I can give you the code to plot in the right format and to copy to graphics RAM.
avatar
Je fais des trucs. Des fois ça marche, des fois ça marche pas.

3

Hi Furtek,
First, thanks for your help.

I'll describe you the actual scenario (lable TODO is where I'm actually need help):



Basic Galaxian Memory map
0000-27FF Game ROM
5000-57FF Vram Character ram
5800-583F OBJRAM Screen attributes
5840-585F OBJRAM Sprites
5860-5FFF OBJRAM Bullets


Write From Galaga VRAM (start addr: 0x4000) to NeoGeo Screen with size 26x32:
Dim Galaga Ram:
unsigned char RAM[0x8000]; //Galaga RAM Buffer (32K RAM)

NG_VIDEO_DRAW:

for(y = 0; y < 32; y++)
{
int pos = 0x5000+32*(25)+y;
for (x = 0; x < 26; x++)
{
c = RAM[pos]
textout(4+x, 0+y, 0, 0, c); /Put only ascii char for now
pos -= 32;
// TODO put Galaxians sprites
}
}
wait_vbl();


Now I need to decode Sprite and Galaxian VRAM in NG VRAM (Galax. use 256 characters and 64 sprites):

//Galaxian general, change for other games
base = 0x5000;
MAXCHARS = 256;
MAXSPRITES = 64;
MAXPALETTES = 16;
char *chars[MAXCHARS][16]; // All the characters
char *sprites[MAXSPRITES][16]; // All the sprites

//Load Into NG RAM foreground characters from Galaxian VRAM
for (Y = 0; Y < 32; Y++)
{
for (X = 0; X < 32; X++)
{
offset_value = RAM[base + (31 - Y) * 32 + X];
//TODO draw_sprite function for NeoGeo!!
draw_sprite( chars[offset_value][RAM[base + 0x801 + X * 2]],
((Y * 8 + (unsigned char) RAM[base + 0x800 + X * 2]) % 256),
X * 8
);
}

}



CIAO
GRAZIE!!!
BEY
From St@ff www.IoCero.com
RetroIsTheOnlyFuture!

4

Now I'm trying to use a trick for Galaxian (Or Galaga, or Phoenix, or..etc.) tile conversion into NG format but I don't know if it is a easy way..
I hope to make the system think we're using the standard tile format

Es.

int NeoGeoVideoDraw(A)
{
int x,y;
Uint8 c;
unsigned int background_y;

for(y = 0; y < 32; y++)
{
int pos = 0x4000+32*(26-1)+y;
int pos2 = 0x4800+32*(26-1)+y;
for (x = 0; x < 26; x++)
{
background_y=(y+(32-scroll_reg/8))%32;
map_data[(background_y*64)+x] = RAM[pos2] << 1;

gfx_data[(y*64)+x] = RAM[pos] << 1;
pos -= 32;
pos2 -= 32;
}
}
return(0);
}

Now map_data and gfx_data are the buffer to draw like tile into NeoGeo with this routine (Thx to Furtek help!):

move.l #BUFFER,BIOS_UPSRC
move.l #32,BIOS_UPDEST
move.l #WIDTH*HEIGHT*4*8,BIOS_UPSIZE
move.b #1,BIOS_UPZONE
move.b #0,BIOS_UPBANK
jsr BIOSF_UPLOAD

Can someone translate this asm function in C code, please?
Thx!!

Ciao
BEY
www.IoCero.com
RetroIsTheOnlyFuture!

5

27_NEOGEO%20SPECIAL%20ARCADE@HOME_iocero_2013_11_06_18_11_48_NeoGalEmu1.jpg
27_NEOGEO%20SPECIAL%20ARCADE@HOME_iocero_2013_11_06_18_07_12_NeoGalEmu2.jpg

A little improvement with Phoenix, seems to work fine but slowly without optimization.

Link Download NeoGeo CD img -> http://www.megafileupload.com/en/file/467732/NeoPhoenixEmu-nrg.html

I need still help with GFX background !!!!

Ciao
BEY
www.IoCero.com
RetroIsTheOnlyFuture!

6

27_NGDSGA%20(NEOGEO%20CD%20SINGLE%20GAME%20ARCADE)%20Work%20In%20Progress_iocero_2013_11_12_10_43_03_NeoGalEmu1.jpg
27_NGDSGA%20(NEOGEO%20CD%20SINGLE%20GAME%20ARCADE)%20Work%20In%20Progress_iocero_2013_11_12_10_43_45_NeoGalEmu2.jpg

Thx to Mark McDougall now gfx render work fine!

Now optimization....

NEO GEO CD ISO --> http://www.filedropper.com/ngphoenixemu

NB: No optimized code so it's still slow!

Ciao
BEY
www.IoCero.com
RetroIsTheOnlyFuture!

7

super nouvelle ! je vais testé ça rapidement
Le lien ne fonctionne pas avec Internet explorer
avatar
La Neo Geo CD à son site (en tout cas elle essaye...): http://neogeocdworld.info/
Le forum de la Neo Geo sur Yaronet: forums/264

Un petit site sur l'Atari Falcon avec plein de trucs bon pour votre poussin: http://falcon.ti-fr.com/

8

This link (NEO GEO CD ISO --> http://www.filedropper.com/ngphoenixemu) are not working?


No problems with Chrome, you can just copy and paste in case: http://www.filedropper.com/ngphoenixemu
RetroIsTheOnlyFuture!

9

yeah it not working with internet explorer
avatar
La Neo Geo CD à son site (en tout cas elle essaye...): http://neogeocdworld.info/
Le forum de la Neo Geo sur Yaronet: forums/264

Un petit site sur l'Atari Falcon avec plein de trucs bon pour votre poussin: http://falcon.ti-fr.com/

10

Hello Guys , hello BEY !
Great your project !!! ...it looks promising

Do you know these two projects (can help you, for you personnal project)

1/
http://pushpopmov.blogspot.fr/2012/08/galaga-z80-disassembly-uploaded.html Galaga Z80 Disassembly (still Work In Progress, in 2013 !)
http://code.google.com/p/arcade-game-source-code/ With ASM & C Z80 sources , from the real game 'galaga' !!!

2/ this new project on NGCD, look promising too !
http://ngpace.blogspot.com.au/ NGPACE - A Neo Geo System Board Replacement Project / by tcdev From Australia !

Concerning the UPLOAD library for SDK NEODEV, do you have found the solution to translate this asm function in C code ?

If I remember correctly, Michael aka ProgFr had found the solution, but I had no news from him , since a long time
-> Questions a Kuk, Furrtek : avez-vous des nouvelles de Michael de votre coté ... il ne post plus sur le forum depuis tres longtemps ... cela me semble etrange !


Bye,
fred /FRONT !

11

non rien de mon coté
avatar
La Neo Geo CD à son site (en tout cas elle essaye...): http://neogeocdworld.info/
Le forum de la Neo Geo sur Yaronet: forums/264

Un petit site sur l'Atari Falcon avec plein de trucs bon pour votre poussin: http://falcon.ti-fr.com/

12

Thx Front, KuK for interesting about my little project.

A little optimization today into some cycle...
Here new ISO: http://www.2shared.com/file/cKG6YH6B/NeoPhoenix_001.html

Future ISO can be download from my BlogDev page: http://www.iocero.com/eventdetail.aspx?idevent=27312 (or in this forum wink )

Front no I haven't still traslate in C Furtek ASM routine because now I'm using Mark example (http://ngpace.blogspot.com.au/) so first I can fit in NG ram all MAME ripped sprites and after show on video with a "simple" write_sprite_data.

The optimization need a search about new SUPER OPTIMIZED and portable Z80 core.....


Grazie!
Ciao
BEY
RetroIsTheOnlyFuture!

13

Hello

I burn two CD of NeoPhoenix_001 but i have an error 002 in the middle of loading in my neo geo front

And i have a bug in the left of the screen on neorain emulator
avatar
La Neo Geo CD à son site (en tout cas elle essaye...): http://neogeocdworld.info/
Le forum de la Neo Geo sur Yaronet: forums/264

Un petit site sur l'Atari Falcon avec plein de trucs bon pour votre poussin: http://falcon.ti-fr.com/

14

Error 0002 and 0003 = Mechanical problem or copy protection alert.

I don't jnow if it can be fix cleaning the CD reader lens or it's a writable CD problem.
I haven't a real NG CD and can't test my software in the real machine, sorry. sad
I use the same makefile of my first Galaga Demo without modifications into DevKit.
Please, try with other CD and let me know, thanks.

I know the bug in the left of the screen, I will fix it in the next release!
RetroIsTheOnlyFuture!

15

Bug on the left corner screen fixed! A little more speed.

ISO--> http://www.2shared.com/uploadComplete.jsp?sId=y6kXtMeCIZ8by4E4

27_NGDSGA%20(NEOGEO%20CD%20SINGLE%20GAME%20ARCADE)%20Work%20In%20Progress_iocero_2013_11_14_16_35_00_NeoGalEmu1.jpg

27_NGDSGA%20(NEOGEO%20CD%20SINGLE%20GAME%20ARCADE)%20Work%20In%20Progress_iocero_2013_11_14_16_35_38_NeoGalEmu2.jpg

Dev upd: http://www.iocero.com/EventDetail.aspx?idEvent=27312

Ciao
BEY
RetroIsTheOnlyFuture!

16

idem le lien ne fonctionne pas ni sur Chrome ni sur IE ni mozilla
avatar
La Neo Geo CD à son site (en tout cas elle essaye...): http://neogeocdworld.info/
Le forum de la Neo Geo sur Yaronet: forums/264

Un petit site sur l'Atari Falcon avec plein de trucs bon pour votre poussin: http://falcon.ti-fr.com/

17

kuk (./16) :
idem le lien ne fonctionne pas ni sur Chrome ni sur IE ni mozilla


Try this --> http://www.2shared.com/file/7wbCd5cq/NGPhoenix_002.html
RetroIsTheOnlyFuture!

18

Oui c'est mieux
Je crame un Cd et je te dis
avatar
La Neo Geo CD à son site (en tout cas elle essaye...): http://neogeocdworld.info/
Le forum de la Neo Geo sur Yaronet: forums/264

Un petit site sur l'Atari Falcon avec plein de trucs bon pour votre poussin: http://falcon.ti-fr.com/

19

bon bonne nouvelle le jeu boot sur ma neo geo cd
Par contre c'est toujours aussi lent devil
avatar
La Neo Geo CD à son site (en tout cas elle essaye...): http://neogeocdworld.info/
Le forum de la Neo Geo sur Yaronet: forums/264

Un petit site sur l'Atari Falcon avec plein de trucs bon pour votre poussin: http://falcon.ti-fr.com/

20

kuk (./19) :
bon bonne nouvelle le jeu boot sur ma neo geo cd
Par contre c'est toujours aussi lent devil


Good news for me, now I'm shure that's executable run on real hardware (can you made a video, pls?).

Yes is very slow, I'm not be able to write a Z80 emu in assembler 68K but I'm working for a more efficient C code despite of 12Mhz cpu speed.
Render is already via hardware so i don't think it's possible make better...

Grazie
Ciao
BEY
RetroIsTheOnlyFuture!

21

i could try to make an video
avatar
La Neo Geo CD à son site (en tout cas elle essaye...): http://neogeocdworld.info/
Le forum de la Neo Geo sur Yaronet: forums/264

Un petit site sur l'Atari Falcon avec plein de trucs bon pour votre poussin: http://falcon.ti-fr.com/

22

kuk (./21) :
i could try to make an video



Relly thanks, is very important for me see pics/video result on real NeoGeo+TV for understand about quality rendering and good sprites scaling (1:1 pixels).
I don't sure about neoSDL emulator result.

Grazie
Ciao
BEY
RetroIsTheOnlyFuture!

23

i dont know if it's me but i see a low difference on the tv than the emulator
avatar
La Neo Geo CD à son site (en tout cas elle essaye...): http://neogeocdworld.info/
Le forum de la Neo Geo sur Yaronet: forums/264

Un petit site sur l'Atari Falcon avec plein de trucs bon pour votre poussin: http://falcon.ti-fr.com/

24

kuk (./23) :
i dont know if it's me but i see a low difference on the tv than the emulator



What kind of differences?
RetroIsTheOnlyFuture!

25

it's hard to explain, it's on the sprite rendering/aspect
like if all the pixel are not "present" like a probleme with the scan line
avatar
La Neo Geo CD à son site (en tout cas elle essaye...): http://neogeocdworld.info/
Le forum de la Neo Geo sur Yaronet: forums/264

Un petit site sur l'Atari Falcon avec plein de trucs bon pour votre poussin: http://falcon.ti-fr.com/

26

kuk (./25) :
it's hard to explain, it's on the sprite rendering/aspect
like if all the pixel are not "present" like a probleme with the scan line



Consider that in this case we don't have all MAME complex routine but only a "simple" emulation.

This is a very complex project in the end because I need a new Z80 emu core in 68K Assembler core and I can't be able to do this (maybe someone can help me).
12Mhz for the NeoGeo 68K CPU is a very little speed for arcade emulation, but if someone did code a Z80 core that could run at a few MHz on the Neo Geo, it would open the door for a *lot* of new arcade games for NeoGeo system!

This is only a first step...
RetroIsTheOnlyFuture!

27

27_NGDSGA%20(NEOGEO%20CD%20SINGLE%20GAME%20ARCADE)%20Work%20In%20Progress_iocero_2013_11_20_15_38_20_IMG_GENERAL2.jpg

Several optimization of Z80 core functions provides a significant speedup!
ISO DOWNLOAD -> http://www.2shared.com/file/FiASd2gG/NGPhoenix_004.html


the optimization phase continue..

Ciao
BEY
RetroIsTheOnlyFuture!

28

Test run on real NeoGeo CD hardware VIDEO-> http://www.iocero.com/player.aspx?iduserplaylist=2&idplaylist=7527&v=7Q6kby5HJ5c

I'm still working on Z80 core emu...

Ciao
BEY
RetroIsTheOnlyFuture!

29

Salut

pour info, la section 'neodev' du site spécialisé du Homebrew' PDROMS bouge un tout petit peu !

http://pdroms.de/news/neogeodev/
Si quelqu' un connais les personnes qui gèrent le site, il serait bien de les informer des projets Amateurs que nous connaissons ... cela pourrait interresser du monde !

Fred FRONT

30

salut tlm, effectivement j ai fait une pause mais je suis de retour, je traine sur l irc #neogeodev.