Jump to content

NRV

Members
  • Posts

    444
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by NRV

  1. Totally sane.. have more confidence x) There are a couple of posts about binary files near here that can explain better how to configure your program, to load different sections of the file in different areas of memory. So, you could made the .byte data load in the area that you need it. You could also continue loading from disk the data that you need, or to put another example, if you want to write a line to screen you could point the display list to your data, instead of moving all those bytes. But, you should stop worrying about these details for now.. is pretty common to have a lot of different data that you need to move to a specific area or buffer in memory, like with printing text to the screen using OS routines, or moving the data of a game level to a default buffer, etc. Losing 20 or 30 bytes is nothing important for now
  2. Nice one "Split-Man", I suppose if you are going to take all the cycles of the line is better doing it with style
  3. By the way... I'm going to assume that using negative numbers and sometimes doing an add or a subtract is what is confusing you about knowing when you really "added" something or not. If that is the case, then you should test the number coming from your sine tables (I suppose your offset is always positive) with the BMI instruction, to see if it is negative or not. Then: - if the number is positive and you did a ADC, then use the method for add - if the number is positive and you did a SBC, then use the method for subtract - if the number is negative and you did a ADC, then use the method for subtract - if the number is negative and you did a SBC, then use the method for add That should do (if you don't want to change your code so the sin tables only use positive numbers)
  4. You say that, but you could have posted your tables also What he said x) I was going to ask if is just (sin1 + sin2 + offset) or if you add that to another value. If is like MaPa said it would be a good idea (if possible) to transform the range of the sin tables to be always positive. Also remember that after the "lda table,x" you should exit or jump over the next "lda table+86,x" x) To MaPa: when doing the "tb2" path your x register could be from 0 to 191 (assuming offset from 0 to 255), if you add 86 to the start of the table then you get a max possible index of 277, so your table should be of size 278.
  5. Arrrgh.. I still don't get your problem x) I think you fail to answer the important questions, for one what is the range of the numbers that you are adding or subtracting? from 0 to what? With this I still don't see the problem.. if you just added something you use the method that I put for "add", if you subtract something you use the other one.. Why should you need to do that? if you just added something treat it like and add! (and viceversa) Come on Heaven, help us to help you (and the MaPa solution is a very good one if the numbers you are adding or subtracting are in the range 0-43)
  6. You lost me there (I should be sleeping) Why do you not now if you are adding or subtracting a value? I mean... if you just did "adc value" you were adding, if you did "sbc value" you were subtracting.. (in your code I see that you use adc cloc or sbc cloc). Or are you just adding values that can be positive or negative? (255 for -1 for example)
  7. I suppose is already clear, but: - if you add something to your value you need to check if the result is greater or equal to 170, and in that case SUBSTRACT 170 - if you substract something to your value you need to check if the result is below 0, and in that case ADD 170 ... there is no "one magic table".. but you can have two tables, one for the case you just added something to your value, and the other for the case you just substracted something (if you don't mind losing 512 bytes for this... or less, if you compare with 170 before using the tables). ; if you add something to your value in "A" clc adc #something bcs value_over_170 cmp #170 bcc exit1 value_over_170 sbc #170 ; the carry is already set! exit1 ... ; if you substract something to your value in "A" sec sbc #something bcs exit2 value_below_0 adc #170 ; the carry is already clear! exit2 ... (by the way.. if the value "something" is already greater or equal to 170, I would substract 170 from it before using this routines, if not I believe you need more code) (also I'm assuming that your value in "A" is already in the range 0 - 169 !!) With tables: ; add: clc adc something ; value already normalized! (between 0-169) bcc version2 ; the result was not greater than 255, use another table tax lda TabMod170AdcVersion1,x bcs continue ; always jump! tax lda TabMod170AdcVersion2,x continue ... ; substract: sec sbc something ; value already normalized!(between 0-169) tax lda TabMod170SbcVersion,x Well they were 3 tables, it was more complex than I was expecting.. shame on you Heaven! But I suppose we can combine all tables into a big one.. let's see.. TabMod170SbcVersion --> 256 byte values: [84-169], [0-169] TabMod170AdcVersion1 --> 256 byte values: [86-169], [0-169],[0-1] TabMod170AdcVersion2 --> 256 byte values: [0-169], [0-85] Yep.. is easy to combine them in one table of 86+170+86 bytes (but you lose some cycles because of the page boundaries crossed).. homework (and yep.. probably is better to just use the "without tables" version of this routines, at least the one for "adding") (I didn't check this too much, there could be errors!)
  8. Mine: ;================================================================================ ; System equates, Atari XL + mads [NRV 2009] ;================================================================================ ;---------------------------------------- ; GTIA: ;---------------------------------------- M0PF = $D000 ; read only M1PF = $D001 ; read only M2PF = $D002 ; read only M3PF = $D003 ; read only P0PF = $D004 ; read only P1PF = $D005 ; read only P2PF = $D006 ; read only P3PF = $D007 ; read only M0PL = $D008 ; read only M1PL = $D009 ; read only M2PL = $D00A ; read only M3PL = $D00B ; read only P0PL = $D00C ; read only P1PL = $D00D ; read only P2PL = $D00E ; read only P3PL = $D00F ; read only TRIG0 = $D010 ; read only TRIG1 = $D011 ; read only TRIG2 = $D012 ; read only TRIG3 = $D013 ; read only PAL = $D014 ; read only HPOSP0 = $D000 ; write only HPOSP1 = $D001 ; write only HPOSP2 = $D002 ; write only HPOSP3 = $D003 ; write only HPOSM0 = $D004 ; write only HPOSM1 = $D005 ; write only HPOSM2 = $D006 ; write only HPOSM3 = $D007 ; write only SIZEP0 = $D008 ; write only SIZEP1 = $D009 ; write only SIZEP2 = $D00A ; write only SIZEP3 = $D00B ; write only SIZEM = $D00C ; write only GRAFP0 = $D00D ; write only GRAFP1 = $D00E ; write only GRAFP2 = $D00F ; write only GRAFP3 = $D010 ; write only GRAFM = $D011 ; write only COLPM0 = $D012 ; write only COLPM1 = $D013 ; write only COLPM2 = $D014 ; write only COLPM3 = $D015 ; write only COLPF0 = $D016 ; write only COLPF1 = $D017 ; write only COLPF2 = $D018 ; write only COLPF3 = $D019 ; write only COLBK = $D01A ; write only PRIOR = $D01B ; write only VDELAY = $D01C ; write only GRACTL = $D01D ; write only HITCLR = $D01E ; write only CONSOL = $D01F ; read and write ;---------------------------------------- ; POKEY: ;---------------------------------------- POT0 = $D200 ; read only POT1 = $D201 ; read only POT2 = $D202 ; read only POT3 = $D203 ; read only POT4 = $D204 ; read only POT5 = $D205 ; read only POT6 = $D206 ; read only POT7 = $D207 ; read only ALLPOT = $D208 ; read only KBCODE = $D209 ; read only RANDOM = $D20A ; read only SERIN = $D20D ; read only IRQST = $D20E ; read only SKSTAT = $D20F ; read only AUDF1 = $D200 ; write only AUDC1 = $D201 ; write only AUDF2 = $D202 ; write only AUDC2 = $D203 ; write only AUDF3 = $D204 ; write only AUDC3 = $D205 ; write only AUDF4 = $D206 ; write only AUDC4 = $D207 ; write only AUDCTL = $D208 ; write only STIMER = $D209 ; write only SKREST = $D20A ; write only POTGO = $D20B ; write only SEROUT = $D20D ; write only IRQEN = $D20E ; write only SKCTL = $D20F ; write only ;---------------------------------------- ; PIA: ;---------------------------------------- PORTA = $D300 ; read and write PORTB = $D301 ; read and write PACTL = $D302 ; read and write PBCTL = $D303 ; read and write ;---------------------------------------- ; ANTIC: ;---------------------------------------- VCOUNT = $D40B ; read only PENH = $D40C ; read only PENV = $D40D ; read only NMIST = $D40F ; read only DMACTL = $D400 ; write only CHACTL = $D401 ; write only DLISTL = $D402 ; write only DLISTH = $D403 ; write only HSCROL = $D404 ; write only VSCROL = $D405 ; write only PMBASE = $D407 ; write only CHBASE = $D409 ; write only WSYNC = $D40A ; write only NMIEN = $D40E ; write only NMIRES = $D40F ; write only ;---------------------------------------- ; Shadow registers: ;---------------------------------------- SDMCTL = 559 ; shadow of DMACTL GPRIOR = 623 ; shadow of PRIOR PCOLR0 = 704 ; shadow of COLPM0 COLOR0 = 708 ; shadow of COLPF0 RTCLOCK = 20 ATRACT = 77 CHBAS = 756 ; shadow of CHBASE CH = 764 CHACT = 755 SDLSTL = 560 ; display list address VDSLST = 512 ; DLI address PADDL0 = 624 ; 0-228 , shadow of POT0 PTRIG0 = 636 ; 0 = PRESSED , shadow of PTRG0 STICK0 = 632 ; 0000 = RLDU , shadow of PORTA STRIG0 = 644 ; 0 = PRESSED , shadow of TRIG0 COLDST = 580 ; non zero --> do a cold start when pressing the reset key ;---------------------------------------- ; VBI: ;---------------------------------------- XITVB_I = 58463 XITVB_D = 58466 VBI_I = 6 VBI_D = 7 NORMAL_VBI_I = 49378 NORMAL_VBI_D = 49802 SETVBV = 58460 VVBLKI = 546 VVBLKD = 548 XITVB = XITVB_D ;---------------------------------------- ; Handler vectors: ;---------------------------------------- NMIH_VECTOR = 65530 RESH_VECTOR = 65532 IRQH_VECTOR = 65534 ;---------------------------------------- ; I/O: ;---------------------------------------- CIOV = $E456 ; (58454) SIOV = $E459 ; (58457) ;---------------------------------------- ; Bit values: ;---------------------------------------- ; DMA values DV_DMA_ON = %00100000 DV_PM_ONE_LINE = %00010000 DV_PLAYERS_ON = %00001000 DV_MISSILES_ON = %00000100 DV_WIDE_PF = %00000011 DV_NORMAL_PF = %00000010 DV_NARROW_PF = %00000001 ; Display list values DL_DLI_MASK = %10000000 DL_LMS_MASK = %01000000 DL_VSCROLL_MASK = %00100000 DL_HSCROLL_MASK = %00010000 DL_JMP = 1 DL_JVB = 65 DL_BLANK_1 = 0 DL_BLANK_2 = 16 DL_BLANK_3 = 32 DL_BLANK_4 = 48 DL_BLANK_5 = 64 DL_BLANK_6 = 80 DL_BLANK_7 = 96 DL_BLANK_8 = 112 ; Antic graphic modes GM_CHAR_A2 = 2 ; 2 colors, 40x24, 960b, 40xline, 8 scanlines GM_CHAR_A6 = 6 ; 4 colors, 20x24, 480b, 40xline, 8 scanlines GM_CHAR_A7 = 7 ; 4 colors, 20x12, 240b, 20xline, 16 scanlines GM_CHAR_A4 = 4 ; 5 colors, 40x24, 960b, 40xline, 8 scanlines GM_CHAR_A5 = 5 ; 5 colors, 40x12, 480b, 40xline, 16 scanlines GM_CHAR_A3 = 3 ; 2 colors, 40x24, 760b, 40xline, 10 scanlines ; Basic graphic modes GM_CHAR_G0 = 2 ; 2 colors, 40x24, 960b, 40xline, 8 scanlines GM_CHAR_G1 = 6 ; 4 colors, 20x24, 480b, 40xline, 8 scanlines GM_CHAR_G2 = 7 ; 4 colors, 20x12, 240b, 20xline, 16 scanlines GM_CHAR_G12 = 4 ; 5 colors, 40x24, 960b, 40xline, 8 scanlines GM_CHAR_G13 = 5 ; 5 colors, 40x12, 480b, 40xline, 16 scanlines GM_PIXEL_G3 = 8 ; 4 colors, 40x24, 240b, 10xline, 8 scanline GM_PIXEL_G4 = 9 ; 2 colors, 80x48, 480b, 10xline, 4 scanline GM_PIXEL_G5 = 10 ; 4 colors, 80x48, 960b, 20xline, 4 scanline GM_PIXEL_G6 = 11 ; 2 colors, 160x96, 1920b, 20xline, 2 scanline GM_PIXEL_G7 = 13 ; 4 colors, 160x96, 3840b, 40xline, 2 scanline GM_PIXEL_G8 = 15 ; 2 colors, 320x192, 7680b, 40xline, 1 scanline GM_PIXEL_G14 = 12 ; 2 colors, 160x192, 3840b, 20xline, 1 scanline GM_PIXEL_G15 = 14 ; 4 colors, 160x192, 7680b, 40xline, 1 scanline GM_PIXEL_G9 = 15 ; 1 color, 80x192, 7680b, 40xline, 1 scanline GM_PIXEL_G10 = 15 ; 9 colors, 80x192, 7680b, 40xline, 1 scanline GM_PIXEL_G11 = 15 ; 16 colors, 80x192, 7680b, 40xline, 1 scanline ; Prior values PRV_PM_PRIORITY_1 = %00000001 PRV_PM_PRIORITY_2 = %00000010 PRV_PM_PRIORITY_3 = %00000100 PRV_PM_PRIORITY_4 = %00001000 PRV_FIFTH_PLAYER = %00010000 PRV_PM_OVERLAP = %00100000 PRV_GTIA_9 = %01000000 PRV_GTIA_10 = %10000000 PRV_GTIA_11 = %11000000 ; Consol values: CNV_START_MASK = %001 CNV_OPTION_MASK = %010 CNV_SELECT_MASK = %100 ; Stick values: STV_RIGHT_MASK = %1000 STV_LEFT_MASK = %0100 STV_DOWN_MASK = %0010 STV_UP_MASK = %0001 STICK_MASK_RIGHT = %1000 STICK_MASK_LEFT = %0100 STICK_MASK_DOWN = %0010 STICK_MASK_UP = %0001 STICK_VALUE_RIGHT = %0111 STICK_VALUE_LEFT = %1011 STICK_VALUE_DOWN = %1101 STICK_VALUE_UP = %1110 It only have the special chips (I don't use the OS that much, I should just erase the "Shadow registers", "VBI" and "I/O" areas ), but also the read/write versions of the same register and some section for "constants" (like the DL values and some bits values).. so you could say that there is still room for someone to write the "definitive" version of the equates file, starting with all the versions in this thread.
  9. Probably a noob question, but.. x) If I do: LDA RANDOM LDX RANDOM do I get different numbers of the random sequence?.. or.. does the sequence change every machine cycle?
  10. i was going to write a long, drawn out reply explaining everything that makes Project M what it is but... that sums it up beautifully. =-) ... Well, I was going to do the same thing, but I would had forgotten to mention the 32 bytes wide screen So resuming: - 32 bytes wide screen - over an area of 128 scanlines - assembler IRQ system to toggle the PRIOR register - one IRQ interruption every two scanlines So basically you lose most of the time in 64 scanlines (80% - 90% app), like 20% of the frame time in PAL land. I suppose if you can run assembler code from Action you could set up the IRQ system. A DLI system doesn't work for this (the "one interrupt every two lines"), because you need to start the interruption before the start of a line, to do the first change to PRIOR, then waste a little time before doing the second change after the end of the same line. With a 40 bytes wide screen you would lose a similar time, but I never tested this. (And no, you don't need to be NRV, there are many people here as crazy as me )
  11. Sounds like you are using the wireless version of the controller, in that case the wire is only used to charge the battery. If you get a wired version of the x360 gamepad (I have one) it should work in your console and in your pc. Is just another usb controller (but have some special driver I believe), so maybe it could work in your linux laptop.
  12. This thread made me remember of a trick from my days playing DK at the arcade. The problem was I didn't find it looking through faqs, so I was "forced" to try all the Mame versions of DK (i was starting to think I just dreamed about it). Basically you jump from the top of the bottom right ladder and Mario (jumpman?) goes through the floor, ending the level very easily (this seems to work only in the third japan version of the game, so I suppose it was corrected later). Anyway, this is how it looks (itsameeee princess.. really!.. where are you going!?) (by the way there is some interesting and detailed info here: http://www.coinopspa...ced-donkey-kong about the game)
  13. Nice! So the record for colors in a line is something like 85 then?
  14. When trying to sync the start of a IRQ to a horizontal position I remember to have needed to use two consecutive STA WSYNC, because with only one there were timing issues ... could that be the same thing as using INC WSYNC?.. or maybe the effect is minimized or it was just luck ?
  15. something like.. ldx collum ldy collum0 lda 53770 .rept 100 sta vram+#*40,x sta vram+#*40,y .endr ?? (never used .rept? really?? .. how can you live )
  16. Platformers: Spelunky, Terraria.. Top down: most rogue likes, Dwarf Fortress.. 3D: Sentinel (?), Minecraft..
  17. I don't use them (yet), but here is a good place to look for "real world" applications: http://www.codebase6...illegal_opcodes (nothing bad is going to happen if you click that link )
  18. A lot of changes .. what did you keep from the original then? Any thing that you still miss from the arcade original? Regards.
  19. Fight Night? I believe that it ""streamed"" some moves or animations from disk.. Last V8, but in NTSC! Then go for this: http://www.atariage....ost__p__2431105 Find the last (available) version in this post: http://www.atariage....25#entry2449002
  20. Great! One vote for the Crazy Comets and Commando tunes, if it's possible
  21. Good one! x) You know that now we NEED to do a multiplayer crossover between robo, boulder dash, pac man and dig dug ??
  22. nice.. you could also add this to "your" list: http://www.macworld....21/shibuya.html regards.
  23. I'm starting to believe it.. (sorry, couldn't resist ... runs to hide)
  24. Good god - did the author get paid by the word? Hey hey.. if Stephen is not going to wisdom, then wisdom comes to Stephen ... "Social media confounds the issue. You are a public relations masterpiece. Not only are you free to create alternate selves for forums, websites and digital watering holes, but from one social media service to the next you control the output of your persona. The clever tweets, the photos of your delectable triumphs with the oven and mixing bowl, the funny meme you send out into the firmament that you check back on for comments, the new thing you own, the new place you visited – they tell a story of who you want to be, who you ought to be. They satisfy something. Is anyone clicking on all these links? Is anyone smirking at this video? Are my responses being scoured for grammatical infractions? You ask these questions and others, even if they don’t rise to the surface." ... "The researchers explained this is how one eventually arrives at the illusion of naive realism, or believing your thoughts and perceptions are true, accurate and correct, therefore if someone sees things differently than you or disagrees with you in some way it is the result of a bias or an influence or a shortcoming. You feel like the other person must have been tainted in some way, otherwise they would see the world the way you do – the right way. The illusion of asymmetrical insight clouds your ability to see the people you disagree with as nuanced and complex. You tend to see your self and the groups you belong to in shades of gray, but others and their groups as solid and defined primary colors lacking nuance or complexity." ...
  25. Nope.. sadly, because this seems to be a good year (20th anniversary): http://kotaku.com/59...isten-to-it-now
×
×
  • Create New...