Show us yer programming projects!

Coders forum. Discuss techniques, swap code snippets, ask for help etc. relating to all forms of software development.
Post Reply
User avatar
evilpaul
Baaaa!
Baaaa!
Posts: 811
Joined: Wed Sep 29, 2004 2:01 pm 0
Location: #ukscene, helsinki branch
Contact:

Re: Show us yer programming projects!

Post by evilpaul »

yorgle wrote:Hi all.

Here's a little something I've been poking at for the past few days...
Image
Lovely idea :)
Are you planning on writing original games with it?

*edit*
I'm making it such that the "hardware" can easily be moved about in the memory space, so that I can make it compatible with pac-man or Pengo hardware, even though my goal is not to make an arcade emulator. In fact, I general practice, I will not be throttling the Z80 emulation to any specific speed, so it will likely not function properly as an arcade game emulator.
Jusr re-read that bit... so I guess not. Ace :)
User avatar
koogy
Baaa!
Baaa!
Posts: 475
Joined: Thu Aug 31, 2006 11:16 am 0

Re: Show us yer programming projects!

Post by koogy »

isn't the reason that there's no flash on iphone due to apple not wanting people running their own, unchecked code on it? isn't this doing the same thing?
User avatar
bloid
Baaaaaa!
Baaaaaa!
Posts: 4082
Joined: Wed Dec 17, 2003 3:12 pm 0
Location: Mancuniana

Re: Show us yer programming projects!

Post by bloid »

koogy wrote:isn't the reason that there's no flash on iphone due to apple not wanting people running their own, unchecked code on it? isn't this doing the same thing?
Officially, yes (and that's the reason there's no default "flash player")

But Apple are nothing if not inconsistent

SEGA's games are emulated apparently, as is the C64 emulator released for it. It seems you basically, submit your app, roll a d6, wait some months, get rejected, argue, get approved, get pulled off the appstore, kick up a storm on blogs and twitter, get re-accepted

http://www.electricpig.co.uk/2009/06/22 ... re-police/

Or, be SEGA

that's how it seems to be to me anyway (not tried, as the whole approval thing has put me off)

Indeed, there are 2nd gen frameworks for languages other than Objective-C which will compile your flash down to being a native app, but again, these are sometimes considered as running inside a VM, and blocked (and sometimes let through)

http://www.anscamobile.com/corona/
http://ejohn.org/blog/iphone-javascript-apps/

It's all a mess, hidden inside a black box
"What's there to lose?" said the general, selling our dead meat by the pound...
User avatar
BleuLlama
Baa!
Baa!
Posts: 38
Joined: Mon Sep 12, 2005 6:55 pm 0
Location: Rochester, NY, USA
Contact:

Re: Show us yer programming projects!

Post by BleuLlama »

evilpaul wrote:
yorgle wrote:Hi all.
Lovely idea :)
Are you planning on writing original games with it?

*edit*
I'm making it such that the "hardware" can easily be moved about in the memory space, so that I can make it compatible with pac-man or Pengo hardware, even though my goal is not to make an arcade emulator. In fact, I general practice, I will not be throttling the Z80 emulation to any specific speed, so it will likely not function properly as an arcade game emulator.
Jusr re-read that bit... so I guess not. Ace :)
Yep. I plan on probably finishing up my "Absurd" game, and possibly a few others.
http://umlautllama.com/projects/blgamekernel/
User avatar
BleuLlama
Baa!
Baa!
Posts: 38
Joined: Mon Sep 12, 2005 6:55 pm 0
Location: Rochester, NY, USA
Contact:

Re: Show us yer programming projects!

Post by BleuLlama »

koogy wrote:isn't the reason that there's no flash on iphone due to apple not wanting people running their own, unchecked code on it? isn't this doing the same thing?
Basically.

with the 2.0 OS/SDK, the terms of service said you could not download and run any code to be interpreted or emulated. The 3.0 TOS changed this to read that you can't do this unless you use Apple's published APIs - so grabbing javascript and running it in a web browser view is OK, but grabbing a Commodore 64 game and running that was not OK.

Although, the latter was true with 2.0 as well - with 2.0, it was worded such that you could have a Commodore 64 emulator, and that was fine, but you are not allowed to download or have the user install any program files after they got the app. You can include any code you want within the bundle though.

3.0 changed the meaning such that even this is a no-no... (not even LISP or LUA code can now be included with your game, which many use for game AI functions) although this seems to be overlooked by them on some reviewing, since you can't tell by looking at Doom if the player AI is handled by an interpeter, for example.

