Rybags Posted August 12, 2009 Share Posted August 12, 2009 No good. Worst-case situation with the OS switched in sees the change happen in Column 21 (of 0-31). Switching OS out gives us back 11 cycles which would only bring it back to Column 7. 4 cycles earlier would probably give us what we want. Quote Link to comment Share on other sites More sharing options...
Rybags Posted August 12, 2009 Share Posted August 12, 2009 I was almost going to sugggest reserving a register, but it's too much of a sacrifice. Another idea if you need to change PRIOR and your routines need to do other different stuff - just use $xx40 and $xxC0 as the base for your 2 DLI routines. Then you can just LDA #$40, STA PRIOR, STA $200. So, I suppose your best strategy now is to just stick to Timers... try and get you some nice Pokey alignment code so you can squeeze it down to the exact group of cycles. Quote Link to comment Share on other sites More sharing options...
Rybags Posted August 12, 2009 Share Posted August 12, 2009 2 last ditch ideas, neither worked... 1. Set HSCROL to $0E and use scrolled lines, that distorts the DMA pattern to the right, but doesn't help us here. 2. In first DLI, change DMACTL to turn off Instruction fetch. No help either. The mode lines repeat but the DLIs don't. Quote Link to comment Share on other sites More sharing options...
emkay Posted August 12, 2009 Share Posted August 12, 2009 I say go for it 100% so far as creating a Wolf3D clone - if it takes 128K or 320K to make it work, well so be it. If it ends up running at 8 FPS once all the 3D and sprite mask/render comes into play... oh well, but at least it will look good. 8 FPS? Do we really need another slide show or unplayable demo? For the FPS game 15 FPS is a minimum, and 20 would be fine enough. I mean go for a game that is playable. FPS game should be dynamic, it's not an cRPG... regards, Jakub Seeing NOT having 100 other 3D projects out there, I'd prefer to have a game with 8fps in prior to nothing. Depending on the horizontal resolution, high framerates do not make sense. Vice versa, they waste too much cpu cycles, by building more frames than the display can show. Mood on the C64 has around 10 fps (as the coder pointed out) , and it seems fast enough for the game itself. Quote Link to comment Share on other sites More sharing options...
Thelen Posted August 12, 2009 Share Posted August 12, 2009 Wow, this looks truly above my espectations ! In comparision to MOOD from the c64 this looks far more detailed and colourful ! Great work ! Hope you stay motivated to expand it ! I saw this ZX movie : http://www.youtube.com/watch?v=vzm9KkJ5lGI&NR=1 Quote Link to comment Share on other sites More sharing options...
NRV Posted August 12, 2009 Author Share Posted August 12, 2009 I hope to do it a lot better than Mood ... I suppose the c64 can do better anyways, the other time someone posted a link to a demo that have a 3d maze part that looked very nice.. not with 256 colors, but with better resolution I have seen the ZX demo, but they said that the machine is running in some kind of turbo mode.. but I like the bob up and down effect and some tricks they use to draw the sprites Regards Quote Link to comment Share on other sites More sharing options...
roland p Posted August 12, 2009 Share Posted August 12, 2009 This looks great! I didn't know such colorful graphics where possible on the good old 8-bit! Quote Link to comment Share on other sites More sharing options...
potatohead Posted August 12, 2009 Share Posted August 12, 2009 Totally!! Love what I'm seeing so far. Quote Link to comment Share on other sites More sharing options...
NRV Posted August 17, 2009 Author Share Posted August 17, 2009 Update: project-M 1.1 - Added song from Miker. Being my first time integrating RMT I should say that it was pretty painless, the only thing that I had problems with, was the reset of the voice that I was using for the IRQ. I don't know if there is a "correct" way to do this (I tried with the SFX feat without success), but I commented the code that updated AUDF4, AUDC4 and AUDCTL in the RMT player and it worked. - Added special NTSC version with similar colors to the PAL version. Should be used with the Larry-NTSC palette that seems to be the more accurate from what I remember from my own works (it was posted in this forum, but I don't remember the topic). Also added the laoo palette and the NTSC one as .PAL formats, for those that want to use them in Gimp or some other programs. These are still only for the emulator, as I haven't had the time to sync the IRQ's in real hardware yet (hoping that the new Altirra emulator arrives soon ) Regards! (Many thanks to Miker for the song!) PM1_1.zip Quote Link to comment Share on other sites More sharing options...
eru Posted August 19, 2009 Share Posted August 19, 2009 Hi NRV, Just wanted to wish you good luck with the project. Having what you achieved so far is a nice first step, but the biggest hurdles are in front of you. I do have some experience in writing similar stuff, so a few notes: do not underestimate the complexity of ray-caster your texturing routine (around $4000), if I get it right, does not allow smooth horizontal scaling of textures - wonder how you plan to manage this, as sticking to drawing full bytes will produce very weird artifacts the GFX mode that you are using, while looking very good, sucks wrt performance. So for a fast-paced game, go for 9++ (4x stretched GR9) or something else If you manage to make the entire thing (free-walk wolfenstein) work with 5 FPS with this graphics, that's already an achievement. Good luck! eru Quote Link to comment Share on other sites More sharing options...
NRV Posted August 20, 2009 Author Share Posted August 20, 2009 Thanks eru Do not worry, I am no underestimating the "beast" that is a ray caster (and I will try to surprise you with the next stage ) Could someone try this on real hardware, PAL or NTSC? PM1_real_HW.zip the last Altirra 1.3pre10 seems to like it.. (but in Atari800Win it starts one line too late) (I should be sleeping..) Regards! Quote Link to comment Share on other sites More sharing options...
Rybags Posted August 20, 2009 Share Posted August 20, 2009 Seems fine graphically (PAL 130XE) but the music is crap compared to running it in the emulator. Quote Link to comment Share on other sites More sharing options...
NRV Posted August 21, 2009 Author Share Posted August 21, 2009 Seems fine graphically (PAL 130XE) but the music is crap compared to running it in the emulator. Thanx!, good.. correct sync at last.. But about the sound, do you think is a problem with the song and the clock or maybe some bug in my code? When I test it in Atari800Win it sounds the same as before. In Altirra it sounds different than in Atari800Win.. like with more bass.. Regards Quote Link to comment Share on other sites More sharing options...
Rybags Posted August 21, 2009 Share Posted August 21, 2009 (edited) Initially I thought maybe it was trying to play in Stereo which of course on a normal machine means that 2 notes get plugged into a voice in quick succession, with the usual result being that it doesn't sound very good. Then I thought maybe it's just the old "Bad sounds after SIO" which afflicts some programs. It actually sounds a little bit like it's playing the sound only on every second VBI and zeroing the voices on the other ones. If I get time later I might sample it, might provide an answer. Edited August 21, 2009 by Rybags Quote Link to comment Share on other sites More sharing options...
NRV Posted August 21, 2009 Author Share Posted August 21, 2009 I think I found the problem, try this version: PM1_real_HW_fix1.zip I was doing a: lda #1 sta STIMER every frame (in the DLI that starts the IRQ's).. now only in the init (Altirra detected the problem correctly). Also, seems that the song used an effect that changes the clock for a moment, near the end, so now I'm forcing the 64KHz clock in every frame (inside the RMT player's code), to avoid the screen corruption that it caused. Regards Quote Link to comment Share on other sites More sharing options...
NRV Posted August 22, 2009 Author Share Posted August 22, 2009 Hi, I have 2 new versions for PAL hardware: PM1_PAL_HW_15khz.zip PM1_PAL_HW_179mhz.zip I have implemented the IRQ's with the 1.79MHz clock and changed a little the method for the 15KHz clock (to something more reliable, I think). When the programs start you can see where the GTIA mode changes are made, but if you press any key all goes back to normal. For the 1.79MHz method I needed to use a value of 109+114 in AUDF1, for one IRQ every 2 scan lines, but if I wanted one IRQ in every scan line I needed to use a value of 109.. I don't know why is this (only tested under emulation anyways). Also I just clocked channel 1 to 1.79MHz, but didn't joined channel 1 and 2 (is this necessary?, I don't want to lose two sound channels to use the IRQ's). At least they work on the last Altirra beta emulator.. Could someone test them in real hardware? Thanks! Quote Link to comment Share on other sites More sharing options...
Rybags Posted August 23, 2009 Share Posted August 23, 2009 No need to join Channel 1+2. You'd effectively lose Channel 2 doing so since you'd have to keep it at value 0 which is essentially what you're already doing anyway. Quote Link to comment Share on other sites More sharing options...
analmux Posted August 23, 2009 Share Posted August 23, 2009 For the 1.79MHz method I needed to use a value of 109+114 in AUDF1, for one IRQ every 2 scan lines, but if I wanted one IRQ in every scan line I needed to use a value of 109.. I don't know why is this (only tested under emulation anyways). Also I just clocked channel 1 to 1.79MHz, but didn't joined channel 1 and 2 (is this necessary?, I don't want to lose two sound channels to use the IRQ's). 1 scanline = 114 cycles thus 2 scanlines = 228 cycles. the 1-channel (not 16bit) 1.79mhz setting uses the following formula: If P is the needed period (in this case 228 or 114 cycles), then we write P-4 to AUDF1, thus 224 or 110. I wonder how you found 109. The -4 (in the formula P-4) is a result of pokey's internals. it uses some cycles to reinitialize one period. I'm not an expert in gfx coding for 3d objects, but I wonder how you will deal with the horizontal rescaling of gfx textures. anyway, good luck with the project. It already looks very impressive. Quote Link to comment Share on other sites More sharing options...
Rybags Posted August 23, 2009 Share Posted August 23, 2009 (edited) 109 sounds right, remembering that you always use (AUDF-1) in frequency calculations. I gotta wonder though... once you expand this to a game. Would you profit by just doing the PRIOR changes in a Kernal, and just embed some of the game logic within? A cumbersome approach for sure, but if it's the case that a game needs areas of memory cleared or moved, it would probably work out pretty well. Edited August 23, 2009 by Rybags Quote Link to comment Share on other sites More sharing options...
analmux Posted August 23, 2009 Share Posted August 23, 2009 (edited) 109 sounds right, remembering that you always use (AUDF-1) in frequency calculations. no no no...AUDF+1 is the period using 64 or 15 khz divisor. It becomes AUDF+4 for 1.79mhz, AUDF+5 for 2tone filter+1.79mhz, AUDF+7 for 16bit&1.79mhz, AUDF+8 for 2tone filter+16bit+1.79mhz etc. maybe the 109+114 didn't cause you (NRV) any problems, as in emulation the timing seems 'quantized'. Edited August 23, 2009 by analmux Quote Link to comment Share on other sites More sharing options...
NRV Posted August 23, 2009 Author Share Posted August 23, 2009 (edited) AUDF+1 is the period using 64 or 15 khz divisor. It becomes AUDF+4 for 1.79mhz, AUDF+5 for 2tone filter+1.79mhz, AUDF+7 for 16bit&1.79mhz, AUDF+8 for 2tone filter+16bit+1.79mhz etc. maybe the 109+114 didn't cause you (NRV) any problems, as in emulation the timing seems 'quantized'. Is good to know that, I normally sync the effects through trial and error Right now I cannot test this in PAL hardware, so maybe you are right and it doesn't work with this value. I gotta wonder though... once you expand this to a game. Would you profit by just doing the PRIOR changes in a Kernal, and just embed some of the game logic within? A cumbersome approach for sure, but if it's the case that a game needs areas of memory cleared or moved, it would probably work out pretty well. Yep, that's like the optimal solution, I had taught about it, but in reality is too much work. I don't have a "constant workload" in every frame that I can "interleave" with something like that right now.. maybe for another project. Regards. Edited August 23, 2009 by NRV Quote Link to comment Share on other sites More sharing options...
eru Posted August 23, 2009 Share Posted August 23, 2009 NRV: I'm following this thread, and I think you are spending too much time here on things that are effectively details. I would strongly encourage you to invest your time into further development of the prototype, and only once you see if/how the entire engine fits together, start polishing things. Good luck! Quote Link to comment Share on other sites More sharing options...
smartkitten26 Posted August 24, 2009 Share Posted August 24, 2009 (edited) Wow! That's amazing for an 8-bit game, it seemed like only SNES games looked like that. BTW, is that for the 8-bit computer or the 5200? Edited May 19, 2015 by smartkitten26 Quote Link to comment Share on other sites More sharing options...
NRV Posted August 25, 2009 Author Share Posted August 25, 2009 Wow! That's amazing for an 8-bit game, it seemed like only SNES games looked like that. BTW, is that for the 8-bit computer or the 5200? Well, is just a technical demo right now.. maybe some day it will be a game for the 8-bit NRV: I'm following this thread, and I think you are spending too much time here on things that are effectively details. I would strongly encourage you to invest your time into further development of the prototype, and only once you see if/how the entire engine fits together, start polishing things. Don't worry that much.. I suppose that you want to see this thing completed as much as me, but don't think that I am losing time just because I'm asking some questions. You are not going to see me talking about the problems that I will have with the next stage, just the final result in one or two months (I hope), that's the way I "work". Also, sometimes I like to advance in the details, sometimes in the main algorithms.. I can do both . This is my "road" and is supposed to be fun over all things.. My principal "enemies" right now are the "scaling in X" artifacts, but I think I can minimize them without compromising the frame rate (my main goal).. all other things are advancing well. The luck and encouragement are well received by the way Regards. Quote Link to comment Share on other sites More sharing options...
xt5 Posted August 25, 2009 Share Posted August 25, 2009 Very nice!! It looks awesome, keep working on it!! 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.