[Staff] Vinegar: CHIP-8/SCHIP interpreter ('emulator')

Here you can find side projects of the staff and great projects which we think should get extra support. (Note that featured products are not products of MaxCoderz)

Moderator: MaxCoderz Staff

User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

[Staff] Vinegar: CHIP-8/SCHIP interpreter ('emulator')

Post by benryves »

Yet another (*cough*) side project; this time it is a genuine side project as I only worked on it for a couple of days :)

Image
Download binaries for TI-83/TI-83+
Documentation

Vinegar is a simple CHIP-8/SCHIP interpreter with a range of options; it should run most CHIP-8 games fine. SCHIP games are cropped to 96x64 (pan-and-scan with the arrow keys) - I'm up for ideas on how to display the 128x64 screen! My quick-and-dirty scaling methods were very ugly, so I removed them from this beta.

Please note that because of the way this works it can potentially cause RAM clears. I have done my best to catch any errors, but this is still in beta. It does check all bounds before writing to memory, and has a built-in error system.

None of the games I have played with it have crashed my calculator, though. ;)
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

So ... many ... projects ... in ... such ... a ... short ... amount ... of ... time!

Very hard to keep up with you ben!

CHIP-8 is an awesome idea, i vaguely remember someone talking about it a while ago ... but maybe that was for GBA instead.

Wow! - There are a lot of games included! :).
Last edited by tr1p1ea on Mon 27 Feb, 2006 12:56 pm, edited 1 time in total.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

Really nice Ben, yeah I remember someone talk of this also. This looks amazing!
User avatar
GuillaumeH
Regular Member
Posts: 143
Joined: Fri 17 Dec, 2004 8:30 pm
Contact:

Post by GuillaumeH »

Awesome, this means a new wave of games is coming to our Tis :)
Good job benryves, you're really on fire these days.
User avatar
kv83
Maxcoderz Staff
Posts: 2735
Joined: Wed 15 Dec, 2004 7:26 pm
Location: The Hague, Netherlands
Contact:

Post by kv83 »

wow very nice :D
Image
User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

GuillaumeH wrote:Awesome, this means a new wave of games is coming to our Tis :)
The problem is that for SCHIP games, you can't see what you're doing :(
For some games (eg Ant) this isn't much of a problem. Joust can get annoying, as you start off screen. Blinky (the SCHIP version) is not great to play, either.
Note also that some of the ROMs included in the package are useless (X-Mirror, IIRC?). I just batch converted a load of them, most work but I haven't tried them all.

*shakes fist at TI for giving the 83 series 96-pixel wide screens*
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Like I spammed in the Emerson thread: Bloody amazing! :)
I think you've already earned the titles "best programmer" and "most active programmer" for 2006 :P
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

Timendus wrote:I think you've already earned the titles "best programmer" and "most active programmer" for 2006 :P
Heh, thank you :)

One thing I have noticed; I've been looking for some more documentation on CHIP8 (for better information about the way it works) - according to this site, FX55 and FX65 need to modify I; they don't in my implementation.

I'd also like to rewrite the sprite routines; they're currently mutilated versions of ionPutSprite and ionLargeSprite, and don't wrap in the same way as most PC implementations do.

A CHIP-8/SCHIP interpreter is not a difficult project, but I wanted to give it a go as a bit of fun. :)
User avatar
kv83
Maxcoderz Staff
Posts: 2735
Joined: Wed 15 Dec, 2004 7:26 pm
Location: The Hague, Netherlands
Contact:

Post by kv83 »

What consoles/pc's did use chip-8?
Image
User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

kv83 wrote:What consoles/pc's did use chip-8?
Originally, COSMAC VIP and Telmac 1800.
However, the SCHIP extensions were developed for the HP48, and since then there has been an interpreter for pretty much every platform under the sun, though it appears that the only TI one was for the TI-85, by Andreas Ess.
The TI-85 has a 128x64 display, so has the benefit of not having to crop the display and can double the pixel size for the regular CHIP-8 mode to implement half-pixel scrolling.
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

Well none the less, this is a great job! Btw could you not just adapt the screen size to fit that of the 83+? Like instead of using the way you have it, nake it where the screen is full. So when your playing joust you could just "blow" up the screen. I am unsure if I am making myself clear...Let me know if I am not.
User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

kalan_vod wrote:Well none the less, this is a great job! Btw could you not just adapt the screen size to fit that of the 83+? Like instead of using the way you have it, nake it where the screen is full. So when your playing joust you could just "blow" up the screen. I am unsure if I am making myself clear...Let me know if I am not.
Do you mean scaling (shrinking) the screen?
I tried using 3 different approaches; setting the LCD into 6bpp mode and shifting each byte right was very ugly but fast; doing a full scale "proper" was very slow and still very ugly (both methods lose pixels). The best looking method was to scale the entire thing down to 50%, but add an offset of either one x or one y (so four different frames) each loop, creating a flickery greyscale view. For some games this looked OK, for others (such as Ant) it made the graphics a horrible mess.
In the end, I removed that code completely and just use the pan-and-scan method.
One method I haven't tried would be to work out where the last sprite was drawn, and to scroll the screen towards it if it was off-screen.
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

Well I just meant that could you fill the screen. Like not shrinking it 50% but shrinking it 75% or so?
User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

kalan_vod wrote:Well I just meant that could you fill the screen. Like not shrinking it 50% but shrinking it 75% or so?
That's what I tried. The problem is that you lose pixels in doing so; if you look at the SCHIP "Blinky" (Pacman) you'll see the dots and walls are one pixel thick and they end up being erased.
CoBB
MCF Legend
Posts: 1601
Joined: Mon 20 Dec, 2004 8:45 am
Location: Budapest, Absurdistan
Contact:

Post by CoBB »

Blasphemy! Screenshot made with TISShot! :P
Post Reply