FAQ  •  Register  •  Login

about to start something to pacman-namco (arcade machine)

<<

nitrofurano

Posts: 349

Joined: Thu Sep 29, 2011 12:44 pm

Location: Porto, Portugal

Post Mon Sep 17, 2012 4:17 pm

about to start something to pacman-namco (arcade machine)

I were starting to create files with random or hex-edited content similar to pacman.zip (mame), and also using the information from - http://www.ascotti.org/programming/pie/hardware.htm - and i'm starting to know how this machine works (but i didn't start to code anything yet on zxbasic-compiler for that)

(overally, pacman.6e , *.6f, *.6h and *.6j are 4 4kb files for the program (a 16kb limit splitted into 4), pacman.5e is the character set (4kb), pacman.5f is the sprite set (4kb), 82s123.7f the palette (32 bytes - it's from a colourspace similar used on msx2-screen8 or UzeBox ), and 82s126.4a the clut (how the palette is arranged in groups of 4 colours - 256 bytes) - and i think 82s126.1m and *.3m are related to sound (256 bytes each) )

This machine seems to be not that plenty of ram memory (it's an arcade machine from 1980), around 4kb at most, which 2k is for displaying patterns (and the bitmaps (background patterns (8x8 characters), sprites (16x16) ) are stored in 8kb of rom somewhere else)

So, it seems that almost 2k of free ram makes it difficult to deal with the stack point, isn't it? and anyway, must we set that into a specific area, like 0x07EF, before the code starts? how much ram much we count with like on a regular use of functions and routines, and which care must we have?
<<

nitrofurano

Posts: 349

Joined: Thu Sep 29, 2011 12:44 pm

Location: Porto, Portugal

Post Tue Sep 18, 2012 2:37 pm

Re: about to start something to pacman-namco (arcade machine

The whole first experiment is in the attachment here in this message.
For some reason, i may be doing something wrong in this example01.zxb

  Code:
'- i really don't know if there is some stack issue, and if we can solve this way
asm
  ld sp,$07EF
  end asm

dim i as uinteger at $4800
dim x as uinteger at $4802

'- this should put some characters on the pattern display area
for i=0 to 255
  poke $4040+i,i
  poke $4440+i,i
  next

'- this should move a sprite on the screen
loop01:
for i=0 to 63
  for x=0 to 255
    poke $4FF0,i*4 '- shape sprite 0
    poke $4FF1,i   '- clut? sprite 0
    poke $5060,x   '- x sprite 0
    poke $5061,128 '- y sprite 0
    '- waitvbl
    asm
      halt
      end asm
    next:next
goto loop01


the result of the character map, sprite sheet, clut and palette seems good enough (you can see when pressing 'f4' on mame (at least on old version of mame) - and browse them with cursor keys ), but the code itself seems to be not running at all...
Attachments
example01_pacman_mame_zxbasic.zip
(31.42 KiB) Downloaded 102 times
<<

slenkar

Posts: 282

Joined: Sun Feb 13, 2011 3:33 am

Location: Kentucky US, used to be Birmingham UK

Post Tue Sep 18, 2012 5:33 pm

Re: about to start something to pacman-namco (arcade machine

1.u crazy

2.did you run the compiler with the right option to reduce the stack?

-H HEAP_SIZE, --heap-size=HEAP_SIZE
Sets heap size in bytes (default 4768 bytes)

e.h. -H 100
<<

nitrofurano

Posts: 349

Joined: Thu Sep 29, 2011 12:44 pm

Location: Porto, Portugal

Post Tue Sep 18, 2012 6:48 pm

Re: about to start something to pacman-namco (arcade machine

slenkar wrote:1.u crazy


thank you! \o/

2.did you run the compiler with the right option to reduce the stack?

-H HEAP_SIZE, --heap-size=HEAP_SIZE
Sets heap size in bytes (default 4768 bytes)

e.h. -H 100


nope... and i didn't know what that was at all - btw, i tried now with both '-H 100' and '--heap-size=100' - weird is the resulting asm file (for trying to see what is happening) says the heap size is 0 then?

and it is still not working anyway ( new attachment available here as well, for testing and seeing what may be happening)
Attachments
example01_pacman_mame_zxbasic_02.zip
(31.44 KiB) Downloaded 113 times
<<

nitrofurano

Posts: 349

Joined: Thu Sep 29, 2011 12:44 pm

Location: Porto, Portugal

Post Mon Oct 06, 2014 6:04 pm

Re: about to start something to pacman-namco (arcade machine

updated - for-next loops seems to work fine, but i'm struggling on interrupts (halt for vblank delays), and delay from bc register decrement is not working as expected (interrupt issue as well?)
Attachments
example04a_startingtowork.zip
(104.12 KiB) Downloaded 82 times
<<

nitrofurano

Posts: 349

Joined: Thu Sep 29, 2011 12:44 pm

Location: Porto, Portugal

Post Tue Oct 07, 2014 4:37 pm

Re: about to start something to pacman-namco (arcade machine

updated again, Jim Bagley helped me on recalling the Watchdogs issue - i still struggle on figuring out what it really does, but it is working fine now! thanks Jim! :) (anyway, it's a mystery for me not needing halt for vblank delay there - how weird machine is this! :D )
Attachments
example04c_startingtowork.zip
(109.42 KiB) Downloaded 123 times

Return to Wishlist

Who is online

Users browsing this forum: No registered users and 2 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.

phpBB SEO