I'm doing this for the fun of it. If I can squeak in some of these apps past the reviewers, great. otherwise, oh well... jailbreak store i guess.
User avatar
Barney
Baaaaaa!
Baaaaaa!
Posts: 2131
Joined: Tue Aug 23, 2005 7:59 pm 0
Location: UK, Broughton, Brigg

Re: Show us yer programming projects!

Post by Barney »

A 256 colour speccy anyone?

Image


Whilst waiting to see if Dio comes up with anything with regards to the vertical stripe issue, I implemented this little gem in ZXSpin. And yes, your lowly 48k will be able to do this very soon. For real. You still get attribute clash, and it's 95% compatible with everything else out there for the speccy :)


Dio: I managed to fix the diagonal line! I subtracted 0.5 from all vertices in both x and y, and it's gone. God knows why it doesn't screw up the cards that were fine before, but I thank god that it doesn't. Result!
"Oh dear lord, I slightly soiled myself. Oxfam won’t be pleased."
User avatar
Dio
Sheepie Whore
Sheepie Whore
Posts: 18887
Joined: Mon May 31, 2004 1:08 pm 0
Location: Newcastle UK

Re: Show us yer programming projects!

Post by Dio »

I'd got the idea you were doing that before. In fact I'm sure I saw it in your code :D . But the only thing that matters is that it works.

The biggest problem with something like Emu is that there's so much to do I tend to hop about an awful lot. Last week it was the FM timeslice loader, then earlier this week I was working on video flushing and contention, and the last couple of days someone asked me about when I might let it out and I've been going back and trying to clean off the 'MUST DO THIS BEFORE RELEASE' list.

That's pretty good. How'd you manage to write all 32 bytes in one video line? I implemented PUSH rr for fast cls in the loaders - 16 bytes in the 128 contended cycles, 88 cycles for the remaining 16 bytes, but that only leaves 8 cycles - not enough to reset SP for the next line?

Or do you mean that you actually changed the video chip a bit? :D
User avatar
Devlin
Baaaaa!
Baaaaa!
Posts: 1380
Joined: Tue Aug 02, 2005 10:53 pm 0
XBL Gamertag: Anarkhis
Location: Bradford, Sacred Sod of God's Own County
Contact:

Re: Show us yer programming projects!

Post by Devlin »

Barney wrote:A 256 colour speccy anyone?

Image


Whilst waiting to see if Dio comes up with anything with regards to the vertical stripe issue, I implemented this little gem in ZXSpin. And yes, your lowly 48k will be able to do this very soon. For real. You still get attribute clash, and it's 95% compatible with everything else out there for the speccy :)


Dio: I managed to fix the diagonal line! I subtracted 0.5 from all vertices in both x and y, and it's gone. God knows why it doesn't screw up the cards that were fine before, but I thank god that it doesn't. Result!
Does that mean we'll be able to use those funky 256-colour patches that came with that Spec256 emulator?
User avatar
Barney
Baaaaaa!
Baaaaaa!
Posts: 2131
Joined: Tue Aug 23, 2005 7:59 pm 0
Location: UK, Broughton, Brigg

Re: Show us yer programming projects!

Post by Barney »

Dio wrote: That's pretty good. How'd you manage to write all 32 bytes in one video line? I implemented PUSH rr for fast cls in the loaders - 16 bytes in the 128 contended cycles, 88 cycles for the remaining 16 bytes, but that only leaves 8 cycles - not enough to reset SP for the next line?

Or do you mean that you actually changed the video chip a bit?
All that's required is an OUT instruction to change a palette value :) The Video chip (ULA) has at long last been reverse engineered by CSmith from WOS, and he - along with Andrew Owen - have developed a new plug-in ULA replacement which hopefully will be available for Speccy modders soon. It interested me, so I decided to see what it would be like emulated. It displays 64 colours from a palette of 256, and is almost completely compatible with the old ULA - all you're missing are the FLASH and BRIGHT bits in the attributes. INK and PAPER work the same way, so you still get attribute clash.

More info can be found here:

