coding on PacMan arcade machine using ZX-Basic Compiler

A place for people with an interest in developing new shmups.
Post Reply
User avatar
nitrofurano
Posts: 7
Joined: Wed Oct 01, 2014 9:06 pm
Location: Portugal
Contact:

coding on PacMan arcade machine using ZX-Basic Compiler

Post by nitrofurano »

months ago i tried to use Boriel’s ZX-Basic Compiler for compiling homebrew roms for PacMan arcade hardware:
https://dl.dropboxusercontent.com/u/795 ... orking.zip

the problem is that is only partially working - i can poke on the display area, but i can't use variables on ram - where would be the problem? am i setting the stack on the wrong place? would be there interrupt issues?

thanks in advance! :)
User avatar
ciox
Posts: 1008
Joined: Sun Feb 12, 2012 5:29 pm
Location: Romania

Re: coding on PacMan arcade machine using ZX-Basic Compiler

Post by ciox »

That's so weird that you can run an interpreted language on arcade hardware, how come it works? From what I remember BASIC used to take up a decent amount of ROM/RAM and was no good for coding games (terrible performance) so I'd expect there to be pressure for it to be taken out of arcade hardware. Maybe this happened partially and they removed its memory access while using a bare bones version of it for some obscure purpose.
Well, can't help you but good luck with this interesting endeavour.
rfeese
Posts: 30
Joined: Fri Nov 15, 2013 4:56 pm

Re: coding on PacMan arcade machine using ZX-Basic Compiler

Post by rfeese »

@ciox: He's using a compiler so presumably he is running machine code on the hardware, not an interpreter.

This sounds like an interesting project. I'm not sure how you're working right now, but I would think you would want to look into using the MAME debugger and dive into the machine/assembly code a bit. It may be helpful to debug some existing roms to understand what they are doing. I think there are probably some people here with more knowledge in this area so hopefully they will comment.
User avatar
trap15
Posts: 7835
Joined: Mon Aug 31, 2009 4:13 am
Location: 東京都杉並区
Contact:

Re: coding on PacMan arcade machine using ZX-Basic Compiler

Post by trap15 »

Really, I'd just dump using BASIC at all. You're not really going to be able to do stuff on that hardware without using assembly anyways.
@trap0xf | daifukkat.su/blog | scores | FIRE LANCER
<S.Yagawa> I like the challenge of "doing the impossible" with older hardware, and pushing it as far as it can go.
User avatar
nitrofurano
Posts: 7
Joined: Wed Oct 01, 2014 9:06 pm
Location: Portugal
Contact:

Re: coding on PacMan arcade machine using ZX-Basic Compiler

Post by nitrofurano »

yes, it's compiled, not interpreted - and we can code in pure assembly there (we just need to put everything between "asm" and "end asm") - this way, we can create functions and subroutines in assembly as we can do in basic, put assembly code anywhere we want on the code, etc.

what this cross-compiler does is to convert the basic into assembly, and then compile the assembly

about coding rom files, i were successful on creating for Sega SG1000 (there are arcade machines using this hardware), Sega Master System (Sega System-E is based on it), and Sega Game Gear, as well MSX (1, 2, 2+, and v9990 display modes), ColecoVision, Amstrad GX4000 console (based on CPC+), etc. - some of them can be find at http://www.boriel.com/wiki/en/index.php ... R_HARDWARE

and the particular case of these Sega machines, their roms starts at $0000, just like PacMan arcade machine (i think), so i guess would be something related to z80 interrupts (like $38 and etc. ), but i found nothing strange there - and i don't know if i'm setting the variables in ram in the wrong place, and the stack address as well

(i never used Mame debugger, i have no idea how it works! :D )

btw, about assemblers, i'm interested in any help that i could compile on Pasmo (for example) - actually, that .asm files i used to share with the source is generated from Boriel's ZX-Basic Compiler, for some kind of debugging purpose

and thanks! :)
User avatar
nitrofurano
Posts: 7
Joined: Wed Oct 01, 2014 9:06 pm
Location: Portugal
Contact:

Re: coding on PacMan arcade machine using ZX-Basic Compiler

Post by nitrofurano »

it actually works, Jim Bagley (he made PacManicMinerMan for this hardware as well) helped me a bit there, i didn't know what is that Watchdog for: http://www.boriel.com/forum/post5356.html#p5356
User avatar
nitrofurano
Posts: 7
Joined: Wed Oct 01, 2014 9:06 pm
Location: Portugal
Contact:

Re: coding on PacMan arcade machine using ZX-Basic Compiler

Post by nitrofurano »

i have some news! 10 arcade machines are now supported, and soon i hope doing something for more 75! :) - this was the last one up to now http://www.boriel.com/wiki/en/index.php ... ms_-_Tecmo
Post Reply