Search the Community
Showing results for tags 'Programming'.
-
Well, other consoles have such a thread. Since this is supposed to be an open console, it'll need one too. Put plans & progress here.
- 4 replies
-
- 1
-
- programming
- development
-
(and 1 more)
Tagged with:
-
Hey! New here I have just started learning intybasic from Oscar's book, and I do have a basic understanding of Basic programming. In the examples folder for IntyBasic, I was trying to decipher how intyPak works. Just wondering if someone can break down for me what exactly this code is doing? IF dir = 0 THEN #c = PEEK($0201+X1/8+Y1/8*20):IF #c <> (BG06+FG_YELLOW) AND #c <> 0 THEN dir = 4 IF dir = 1 THEN #c = PEEK($01FF+X1/8+Y1/8*20):IF #c <> (BG06+FG_YELLOW) AND #c <> 0 THEN dir = 4 IF dir = 2 THEN #c = PEEK($01EC+X1/8+Y1/8*20):IF #c <> (BG06+FG_YELLOW) AND #c <> 0 THEN dir = 4 IF dir = 3 THEN #c = PEEK($0214+X1/8+Y1/8*20):IF #c <> (BG06+FG_YELLOW) AND #c <> 0 THEN dir = 4 Thanks for any help! Brian
-
My attempt to System Off in Millfork: java -jar $HOME/Programs/Millfork/millfork.jar -Xr -t a8 your_code.mfk // ================================================ // // antic_nmien = $40 // // %01000000 $40 VBI // %10000000 $80 DLI // %11000000 $c0 VBI + DLI // // ================================================ // // pia_portb = $fe // // PORTB_BASIC_OFF + PORTB_SELFTEST_OFF + %01111100 // // PORTB_SELFTEST_OFF = %10000000; portb bit value to turn Self-Test off // PORTB_BASIC_OFF = %00000010; portb bit value to turn Basic off // PORTB_SYSTEM_ON = %00000001; portb bit value to turn System on // // ================================================ byte nmien = $c0 byte rti @ $15 // default routine for VBI & DLI word vbivec @ $10 // vector for VBI word vdslst @ $16 // vector for DLI // simple display list; LMS = $e000 const array(byte) dl align(32) = [ $70,$70,$70, $42,$00,$e0,2,2,$f0,2,2,2,$f0,2,2,2, $41,@word[dl.addr] ] // init procedure void system_off(){ asm { sei } // turn off IRQ antic_nmien = 0 // turn off NMI pia_portb = $fe // turn off ROM rti = $40 // set RTI opcode vbivec = rti.addr // set address for VBI routine vdslst = rti.addr // set address for DLI routine os_NMIVEC = nmi.addr // set address for custom NMI handler antic_nmien = nmien } // custom NMI handler asm void nmi(){ bit antic_nmist // test nmist bpl .vblclock // if 7-bit not set handle VBI jmp (vdslst) // indirect jump to DLI routine .vblclock: // RTCLOK maintainer inc os_RTCLOK.b2 bne .tickend inc os_RTCLOK.b1 bne .tickend inc os_RTCLOK.b0 .tickend: jmp (vbivec) // indirect jump to VBI routine } // example dli interrupt asm void dli_first(){ pha lda #$2a sta gtia_colpf2 sta antic_wsync lda #<dli_second.addr sta vdslst.lo lda #>dli_second.addr sta vdslst.hi pla rti } // example dli interrupt void dli_second(){ gtia_colpf2 = $de antic_wsync = $de vdslst = dli_first.addr } // wait for VBLANK asm void pause() { lda os_RTCLOK.b2 .rt_check: cmp os_RTCLOK.b2 beq .rt_check rts } // wait 0-255 frames noinline asm void wait(byte register(a) f) { clc adc os_RTCLOK.b2 .rt_check: cmp os_RTCLOK.b2 bne .rt_check rts } // example vbi interrupt void vbi(){ gtia_colpf2 = os_RTCLOK.b2 } // main procedure void main(){ system_off() // turn off OS wait(100) // waint 2 sec on PAL for fun antic_dlist = dl.addr // set custom display list wait(100) // waint 2 sec on PAL for the lulz vbivec = vbi.addr // set custom VBI wait(100) // waint 2 sec on PAL because we can vdslst = dli_first.addr // set custom DLI while(true){ wait(100) nmien ^= %10000000 // toggle DLI antic_nmien = nmien } } systemoff-example.mfk systemoff-example.xex EDIT: My repository with examples https://github.com/zbyti/a8-millfork-playground
-
ti994a TI99 MyArcXBII & P-Card in MESS/MAME emulation package-update
hloberg posted a blog entry in HLO projects
Update: moved packages to emulation section from software. I have put a together MAME/MESS emulation package that emulates the MyArc Extended BASIC II & TI P-Card for the Ti99. MyarcXBII: MyArc was a company that made peripherals for the TI-99 line. There most famous peripheral (if you want to call it that) was the Geneve. The Geneve was a complete TMS 9995 computer that fit in the TI-99 PEB as a card. Another peripheral that was lesser known, but just as revolutionary, was the MyArc Extended BASIC II. The MyXBII consisted of the 128k or 512k Memory card, a set of disk and a cartridge. When running the MYXBII had 3 times the memory of TIXB, was up to twice as fast as TIXB and was able to access all the graphic capability of the TI graphics card including the hi-rez. If a MyArc HD disk card was added the software could even boot from the MyArc hard drive. It turned the TI99 into a real power house. Unfortunately because of it's expense and the fact that you needed a PEB to run it, the MyArcXBII never really caught on. Now, though, with emulation it cost nothing so through the power of MAME/MESS the power is being released. Start the MyArcXBII at the TI99 main menu by choosing 3-128k BASIC and this will boot the MyArcXBII from the hard drive. P-Card: The P-Card was a card for the PEB that was, more or less, a complete operating system apart from the TI99. It's a virtual machine processor on a card that ran P-Code. It was written totally in software and was based on Pascal and was able to run on other computers that also conformed to the P-Code specifications. It is nothing like a standard TI-99 and when booted takes over the TI-99 and even has a specially formatted disk it uses. There is a complete suite of software and if you can figure it out, kinda nice. To run the P-Card in MAME/MESS click under OPTIONS-DIP SWITCHES then turn on the P-CARD. Hard reboot the machine and the TI-99 will start in the P-Card mode (after a few seconds of beeping and blank pages). To go back to MyArcXBII just turn the P-CARd switch OFF then hard reset the machine. The MAME/MESS package works with any versions of MAME/MESS past version 222. Just merge your version of MAME/MESS into the MESSxxx directory and point the already created batch file in the root to that directory. Package includes manuals, software, batch files and everything you need except MAME/MESS itself. Enjoy. Download from my https://ti99resources.wordpress.com/emulation/ At the bottom of the page is MAME packages, click on MyArc Extended BASIC II to show download files. I have both a package with and without the P-Card. (a truly nice tripped out Ti-99 from mainbyte.com) -
Hi everyone, Anyone can help me with this? I wanna use 3 or more sprites in same screen, using the system of flickering, something like in Adventure, I don't know how to create something like a "corroutine" in this, so if anyone can help me, thank u.
- 3 replies
-
- atari 2600
- atari
-
(and 5 more)
Tagged with:
-
If you didn't already know, the Retro Programming - Vectrex Academy 2021 course offered by Prof. Dr. rer. nat. Peer Johannsen through Pforzheim University (Hochschule Pforzheim) is well underway. Some students have posted work that could benefit from testing and your feedback. Below is the comment posted on by Peer on Vector Forums along with the link to the 2021 project gallery page. Make all replies to either the direct reply email link available on each project page, or by "Vectrex Academy 2021" post thread on Vector Forums. "Greetings everyone, here are the latest news of the Vectrex Academy 2021: All the projects are on track. Some have already reached what I would call a very early alpha status, which is quite amazing considering the fact that, just 7 weeks ago, none of the students had even heard of a Vectrex before. Two of the students are brave enough to have their alpha candidates already put out to the public for some very early alpha testing Alpha test binaries of projects "Frog Jump" and "Racetrex" are available for download by means of the gallery page. There are also links on the project pages for playing the games in Dr. Snuggles' online emulator in your web browser. It would be really really great if some of you guys out there find the time to take a look and try these games and voice your opinions and some early feedback here on the forum. This would be quite rewarding for the students and a great help for them while continuing their work on the projects. Many Cheers, Peer" Vectrex Academy 2021 Project Gallery Page: http://eitidaten.fh-pforzheim.de/daten/mitarbeiter/johannsen/vectrex_2021/gallery/vectrex_gallery_2021.htm Vector Gaming Forum thread about the 2021 projects General Information: https://vectorgaming.proboards.com/thread/2544/vectrex-academy-2021 Vectrex Academy 2021 Homepage: http://eitidaten.fh-pforzheim.de/daten/mitarbeiter/johannsen/vectrex_2-021/vectrex_academy_2021.htm
-
A while back, I started a thread which was intended to be a place where interested programmers could go to find everything they needed to get started with assembly language programming on the Aquarius. Since then, with the popularity of batari Basic for the Atari 2600 and other homebrew-oriented languages, there has been some interest in developing games for the Aquarius in BASIC, so ... here's another Aquarius thread, just for BASIC programmers! Fortunately, the Aquarius already has its own version of BASIC, and it's built right in to the computer! When you turn on your Aquarius (without a cartridge inserted), or start your favorite Aquarius emulator, you'll be presented with a startup screen for Microsoft BASIC. This is the BASIC interpreter that is built in to the Aquarius OS ROM, and contrary to what you might have read elsewhere, it is a perfectly capable implementation of BASIC; it is not a "crippled" version that is missing such elementary features as the ability to do FOR-NEXT loops. The Extended BASIC cartridge (released in very limited quantities, and available today as part of the Aquaricart) did add a few "missing" features, such as the ability to edit previously entered lines of code, but you can easily live without most of them, and as we'll see, there are even better ways of editing BASIC programs using the tools available today. Speaking of tools, let me begin by posting a few. First is the most recent version of the Virtual Aquarius emulator for Windows, version 0.72a: VirtualAquarius.zip This distribution archive includes the emulator itself, the OS ROM, several cartridge and cassette images, and a few sample BASIC programs in ASCII text format to get you started (more on these later). This is the primary emulator that I will be writing my instructions for in this thread, since it has a few features which are especially useful for BASIC programming but which other Aquarius emulators (such as MESS) presently lack. (There is no "installer" for this emulator; just unpack the ZIP archive into a folder, move the folder to a convenient place, and open the "aquarius.exe" executable inside the folder to start the emulator. It's a few years old now, but I've used Virtual Aquarius under every version of Windows from XP through Windows 8 (in Desktop mode), and it appeared to function perfectly.) Next is a bootloader utility, generously provided by Martin v.d. Steenoven, which will convert completed BASIC programs of up to 16K into cartridge images. You can use these images in Virtual Aquarius like any other cartridge binary, or even burn them to a 16K cartridge ROM for use with a real Aquarius. In either case, your BASIC program will load and start automatically when the Aquarius is started; the users will not even see BASIC. Here is a link to the most recent version of the bootloader from the assembly thread, along with Martin's usage instructions: [AQUARIUS] Machine Language Programming on the Aquarius (Post #52) (Note that it is not necessary to use this bootloader utility until after you have completed your BASIC program. While you are writing your program, you would load it into BASIC for testing, using the procedure I will outline in my next post. If you are interested in putting your first completed program onto a real cartridge, send me a PM; I'll be offering a cartridge publishing service in the near future.) Finally, here is a dump of the original Aquarius Character Generator ROM, containing the default Aquarius character set. This replaces the "reconstructed" character set used by Virtual Aquarius: AquariusCharacterSet.zip To explain why this is important, and how to use the replacement ROM in Virtual Aquarius, I'll quote from the assembly thread: The only other tool you will need is a text editor. Note that a text editor is not the same thing as a word processor: both are writing tools, but the text editor saves your files as plain text, without any formatting information or metadata. Microsoft Windows comes with Notepad, but since this is a very simple editor, many developers choose to use editors which offer more features, such as macros and syntax highlighting. The editor that I usually use on Windows systems is VEDIT by Greenview Data, but just about any editor will do. Even plain old Notepad is a much better alternative than typing a lengthy BASIC program on a real Aquarius!
-
Hello! After some searching for MADS highlighting for Vim, I haven't found nothing useful, so I decided to write something new… The only solution like this which I found was vim-xasm, the XASM highlighting, but it wouldn't enough good to use with MADS (lack of preprocesor directives and so on) So, here it is! Completely new plugin, suitable for every serious Atari coder with Vim as his main editor. (Note: If Vim isn't your primary editor yet, give it a try! But remember, some of your habits will be quickly broken :>) URL for GitHub Repository (aka "The Giant DOWNLOAD Button"): https://github.com/skrzyp/vim-mads (of course, if you're not familiar with Git, you can still grab this plugin as archive, but you'll lose the ability to update it when something new will be added/corrected) Installation Manually: Put folders syntax and ftdetect in your Vim configs directory: Windows: %USERPROFILE%\vimfiles Rest of world: ~/.vim Recommended: Using Pathogen Clone this repo into your Vim path: git clone https://github.com/skrzyp/vim-mads ~/.vim/bundle/vim-mads Of course, I'm fully open for any suggestions and comments, even if you found any bug or problem, tell me here or make a pull request. I'm also very interested about any feedback from users. Screenshot (sorry, I don't have a code which use a full potential of MADS, but if someone has, send me your pic, please)
-
Hi everybody, Anyone knows if its possible to change the position of live bar? I wanna put it above the score. And if anyone can explain why its so deformed in right side: And for any reason, I'm trying to take out this black line in screen, but I can't, in other projects I tried, but it always had bugs impossibilating to recompile.
- 1 reply
-
- life system
- atari 2600
-
(and 6 more)
Tagged with:
-
I think it's high time to include a section here on the venerable TI 58/59/66/95 calculators as they represent an important legacy If you have an interesting program you'd like to share, please post it here. My favorite source of programs for them is the venerable French magazine Jeux & Strategie published in the 80's. I have all of the first 30 classic issues and you can find high quality scans of them here: http://www.abandonware-magazines.org/affiche_mag.php?mag=185&page=1 . I never go on a long flight without one of these issues in my bag along with the compact TI 66 to play with! Here's a game called Ricochet from issue 17 (Oct-Nov 1982) to get things started: You have to uncover 4 atoms hidden in an 8x8 grid by sending laser beams through the grid and analyzing the output. The beam can be either deviated or absorbed. The entry and exit points of the laser beam is given by their x,y coordinates. In the above example, beam one (0,11) is first deviated then absorbed. Beam 2 (0,15) is deviated and exits from (4,18). And so on. Study the image above closely to deduce how the deviation process works. To run the program, first enter a value between 0 and 1 then press A. After a bit of time 0 will appear on the display, indicating that the atoms have now been hidden. To send a beam, enter first its x coordinate followed by R/S, then its y coordinate followed by R/S again. It can take from a few seconds to several minutes for the calculator to respond. If the beam is absorbed, it will display 0, otherwise its exit point will be displayed as xx.yy. For example, if the exit point is (6,9), the display will show 6.9. Repeat as needed until you think you have uncovered all 4 atoms' locations. You can find out by using RCL 1 to 4, displaying all of the coordinates for the atoms. To try a new game, enter a new value between 0 and 1 then press A again. Don't forget to RST before running the program! I tested out the program on a TI 66 and it works great! There was a typo in the listing which I corrected in the image on top.
- 22 replies
-
- 8
-
#FujiNet #Atari8bit Now that libssh2 is embedded into the code and is compiling, I have added a ticket to add an SSH protocol adapter, if anyone wants to try their hand at it. https://github.com/FujiNetWIFI/fujinet-platformio/issues/439 I especially want someone else to do this, so that they can point out to me how incredibly brain damaged my approach is, and hopefully we can make it better.
-
This is another resource which can be tested online, but could also be used to create games for the VCS. It's designed for 2D games, and applications, this time, but I don't think anybody really hates 2D games! https://playground.solar2d.com/ Do you have 8 minutes to spare?
- 1 reply
-
- programming
- development
-
(and 1 more)
Tagged with:
-
There have been many people asking how to create music on the Intellivision and each thread is addressed individually. There is some good information on the IntelliWiki, but the format of the tracker is not described in detail. This thread endeavors to describe the tracker format in all its gory detail. The information in this article was originally provided to me by Arnauld Chevallier, author of the tracker library for the Intellivision. I have adapted and expanded it for publication. I've attached to this article an archive containing the source code for the Intellivision Tracker library, along with the original demo song provided by Arnauld Chevallier. I've also included a simple song taken from the Christmas Carol game for further illustration. Intellivision Tracker Lib.zip Technical Overview The Intellivision Master Component includes a General Instruments AY-3-8914 sound chip, commonly referred to as the Programmable Sound Generator, or PSG. The PSG contains three separate square-wave tone generators, each of which can be programmed individually to control its frequency and volume. The chip also includes a noise generator, which can be mixed with any of the three tone channels. All three channels, potentially modulated by the noise generator, are then mixed and fed to the TV for output. The PSG also contains a hardware envelope generator to shape the output sound-wave. Any of the three channels can be processed through the envelope generator, but only one envelope is available to all channels at a given time. The inability to shape each tone individually reduces the versatility and usefulness of this feature, often forcing the programmer to generate and manage discrete envelopes in software. Programming the PSG manually is certainly possible, but requires a significant volume of insight into the technical details of the chip, and the mathematics involved in calculating musical tones and note periods from raw frequency counter values. For this reason, it is common to use library modules that abstract these properties. The Intellivision Music Tracker Intellivision games designer and programmer Arnauld Chevallier, has implemented a tracker library to play specially-crafted music files on the Intellivision. He has been gracious enough to donate his code to the public domain so that all Intellivision programmers may benefit from it. Because it is freely available--and because it is so exceptionally useful and easy to integrate--it has become the de facto method to play music on Intellivision home-brew games. Using the tracker in your own games is a matter of including the library, defining some needed variable labels, and adding a call to update the tracker state periodically from your game loop. You also need to create your own music files in the appropriate data format. Tracker Data Format The format used in Arnauld's tracker has a lot in common with the classic MOD format of old Amiga tracker modules: a song defines a series of patterns, which describe musical sections, and specifies in which order they are to be played. More precisely, the data layout is closer to the later XM format introduced by Fast Tracker II, which added the notion of instruments. The most notable difference, of course, is that no digital samples are used at all. All instruments in the Intellivision tracker are software-generated tones. Below is the general structure of the tracker data layout, which I'll describe in detail further on. Root | +-- Pitch Effect #1 (...) +-- Pitch Effect #N | +-- Envelope #1 (...) +-- Envelope #N | +-- Drum #1 (...) +-- Drum #N | +-- Song #1 | | | +-- Header | +-- Pattern Sequence | +-- Pattern #1 | | | | | +-- Length of pattern | | +-- Sub-pattern for channel A | | +-- Sub-pattern for channel B | | +-- Sub-pattern for channel C (...)(...) | +-- Pattern #N | | | +-- Instrument #1 | | | | | +-- Pitch | | +-- Vibrato | | +-- Envelope (...)(...) | +-- Instrument #N | | | +-- Sub-pattern #1 | | | | | +-- Notes (...)(...) | +-- Sub-pattern #N | +-- Song #N Root Objects defined in this section are common to all songs. This may include pitch effects, envelopes and even drum patterns for a rudimentary percussion track implementation. Pitch Effects Some rather simple pitch effects are supported by the tracker, such as tremolo or fast arpeggios. The format is as follows: DECLE D[0], D[1], D[2], D[3] Where D[x] values are expressed in half-tones and are added to the current standard pitch of the note, on every frame, with the following formula: FinalPitch = StandardPitch + D[frame % 4] A frame is every game cycle where the tracker state is updated. Presumably, this would be 60 times a second, on standard NTSC Intellivision consoles. The result is that the tone is modulated, four frames at a time, by the number of half-tones defined for each frame, producing a tremolo effect. For example, pitch01: DECLE 0, 0, 0, 0 ; No modulation: |_|_|_|_| pitch02: DECLE 0, 0, 12, 12 ; half-modulation: |_|_|-|-| pitch03: DECLE 0, 12, 0, 12 ; fast-modulation: |_|-|_|-| The first pitch effect will play the note at its standard pitch without modulation. The second one will play the standard pitch for two frames, then increase the pitch by an octave (12 semi-tones) for another two frames, and repeat this throughout the length of the note. Finally, the third one will alternate the note between its standard pitch and one octave higher on every frame. Envelopes The tracker library does not use the hardware envelopes of the PSG. Instead, it relies on software envelopes defined in this section. The format of the envelope definition is as follows: DECLE SPEED DECLE WORD_00, ..., WORD_15 Where SPEED is in the range of [0..3] with 0 being the slowest and 3 the fastest. Each WORD_xx value is a hexadecimal value in the form $ABCD, where each nibble describes the volume level to be output. The tracker does not currently support loops within an envelope. Consequently, they are applied only once on each note. Consider an envelope as a 64 x 16 matrix, where each point defines the volume to be applied to an instrument on a given frame. Below is an example of a rather exaggerated envelope, in order to illustrate its layout: ATTACK DECAY SUSTAIN RELEASE .--------|---------------------|-------------------------------------------------------|---------------------------------------| F -|. . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E -|. . . . # # # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D -|. . . . # . . # # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C -|. . . . # . . . . # # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B -|. . . # . . . . . . . # # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V A -|. . . # . . . . . . . . . # # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . O 9 -|. . . # . . . . . . . . . . . # # # # # # # # # # # # # # # # # # # # # # # # # # # # # . . . . . . . . . . . . . . . . . . . . L 8 -|. . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # . . . . . . . . . . . . . . . . . . . . U 7 -|. . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # . . . . . . . . . . . . . . . . . . . M 6 -|. . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # . . . . . . . . . . . . . . . . . . . E 5 -|. . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # . . . . . . . . . . . . . . . . . . 4 -|. . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # . . . . . . . . . . . . . . . . . 3 -|. # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # # . . . . . . . . . . . . . . . 2 -|. # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # # # . . . . . . . . . . . . 1 -|# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # # # # # . . . . . . . 0 `+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 3 7 B F E E D D C C B B A A 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 7 5 4 3 3 2 2 2 1 1 1 1 1 0 0 0 0 0 0 0 ; Envelope definition DECLE 1 DECLE $137B, $FEED, $DCCB, $BAA9 DECLE $9999, $9999, $9999, $9999 DECLE $9999, $9999, $9999, $7543 DECLE $3222, $1111, $1000, $0000 The SPEED value influences how the tracker applies the envelope over time. For instance, a speed value of 0 will cycle through the matrix one point at a time. While a value of 1 will skip every other point, and so on. The envelope position for each frame is computed using the following formula: envelope_x = (frame / 2speed) Below is another, more common example. This one is for a simple envelope with a short attack, immediately followed by a linear decay in volume, all the way to zero. ATCK DECAY .----|---------------------------|---------------------------------------------------------------------------------------------- F -|. . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E -|. # . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D -|# . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C -|. . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B -|. . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V A -|. . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . O 9 -|. . . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . L 8 -|. . . . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . U 7 -|. . . . . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . M 6 -|. . . . . . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E 5 -|. . . . . . . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 -|. . . . . . . . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 -|. . . . . . . . . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 -|. . . . . . . . . . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 -|. . . . . . . . . . . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0 `+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | D E F E D C B A 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; Envelope definition DECLE 2 DECLE $DEFE, $DCBA, $9876, $5432 DECLE $1000, $0000, $0000, $0000 DECLE $0000, $0000, $0000, $0000 DECLE $0000, $0000, $0000, $0000 Drums Drums are a special kind of instrument that are defined globally. A drum is a short and fixed sequence of tones with optional noise modulation. No pitch effects, vibrato, or envelopes are applied to drums. The drums section includes the patterns for each drum instrument, along with the instrument definitions themselves. A drum instrument pattern is a series of eight instrument definitions that describe the sound of the drum over time. This allows the shaping of the drum sound with varying measures of tones and noise, resulting in a richer sound. The library includes the macro Drum() that facilitates the definition of drum sounds. The macro is used as follows: Drum(TONE_PERIOD, NOISE_PERIOD, TONE, NOISE, VOLUME) ; #1 Drum(TONE_PERIOD, NOISE_PERIOD, TONE, NOISE, VOLUME) ; #2 ... Drum(TONE_PERIOD, NOISE_PERIOD, TONE, NOISE, VOLUME) ; #8 TONE_PERIOD: Corresponds to a 16-bit value describing the period of the tone to use. NOISE_PERIOD: Corresponds to a 16-bit value describing the period of the noise to apply. TONE: Declares whether to use the tone generator for this drum instrument: 1 = On 0 = Off NOISE: Declares whether to use the noise generator for this drum instrument: 1 = On 0 = Off VOLUME: Corresponds to a value in the range [0..15] describing the volume of this drum. Below is an example of a simple hi-hat cymbal instrument definition: @@hithat DRUM($380, $04, 0, 1, $D) DRUM($380, $04, 0, 1, $6) DRUM(0, 0, 0, 0, 0) DRUM(0, 0, 0, 0, 0) DRUM(0, 0, 0, 0, 0) DRUM(0, 0, 0, 0, 0) DRUM(0, 0, 0, 0, 0) DRUM(0, 0, 0, 0, 0) Song A song is a collection of patterns describing the notes and instruments to be played. The song definition includes a header, the sequence of patterns to play, and the pattern definitions. Header The song header describes the overall definition of the song, and takes the following format: DECLE SPEED, PATTERNS, INSTRUMENTS SPEED: The playing speed, expressed in frames. It actually represents the number of frames that each row in a pattern will last. PATTERNS: A pointer to the pattern definitions table. INSTRUMENTS: A pointer to the instrument definitions table to be used. Pattern Sequence The pattern sequence describes the order in which the patterns will be played. The sequence is comprised of the definition index of each pattern in the sequence. The pattern sequence is the actual musical sequence of the song, so only those patterns included in it will be played. The sequence may be terminated by a negative value identifying a looping point. The tracker will then backtrack that many patterns and repeat the sequence from that point. If the song is to terminate without looping, the magic constant $F000 may be use to tell the tracker to stop playing and clear its registers. Below is an example of a pattern sequence: DECLE 0, 1, 0, 1, 2, 3, 2, 4, -4 The above will play the patterns listed in order, and loop indefinitely through the last four patterns. Replacing -4 with $F000 will instead cause the tracker to stop playing at the end of the song. Patterns A pattern is defined by its length, followed by pointers to sub-patterns for all three channels. The length of a pattern is expressed in rows, where a row represents a discrete musical event in time. (The speed of the song defined in the header corresponds to the number of frames between each pattern row.) It is important to think of patterns not in terms of beats and measures like a musical score, but as rows of tracker events that alter the output of a particular channel over time. The format of patterns is as follows: DECLE length, sub_pattern_a, sub_pattern_b, sub_pattern_c Where the length is the number of rows in the pattern, and sub_pattern_a, sub_pattern_b, and sub_pattern_c are pointers to sub-pattern definitions for channels A, B, and C, respectively. NOTE: The tracker assumes that all patterns have the same length. You are advised to ensure this is the case, or else Bad Things may happen during execution. Instruments This section holds all song instrument definitions. Each instrument includes information about pitch effects, optional amplitude modulation (vibrato), and an envelope. The instrument definition takes on the following format: DECLE PITCH, VIBRATO, ENVELOPE PITCH: A pointer to a pitch effect object previously defined in the global header. VIBRATO: The amount of vibrato effect to apply, in the range of [0..3]: 0 = no vibrato 1 = low 2 = medium 3 = high ENVELOPE: A pointer to an envelope object previously defined in the global header. Up to 15 different instruments can be defined. Sub-Patterns A sub-pattern indicates the actual notes to be played in a pattern, the instrument to be used for each note, and its volume. A note in this context describes a discrete tracker event which alters the output produced by a channel over a series of rows. The tracker library includes the macro NOTE() to define notes. For standard instruments (i.e., not drums), the macro takes as argument a string in the form: NOTE("NnO IVL") N = Musical note (from A to G) n = # for sharp; - for regular O = Octave (from 1 to 7) I = Instrument (from 1 to F, with '0' meaning no change) V = Volume (from 0 to F) L = Length, in rows (from 0 to F) The length is the number of rows to wait before the next event, and corresponds to the length of the note minus 1. For instance, a length of 7 corresponds to a note lasting for eight rows: the tracker will apply the note event on the current row, and wait for seven more until the next event. For drum instruments, the "NnO" parameter is replaced by the "DRM" keyword: NOTE("DRM IVL") I = Drum instrument (from 1 to F) V = Volume (from 0 to F) L = Length, in rows (from 0 to F) The library also includes the macro NOTES(), which defines four notes at a time. Any unused arguments can be padded with empty strings. For example: @@p003 NOTES("A-5 3F7", "G-5 3F7", "E-5 3F7", "F-5 3F1") NOTES("E-5 3F5", "", "", "") The "NnO" parameter may also be replaced by the "NUL" keyword, which means that no note change has occurred for this event. This makes it possible to define notes with a length greater than 15. EDIT: Corrected typos and edited for clarity.
- 39 replies
-
- 6
-
- intellivision
- music
-
(and 2 more)
Tagged with:
-
Early this year, I learned that MAME, which has recently been combined with MESS into one single emulator, also emulates some handhelds now... among those are some I have or had myself, Coleco's Donkey Kong tabletop game, MB's Bigtrak and Nintendo's Mickey & Donald (Game & Watch). I decided to take a deeper look at Mickey & Donald (after nearly competing the Bigtrak code, but that's off topic here) because I was always curious how such games have been programmed... I started on it in February 2016, about 33 years after I got the actual game. Obviously, this is a low-power device powered by two button cells and having an LCD screen. It's using a Sharp SM510 mictrocontroller with a fixed ROM. There is a nice write-up on that CPU here: http://watchdev.blogspot.co.at/2013/06/sharp-sm510-innards.html This chip has got a built-in LCD driver, and the display is memory-mapped, that is, all memory locations from $60 on are visible (at least if they've got segments connected to it). Since the disassembler in MAME didn't work quite correctly (don't know if it has been fixed by now), I wrote my own disassembler for the code in VB.net, which is actually not so hard considering the CPU doesn't have that many commands. There are some quirks like 1-byte subroutine calls which are routed through an address table in the first page, though this still only enables certain jump destinations because those addresses still only have 8 bits, but the address range of the CPU is 12 bits. Well, as I said I was curious how such a game is programmed. Actually it's quite different to what you're used to on video based systems. Normally you would have sprites, which are objects with an X and an Y coordinate, and they move and interact in some fashion. Well, for the most part, it doesn't work this way here. How it actually works is closer to a shift register, actually several of them. As you may know, a shift register is a stack of bits which get shifted left or right in sync to each other. In this game, there are several lines of bits which work like a shift register. But they're not hardwired, all of this is done in software. There is a subroutine for each possible bit which swaps that bit in a memory location with the carry flag. The actual bits in a line often don't have a real logical position in memory, rather they were seemingly positioned so the lines in the LCD screen are best used. For instance, for an object that has 3 possible positions, one position might be displayed when bit 2 of memory location $62 is on, the second one is on bit 1 of memory location $6D and the third one on bit 2 of memory location $6B. The line is now shifted by starting at the first position, fetching its status to the carry flag. Then you set the memory location for the next bit (by one instruction) and call the respective subroutine to swap the bit you want to access. Now you've got that bit in the carry bit and go on to the next location... and so on until the line is through. For instance, Mickey on the left has three possible positions, on bottom, in the middle or on top. If the player presses the "up" button, the Mickey line gets shifted upwards, on pressing "down" it gets shifted downwards, only that the last bit in the line gets re-set if it's found to be on after the shifting. The game code generally doesn't "know" the coordinates of any object visible on screen, it's all done by checking if a certain bit in memory is set. And there are more shift "lines"... two for the hose (one for small and one for big blobs), six for drops and fires and one for Donald on top. The fire shifting routine checks for each position if the corresponding drop bit is set, if so, both are cleared, a point is scored and the routine terminates. The routine shifting down the drops does the same. As for game variables, there are only a few controlling if there's one of the possible leaks, which game or demo mode is on, if the alarm is set, and as far as I can tell two counters for keeping the correct speed. But maybe there are some more which I missed because I didn't examine the complete code. Since the objects don't have coordinates in memory, all checks that depend on a certain location to be set or clear, such as collision detections, check the actual bit in memory... for instance, the routine that creates new drops checks all three possible locations of Donald to find out where he is and place a drop there. That way, they also go around the limitation of the CPU that indexed writes are very hard to do... with this game architecture, none are required, the closest thing to it is actually the routine that converts score digits to the 7 segments that are displayed for each number. This one uses an indirect jump instruction which loads the data byte to the PC. Keep in mind that the PC is not linear, but a pseudo-random shift register, which means that the numbers 0-9 get converted to addresses which are actually all over the place in that page. Oh, the total ROM in that chip is 2772 bytes (44 pages with 63 bytes each). I guess it's similar for other Game & Watch games, though much later models like Pinball and Super Mario Bros. might use a different chip, as may much earlier models like the Silver Series Ball, Vermin, Fire and Judge... there are more advanced models SM-511 and SM-512 supporting independent sound generation, more segments and more ROM up to 4K while the SM-510 has to generate sound writing 0's and 1's for each wave "by hand". On the other hand, there's a simpler chip with only 2016 bytes of ROM that may have been used on the first games. But still I suppose most Game & Watch games will have been programmed in a similar way, because you see some kinds of shifted strings of segments in all of them, with some of them going only one way and others going both ways.
- 3 replies
-
- 1
-
- Game & Watch
- Architecture
-
(and 5 more)
Tagged with:
-
#Atari8bit #FujiNet shown here is an HTTP GET example in BASIC, that uses aux1=12, to be able to do things like get/set headers, in this case, to manually set an HTTP Authorization header, and to get back the requested data. These changes are in master, and will be in the next release. -Thom
-
An #Atari8bit IRC client in...#BASIC? With #FujiNet, this is possible thanks to the N: device providing an easy interface to the network outside. This IRC program has been in development for roughly a week, and it's amazing!
-
This web-based development platform runs as a native app via Chrome browser! I've been playing around with this tool. Very nice. (There IS a FREE edition as well.) You can build games and run them directly on the VCS, and build for other platforms. https://www.construct.net/en You can't run the tool in application mode, but it runs just fine in the browser mode.
-
- 3
-
- programming
- development
-
(and 1 more)
Tagged with:
-
This may be out there somewhere but if not, here is the TI logotype (c) for TEXT mode (40 columns as opposed to 32 columns). If you have pics like this to share I'd love to see them. TI Logo CHAR data for TEXT mode.pdf
-
A project I have been working on for the last two years is nearing completion i.e. my next book called 'Programming Games for the Colecovision and Adam in Assembler'. It includes a tutorial section working through the steps of creating a game, with a Z80 assembler primer and information on how to set up a cross development environment (similar but extended from my Let's Make a Retro Game series). It also includes a complete Colecovision BIOS reference guide, covering ALL of the jump table BIOS calls with explanations and examples for using each call. There are extensive memory and port maps, also with explanations etc. It will have a dedicated web site section where you can download the code (for lazy typers :)). The early pre-order link for the Kindle edition is available here. Cover is still a draft. Shortly after I have released the Kindle Edition, there will also be a physical print edition available on Amazon's print to order service, which I used for my last book and has been received well. It does have some colour screen shots and pictures in it, let me know how many people would be interested in a full colour edition, rather than a colour cover with black and white interior. The book is currently 90% complete, with the majority of the content completed, but I have about ten quality read through passes to do and need to tidy-up/check all the source code etc. I am aiming for a 1st August 2020 release date at this stage.
- 70 replies
-
- 12
-
- book
- programming
-
(and 3 more)
Tagged with:
-
Greetings folks, Just an FYI for anyone looking for reprinted out of print programming books to try Lulu.com I have used Lulu before but this time I found a book I have been desperately looking for years. I have been wanting the Compute! published books Programming the 64 and Programming the Vic by West and was able to find the 64 on Ebay, but the Vic one appears to some rare air to find. I love West's two books for the C64 and Vic and have been wanting them for many years. I even went as far to email libraries in Texas once I found out they had the Vic book to offer them to buy it, however all of them could not sell the book to me.. I visited lulu and it looks like someone just recently uploaded the PDF and Lulu has made Programming the Vic for reproduction. I am just passing this on to anyone who may be looking for this awesome Vic 20 book! The printing is done well and it is the same size of the 64 original one and the binding is excellent. I also bought another copy (I have the original) of the Butterfields Machine Language for the C64, 128 expanded editions. The Butterflied book is printed much smaller but still looks good, I was surprised they went with the small size when it should be the same size of the West book. In any case I am not connected to Lulu and do not make any money or get anything from them.. I just wanted to pass on a place for anyone who was looking for these tough to find books and do not mind a reprint. The books were very reasonable priced. I put a few screenshots here for anyone who might be interested. I hope anyone who is interested in Assembly Commodore programming can find this knowledge useful for them. If anyone here is looking for these
- 7 replies
-
- vic; vic20;assembler;assembly;programming
- vic20
- (and 5 more)
-
Hey guys, so I've started on a set of bindings for ACTION! and they almost work(tm). https://github.com/FujiNetWIFI/fujinet-apps/tree/master/netcat-action What does not work: * Write doesn't work. * Interrupt routine isn't being called, even though I vector it in, and toggle PACTL's PROCEED interrupt enable. Anybody want to peer at this and give some insight?
-
#FujiNet #Atari8bit I have made a cheat sheet showing how to use the N: device in BASIC to open, close, send, receive, etc. The page is here: https://github.com/FujiNetWIFI/fujinet-platformio/wiki/N%3A-Game-Developer-Cheat-Sheet
-
#Atari8bit Any assembler coders? Anyone want to help out with #FujiNet's CIO handler? There are three issues that I need help with as I work on the firmware (ESP32) side. Add Binary Load File support https://github.com/FujiNetWIFI/fujinet-nhandler/issues/1 Add NOTE/POINT support https://github.com/FujiNetWIFI/fujinet-nhandler/issues/2 Make code relocatable again. https://github.com/FujiNetWIFI/fujinet-nhandler/issues/3 Add burst mode I/O https://github.com/FujiNetWIFI/fujinet-nhandler/issues/4