+karri Posted January 21 Author Share Posted January 21 NTSC vs PAL music question. The xtal in the SN cart has NTSC frequency. So I assume that to get correct pitch I should choose NTSC in Furnace tracker. The pitch should be the same on both systems because the xtal is on the cart. But to get the same play speed I want to write the tune for 50 Hz interrupts and perhaps skip 10 interrupts per second on NTSC systems. Like: NTSC: 1, 2, 3, 4, 5, skip, 1, 2, 3, 4, 5, skip PAL: 1, 2, 3, 4, 5, 1, 2, 3, 4, 5 Is this something that has been done before? And is it a bad idea? I would only skip audio processing... Quote Link to comment Share on other sites More sharing options...
Eagle Posted January 21 Share Posted January 21 2 hours ago, karri said: Is this something that has been done before? And is it a bad idea? Yes. I did that with some of pokey music for A7800 In Atari 8 bit it is common practice. Also you could use DLI to play more accurate (but not worth it) 1 Quote Link to comment Share on other sites More sharing options...
+karri Posted January 21 Author Share Posted January 21 1 hour ago, Eagle said: Yes. I did that with some of pokey music for A7800 In Atari 8 bit it is common practice. Also you could use DLI to play more accurate (but not worth it) Thanks! I did it now and Walter just confirmed that it works on both consoles (NTSC and PAL). I also have the same mod for sfx effects. 1 Quote Link to comment Share on other sites More sharing options...
+karri Posted January 27 Author Share Posted January 27 I have spent time in order to understand sporadic errors in the drawing. The errors never occur when I do things slowly by hand. But when there is a lot of action the updating of zones appear to fail. The code is simply "zone.hpos += 8" or "zone.hpos -= 8". ; ; h[i].hpos -= 8; ; lda M0001 ldx M0001+1 jsr aslax2 clc adc M0005 sta ptr1 txa adc M0005+1 sta ptr1+1 ldy #$03 lda (ptr1),y sec sbc #$08 sta (ptr1),y You can see the sporadic errors in the video clip when I scroll around the playfield. As I cannot detect when the error happens I re-draw the screen after the scrolling. Do you have an idea what kind of race there could be? Edit: My guess is that there is two processes messing with the same structure. One process running during vblank and the other running during display. The "display" process is the main one using the C stack while the vblank parts are all in asm. Perhaps I must do all DLL and zone processing in asm during vblank? Unfortunately it means that I need handshaking between the processes. 1 Quote Link to comment Share on other sites More sharing options...
+karri Posted January 27 Author Share Posted January 27 Getting rid of initializing code after startup. I just got an idea to put all the initialisation code in BANK 5 ($d000). It is mapped there at startup and as soon as I got everything running I don't need to map it anymore. This cleans up a lot of code run only once from the $f000 segment. The fixed banks $8000, $9000, $b000 and $f000 should mainly contain library routines needed all the time. The bank $d000 could contain the level dependent code that you run once you have set up the tiles, maps and the music. Here is a layout of how Wizzy uses the SN cart: Name Start End Size --------------------------------------------- EXEHDR 000000 00007F 000080 ZEROPAGE 000040 000059 00001A EXTZP 00005A 00006B 000012 DATA 001800 00187D 00007E BSS 00187E 001C90 000413 MAP0 004000 004FFF 001000 RAM0 RAM1 TILE0 005000 005FFF 001000 RAM0 TILE1 006000 006FFF 001000 RAM0 COLLCHAOS 005000 006485 001486 RAM1 FURHUFF 005000 00620B 00120C RAM1 FONT 007000 007FFF 001000 RAM0 FIGHTTUNE 007000 007544 000545 RAM1 HUFFMUNCH 007E71 007FFF 00018F RAM1 CODE 008000 00925D 00125E RODATA 009300 009414 000115 WIZIDLE 00A000 00AFFF 001000 HERO WIZRUN 00A000 00AFFF 001000 HERO COMMONA 00B000 00B000 000000 SPIDER 00C000 00CFFF 001000 MONSTER/NPC ONCE 00D000 00D01D 00001E TRANSFER BANK INITS 00D01E 00D2EF 0002D2 NPC 00E000 00EFFF 001000 MONSTER/NPC COMMONB 00F000 00F1B1 0001B2 STARTUP 00FF3F 00FF79 00003B ENCRYPTION 00FF7A 00FFF9 000080 VECTORS 00FFFA 00FFFF 000006 Quote Link to comment Share on other sites More sharing options...
Eagle Posted January 28 Share Posted January 28 Below my few examples of horizontal and vertical scrolls in MADS https://forums.atariage.com/topic/337580-scrolling-from-memory-buffer-and-256-characters/ But I think you need double buffering screen. What is size of your tiles? How many sprites you will use on screen at this same time. Are you gonna mix 160A and 160B? What will be height of the screen (192?)? How many bytes per tile you are using in your map data? Will your scrolling be by pixel or tile? Quote Link to comment Share on other sites More sharing options...
+karri Posted January 28 Author Share Posted January 28 Thanks! I should take a look at your examples. I was thinking about double buffering. But usually double buffering is good when you have to re-draw everything for every frame. In the case of 7800 I was afraid of the extra time it would take to set up the DLL's and zones. Once I get the bugs fixed I believe that I just allocate one more column to hide the draw of the new column. That should be pretty smooth. My tiles are 16x32 pixels. The number of sprites on screen is 10 x 12. But for the height I need two zones. One for the top half of the tile and one for the bottom half. The tiles are 160A, the sprites are 160A and 160B. The height of the screen is 384 lines, I think. My map is 64 x 64. 1 byte per tile. I am scrolling by 8 pixels horizontally and 1 zone (16 pixels) vertically. Quote Link to comment Share on other sites More sharing options...
Eagle Posted January 28 Share Posted January 28 56 minutes ago, karri said: The tiles are 160A, the sprites are 160A and 160B. Are you using 4 bytes headers now? 58 minutes ago, karri said: 384 lines, I think. 🤔 Maximum height is 192. Quote Link to comment Share on other sites More sharing options...
Jinks Posted January 28 Share Posted January 28 You would never guess what I can program off screen. 2 Quote Link to comment Share on other sites More sharing options...
+karri Posted January 28 Author Share Posted January 28 46 minutes ago, Eagle said: Are you using 4 bytes headers now? 🤔 Maximum height is 192. Yes, I am using 4 byte headers for the background tiles. I don't obviously know what I am doing. It may be that I have tiles outside my screen. Edit: I checked this. I have 224 lines on the screen. That is 14 tiles of 16 pixels. It works on both NTSC and PAL. Quote Link to comment Share on other sites More sharing options...
Eagle Posted January 28 Share Posted January 28 38 minutes ago, karri said: Yes, I am using 4 byte headers for the background tiles. Just FYI, if I remember correctly when using 160B sprites you have to "reset" back to 160A before the next line. 49 minutes ago, karri said: I have 224 lines on the screen. IMHO is too high, in NTSC you will have only 38 scanlines CPU left free of Maria DMA usage On 1/27/2023 at 4:59 PM, karri said: TILE0 005000 005FFF 001000 RAM0 TILE1 006000 006FFF 001000 RAM0 Are you using Tile0 for the top zone of tile and Tile1 for the bottom one? Quote Link to comment Share on other sites More sharing options...
+splendidnut Posted January 28 Share Posted January 28 6 minutes ago, Eagle said: Just FYI, if I remember correctly when using 160B sprites you have to "reset" back to 160A before the next line. When in 160 pix mode, 160B mode is set (or rather must-be set) on a per-object basis, via a bit in the 5-byte header for each object.... If only 4-byte headers are used, the object can/will only use 160A mode. 1 Quote Link to comment Share on other sites More sharing options...
+karri Posted January 28 Author Share Posted January 28 22 minutes ago, Eagle said: Just FYI, if I remember correctly when using 160B sprites you have to "reset" back to 160A before the next line. Yes. I read about it. 22 minutes ago, Eagle said: IMHO is too high, in NTSC you will have only 38 scanlines CPU left free of Maria DMA usage According to Walter the music and the game works on a NTSC machine. So I go with it for now. I did try lower viewports with less tiles but I did not like it. It feels too cramped and you cannot see where you are going. 22 minutes ago, Eagle said: Are you using Tile0 for the top zone of tile and Tile1 for the bottom one? Actually, just the opposite. Tile0 is the bottom 16 lines of a tile and Tile1 the top 16 lines of a tile. I also plan to re-use the tile set with some custom colour palettes in the dungeon section. I just found out that there is several free palettes I have not used yet. PS. Today I had some discussions with my kids about the UI and controls. And they convinced me to take Wizzy to a different direction. So half of the talents are gone now. The SELECT button is also out. So I am optimistically planning for a Silly Ventures release this year The nice thing is that this releases about half of the banks as there is no longer AOE or DOT damage. The only things left are: - travel mode (witch on a broom) - witch mode (shoot and quick turn to travel) - barbarian (tank and melee) - mage (stealth and crowd control) The switch between modes is a long press on FIRE2 + joystick to choose. This allows me to use a lot more text and images to tell the story. And to keep the gameplay very simple. 1 Quote Link to comment Share on other sites More sharing options...
Eagle Posted January 28 Share Posted January 28 (edited) 30 minutes ago, splendidnut said: When in 160 pix mode, 160B mode is set (or rather must-be set) on a per-object basis, via a bit in the 5-byte header for each object.... If only 4-byte headers are used, the object can/will only use 160A mode. I just checked quickly and 4 byte header can be use as 160B as well DisplayListListFirst :5 .byte $0d,>emptyline,<emptyline .byte $0F,>line1,<line1 .byte $0F,>line2,<line2 .byte $0F,>line3,<line3 :8 .byte $0f,>emptyline,<emptyline emptyline .byte 0,0 line1 .byte <$E000,$c0,>$E000,$1a,10 ;5 byte header - 160B mode on .byte 0,0 line2 .byte <$E000,$1a,>$E000,20 ;4 byte header .byte 0,0 line3 .byte <$E000,$1a,>$E000,30 ;4 byte header .byte 0,0 Below result we have 3 sprites in 160B mode. I remembered this because cost me lot of problems one day Edited January 28 by Eagle 2 Quote Link to comment Share on other sites More sharing options...
+splendidnut Posted January 28 Share Posted January 28 Ah, I didn't realize that was a sticky bit. I just checked my Congo Bongo code... and I used 5-byte headers for all sprites. So I've inadvertently avoided my mistaken knowledge causing issues. 1 Quote Link to comment Share on other sites More sharing options...
Eagle Posted January 28 Share Posted January 28 If I remember correctly only Indirect bit is reset every zone. Maria is starting every new line in Direct mode. Quote Link to comment Share on other sites More sharing options...
+karri Posted January 30 Author Share Posted January 30 I did manage to move scrolling to the IRQ's. But obviously I need to drop something instead. So I cut the IRQ rate for the music temporarily. The effect is very noticable, unfortunately. Is there some good ideas of how to maintain the illusion of speed in the music without giving away that the update rate is going down? One way might be to use irq slots like: 1 music 2 other services 3 music 4 other sevices 5 music I already have lots of "other services" like scroll vertical, load blocks to RAM banks 0 and 1, start music from a new bank. Then I could compose something in 30Hz rate (if Furnace tracker supports it). This could be used when you have lots of action on the screen. Quote Link to comment Share on other sites More sharing options...
+karri Posted February 7 Author Share Posted February 7 I know that this is of no interest to most people. But after weeks of fighting with interrupts and a large screen 224 lines PAL + NTSC I have finally been able to use Furnace tracker music, sfx sound effects and scrolling background. And this is with no artifacts when scrolling stops. And no crashes so far. Enjoy the full screen with 10 * 7 tiles = 160 x 224 pixels. The music is from the SN76489AN chip on the cart run at 30Hz. The scrolling eats the rest of the interrupts. AtLast.mp4 I did not want to start with the animation until I have the fundamentals done. The game itself will not be double buffered or free from artifacts during draw. I rather use the time of the CPU for the characters and playability. 5 Quote Link to comment Share on other sites More sharing options...
Flashback Posted February 7 Share Posted February 7 wow, great work Karri 1 Quote Link to comment Share on other sites More sharing options...
+saxmeister Posted February 18 Share Posted February 18 Your work looks and sounds amazing. I definitely look forward to the progress you are making. 1 Quote Link to comment Share on other sites More sharing options...
+karri Posted February 18 Author Share Posted February 18 That is nice to hear! I hope that Wizzy will bring good feelings to the 7800 community. 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.
Note: Your post will require moderator approval before it will be visible.