Jump to content
IGNORED

Chip8 emulator version 1.0


pirx

Recommended Posts

Hi!

 

This is possibly the final (or close to final) version of my Chip8 and SuperChip8 emulator. This time almost all games are instantly playable because I mapped various keyboard settings to our favourite Atari game controller (joystick that is).

 

Other changes include:

 

; Added sound emulation

; Configured all games for use with joystick

; Adjusted emulation speed for (almost) all games

; Removed faulty game X_MIRROR (this file was corrupt)

; Added configuration file

; Added joystick mapping to Chip8 keys

; Fixed directory listing under SpartaDos (X). It runs from HDD now.

; Fixed inversed shooting - it shoots correctly when a key is pressed.

; Reduced flickering a bit in Chip8 mode

; Fixed faulty scrolling routines (ANT is perfectly playable now!)

 

Right now this is the best Chip8 emulator known to me :). Too bad most of old games are lost on tapes of the pre-internetian era.

 

Please let me know if you find any faults in this software or if you find any not included games for Chip8.

 

If anyone is interested, I will release sources, too.

 

Have fun!

Edited by pirx
  • Like 2
Link to comment
Share on other sites

but are you sure that the 800 is fast enough to do that?

 

Well, it would be too slow for the real, fully-blown emulation, but it might be possible to run recompiled Pokemon Mini games on 800.

 

Let me explain this concept in greater detail: some 15 years ago I came up with the idea of emuler (one of the neologisms I loved to make up these days).

Emuler is a set of utilities that gets software written for one machine, disassembles it, detects data areas, translates mnemonics from one microprocessor to another and assembles an executable for another machine.

My source platform was meant to be ZX Spectrum (I bought one with Btronic to test this concept), destination platform would be Atari 800 of course. I wrote down some algorithms but later we shifted to making C64 conversions where this whole idea was not feasible due to serious differences between A800 and C64 (first of all sprites, attributes and character set lengths, not speaking about sound). So our C64 conversions were programmed from scratch using C64 graphics only.

 

Another problem that came up when analyzing Z80 code was self-modifying code that sometimes pops up, but this would be not a case for ROM based machines, like Pokemon Mini.

 

Of course this task would be VERY difficult (being possibly the most difficult thing I ever did on A800), but seems feasible but one small detail - memory usage. Pokemon Mini uses the whole 64 KB with one small empty space where stack is meant to be and juggling with 130XE+ banks would definitely slow down the whole thing a lot, not mentioning 20-bit data addressing.

 

To prove the emuler idea is not as preposterous as one could think we manually converted Power Depacker from Amiga to A800 in this fasion:

I made MAC65 macros for all M68K menmonics used in Power Packer and then we just copied mnemonic for mnemonic the Amiga routine to A800. I worked at FIRST run. Of course later Nosek/BC did the same routine in pure 6502 code making it shorter and run faster.

Edited by pirx
Link to comment
Share on other sites

There's some problem during loading the game on real machine. The load suddenly stops.

 

Thanks Miker for this report. Could someone check if the previous version (beta) loaded fine on the real A800?

 

Unfortunately I do not have the real stuff available and emulator seems to be too forgiving.

Link to comment
Share on other sites

  • 3 weeks later...
? really written in Mac/65?

 

Well, no - I have assembled it with OMC65 that is meant to be compatible with MAC (but is not, unfortunately).

It should assemble under MAC65, though, after very few adjustments like removing .rept directive.

 

If I happen to do something new on A800 I would rather choose ATASM

http://sourceforge.net/projects/atasm/

It is much better than OMC65 in terms of compatibility (besides one unpleasant feature of not accepting dots "." in names of macros and labels).

 

You can download OMC65 from the web page listed in my footer.

  • Like 1
Link to comment
Share on other sites

  • 16 years later...

not a bad idea at all, but it would be great to get some help in selecting them, some do not work, some are duplicates, etc. (from what I remember)

 

also my interpreter maps keys to a joystick, so a mapping would be super nice

Edited by pirx
Link to comment
Share on other sites

All the games does work as they have been tested with Emma 02. Some had bugs but Marcel (the author of Emma 02) has corrected them. Almost all the games

have a ".txt" file which usually gives a small description of the game and which keys does what based on the original hex pad on the Cosmac VIP. The best would

try them and select the best games to put with your emulator. I would love to help out but i don't have much spare time (like 1-2 hours per week).

  • Like 1
Link to comment
Share on other sites

@slydc i looked again at the archive and it is very nice indeed! And my interpreter runs also super chip 8, so like 400 gamies could be there 😮

1-2 hours per week is just about perfect, we are not fighting for a deadline anyway. 

and who knows, maybe it won't be a big deal to add emulation of the other extended formats.

anyways, i'll scrap a bit of time and revive the project in github https://github.com/pkali/Chip-8

 

the most important file is https://github.com/pkali/Chip-8/blob/master/CHIP8.CFG

it contains mapping of the keys to a joystick, this was quite time consuming task, so I will be super happy to get any help here.

I could also add mapping to the second controller, I've noticed some 2plr games there.

Edited by pirx
  • Like 1
Link to comment
Share on other sites

  • 3 months later...

@pirx Hi Pawel,

 

thank you very much for the CHIP-8 interpreter.

 

I'm currently writing an article on CHIP-8 for the upcoming ABBUC magazine (June 2023). An English translation of the article will be available for free on AtariWiki.

 

I would like to include the CHIP-8 interpreter on the magazine disk, if that is permitted (there is no licensing information on the Github repo).

 

My hope is to spark some interest on CHIP-8 so that more programs are written or adapted for the Atari CHIP-8 interpreter. I'm creating a page in the AtariWiki with information on CHIP-8 and information an all CHIP-8 programs that have been successfully tested on the Atari CHIP-8 interpreter.

 

I've also tried to assemble the CHIP-8 interpreter from source with "omc", but failed (Phase error in "fr55", I've opened in issue on Github). Maybe you have an idea what is causing this issue. A port of the sources to MADS as you hinted in January would be great.

 

Greetings

 

Carsten

  • Like 4
Link to comment
Share on other sites

On 1/15/2006 at 9:44 AM, pirx said:

Let me explain this concept in greater detail: some 15 years ago I came up with the idea of emuler (one of the neologisms I loved to make up these days).

Emuler is a set of utilities that gets software written for one machine, disassembles it, detects data areas, translates mnemonics from one microprocessor to another and assembles an executable for another machine.

My source platform was meant to be ZX Spectrum (I bought one with Btronic to test this concept), destination platform would be Atari 800 of course. I wrote down some algorithms but later we shifted to making C64 conversions where this whole idea was not feasible due to serious differences between A800 and C64 (first of all sprites, attributes and character set lengths, not speaking about sound). So our C64 conversions were programmed from scratch using C64 graphics only.

 

 

Wow your description of Emuler from 15 years ago about an idea you had 15 years before in 1992 is very similar to the design concept I used for my Commodore 64 Atari 2600 Emulator GameLoader (recent sound example). Part emulator and part source translator, it creates a standalone prg binary.

 

Does the A8 CHIP-8 emu work this way creating a native A8 binary from CHIP-8 instructions? 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...