http://scratchpad.wikia.com/wiki/ZX_Spe ... olour_Mode
Devlin wrote: Does that mean we'll be able to use those funky 256-colour patches that came with that Spec256 emulator?
Unfortunately not. I don't have any specs on how this was done, so it's unlikely to end up in ZXSpin. This new ULA is an actual hardware project, and is possible to make - the 256 colour patches from other emulators weren't grounded in reality.
"Oh dear lord, I slightly soiled myself. Oxfam won’t be pleased."
User avatar
Dio
Sheepie Whore
Sheepie Whore
Posts: 18887
Joined: Mon May 31, 2004 1:08 pm 0
Location: Newcastle UK

Re: Show us yer programming projects!

Post by Dio »

Yeah, that's not a bad idea. Would have cost a fortune to add 64 regs to the existing hardware, of course :D .

These hardware counterfactuals are fun (if pointless) diversions - I have spent an interesting few hours messing about with how you could improve the video system on the ST for minimal cost too.
User avatar
sdetoni
Baaaaa!
Baaaaa!
Posts: 1368
Joined: Tue Jun 18, 2002 4:14 am 0
Location: New Sheepland

Re: Show us yer programming projects!

Post by sdetoni »

Image

Progressed a little more since a couple of week ago, ignore the rubbish sprites (just fillers). Finished my sprite multiplexer and appears quite stable for some particle effects.... just got to code them now ...

* Finished coding a simple pixel based collision detection algo, SDL helped out here, thanks SDLSprite.

* Finished a simple Bitblit algo. NDS could have really done with hardware with a BitBlit(), not sure why they left it out? Tile based sprites with predefined sizes can be limiting at times.

* Added a nifty feature which shows me CPU usage per frame, more red shown == bad.

* Implemented embedded file system, turn out harder than it should trying to get grit (image converter) to convert and output to the build file sys directory. Actually still doesn't work quite right...

* Fix/found a really nasty memory leak, took friggin hours to figure out. Turned out to be the way I was calling a parent constructor was wrong and was not initializing variables, specifically a certain pointer var. Using NDS hardware exception/cpu reg dump feature helped out here very nicely thank you, no$gba not so much.
User avatar
Dio
Sheepie Whore
Sheepie Whore
Posts: 18887
Joined: Mon May 31, 2004 1:08 pm 0
Location: Newcastle UK

Re: Show us yer programming projects!

Post by Dio »

sdetoni wrote:* Added a nifty feature which shows me CPU usage per frame, more red shown == bad.
If that's a simple palette switch, you've just reinvented colour bars, the oldest and still best way to profile a frame-per-frame app :D . Use multiple colours for different types of workload and you'll never need anything else.
User avatar
piku
Sheepie Whore
Sheepie Whore
Posts: 20960
Joined: Wed Apr 24, 2002 10:44 am 0
Website: Http://Www.ncot.uk
Location: Wakefield
Contact:

Re: Show us yer programming projects!

Post by piku »

Dio wrote:
sdetoni wrote:* Added a nifty feature which shows me CPU usage per frame, more red shown == bad.
If that's a simple palette switch, you've just reinvented colour bars, the oldest and still best way to profile a frame-per-frame app :D . Use multiple colours for different types of workload and you'll never need anything else.
Explain more please. Debugging software that runs at 60fps is quite quite difficult.
return (0);
User avatar
Dio
Sheepie Whore
Sheepie Whore
Posts: 18887
Joined: Mon May 31, 2004 1:08 pm 0
Location: Newcastle UK

Re: Show us yer programming projects!

Post by Dio »

This is about profiling, not debugging.

Back in the ST days, everyone's standard way of profiling was simple: write $ff8240 (background colour register) with a colour at the start of every routine. So, for example, on Starball the main table graphics blit was red, aligned block sprites were purple, arbitrary position sprites were blue, collisions were green, etc., and the point at which it goes black again indicates how much headroom you have.

You can get a good overview if you're spending your time where you thought you were, and it makes it easy to spot routines that have pathological cases that don't occur often.

I suppose it does marginally help debugging too - if it does drop dead, at least you know which routine it was in by the colour...
User avatar
Muttley
Sheepie Whore
Sheepie Whore
Posts: 13169
Joined: Thu Apr 25, 2002 12:30 pm 0
XBL Gamertag: Mu77ley
Location: In a maze of twisty passages, all alike.
Contact:

Re: Show us yer programming projects!

Post by Muttley »

Pre-ST too. I used to do that on the C64. :D
Muttley's Blog: Rarely updated, occasionally interesting… maybe
RetroRemakes Framework: Open Source BlitzMax Game Framework
MuttMod: My Open Source BlitzMax Modules
Post Reply