Galaksija

Discussion about other targets
Post Reply
RobertK
Well known member
Posts: 224
Joined: Mon Feb 26, 2018 12:58 pm

Galaksija

Post by RobertK »

There was only this locked thread on the Galaksija computer, so I'm starting a new one.

I am trying to compile a Galaksija Plus hires version of the dstar.c game. I have added these modifications...

Code: Select all

#if defined(__GALPLUSHIRES__)
	#include <sys/ioctl.h>		// required for switching the screen mode
#endif

[...]

void main()
{
	
  #if defined(__GALPLUSHIRES__)
	int mode;
	mode=1;
	console_ioctl(IOCTL_GENCON_SET_MODE, &mode);	// switch to hires mode
  #endif
	
	Level = (STARTLEV-1);
	SetupLevel(); /* Display the first level */

	/* Loop keyhandler till you finished the game */
	while (CheckNotFinished())
	  Gamekeys();
  
  #if defined(__GALPLUSHIRES__)
	mode=0;
	console_ioctl(IOCTL_GENCON_SET_MODE, &mode);	// switch to text mode
  #endif  

}
...and compiled it like this...

Code: Select all

zcc +gal -subtype=galaxyp -create-app -pragma-redirect:fputc_cons=fputc_cons_generic -Dspritesize=16 -pragma-redirect:CRT_FONT=_font_8x8_bbc_system dstar.c -o dstar -D__GALPLUSHIRES__
(the font is probably not required here, as the game has no text output)

...and basically it's working, the screen looks good, but keyboard input does not work proberly. Same on the standard Galaksja model (-Dspritesize=4). Keys G and H are working, but the directional controls (QAOP) are not.

When I compile with the 2018-07-04 version, keyboard input is fine. I tried the earlier versions when Galaksija Plus support was added (8 January 2020), but the keyboard problem is already present there.

Please check what could be wrong here...
User avatar
dom
Well known member
Posts: 1409
Joined: Sun Jul 15, 2007 10:01 pm

Re: Galaksija

Post by dom »

I'm surprised that was the only thread, we must have done the Galaxy+ work off forum.

Anyway, I've now tracked this down to a missing export of xorpixel in the Galaksija library. I've checked other machines and it looks like the sv8000 and lviv were similarly affected. All have now been corrected.

I've not tried your Galaxy+ code - I'll let you have the joy of first light for that one!
RobertK
Well known member
Posts: 224
Joined: Mon Feb 26, 2018 12:58 pm

Re: Galaksija

Post by RobertK »

Now keyboard input is working fine, thanks!

Sprite movement is a little slow, but it's good like that, it makes you plan your moves better instead of randomly moving across the room.

The half row of blocks at the right edge is an emulation bug in MAME, it replicates the pixel rows from the left edge there.

GalaksijaPlus_DStar.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
dom
Well known member
Posts: 1409
Joined: Sun Jul 15, 2007 10:01 pm

Re: Galaksija

Post by dom »

I suspect that an optimised putsprite would improve the performance somewhat - at the moment it will be setting individual pixels but in the + mode we could manipulate the display bitmap directly.

It’s working though - that’s great!
Post Reply