Search the Community
Showing results for tags 'assembly'.
-
After many, many years of not programming in 6502 assembly on Atari, I am now spending some free time exercising. I was wondering if anyone had some recommendations on how to implement software sprites in GR8 mode, and perhaps could point me to some examples. What I am trying to do is copy 1-bit image of 16x16 to an X, Y location on the screen (let's say the screen is 320x96, or 320x192). I want to be able to do it with or without masking. Anyone?
-
dsrlnk Toward a Better (and Better-Documented) DSRLNK
Lee Stewart posted a topic in TI-99/4A Development
I have decided to take this DSRLNK discussion out of my fbForth thread so that I can get more non-Forth eyes on it. One of the changes I am seriously considering for fbForth 3.0 is revamping the file management system—especially, how DSRLNK works. I will likely replace the MG DSRLNK currently in place. I am looking into an implementation of Paolo Bagnaresi’s version as modified by Bill R. Sullivan (@Bill R Sullivan & @FDOS). I do not want to include Bill’s optional use of CPU RAM PABs and buffers, but I definitely want to use the 5 saved parameters after the first call to DSRLNK so CRU and device/program searches can be minimized with subsequent DSRLNK calls. Whereas Bill suggests a stack for multiple open files, I am thinking of adding those parameters to the head of each PAB. Though others have addressed some or all of my issues, trying to follow the logic of the various DSRLNKs, especially with some (several?) misleading comments, has been unsettling, to say the least. I am also considering using a linked list of PABs, much as TI Basic does—we’ll see. My Current Version of the Bagnaresi-Sullivan-Stewart DSRLNK: DSRLNK_LES02.a99 My Current Version of the Miller-Warren-Stewart DSRLNK: DSRLNK_fbForth02.a99 ...lee -
Hi, I was learning Atari 8-bit assembly from Atari Roots and I wrote this joystick test program just to see how I'd do at assembly programming. It's nothing much, it changes the color of the border when you move the joystick and it changes the color of the playfield when you press the fire button. Feel free to look at the source code and tell me what you think. JOYTEST.xex JOYTEST.ASM
-
What was this, exactly? Looking for info, docs, bits, anything related. 2264445-9701 is the PN for "Model 990 MDS-990 Microcode Development System Programmer's Guide". Possibly relevant and looks interesting in any case: 2250081-9701 "Instruction Simulation Package User's Guide". Neither seems to be online anywhere I can see. Thanks for any help! jbdigriz
-
Here's what I've been obsessed with of late. Having recently watched a playthrough of Ghosts'n'Goblins on NES, I thought it could be reproduced on the 9918A using chunky scrolling combined with another idea for mixing hardware and software sprites. I wanted the software sprites to allow transparent parts to allow the background colors to show through. I was also very inspired by what @thegeps has been doing with Turrican on MSX, with chunky scrolling in Graphics Mode II, and keeping the character sprite stationary while scrolling once every 6 frames feels not too jarring. As well as doing the player weapons using background tiles to avoid/reduce sprites-per-line flicker. The white and black colors are handled with hardware single-color sprites, and the software sprites display the face, beard and belt. The software sprites are also compiled sprites - the background pattern and colors are loaded into a memory buffer, then the WP is pointed to a starting y-offset in each buffer. Using the WP allows me to modify the background using LI ANDI ORI instructions on only the registers that change. The main advantage of compiled sprites is that the transparent areas (non-modified lines in a tile) don't require any changes - the fastest code is no code. The colors for the tiles are drawn in Magellan so that the dominant color is always the background color, and the software sprite can replace the foreground color. While this does have some unintended colors fringing as the software sprite moves around, a better solution might be to encode the left-dominant color as foreground and right-dominant color as background, but I haven't figured out a way to do that yet. The map is incomplete and will have garbage after the first water crossing. Use joystick 1 to move around and explore. This is as far as I'm going to take it for now. Will come back after other projects are finished. spooks0c.bin
-
Running Atari 2600 programs on my NTSC C64! This is a Cross Compiler for the C64 that runs Atari 2600 programs written in Assembly and BASIC (SuperCharger BASIC and Flashback BASIC) with no changes to the BASIC or Assembly code. This is accomplished by abstracting the Atari 2600 virtual machine RUNTIME including a soft ANTIC blitter like Atari home computers bringing display list technology to the Commodore 64! Double the fun of racing the beam with the classic Television Threading Model on the Commodore 64 allows game loops that repeat 30 or 60 times per second with full screen animation each frame creating faster action scenes than are usually seen with the C64 design. The rich BASIC provides graphics and sound support and a camera object for panning around the virtual world, or with abstract Assembly programming (ASDK api). The next version will add color and audio support, check out some of the Atari 2600 BASIC and Assembly games that will be supported online here: http://relationalframework.com/Atari2600gamesonline.htm The Commodore 64 and the Atari 2600 Video Computer System are the two most popular retro computer consoles, write programs that run on both! Details: The soft blitter, camera object and display lists are running and functional, I dropped the compiled Atari 2600 BASIC Assembly code and the bitmap right into the 64 Framework and it ran the same in the abstracted VM on my Commodore 64. I can cross compile some of the BASIC at this point and am adding the RUNTIME subsystems that are missing. Adding sprites, sound and color next... the Tracker/Sequencer for the TIA chiptunes is going to be tremendous fun on the 6581! C64 Extra tile detail: The VM abstracts each 1 bit textured phat tile the TIA draws into 4 characters on the VIC-II text screen allowing both tiled patterns and background patterns to be drawn, I chose the same graphic for the 4 background tile quadrants in the demo. There's inspiring concept innovation with prior art if a prototype was ever produced!
- 12 replies
-
- 4
-
Hello, i am trying to split the screen with 2 colors (3/4 blue and 1/4 white), and I used the asm command in batari basic, what I am doing wrong? Pls help me. I keep getting 2 moving colors (ignore the color values). main asm lda #$5C LDX #96 START sta WSYNC dex bne START LDX #96 sta COLUBK START1 STA WSYNC dex bne START1 LDA #$A9 STA COLUBK end goto main
-
Hi. I'm trying to set up the color table of an XB program from an assembly subprogram in low memory and it's not working. I'd like to confirm a few facts: The color table is at >800 and is 32 bytes long The color bytes are set up as foreground in most significant nibble and background in the least significant nibble The color numbers are those used by assembly and not XB Color set #1 (starting with character # 32) is at >804 in the color table If all the above are correct, then I am stumped...
- 7 replies
-
- extended basic
- xb
-
(and 2 more)
Tagged with:
-
Introduction thread here: Meta is a new, human-friendly programming language that supports and started on Atari: https://language.metaproject.frl The old links from the early development period in the introduction thread are gone, and a few of the method names in the program examples have changed. I will post progress here now, so that the website is on top, and examples on the website, where they can be updated. Release thread here:
- 127 replies
-
- 3
-
- programming-language
- compiler
- (and 10 more)
-
Hello! During the preservation phase, I stumbled upon this beautiful version of the famous arcade game, Nibbler. It has been published on an Italian Magazine in 1985 and it is written purely for the Mini Memory cartridge and consists of two parts, the first loaded using option 2 EasyBug and the second loaded by TI-BASIC but through the instruction CALL LINK ("LOAD"). It would be really nice to save everything in a digital format more usable than the .WAVs files. I tried to load them with the MAME/MESS emulator and they work fine. In my opinion it's a beautiful version and deserves to be played by everyone in an easy way. I never thought that with the Mini Memory cartridge you could get such a complete game loaded from a cassette tape. I am really surprised. is there in the community someone that would have the ability to convert it to a better format, maybe .BIN or at least, a disk format? Could be nice! There are the link to the game page and the .ZIP file containing the material that I was be able to put together. Page: https://www.ti99iuc.it/web/index.php?pageid=database_cerca&archivioid=883 Download: (Ita)-(Game)-(Snake Snake)-(1985)-(MM)-(by M.M.G. Software)-(from TI99NewSoft).zip
- 66 replies
-
- 13
-
Introduction thread here: I am starting a new thread, because Meta has a new website: https://language.metaproject.frl The old links from the early development period are gone, and a few of the method names in the program examples have changed. I will post progress here now, so that the website is on top, and examples on the website, where they can be updated.
- 423 replies
-
- 1
-
- programming-language
- compiler
- (and 10 more)
-
Does anyone know of a good tutorial on making title screens? I am making a home brew right now for a university project and I would like to add a title screen. I took a course on udemy on how to get started but he doesn't go over things like Procedural Generation and title screens and I'm not sure where to start. Also a good tutorial on animation would be helpful. In the course I learned how to make the character move around the screen but and implement an animation for than but not a cycling animation for every frame. I'll also include my code below if anyone is interested in looking at it. Thanks in adavanced! ?? labyrinth.asm
-
I am developing a new language that I have been introducing here: After the Atari 8-bit, I am now targeting it at the 2600. I just posted the first demo here: Here is the source code: unsafe!!! constant reference volatile byte! [ ; TIA VSYNC= ~0000 VBLANK WSYNC COLUBK= ~0009 PF0= ~000D PF1 PF2 GRP0= ~001B GRP1 ENAM0 ENAM1 ENABL ] vertical-sync-bit= %0000'0010 VBLANK: ; Set beam to on to use the entire vertical-blank overscan area ENABL: ; Ball off ENAM1: ENAM0: ; Missiles off GRP1: GRP0: ; Players off PF2: PF1: PF0: 0 ; Playfield off; we only use the background byte! [jiffies colour] forever [ VSYNC: WSYNC: vertical-sync-bit ; Wait for end of scanline, then start vertical sync ; Vertical sync pulse. ; This lasts 3 scanlines, where some small work can be done to set up the next screen. colour: jiffies ; Begin colour gradient, shifted by jiffy counter ; Wait three scanlines, then end vertical sync, continue vertical blank VSYNC: WSYNC: WSYNC: WSYNC: 0 ; Vertical blank area, followed by the visible display area, ; followed by another vertical-blank overscan area. ; PAL and SECAM officially have 45 + 228 + 36 scanlines here, NTSC has 37 + 192 + 30. ; We generate 283 scanlines (plus the 3 for vertical sync), for a display frequency of 55Hz, ; inbetween PAL/SECAM and NTSC. It will work on all, if you have a tolerant television set. ; The first scanline is used for the setup overhead of the LOOP, ; so it gets the last colour wrapped over from the last scanline of the previous screen. ; Being the first line of the vertical blank overscan area, it is normally not visible. loop 282 [COLUBK: WSYNC: overflow increment colour] ; Increment background colour for every scanline overflow increment jiffies ] Here are some artifacts of the compilation. The assembler listing: https://language.meta.frl/examples/platforms/Atari/2600/rainbow.list A VICE labels file, for debuggers: https://language.meta.frl/examples/platforms/Atari/2600/rainbow.labels The memory sections map: https://language.meta.frl/examples/platforms/Atari/2600/rainbow.map It's my second 2600 program; please be gentle. ? The language will be cross-platform on as many systems as possible. 2600 programs are developed by cross-compiling. In many cases, it is also needed to pre-compute data for a 2600 program. You will be able to write such tools in the same language, on your PC or Mac or other favourite system.
- 2 replies
-
- 6
-
- programming language
- cross-compiler
- (and 6 more)
-
For about a month I have been studying a little bit of Assembly through the great material gathered on the Random Terrain website. (https://www.randomterrain.com/atari-2600-memories.html#assembly_language) Although I managed to create my own kernel, several parts of it I still don't understand. And instead of spending effort with such deep learning, I researched if it was possible to simply create a kernel for batariBasic and continue programming in bB. I found this post which presents a way to use a custom kernel. With some modifications I got to this version below. It's a 2LK and I'm trying to use the same variables as bB to control the players, but this is the problem: I can't (I don't have enough knowledge) use the players pointer correctly. Could anyone clarify my ideas? Player0Draw = $A4 ; I'm not using the vars (0-47) Player1Draw = $A5 BackgroundPtr = $A6 ; $A7 .customdrawscreen custom_eat_overscan ;bB code runs during overscan. We wait for overscan to finish so the ;frame timing doesn't get screwed up. lda INTIM bmi custom_eat_overscan custom_do_vertical_sync ;just a standard vsync lda #2 sta WSYNC ;one line with VSYNC sta VSYNC ;enable VSYNC sta WSYNC ;one line with VSYNC sta WSYNC ;one line with VSYNC lda #0 sta WSYNC ;one line with VSYNC sta VSYNC ;turn off VSYNC custom_setup_vblank_timing ;use bB timing variables so it should work with both PAL and NTSC ifnconst vblank_time lda #42+128 else lda #vblank_time+128 endif sta TIM64T ; feel free to throw useful pre-kernel code in here, so long as it ; completes before vblank is over. custom_eat_vblank ;wait for vblank to complete lda INTIM bmi custom_eat_vblank lda #0 sta WSYNC sta VBLANK custom_setup_visible_timing ;my preference is to use TIM64T to ensure a full screen is drawn. lda #230 sta TIM64T ;------------------------------------------------------------------------------ ; Desenha a parte superior da tela ; 192 - 22 scanlines = 192 - (11*2) = 170 lda #$02 ; Cor cinza no PF sta COLUPF ; COR no PF lda #1 ; sta CTRLPF ; Liga o REFLECT ldx #11 UpperSection: sta WSYNC lda customPFPattern,x sta PF0 sta PF1 sta PF2 lda customPFColor,x sta COLUBK sta WSYNC dex bne UpperSection stx PF0 stx PF1 stx PF2 ; y position lda #80 adc player0height sbc player0y sta Player0Draw ;------------------------------------------------------------------------------ ;-- AREA DE JOGO ;------------------------------------------------------------------------------ ; Desenha a área de jogo ; 170 - 160 scanlines = 170 - (80*2) = 10 (base ... not implemented) ldy #80 ; Carrega o y com o tamanho da área de jogo KernelLoop: ; 15 - todal de 15 ciclos, vindos do bne KernelLoop ; Continuação da segunda linha do 2LK ; precalcula os dados usados na primeiralinha do 2LK lda player0height ; 2 17 - altura do Player0 - IMPORTANTE!! este valor deve ser altura-1 dcp Player0Draw ; 5 22 - Decrementa Player0Draw e compara com a altura bcs DoDrawGrp0 ; 2 24 - (3 25) se o Carry estiver setado, player0 está na scanline atual lda #0 ; 2 27 - caso contrário, desliga o player0 .byte $2C ; 4 31 - $2C = BIT with absolute addressing, trick that ; causes the lda (HumanPtr),y to be skipped DoDrawGrp0: ; 25 - 25 ciclos do pior caso na linha bcs DoDrawGrp0 lda (player0pointer),y ; 5 30 - carrega o formato do player0 <<----------------------------- It's not working sta WSYNC ; 3 33 - Aguarda o fim da scanline ;------------------------------------------------- ; começo da primeira linha do 2LK sta GRP0 ; 3 3 - @ 0-22, desenha o player0 efetivamente (entre os ciclos 0 e 22) lda (BackgroundPtr),y ; 5 8 - Atualizo a linha do BG sta COLUBK ; 3 11 - guardo o valor do BG no resitrador COLUPF lda (player0color),y ; 5 16 - Pega a cor do Player0 sta COLUP0 ; 3 19 - seta a cor do Player0 ; todo esse código acima precisa estar entre o ciclo 0 e 22 ; para adicionar mais alguma coisa neste scanline, é preciso liberar algo acima ; sobraram apenas 3 ciclos ... é possível ainda colocar algum padrão de PF em PF1 e PF2 ;-------------------------------------------------- ; pre calcula os dados necessáriso para a segunda linha do 2LK ; lda player1height ; 2 21 - altura do Player0 - IMPORTANTE!! este valor deve ser altura-1 ; dcp player1y ; 5 26 - Decrementa Player1Draw e compara com a altura ; bcs DoDrawGrp1 ; 2 28 - (3 18) se o Carry estiver setado, player1 está na scanline atual ; lda #0 ; 2 31 - caso contrário, use 0 para desligar o player1 ; .byte $2C ; 4 35 - $2C = BIT with absolute addressing, trick that ; causes the lda (BoxPtr),y to be skipped DoDrawGrp1: ; 28 - 28 ciclos vindo do bcs DoDrawGRP1 ; lda (player1pointer),y ; 5 32 - Carrega a aparencia do player1 sta WSYNC ; 3 35 - Aguarda o inicio de uma nova scanline ;--------------------------------------- ; inicio da segunda linha do 2LK ; sta GRP1 ; 3 3 - @0-22, desenha o player1 efetivamente (entre os ciclos 0 e 22) ; lda (player1color),y ; 5 8 - Pega a cor do Player1 ; sta COLUP1 ; 3 11 - seta a cor do Player1 ; todo o codigo acima precisa estar entre os ciclos 0 e 22. ; ainda há 11 ciclos sobrando, talvez um playfield ou ball, ou missile ; possa entrar aqui neste ponto. dey ; 2 13 - decrementa o y bne KernelLoop ; 2 15 - se não for igual a zero, pula plá pra cima ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ sty COLUBK custom_eat_visible ;wait for the visible display to complete lda INTIM bne custom_eat_visible custom_setup_overscan_timing ifnconst overscan_time lda #35+128 else lda #overscan_time+128-3-1 endif sta TIM64T lda #%11000010 sta WSYNC sta VBLANK ;bB macro to return from a bank-switch gosub or from a regular gosub. RETURN customPFPattern .byte %11011001 .byte %11111111 .byte %11011001 .byte %11001001 .byte %11011111 .byte %11011001 .byte %11011001 .byte %11001001 .byte %01001001 .byte %01001001 .byte %01001001 .byte %01001001 .byte %11001001 .byte %00001000 .byte %00001000 .byte %11001001 .byte %11011001 customPFColor: .byte $00, $AA, $00, $AA, $00, $AA, $00, $AA, $00, $AA, $00, $AA, $00 Thanks in advance.
-
Glad to show an emulated MAC/65 environment with DDT, that can be use from a web page when you want to do some assembly in your free time : https://eahumada.github.io/AtariOnline/mac65/mac65-mame.html Example: ENTER #D:SPRITE1.LST ASM DDT G 500B (You can use the numeric keypad as joystick and some times when you have a game-pad and MAME recognize that is connected you can move the sprite) Sadly, JavaScript MAME is not an accurate emulator, but I have the hope than in the future some other JavaScript/WebAssembly emulator emerge (jsAtari800 maybe? jsAltirra?) to allow to publish Atari interactive 8-bit content Here is the page for the work in progress Project, please feel free to fork and use to create your own content: https://eahumada.github.io/AtariOnline/ Credits to '@8-bit and more' for the inspiration, when I see his videos I don't have and Atari with Mac65/DDT cartridge at hand, then I get this idea and also thinking how the authors of 8-bit content can share their creations live online, for teach and learn 6502 Atari programming.
-
Hello all, I'm currently teaching myself how to program the 2600 using the 8bit workshop tutorials. Currently, I am wondering how to slow down player movement. Here is the code I am currently using for player movement. ; Read joystick movement and apply to object 0 MoveJoystick ; Move vertically ; (up and down are actually reversed since ypos starts at bottom) ldx YPos lda #%00100000 ;Up? bit SWCHA bne SkipMoveUp cpx #2 bcc SkipMoveUp dex SkipMoveUp lda #%00010000 ;Down? bit SWCHA bne SkipMoveDown cpx #183 bcs SkipMoveDown inx SkipMoveDown stx YPos ; Move horizontally ldx XPos lda #%01000000 ;Left? bit SWCHA bne SkipMoveLeft cpx #16 bcc SkipMoveLeft dex SkipMoveLeft lda #%10000000 ;Right? bit SWCHA bne SkipMoveRight cpx #153 bcs SkipMoveRight inx SkipMoveRight stx XPos rts Normally, I am used to coding for the NES and I would be able to just DEX and NOP until the player slowed down, wondering what I would do here in this instance. Thank you! And here is a link to my current test project, took me all day yesterday how to figure out the 'ground' bit of playfield 2600 Test
- 10 replies
-
- 8-bit workship
- tutorials
-
(and 2 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)
-
Greetings and felicitations, children of technology! A few of you may know me from around three decades back. I have to congratulate you all on this cool forum, that has amazing activity. I am happy that the community is still there. I am contacting the community again, because I am doing some work on Atari again. I am making a new programming language, that will be general-purpose, but that I am targeting at 8-bit Atari first. Most new languages don't target the old machines. There are a few exceptions, but they target the vintage machines specifically, and are not meant as general-purpose languages for modern systems. I think this is feeble and probably wrong in terms of language design: there are many bad reasons, but no good reason to not support small systems. C is still used everywhere, and it can do it. I think any new language should improve on C; it should not be less capable. I always thought this should be possible, and it is turning out to be true. At first I thought it would be harder to support the old systems, but it actually turned out to be easier, and it helped get the project off the ground. Small systems are much easier to work for due to less complexity, they are more motivating, they provide meaningful results earlier, they keep you aware of performance and they prove you can target very small devices, such as for Internet of Things. Like how Contiki became an IoT operating system starting on C64. I have wanted to do this language for some three decades, but the industry became ever more complex faster than I could master it. Every time I thought I could improve some things, the platform I was using was already outdated. For a quarter century, I didn't really know how to improve languages on the newest platforms, so I tried to use the best ones I could find. Yet almost every time I wanted to do a project or a commercial assignment and needed the platform and language to just work, I ran into walls that debilitated my efforts. This was all the more frustrating because there once was a system that I could do anything on that I wanted: my trusty Atari 8-bit. Perhaps my projects are too ambitious, yet this was no problem on Atari. I desperately need that power and control back, and in the past years, the puzzle pieces started to come together. Now it's a matter of doing the enormous amount of work required from a modern language. I am half a year into the project, and am double as productive as I have ever been. The language is mostly inspired by REBOL, of Amiga heritage: https://en.m.wikipedia.org/wiki/Rebol REBOL has great clarity and conciseness of expression, and a great capacity for abstraction, which can be used to define cross-platform abstractions. It has been measured to be the most expressive general-purpose programming language: https://redmonk.com/dberkholz/2013/03/25/programming-languages-ranked-by-expressiveness/ Among others, I was further inspired, for their performance and support of native Atari functionality, by Action!: https://en.m.wikipedia.org/wiki/Action!_(programming_language) and by PL65: https://atariwiki.org/wiki/Wiki.jsp?page=PL65 The language is past the proof-of-concept stage, but it is still very incomplete. On the other hand, it will match features expected from an 8-bit language before it will be able to match expectations for a modern language. I am working on a sneak preview release to let people try it. I will post examples as I go, if you like. After the sneak preview I will be working further on a crowd-funding website, where you will be able to influence the development through donations.
- 252 replies
-
- 12
-
- programming language
- compiler
- (and 7 more)
-
After almost 40 years. I finally purchased an Atari 800 so I can play the 2 games I still had a printout of on real hardware. I had a basic game that I retyped in from compute magazine that I have running on an ATR image. Space Mines was my Assembly game - 4k in length - that I wrote and I have it running on an ATR image by using Binary Load "L" on Dos 2.5. If I want to make Space Mines game a cartridge, with code changes so I can start it at a different address, what would be the quickest and easiest way to make a cartridge? I have a couple of old Brown carts I can open and replace stuff. All the classic consoles/computers sit at the corner of our office. I don't know why my child self liked the name "space" in all my titles. ?
- 29 replies
-
- 20
-
In my ramblings with Level-2 and Level-3 I/O I found that, if a file is opened for Level-3 I/O, a Level-2 I/O call appears to fail. In a test program I open a DF128 file and read the contents. At EOF I close the file. The test program uses a copy of Tom Bentley's "TCIO" library that I disassembled and modified. I added two functions, 'tstat' and 'tstats' 'Tstat' uses the Level-3 STATUS (Op-code 9) command to get information about the test file. 'Tstats' uses the Level-2 Get-File-Info (0x14) command to get information. I was going to merge the two so I can get info to load a PAB for Level-3 access. Before and after each Level-3 TCIO call I use 'tstat' and 'tstats' to see how the information changes as the program performs the various library calls: Use 'tstat' to get file status (Level-3 Op-code 9). Print results and info. Use 'tstats' to get file information (Level-2 Op-code 0x14) Print results and info. Do a Level-3 operation. Get file status (Level-3 Op-code 9). Print results and info. [Repeat Step 1.] Get file status (Level-2 Op-code 0x14). Print results and info. [Repeat Step 2.] I found that Level-2 'Get File Info' command appears to fail with Error Code 7 (file error) if the file is opened for Level-3 access. After closing the file the Level-2 commands once again work. My merged file-info function will have to skip calling the Level-2 call if the file is open, but I do not see that being a problem. Also, I hate to say that my copy of Thierry Nouspikel's TI99-Pages has the 0x14 command returning the record-count at Result-pointer+8 as a byte value. Fred Kaal says this is a word value, and my experiments seem to indicate the record-count is a word. Both sites have been immensely useful for my experiments. K-R.
-
I'm learning assembly, and in reading the Editor/Assembler manual for the DIVision statement, I was surprised to find that if the divisor and dividend are equal, DIV doesn't return 1 with remainder=0. It sets the overflow bit. I assume that the DIV statement works by repeated subtractions. So I would naively expect that, say, 5/5 would involve subtracting 5-5, incrementing the quotient to 1, and checking the remainder (0). Why does it cause an overflow, instead? (I don't know if this is really appropriate for the Development sub-forum, but I thought it might be because of getting into the nuts and bolts of the CPU. Apologies if it's in the wrong place.) Related: I have found an error in the E/A manual for the AB command that isn't listed in the Erratum. Is anybody compiling a list of additional E/A manual errata here?
-
So, as I've mentioned before, I've recently come back to Atari 8 bit computing after decades away. Currently I don't actually have any of my old hardware, other than 520ST. I am in the progress of procuring some old hardware in the form of an 800XL and supporting hardware(possible disk drives/SIO solution/display/etc). One of the goals I have set for myself is to *finally* do some programming for the old 800XL. I did BASIC back in the day on my old 400/800XL, when I was a kid. Then didn't really touch computing from 90-96 or so while I was in the US Navy. After leaving the navy I went to school and became a software engineer, which I still am today. But I never have done any assembly programming. Until I have actual hardware to develop on, I plan on using one of the emulators I've used over the years(most likely Altirra) to write/test my code. I'm also considering using a windows editor/compiler for the actual development work, whether I have actual hardware or not. Does anyone have any thoughts on how they would proceed if they were me? More later...
- 12 comments
-
- 800xl
- programming
-
(and 1 more)
Tagged with:
-
Hi, all, I'm practicing assembly language with the Editor/Assembler, using the xdt99 cross-assembler with Emacs on a Mac and running it on js99er.net for the emulator. So far, everything has gone very smoothly...but this one weird bug: If I have a period in a TEXT directive string, I get unpredictable VDP results when I display it using VMBW. For example, I printed my name to the screen (along with some other text), with the text set as: MSG2 TEXT 'Timothy S. Hamilton' The other strings printed to the screen just fine with VMBW, but this one came up with the last byte displayed as a space: Timothy S. Hamilto Thinking I'd miscounted the bytes by one, I tried other combinations of characters. It turned out it was the period causing the problem. Later, after putting it back in, sending this same string to VMBW caused the screen to flash with colored noise. Another time, it made it go blank, with a solid color on the border. [Edit: It was another version of the string that caused the flashing, with one or two characters changed, but with the period still there. I haven't tried replicating that particular behavior since then.] I thought it might be some glitch in encoding the period, so I opened up my assembly source file in E/A directly and put the period in there. It displayed the period just fine. Does anybody have a suggestion as to what might be causing this and how to get around it?
-
I'm using my HDR ramdisk a lot while developing my TiVi editor. It's a real time saver. It's especially helpful when dealing with large files (which is kinda my primary purpose why I started working on TiVi). Today I read the updated documenation the InsaneMultitasker provided as draft. In there I learned that with ROS it's possible to use data buffers that reside in CPU RAM insead of VDP RAM. That is something I really want to try, because even with a RAMDISK reading a large file (think >100 kilobytes) takes some time. Now my challenge is; How can I easily detect from assembly language if I'm dealing with a "high-speed" disk device compared to a "slow" disk device ("floppy"). With a high-speed device I mean: CF7+, Nanopeb TIPI HDR ... I see differents possible paths here: CRC checksum on DSR space (but won't work with RAMBOS? Self modifiying code, configuration stored here too?) Check on some specific device feature? Actually I think that the CRC checksum logic would work quite well (I already did a test program on that about a year ago), but I'm not sure about HDR. Thinking about it would be cool if there is some unified way to detect device capabilities accross devices. For example a standard where there's a device "capabilities" file that is automatically created when the device is formatted. That file could then be processed from TI-Basic, assembly language or any other language supporting file I/O. Any ideas?
-
I'm declaring R3 to be the final version. (This is my first post, but I've been lurking for a few weeks while writing this game, and I've really enjoyed trying out other homebrews.) Water Diver is a reflex game, for one or two players (simultaneously): dots are bouncing everywhere in the water; collect the good ones, while avoiding the bad ones! Five Six Twelve exciting levels, four exciting songs. ? No title screen yet... The graphics are pretty simple, but I think it's fun, and challenging. I have yet to break 150 points, except when testing at slow emulation speeds. There can be a lot going on onscreen. My high score during development is 162; for R3 as released, my best so far is 131. Latest release: water_diver_R3.bin (NTSC) water_diverpal_R3.bin (PAL60) Older releases: water_diver_R2.bin (NTSC) water_diverpal_R2.bin (PAL60) water_diver.bin (NTSC) water_diverpal.bin (PAL60) I've tested in Stella 6.0.1, and on an NTSC 2600. In Stella, it's difficult with keyboard, but I find that it works quite well with a mouse. The two-player mode hasn't had a lot of play; please let me know what you think! Also feel free to suggest PAL color tweaks, or whatever else. I have a very small amount of room left. I expect to at least add a few more levels. Or maybe a title screen. Controls: Joysticks. Either player can start at any time, by pressing their fire button; after that, just steer the button will give a lateral speed boost. Between games, you can cycle through game modes, with Select: In the default mode, you advance from level to level in time with the music. In "flow mode" you stay on one level forever -- any level you have reached previously. (This is more fun than it sounds!) Hints: There's no way to only one level where you can restore your health. You can see how much damage you've accumulated by looking at your score. The faster you pick up the good dots, the sooner new ones can appear. (It can be dangerous to pay too much attention to this fact.) When the water turns green, watch out... The game is inspired by https://www.khanacademy.org/computer-programming/water-diver-sounds-added/5430351862169600
- 14 replies
-
- 4
-
- atari 2600
- homebrew
-
(and 2 more)
Tagged with: