craiganderson Posted April 20, 2017 Share Posted April 20, 2017 i can upload to share if anybody wants it emulator= fish and chips launching via RocketLauncher https://en.wikipedia.org/wiki/CHIP-8 CHIP-8 is an interpreted programming language, developed by Joseph Weisbecker. It was initially used on the COSMAC VIP and Telmac 1800 8-bitmicrocomputers in the mid-1970s. CHIP-8 programs are run on a CHIP-8 virtual machine. It was made to allow video games to be more easily programmed for said computers. Roughly twenty years after CHIP-8 was introduced, derived interpreters appeared for some models of graphing calculators (from the late 1980s onward, these handheld devices in many ways have more computing power than most mid-1970s microcomputers for hobbyists). An active community of users and developers existed in the late 1970s, beginning with ARESCO's "VIPer" newsletter whose first three issues revealed the machine code behind the CHIP-8 interpreter.[1] Contents [hide] 1CHIP-8 applications 2CHIP-8 today 3Virtual machine description 3.1Memory 3.2Registers 3.3The stack 3.4Timers 3.5Input 3.6Graphics and sound 3.7Opcode table 4Notes 5Additional Resources CHIP-8 applications[edit] There are a number of classic video games ported to CHIP-8, such as Pong, Space Invaders, Tetris, and Pac-Man. There's also a random maze generator available. These programs are reportedly placed in the public domain, and can be easily found on the Internet. CHIP-8 today[edit] There is a CHIP-8 implementation for almost every platform, as well as some development tools. Despite this, there are only a small number of games for the CHIP-8. CHIP-8 has a descendant called SCHIP (Super Chip), introduced by Erik Bryntse. In 1990, a CHIP-8 interpreter called CHIP-48 was made for HP-48 graphing calculators so that games could be programmed more easily. Its extensions to CHIP-8 are what became known as SCHIP. It features a larger resolution and several additional opcodes which make programming easier. If it were not for the development of the CHIP-48 interpreter, CHIP-8 would not be as well known today. The next most influential developments (which popularized S/CHIP-8 on many other platforms) were David Winter's emulator, disassembler, and extended technical documentation. It laid out a complete list of undocumented opcodes and features, and was distributed across many hobbyist forums. Many emulators had these works as a starting point. While CHIP-8 and SCHIP have commonly been implemented as emulators, a pure hardware implementation (written in the Verilog language) also exists for certain FPGA boards. Virtual machine description[edit] Memory[edit] CHIP-8 was most commonly implemented on 4K systems, such as the Cosmac VIP and the Telmac 1800. These machines had 4096 (0x1000) memory locations, all of which are 8 bits (a byte) which is where the term CHIP-8 originated. However, the CHIP-8 interpreter itself occupies the first 512 bytes of the memory space on these machines. For this reason, most programs written for the original system begin at memory location 512 (0x200) and do not access any of the memory below the location 512 (0x200). The uppermost 256 bytes (0xF00-0xFFF) are reserved for display refresh, and the 96 bytes below that (0xEA0-0xEFF) were reserved for call stack, internal use, and other variables. In modern CHIP-8 implementations, where the interpreter is running natively outside the 4K memory space, there is no need for any of the lower 512 bytes memory space to be used, but it is common to store font data in those lower 512 bytes (0x000-0x200). Registers[edit] CHIP-8 has 16 8-bit data registers named from V0 to VF. The VF register doubles as a flag for some instructions, thus should avoid using. In addition operation VF is for carry flag. While in subtraction, it is the "not borrow" flag. In the draw instruction the VF is set upon pixel collision. The address register, which is named I, is 16 bits wide and is used with several opcodes that involve memory operations. The stack[edit] The stack is only used to store return addresses when subroutines are called. The original 1802 version allocated 48 bytes for up to 12 levels of nesting; modern implementations normally have at least 16 levels. Timers[edit] CHIP-8 has two timers. They both count down at 60 hertz, until they reach 0. Delay timer: This timer is intended to be used for timing the events of games. Its value can be set and read. Sound timer: This timer is used for sound effects. When its value is nonzero, a beeping sound is made. Input[edit] Input is done with a hex keyboard that has 16 keys which range from 0 to F. The '8', '4', '6', and '2' keys are typically used for directional input. Three opcodes are used to detect input. One skips an instruction if a specific key is pressed, while another does the same if a specific key is not pressed. The third waits for a key press, and then stores it in one of the data registers. Graphics and sound[edit] Original CHIP-8 Display resolution is 64×32 pixels, and color is monochrome. Graphics are drawn to the screen solely by drawing sprites, which are 8 pixels wide and may be from 1 to 15 pixels in height. Sprite pixels that are set flip the color of the corresponding screen pixel, while unset sprite pixels do nothing. The carry flag (VF) is set to 1 if any screen pixels are flipped from set to unset when a sprite is drawn and set to 0 otherwise. This is used for collision detection. As previously described, a beeping sound is played when the value of the sound timer is nonzero. Opcode table[edit] CHIP-8 has 35 opcodes, which are all two bytes long and stored big-endian. The opcodes are listed below, in hexadecimal and with the following symbols: NNN: address NN: 8-bit constant N: 4-bit constant X and Y: 4-bit register identifier PC : Program Counter I : 16bit register (For memory address) (Similar to void pointer) 3 Quote Link to comment Share on other sites More sharing options...
CriticalCid Posted April 21, 2017 Share Posted April 21, 2017 Woah, that’s some really obscure stuff you have going on there. It’s great to see that there’s someone out there who tackles this kind of platforms. If you want you can upload your creations to the download section. I can imagine that there will be a handful of enthusiast who will appreciate it 1 Quote Link to comment Share on other sites More sharing options...
Massatomic Posted April 22, 2017 Share Posted April 22, 2017 very cool, I just had a look into it. What did you use as your media? I am interested if you could upload a media pack to the download section 1 Quote Link to comment Share on other sites More sharing options...
craiganderson Posted April 22, 2017 Author Share Posted April 22, 2017 (edited) Here is the chip-8 stuff. I do not know how to upload to this forum yet....... (let me know if i forgot to include anything) (i am launching vie ROCKETLAUNCHER. The Emulator is FISHandChips (and is included in download) The emulator (FISH AND CHIPS) should be set to MODE:SCHIP. Goto EDIT --> MODE https://mega.nz/#F!OwB12bZC!bz47A8DG_0jcMf7vdIpgsg Edited April 22, 2017 by craiganderson 1 Quote Link to comment Share on other sites More sharing options...
Massatomic Posted April 23, 2017 Share Posted April 23, 2017 thanks craig, I played with it a little last night before you uploaded with a few roms, seems fish and chips works fine straight from launchbox 1 Quote Link to comment Share on other sites More sharing options...
craiganderson Posted April 23, 2017 Author Share Posted April 23, 2017 5 hours ago, massatomic said: thanks craig, I played with it a little last night before you uploaded with a few roms, seems fish and chips works fine straight from launchbox good to know. i like using RocketLauncher because it does some nice things like hiding the desktop, bezels, fades (if you want them.) just fyi........here is the how i send my commands to RocketLauncher Quote Link to comment Share on other sites More sharing options...
craiganderson Posted April 23, 2017 Author Share Posted April 23, 2017 5 hours ago, massatomic said: thanks craig, I played with it a little last night before you uploaded with a few roms, seems fish and chips works fine straight from launchbox Did you have to add any unique command line options? if so...please share. thanks Quote Link to comment Share on other sites More sharing options...
Massatomic Posted April 24, 2017 Share Posted April 24, 2017 nup, nothing special no default commands or anything, easy setup really I might have to look at RL, I really don't want to add another layer to LB but I do really want bezels Quote Link to comment Share on other sites More sharing options...
craiganderson Posted April 27, 2017 Author Share Posted April 27, 2017 RocketLauncher is awesome....once you get to know it! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.