00:00:00 --- log: started retro/12.12.16 03:51:32 --- join: carefish (~carefish@095-096-156-068.static.chello.nl) joined #retro 04:09:03 pfew, i slept like a baby :D 04:09:15 and almost done reading that pascal pdf 07:00:45 --- join: Mat2 (~Claude@91-65-144-133-dynip.superkabel.de) joined #retro 07:00:50 hello 07:40:21 morning 07:41:44 --- nick: tangentsleep -> tangentstorm 07:46:22 morning! 07:46:32 am now almost finished w/ the pascal pdf 07:47:03 what do you think? :) 07:48:06 liking what i see 07:48:19 --- join: intothev01d (~intothev0@unaffiliated/intothev01d) joined #retro 07:48:31 and i think i can do this, so i'll get on to it once i'm done w/ the pdf :P and then probably use it as a reference 07:50:47 sorry, wha PDF ? 07:51:10 http://freepascalanswers.files.wordpress.com/2012/09/startprogusingpascal.pdf 07:54:56 hello every one 07:55:06 'sup? 07:56:57 well, i brushed up on sdl last night and think i know how to get images on the screen 07:57:59 ah :) 07:58:05 that's rather easy :p 07:58:32 depending what you chose to use though, opengl/use sdl blit/flip 07:58:36 yeah, i actually had an old demo i made when i first started investigating pascal 07:58:47 ahm, I have reserved one port for direct screen access, port 17 07:58:59 (x,y,colour-) 07:59:47 for pixel-by-pixel drawing, right? 07:59:52 yes 08:00:13 and begun work on a blit routine before fell to sleep :) 08:00:24 this will be port 18 08:01:41 using sdl? 08:01:47 yes 08:02:18 so the VDP code is already able for screen plotting 08:02:24 oh nice 08:03:20 I'm back in one hour and upload the latest sources 08:04:03 carefish: read the romVDP.pas file, you can build your routines on that 08:04:11 okie doke. i'm gonna go take a shower and whatnot. seeya in a bit 08:05:25 hrm, must reboot 08:05:36 see you guys in one hour 08:05:39 --- quit: Mat2 (Quit: Verlassend) 08:06:04 where can i find that file? i don't think i have it 08:10:54 tangentstorm, so I'm working on converting over retro.py to retro.js still. I pushed my changes last night and the DivMod function seems to work correctly. I'm working on the run function now 08:12:09 https://portfolio.assembla.com/code/avm/git/nodes/302fd4bce8369949f4ed1c7c100d63e120789afd/metro/backport/romVDP.pas ? 08:12:55 so basically lists in python will need to be arrays in javascript I think 08:27:36 what do you mean by build my routines on that? 08:29:41 --- join: Mat2 (~Claude@91-65-144-133-dynip.superkabel.de) joined #retro 08:30:02 ok, I have upload the latest sources 08:30:26 carefish: what is the status of your work ? 08:32:02 just finished the pdf, written down how i'd like the arraystructure, and just started w/ a spriteclass 08:32:31 and i'm not sure if i can build my code around that romVDP 08:34:59 ok, there exist one procedure vdpPlotPixel (handle, adr, colour) 08:35:18 the handle is tScreen 08:35:36 adress calculation is x * cScnXRes + y 08:35:55 and colour is the pixel colour (0-255) 08:39:00 each pixel is handled like a sprite so you can overlay pixels over the character display without destroying it 08:40:44 it's like you have 800 x 600 single pixel sprites 08:41:51 ok, I see my sources are not megred to the git repro, uno momento 08:44:41 PROCEDURE plotPixel 08:44:41 (handle : tVDP; adr : LONGWORD; value : BYTE); INLINE; 08:44:41 BEGIN 08:44:41 pBitmap := handle.pBitmap; 08:44:41 rBitmap := handle.rVStart * cScnXRes + handle.rHStart + 08:44:42 pBitmap^.pixels + adr; 08:44:44 rBitmap^ := value; 08:44:46 END; 08:44:48 ^this is the procedure 08:45:48 handle.pBitmap: SDL surface 08:46:42 rBitamp: Reference pointer (needed because an SDL suface is an indirect C pointer, otherwise you get a core dump) 08:46:53 rBitmap of course 08:47:03 you see ploting to screen is quie simple 08:47:08 ^quite 08:48:17 you don't need to backup old pixel colour because this is handled automatical from the VDP code 08:48:50 and you don't need to flip the SDL surface, this is also already handled asynchron 08:50:50 you find the newest VDP code here: 08:51:32 https://www.assembla.com/code/avm/git/nodes/master/metro/backport 08:52:03 you will need romVDP.pas and ng.ports.pas 08:52:14 rename ng.ports.pas to ng_ports.pas 08:52:23 and retro will compile 08:53:15 --- nick: Mat2 -> Mat2-afk 09:04:13 Mat2-afk: can you please fork https://github.com/goldsmile/ngaro-pas or add it as a submodule in your repository? 09:04:38 when you just copy the files, i have no way to merge them back in except to manually run a diff/merge tool 09:05:01 or work directly on the repository if you want :) 09:05:19 ng_ports.pas(10,3) Fatal: Syntax error, "UNIT" expected but "FUNCTION" found 09:05:22 intothev01d : yep py list => js array 09:05:38 function vm.handle_syncport( msg : int32 ): int32; this is the line 09:07:12 carefish: you can't "use ng_ports" 09:07:34 if you look in ng.pas, you'll see there's a bunch of {$i ng_xxxx.pas } comments 09:07:40 those are include directives 09:07:50 conceptually it's just one giant module called "ng" 09:08:22 {$ifdef nested_units} isn't a real thing :) 09:08:56 the unit line at the top of those files is just to trick emacs, which has a really clunky pascal mode 09:11:25 well damn I'm stuck with no idea at this point 09:12:19 for some reason process.argv is undefined no matter what in my retro.js. however if I create just another .js file and put console.log(process.argv); it works just fine to display the arguments. I don't know what the problem could be 09:12:41 hmm 09:13:11 can you post the latest sources somewhere? 09:13:15 sure 09:13:16 let me push 09:14:52 here are my changes https://github.com/intothev01d/ngaro-js/commit/2eaddc36f29398f0cbdde3fd01700d9af1584d4d 09:15:31 running node test.js will print out the args just fine, however you get undefined if you run node retro.js 09:15:36 !! 09:16:06 http://pastebin.com/VF9syKa0 do i need to do more than just that? can i know use Direction[NN].sprite 09:16:08 i don't know if it has something to do with the rest of the content of retro.js 09:16:21 but it seems like it wouldn't especially since I'm calling it first thing 09:16:39 var spriteDirections : Direction; ? 09:17:37 one min carefish 09:20:34 maybe all these functions have to be vars? 09:20:52 i am baffled by this behavior :) 09:21:17 me too 09:21:29 it just makes no sense really 09:21:29 so... what i would do is take everything out except that one line, and then add each thing in one by one to see what causes it 09:21:39 yea guess that's what I'll do 09:23:22 i am no longer baffled 09:23:30 you have a function called process :) 09:23:41 oh son of a !!! 09:23:45 lol 09:23:47 it parses the file before it executes it 09:23:49 tangentstorm: I have sync my sources with https://github.com/goldsmile/ngaro-pas ... no error so far (paranoia mode on, I mean it's GIT) 09:23:49 yea that was dumb 09:24:04 Mat2-afk: thanks :) 09:24:08 I would have gotten there eventually after putting all the stuff back in :D 09:24:11 thanks for catching that 09:24:14 np 09:24:21 okay... carefish.. looking 09:24:52 yea working now 09:24:53 lol 09:25:34 carefish: this works too, but i think the enumerated type approach has some advantanges over this 09:25:53 with this version, you'd use whatever.NN[5] or whatever 09:26:05 i actually don't think it's what you wanted to express originally 09:26:20 you wanted an open array (growable array) of sprites for each direction 09:26:27 this is fixed at 8 entries per direction 09:30:45 ah, ok :o 09:31:32 so what would have to be changed? 09:32:08 because i got syntax errors on Direction = record ( nn/etc/etc ); 09:32:23 carefish: you want http://pastebin.com/Ha0cGD04 09:32:53 whoops.. i meant "here" instead of "scene" on line 28 09:35:07 thanks! nice and clear, so all i'd have to do now was make a Pixel class that contains a draw that draws to plotPixel? 09:36:34 i'm not sure what you're doing yet :) 09:36:43 you could make Sprite a class and add a draw method 09:37:30 so then it'd be for sprite in here.viewport[looking] do sprite.draw? 09:37:39 argh mat2 you broke my {$IFDEF GRAPHICAL} stuff :) 09:37:55 sprite.draw(plotpixel stuff); 09:38:23 carefish: yes on the for loop 09:39:11 Mat2-afk: https://github.com/goldsmile/ngaro-pas/commit/2ce039fefd4e8ff1b27c7475345bd9042fdf89e7 ... i'm trying to preserve the ability to run this over ssh in a non-graphical terminal 09:39:52 when i hand-merged yesterday, i added all those {$IFDEF ..}s to allow either way of doing things 09:40:41 awesome, so it's all wired up to check for arguments, so far works with passing --dump. now I just need to figure out how to handle the image file, all these memory and stack arrays, and work on the processor function to process them 09:42:18 in python, [0] * 12 would create 12 list elements correct? 09:42:21 intothev01d: sounds like you have your bearings 09:42:23 yep 09:42:30 then inputs.append(0) does what? 09:42:38 add another one initalized to 0 to it? 09:42:41 yes 09:42:45 ok 09:42:53 that's an odd thing to do 09:43:05 that's what is in the retro.py 09:43:13 inputs = [0] * 12 09:43:13 inputs.append(0) 09:43:58 in the run() function 09:44:46 tangentstorm I don't know how much further I'll get other than just directly converting the if else stuff in process. I'm not to familiar with how it's all supposed to work and I don't want to mess up the logic on it but I can handle all the parts I basically understand 09:45:47 --- nick: Mat2-afk -> Mat2 09:45:55 tangentstorm: sorry 09:47:39 Mat2: no problem. that's why i wanted us both using the same repo. i'll re-add that stuff in a minute 09:48:09 intothev01d: okay... so the python version doesn't need to do that inputs=[0]*12 line 09:48:17 or the append? 09:48:21 that's for the "--with" 09:48:29 oh ok 09:48:36 nope, it doesn't need that append(0) either 09:48:43 it does need a list though 09:49:19 ok, the VDP code is finished I hink so far 09:49:24 the idea is that you say --with whatever ( or in retro, you say: needs whatever' ) and it loads that file from disk 09:49:37 ^think 09:49:38 oh ok 09:50:01 im now testing it out and start debugging 09:50:06 but if *that* file includes another file, then you have to push the current file onto a stack ( list.append() in python ) and process the new file before you finish the first one 09:50:12 --- nick: Mat2 -> Mat2-debugging 09:51:09 intothev01d: since c isn't great with dynamically sized structures like that, you'd preallocate an array of file handles like this... i'm guessing this was just ported from the c. it's unnecessary in python 09:51:29 and also in javascript, I'll just create an array and append to it 09:51:33 correct 09:52:07 intothev01d: implementing --with is more than i asked you to do, and to do it right you'll need to implement the file input device 09:52:36 I'll just drop the list array and argument, then if someone wants to actually implement it later will work 09:52:44 cool :) 09:53:23 now i get to work with fs i think in node 09:53:26 for file opening 09:53:42 loading the image should be a much simpler case: you just need to somehow load an array of 32-bit integers from disk 09:53:55 --- join: FlashingYoshi_ (ad4965cd@gateway/web/freenode/ip.173.73.101.205) joined #retro 09:54:33 --- part: FlashingYoshi_ left #retro 09:54:53 Mat2-debugging: i'll wait until you commit your changes, then add the ifdefs back 09:55:07 meanwhile, i will start on a game loop in retro :) 09:55:32 oh but first i will patch retro.py :) 09:57:08 tangentstorm: that should be the curent code 09:57:12 ^current 09:58:01 I had already pushed my changes 09:58:27 pot 17: check , actual code 09:58:34 ok 09:59:09 cool. :) 10:00:10 so to assign something to use for romvdp 10:00:25 pixeliwanttodraw : tvdpdata; ? 10:00:35 and then initialize the values somewhere else? 10:04:50 not sure. need to read the new code first 10:08:18 crc: i pushed some changes to retro.py and added a .bzrignore for the junk *.img files produced by the ngaro tests. r422 in my branch. 10:08:53 ok. time to make a game! :) 10:13:23 yeah, seems to work 10:13:48 I can change the foreground and background colour on the fly at vsync 10:13:53 in retro 10:14:19 now testing access to attribute and charmap 10:20:31 tangent, I have it to where it can check for the image file now 10:20:37 tangentstorm * 10:20:49 :) awesome 10:21:24 I don't have a clue though about what does on after those cli arg checks 10:21:30 goes* 10:21:46 http://pastebin.com/1uKbTXKh 10:21:55 line 443 and on ( i know I can ignore the set_termios for now) 10:22:45 to me it looks like it's opening the image and loading it into the memory thing 10:24:36 lunch time 10:34:22 Mat2-debugging: okay, i re-applied the ifdefs stuff 10:34:54 if you do a git pull in ngaro-pas we should be on the same version now :) 10:36:50 carefish: for SetBitmap, you can use a property, which allows the syntax to be sprite.bitmap := xxx and it'll call your setbitmap behind the scenes 10:37:00 ok 10:38:26 carefish: give me a moment, and i'll check in a new program file in the root directory that loads and shows Mat2's terminal 10:38:39 then we'll set it up so you can call your routines interactively from the retro prompt 10:45:39 --- join: kumul (~kumul@cvx-ppp-66-50-141-36.coqui.net) joined #retro 10:54:11 carefish: okay, if you do a git pull, there's a lazarus project in the top level directory now that just loads retro 10:54:28 you probably need to copy retroImage from lib/retro into that directory for the time being 10:55:38 carefish: play a bit with retro to get firm 10:56:02 20 16 6 out 10:56:40 for example sets the global foreground colour to radio-active green 10:58:18 (beware you have 256 colours) 11:00:44 hmm. nothing's happening 11:04:05 I have just pushed a fix 11:04:41 git was out of sync 11:06:22 now I'm in sync these error occur: 11:06:27 Error: Forward declaration not solved "vm.clear;" 11:07:21 i guess i missed an IFDEF. add -dGRAPHICAL to your compiler options and it should work 11:10:57 thanks 11:11:40 now I ge these error: 11:11:43 ng.pas(20,36) Error: Specialization is only supported for generic types 11:12:33 you're working off your old repository 11:12:59 you need the latest version of xpl 11:13:12 stacks.pas is now generic 11:13:30 where can i find that sample project tangentstorm? 11:14:08 https://github.com/goldsmile/rpld25 11:14:31 or just go to the top level directory, and run "git pull; git submodule update" 11:14:47 * tangentstorm punches the makefile for not working on windows :/ 11:18:42 ah, so that's how to init the retro thingy? 11:18:52 and with plotpixel i actually draw inside retro? 11:19:13 with vdpPlotPixel !!! 11:19:22 in theory, if we can get it working 11:19:47 nice :), i'll fiddle around with it 11:20:13 Mat2-debugging: i see a cursor but it's not in the right place and no matter what i do, the text is always green on purple 11:20:35 do you want a screenshot? 11:21:11 http://img.is1337.eu/f791e2eb.png 11:21:25 yep. that's it 11:21:45 Mat2-debugging: his screenshot looks like what i see too 11:23:19 that's because of the 11.5 image file 11:23:40 oh. do you have a new image we should be using? 11:23:49 I use the 11.4 image 11:23:59 ok 11:25:05 carefish: what did you use to make and post a screenshot so fast? 11:25:39 tangentstorm: remember, you added some CRT stuff which broke he screen handling in 11.5 11:25:52 yeah but crc took it out :) 11:26:53 these red boxes are escape sequences 11:29:45 http://imgur.com/oZAKO 11:30:18 tangentstorm: a tool a friend of mine made 11:31:03 i'm going to make it in C++ ( or pascal, not sure yet) in the xmas holidays 11:31:15 make what? 11:31:25 the tool to make screenshots really fast 11:31:29 carefish: can you change the forground colour ? 11:31:37 how do i do that Mat2-debugging? 11:32:00 and how do i call vdpPlotPixel? 11:32:40 vm.vdpPlotpixel didn't exist, and vdpPlotpixel didn't either, (in the pascal sample from git) 11:32:56 take a look at vdpROM.pas 11:33:02 sorry romVDP.pas 11:33:50 try 16 6 out 11:34:04 on my linux system it works 11:34:44 where would it put the pixel? 11:35:12 direct to the retro screen you see 11:35:51 the handle variable is tScreen, initiated in ng.pas 11:35:58 colour being specified how? 11:36:09 yeah, i saw that 11:36:13 choose values from 0 o 255 11:38:33 Mat2-debugging: can you give us the exact code you're running in retro? something we could put into the image and test? 11:39:13 start retro 11:39:18 then just write 11:39:24 65 16 6 out 11:39:43 this whould change the foreground colour 11:39:50 I make a screenshoot 11:41:25 http://i.imgur.com/5h2jD.png 11:41:45 hmm, what is the adr : LONGWORD value : BYTE plotpixel wants? 11:42:13 probably an offset into the display's ram 11:42:28 yes 11:42:29 Mat2-debugging: i don't think we're running the same code 11:43:04 i see message 16 is vdpRenderDisplay(tScreen) in ng_ports.pas 11:43:28 oh, that's an old version 11:43:29 which doesn't seem to take any arguments off th estack 11:44:01 and the explanation :) 11:44:18 well, how do i setup longword/byte? (first time i toy around with eh.. a console/pixel plotter/..how do you call this?) 11:45:04 you can take a look at vdpRenderChar, where plotPixel is used, it's the same routine as vdpPlotPixel 11:45:37 adr is a offset into the bitmap 11:45:43 ^an 11:46:03 offset into bitmap being? i tell it what pixel to plot from the bitmap i'm providing? 11:46:03 this is frustrating. i guess i don't understand something about how git works 11:46:21 tangentstorm: ok this is a git problem, were both out of sync 11:47:18 so to set up pixel 20, adr := 20 11:48:38 https://github.com/goldsmile/ngaro-pas/blob/master/src/ng_ports.pas 11:49:04 16: begin 11:49:04 data.pop1 (h); 11:49:04 vdpWriteFgReg (tScreen, h); 11:49:04 end; 11:49:22 hmm, the code is up to date 11:49:31 at least in the repro 11:51:16 Mat2-debugging: okay yeah i have that now on my local machine 11:51:23 all that routine does is set a variable though 11:51:46 that variable is the internal register for the forground colour 11:52:02 http://pastebin.com/D6UZxvqE something like this? (and where do i see it on the screen? 11:52:36 Mat2-debugging: okay, i'm with you in theory, but nothing changes on screen no matter what i set it to 11:54:45 uno momento 11:55:28 I need to compare all files because it can be romVDP is not up to date 11:55:49 http://img.is1337.eu/8779b932.png 11:57:14 tangentstorm: I have rebuild retro and on my system it works 11:57:29 (rebuild from the git repro) 11:58:24 --- join: erider (~chatzilla@unaffiliated/erider) joined #retro 11:58:39 okay i think lazarus may have been caching something 11:58:51 i deleted everything and am just running build.bat 11:58:58 hi all 11:59:07 hi erider 11:59:18 nothing :/ 11:59:24 hey erider 11:59:27 oh, that's interesting 11:59:37 what triggers the redisplay? 12:00:25 the retro listener 12:00:40 son of a... :/ it's leaving the color on the stack again :( 12:01:14 how is the game going 12:01:23 I think to undertand the problem 12:01:49 wait, I upload a tar archive 12:02:02 and now it's not. i'm going to save it as a function in the retro image so i know i run the exact thing every time 12:02:36 please extract the archive in one directory and build retro with fpc 12:02:45 ok 12:06:43 you will find backport.tar in the src directory of ngaro-pascal 12:06:58 try compiling this version 12:07:09 with -dGRAPHICAL 12:07:31 carefish: take a look at ng.pas 12:07:55 tangentstorm, what is the byte size of the retro-11.5 img supposed to be? 12:08:15 {terminal emulation} 12:08:15 cx,cy : longword; 12:08:15 count : longword; 12:08:15 tScreen : tVDP; 12:08:15 refresh : longword; 12:08:42 ^-- tScreen: that's the handle to the terminal bitmap 12:08:44 intothev01d: no idea. you can use the one from retroImage 12:09:24 oh ok, it's correct 12:09:30 just making sure I was doing it right 12:10:16 Mat2-debugging: running that version, i get the same thing 12:10:33 always green on purple 12:10:57 so I'm at the part where I read in the binary file to memory I think 12:11:03 but I have no clue what it's really doing 12:11:12 f = open( imgpath, 'rb' ) 12:11:13 memory = list(struct.unpack( cells * 'i', f.read() )) 12:11:27 I assume open the file in binary for read, then don't know what unpack and all is 12:11:46 intothev01d: that's python's way of breaking the file into 32-bit cells 12:11:59 tangentstorm: I don't have a clue why the same code works here and not for you 12:12:04 ohhh i see 12:12:56 cells = int(os.path.getsize(imgpath) / 4) doesn't this just get the whole size of the retroImage file / 4? 12:14:36 I'll push what I have so far 12:16:55 tangentstorm: try 65 16 6 out 12:17:10 tangentstorm, when you get a chance it's here https://github.com/intothev01d/ngaro-js/blob/master/src/retro.js 12:20:46 tangentstorm: I have uploaded a picture of it: retro.jpg where you see what's looking here 12:24:38 I must prepare for work, see you guys later 12:25:10 --- quit: Mat2-debugging (Quit: Verlassend) 12:26:56 intothev01d: yes it does... an integer is 4 bytes so the /4 gets the number of cells 12:27:13 oh i get it, 1,000,000 cells then 12:27:31 yeah 12:28:14 ok so I have that part to determine the number of cells, now I guess I need to put the binary file into an array with that many cells? 12:28:48 yeah. maybe there's some way to load the entire thing from disk as a typedarray? 12:29:11 not really sure. i've never used the node filesystem api 12:29:13 this is where I'm lost really. I'll take a look and see what node does with binary files 12:30:02 i can't seem to figure out how to draw a pixel on the retro screen :( 12:30:15 or could that be because i don't have the proper retroImage ? 12:30:39 carefish: no, it's because something is broken on windows 12:30:51 that's what mat2 and i have been talking about 12:31:17 so i could upload these pascal files to my vps and run it in there? 12:31:26 tangentstorm: I merged in your changes 12:31:32 crc: cool :) 12:36:59 wow this channel is busy now :-) 12:39:24 --- join: Mat2 (~Claude@91-65-144-133-dynip.superkabel.de) joined #retro 12:40:12 tangentstorm: short, have tested the code on another machine, where it works 12:40:25 hmm 12:40:35 on a win32 machine? 12:40:52 carefish: did you install the jedi-sdl headers, or are you just using what came with fpc? 12:41:07 no an old P4 wih ubuntu 12:41:24 tangentstorm: i'm using lazarus, that had sdl with it 12:41:39 yeah, i've tried both 12:42:00 carefish: do you know how to make sdl work in opengl mode instead of directx or whatever it's defaulting to? 12:42:14 or vice versa? 12:42:28 i know how to make opengl work with opengl yes 12:42:46 not that difficult 12:43:23 the only possible error left I can see: The colour information is no writen correctly ino video mem 12:43:34 for some graphic chips 12:43:37 SDL_Init(SDL_INIT_EVERYTHING); screen = SDL_SetVideoMode(640, 480, 32, SDL_OPENGL /* | SDL_NOFRAME */); 12:43:52 then a whole bunch of commands to init opengl 12:44:20 I try to compensate though RGB composing and see if it works the same 12:44:42 ok, later, ciao 12:44:46 --- quit: Mat2 (Quit: Verlassend) 12:45:14 SDL_HWPALETTE 12:45:16 Give SDL exclusive palette access. Without this flag you may not always get the colors you request with SDL_SetColors or SDL_SetPalette. 12:45:20 carefish: thanks 12:45:33 http://pastebin.com/fu2eXCKw 12:47:48 ^ the init stuff for opengl 12:48:39 carefish: can we still use the sdl bitmap stuff then? or do we have to use the opengl api's if we go that way? 12:49:38 you can't use the sdl bitmap stuff that way 12:49:44 you'd need a seperate screen for that 12:49:51 init'd w/ other params 12:50:00 SDL_OPENGLBLIT 12:50:01 Create an OpenGL rendering context, like above, but allow normal blitting operations. 12:50:10 oh.. :o 12:50:19 hmm, good to know, i didn't know about that :) 12:50:44 http://sdl.beuc.net/sdl.wiki/SDL_SetVideoMode 12:51:26 last time i've used the SDL wiki was about 4 months back :P 12:53:28 hmm 12:53:38 if i manually change the colors, it does change 12:53:45 in vdpOpen 12:54:48 i take it back. only the background changes 13:04:34 i do feel as if what i'm trying to learn/do is a bit too much for only a few days 13:14:31 tangentstorm, bascially node has a buffer class to deal with binary files 13:14:46 which that's a little bit over me, never worked with them really before. 13:15:05 I've typed up what I could find and what I would think works but I'm pretty sure it doesn't. I'll push what I have so you can take a look 13:19:57 :) okay 13:20:44 https://github.com/intothev01d/ngaro-js/blob/master/src/retro.js 13:20:56 you don't have to require buffer or anything, it's supposed to be global 13:21:01 carefish: i'm a little discouraged myself here, but we'll wind up with *something* when we come out of this :) 13:22:06 intothev01d: is there a buffer.toArray for line 99? 13:22:13 those are callbacks too so it's running dump before anythings in the array, so i probably need to run openSync and readSync to block anything else from happening until it's done 13:22:28 http://nodejs.org/api/buffer.html 13:22:32 they have a .toString 13:23:09 you can create a Buffer with an array it seems 13:23:15 http://nodejs.org/api/buffer.html#buffer_new_buffer_array 13:23:22 tangentstorm: i'm toying around with pascal and writeln, need to get used to how to do things in pascal i've noticed 13:23:38 intothev01d: buf.readInt32LE(offset) is what you want 13:23:49 or possibly BE.. i never remember which is which :) 13:23:52 little/big endian 13:24:24 i know for sure that my next project/game will be made in pascal 13:25:48 it's always kind of overwhelming when you jump in to a new language 13:25:50 and frustrating 13:26:14 well, not so much frustrating :) loving the confusion/googling, but overwhelming: fuck yes 13:26:31 the way i see it there are 4 basic concepts in computing 13:26:45 sequence, choice, recursion, and concurrency 13:27:03 and when you attack a new language you just have to figure out how they go about doing those four things 13:27:27 sequence being just ";" or the newline in most languages ( until you get into pure functional programming ) 13:27:42 so i changed out the toString to be buffer.readInt32LE(0) 0 for the offset in the buffer since it's a buffer of 4 bytes we want the whole thing, no offset. how do I know I'm getting the data in there correctly? 13:27:58 that sounds about right tangentstorm 13:28:03 choice being if / case... but also sometimes reading a procedure out of an offeset 13:28:16 like how we do lookups of procedures in ng_ops.pas 13:28:43 intothev01d: i meant read the whole file into a buffer, loop through the offsets by 4 13:28:56 ah ok 13:29:34 for ( var i = 0; i < size; i; ) { img[ i ] = buf.readInt32LE( i*4 ) ; } 13:29:36 something like that 13:29:43 yeah 13:30:00 where size would be size of the destination array, or size of the whole buffer / 4 13:30:05 also, do you have another pdf/tutorial site about pascal? 13:30:13 same as that "cells" variable in python 13:30:41 carefish: yes, but it's much older and predates classes. good stuff though. lemme find it 13:32:07 well, i believe i understand how classes work in pascal now 13:32:45 so shouldn't be too difficult to use them/good experience to read older tutorials and implement them with what i already know 13:35:49 carefish: this isn't what i was thinking of but it looks interesting: http://ebookbrowse.com/the-turbo-pascal-tutor-1985-pdf-d422551162ß 13:36:29 if you want something really mind blowing you can read symbolic processing in pascal.. it's all about parsers and recursion and stuff 13:37:49 good thing i rescued it because they just wiped it off the site again 13:37:56 https://github.com/nickelsworth/sympas 13:38:06 it was here http://www.latrobe.edu.au/phimvt/s00bok.html 13:38:21 the html was completely mangled 13:38:35 so i rescued it and ported it to org-mode but i have yet to regenerate it to an html site 13:39:08 1985? :D 13:40:40 yeah 13:41:04 the one i was thinking of is almost as old but was in a text file 13:41:26 like i said, it's just missing classes though. 13:42:11 awesome :) 13:42:15 i'll give it a read 13:42:23 Sorry! We could not find what you were looking for :( 13:42:28 the tutor of 1985 13:46:17 btw, i'm probably not alone in this: do you guys code faster/better when listening to music? 13:51:28 wow the docs are kind of messed up 13:56:25 it seems to work now tangentstorm 13:58:12 https://github.com/intothev01d/ngaro-js/blob/master/src/retro.js 14:20:10 oh tangentstorm, there was a line i forgot to mention about sdl/opengl 14:20:29 SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); after SDL_SetVideoMode 14:20:51 not sure if you need it though 14:25:22 --- join: Mat2 (~Claude@91-65-144-133-dynip.superkabel.de) joined #retro 14:25:32 hello 14:25:59 tangentstorm: It can be I've found the reason for the colour problem 14:28:30 oh yeah? 14:28:43 intothev01d: awesome :) 14:29:10 Mat2: i've been digging through your code here trying to find a problem. :/ 14:29:21 didn't find anything... so glad you did :) 14:30:52 the problem seems to be that some video cards don't use an RGB format but some form of chunky BRG, these means the colour for the foreground colour would be for most values near the same 14:31:22 there exist a SDL function for handling these mess 14:32:01 so I write a patch 14:32:51 ok :) 14:33:10 the other problem is a bug in DirectX als backend for SDL 14:33:11 in that case i'm going to go take a break because i've just been getting frustrated here. :) 14:33:24 same as me 14:36:46 sorry i couldn't be of more help :( 14:36:55 https://gist.github.com/4313762 I tried refactoring to see if i could shrink the code down and find something wrong.... i wound up introducing some bugs i think (and probably slowing your code down) but... 14:37:12 ... that's kind of the style i'm shooting for in the lessons i'm making 14:38:57 but as i said, it didn't turn up anything useful 14:39:48 Mat2: well, actually.... i discovered that the background renders just fine... i think what's happening is somehow the attributes are all being set to 80 instead of 0 14:39:58 for the foreground 14:40:04 i was able to change the background without any problem 14:41:30 * tangentstorm will not be using SDL again. ZenGL or bust after this project. :) 14:41:50 oh, do you really think it's a problem w/ SDL? 14:49:22 tangentstorm: ok, I check this out 14:54:36 tangentstorm: you can read the attribute map with 9 6 out 14:55:12 0 0 9 6 out putn putn give me: 0 0 14:55:32 so no atributes set 14:58:45 hmm.. you know what 14:58:54 i'll remake that tool in pascal for the screenshots 14:59:07 i'm guessing that way i'll learn alot faster 14:59:32 ha, I've got the eror 14:59:37 ^error 15:09:37 oh yeah? 15:09:38 tangentstorm: ahm, after sync I cant compile retro SDL even with -dGRAPHICAL, I will get only the terminal version 15:10:12 what error do you get? 15:10:31 ... or no error, just it's always terminal only? 15:10:59 how are you compiling it? 15:11:01 yes 15:11:10 fpc -dGRAPHIC retro.pas 15:11:44 ok my fault -dGRAPHICAL 15:11:53 its lae 15:11:59 its late here 15:12:09 that shouldn't compile anything... how does it know where to find the stuff in xpl? 15:13:04 freepascal sets dynamic links for each library 15:13:56 using the IDE? 15:14:13 no I'm using a text edior 15:14:20 ^editor 15:14:35 joe 15:15:52 hmm, no difference, only the console version is compiled 15:16:27 i think you're in your old directory 15:17:59 i can't compile retro.pas without a bunch of command line options to set up the paths 15:18:08 not in ngaro-pas/src 15:19:57 okay, i thought about it, and : i'm going to use the code i wrote here as the start of a port to ZenGL 15:20:43 i'm at my wit's end with SDL... no idea if it's the jedi headers, or our code, or the version of sdl itself... it's just completely opaque to me, and i don't like all the pointers anyway 15:21:41 ok, then I get some sleep 15:21:46 ciao 15:21:50 --- quit: Mat2 (Quit: Verlassend) 15:21:52 if you can figure out how to get it working, then i'll stop and switch, otherwise.. 15:21:53 ok 15:23:23 intothev01d: did i leave you hanging on anything? 15:52:52 tangentstorm, I was just working on retro.js. I think I've gotten most of the run complete and started working on the opcode processor function. if you want to take a look and see if it's working or what needs to be updated to get it that way 15:54:10 intothev01d: sure. just push your changes whenever you're ready to show me 15:54:25 they're up, https://github.com/intothev01d/ngaro-js/blob/master/src/retro.js 15:58:40 how do you add more columns to a TValueListEditor ? i can't seem to find the property in object inspector, nor can i find an example how to do it in code :( 15:59:20 carefish: in lazarus you can press ctrl+space after the period to get a list of methods 15:59:31 yeah, can't find proper piece of code 15:59:54 is it a gui component? 15:59:58 if i do: Form1.TValueEditor.ColCount:=3; it says i should use the Columns property 16:00:19 is there a columns propetry in the property sheet? 16:01:19 carefish: i'm not much of a gui person :/ .. i know there's a grid control though 16:01:28 intothev01d: just got the sources, looking now 16:01:33 and when i'm there, Form1.TValueEditor.Columns.Count is a read-only, and the object inspector doesn't have Column count, but does have row count 16:03:47 intothev01d: http://stackoverflow.com/questions/4981891/node-js-equivalent-of-pythons-if-name-main 16:05:21 ah, found another gui that has what i want w/ less hassle 16:07:11 intothev01d: why are you rewriting the vm with that processor() function? :) 16:32:37 carefish: what was the exact error message you were getting when trying to run make? 16:32:55 i've gotten around the problem on my side 16:36:36 ehh, the problem was that i don't have make in my %PATH% 16:36:49 when i used it directly, so without the build.bat or whatever 16:36:53 it worked 16:38:35 oh 16:38:42 good to know :) 16:43:36 and making tools in lazarus is easy lol 16:55:06 tangentstorm: i have no idea, I saw it in the retro.py 17:04:36 what's the gui library lazarus is using? 17:04:41 wxwidgets or something? 17:08:41 hm, qt it seems 17:11:11 carefish: it uses its own library, or gtk, or qt, or fpgui 17:11:43 intothev01d: :) yeah, that's python's analog of the big main routine in ngaro.js 17:12:05 ah ok. so then importing that module saves me from having to do that then? 17:12:11 yep :) 17:12:13 nice 17:12:42 so what methods are left to implement? finish up the run command (I added the main === module thing) and then the dump one right? 17:13:12 does retro.js even need the DivMod function or is that in ngaro as well 17:13:23 that's alreadi implemented too 17:13:30 ok 17:13:40 sooo basically the run command and dump command 17:13:49 i actually thought you copied it from there :) 17:13:54 mostly 17:15:03 the only other thing i'd suggest is breaking that run function down into smaller pieces 17:15:29 yea 17:15:44 not everybody does things this way, but i think if you have more than a screen or so it's worth breaking it into separate functions/methods 17:16:07 I agree it's better to have small functions doing certain things 17:16:24 i do the same thing too though when i'm first figuring something out 17:16:40 a lot of my admin scripts are just one long thing without any functions at all 17:16:55 mostly just notes i used as i figured something out.. 17:16:57 lol yea it's kind of like just throw it together to get it working 17:17:05 then next time i had the problem, i'd refactor what was there, etc 17:17:39 yeah... and it also keeps you from spending too much time making something good if it's only going to be used once :) 17:17:40 what about the getInputs command? does that need to be there? 17:18:12 only if you want to implement --with on top of this 17:18:25 I'll just let it stay for now then 17:18:34 right now the js version doesn't handle reading input from anywhere except a string in the browserß 17:18:43 ok 17:18:46 you might put a note saying what it's for though 17:19:04 not sure where that question mark came from :) 17:21:14 ok removed the unnecessary stuff and pushed my changes. I'm going to hop on the laptop and keep working on this. it's been fun. i want to see if I can get it working like it's supposed to 17:22:01 --- quit: intothev01d (Quit: intothev01d) 17:25:26 :) 17:26:52 carefish: you want to help me figure out this zengl stuff? 17:27:23 sure 17:27:43 i've just been messing with the demos. it seems like a nice system 17:28:12 i'm recreating that screenshot tool in lazarus/pascal 17:28:37 how can you minify it to taskbar? 17:28:44 no idea 17:28:55 never used that stuff 17:29:07 hah, TrayIcon 17:29:25 when i started pascal everything was on a 80x25 text screen :) 17:30:03 i need to read that pdf myself and get up to speed with lazarus 17:38:09 oh wow, lazarus has an examples folder 17:38:11 amazing :o 17:38:19 oh yeah :) 17:38:26 so does fpc itself 17:38:28 if i found that a few hours ago 17:40:04 i'm really impressed with the zengl demos... it's got a little tile engine, a bunch of animations... i can definitely work with this 17:40:23 joystick input :) 17:48:48 ok. i think i shall attempt to make something like reverse defender in pure pascal 17:48:59 where you play an alien ( https://github.com/sabren/GameSketchLib/blob/master/course/w02_InvaderSketch/demos/InvaderSketch/data/invaders.png ) 17:49:26 and attempt to kidnap people while the spaceship tries to kill you 17:51:01 i will start by just trying to get the sprites on the screen, and then i'll try to expose it to retro for scripting 18:06:33 --- join: intothev01d_m (~intothev0@8.27.217.75) joined #retro 18:07:10 MenuItem2.OnClick:=TForm1.Button2Click; gives an error 18:07:21 MenuItem2.OnClick:=TForm1.Button2Click(Sender); gives an error as well 18:07:34 the latter says something about untyped expected? 18:09:08 mainform.pas(59,27) Error: Incompatible types: got "untyped" expected "" 18:09:38 put a @ in front of the procedure name 18:10:06 wait 18:10:13 yeah 18:10:17 in front of the T in TForm 18:10:24 @TForm1Button2Click 18:10:26 try that 18:10:51 MenuItem2.OnClick:=@TForm1.Button2Click; 18:11:28 tangentstorm, so I guess I need to know once I have retro.js run called and the imagefile read into the buffer and all, what is the next process I would call from ngaro.js? 18:11:41 because it was trying to execute the procedure, hence "untyped" ( procedures don't return anything when executed ) 18:11:45 yeah, after a bit o googlin i noticed it was @procedure 18:11:50 what about sending Sender? 18:12:07 i know from winforms you don't need to send sender 18:12:19 i could use blabla(null, null) 18:12:23 carefish: no idea 18:12:30 but it works 18:13:00 intothev01d_m: you want to call that routine that loops through and runs the opcode processor 18:13:19 all of the test cases are pretty short so that should be sufficient to run them 18:13:45 even though it only runs a limited number of opcodes at once 18:14:29 so just call ngaro.processOpcode? 18:14:31 after that, i think it's just stdout.write(image.join(sepchar)) 18:14:45 intothev01d_m: the other one that calls that 18:14:49 hang on 18:14:49 it doesn't take any parameters though 18:14:53 oh ok 18:15:01 sorry, just not sure what ties what together 18:15:19 yeah i should have drawn a flowchart or something :) 18:15:47 actually, that's not a bad exercise when encountering a new system 18:15:51 that would be super handy 18:15:54 i like VUE ... free drawing thing from tufts 18:16:02 i should do that for zengl here too 18:17:51 https://github.com/intothev01d/ngaro-js/blob/master/src/ngaro.js#L928 18:17:53 rxProcessImage 18:18:22 you will need to do ngaro.image = the thing you loaded first 18:18:47 then ngaro.rxProcessImage() should run enough to pass the tests 18:19:38 hey carefish ... i forgot to tell you this, but there's a javascript written in free pascal too 18:19:43 ah ok, so i need to export ngaro.image variable as well, set it in retro, then run ngaro.ProcessImage() 18:20:17 eah 18:20:19 yeah 18:20:51 you may actually have to provide a setImage() to make that work 18:21:08 really depends on what a module is :) 18:21:39 right. may need to create a function I can export to set it but I'm going to find out 18:21:59 either that or just a container object... 18:22:19 export.xxx = xxx 18:22:36 then instead of using "image" everywhere, you could use xxx.image 18:22:47 "vm" might be a good name for xxx 18:23:15 then you could have vm.image, vm.data, vm.addr 18:23:36 how would i make a container object? 18:23:42 is that like a function? 18:24:52 just any object 18:25:14 vm = { image : []; data : []; addr : [] } 18:25:23 export.vm = vm 18:25:45 hm, well if I export the object I don't know how/if it lets me put data back to it is the only thing 18:25:50 yes 18:26:02 ngaro.vm.image = xxx 18:26:06 it'll work :) 18:26:09 k 18:26:20 http://img.is1337.eu/f7b61e55.png 18:26:35 only after i've added a third form :o 18:27:15 carefish: look at xpc.inc in the xpl/code directory 18:27:33 thanks :) 18:27:35 include that file, or copy all those declarations to the top of your main program 18:27:56 it won't solve the problem but it'll help you see the problem better :) 18:28:22 and also when you hit OK in lazarus you should go to the problem line anyway. 18:28:33 already solved it 18:28:48 forgot to add the proper menuitem to popupmenu 18:28:50 cool 18:29:23 pascal can do runtime bounds checking on all your arrays and whatnot, and provide detailed stack traces, etc. 18:29:56 carefish: maybe we should take this to #learnprogramming, btw, if you're not working on stuff for retro at the moment 18:30:17 or #fpc :) 18:30:30 no that'll probably annoy fpc :) 18:31:09 oh, i'll post any issues from now on at learnprogramming 18:31:16 thanks :) 18:31:21 and i'm really sorry i'm not of more help w/ ld25 :( 18:31:50 it's no big deal. you're really supposed to go into this with a working game engine... it's about making games not technology 18:34:08 haha, i guess that's true 18:50:17 tangentstorm updated and I think it's working? i did some tests to insure it does call the rxProcessImage function. here it is https://github.com/intothev01d/ngaro-js/blob/master/src/retro.js 18:51:05 :) 18:51:10 cool 18:52:05 ngaro.image = imageArray; <- so this just worked out of the box? 18:53:31 that's what I'm not sure of 18:53:36 everything else seems to though 18:53:45 I don't know really how to check, if you can help me with that 18:54:12 well, the way to check would be to run the tests :) 18:54:29 i don't know how else to do it without a debugger 18:54:36 you need to dump the contents of the array :) 18:55:35 i really think you can just dump it with console.log(ngaro.image.join("|")); 18:56:53 yeah [1,2,-3].join(" "); 18:57:10 works just fine at the prompt in firebug 18:57:53 so put that where in retro? 18:58:01 so if you dump it before and after you should see something 18:58:14 ok 18:58:21 how about in the dump_after section you left at the bottom? 18:58:38 so dump is going to take what as a parameter? just the image? 18:58:42 it's not the exact format the tests want, but it's good enough to try it out 18:58:54 just put that exact line for now 18:58:59 console.log(ngaro.image.join("|")); 18:59:09 just so you can see what you're working on 18:59:10 ok 18:59:23 in fact 18:59:42 you have a copy of retro-language lying around, right? 18:59:53 run the ngarotests 19:00:03 it'll generate all those little *.img files 19:00:17 copy one to this directory manually and see if your argument stuff works 19:00:47 maybe even just comment out the call to rxProcessImage for a moment and just double check that you're loading what you think you're loading 19:00:56 ok 19:01:19 if all goes well, you'll see a bunch of numbers separated by pipe characters (change it to a tab or space or newline if you want) 19:03:18 um it's not doing anything right now 19:03:40 oh wait, had to pass the --dump 19:03:41 now it is 19:03:45 :) 19:04:07 neat. many zeros there but I do have other sections that have numbers 19:04:14 does it look like it might be pretty close to the code you expected? 19:04:33 that's why i was saying grab one of the test images.. they're tiny 19:04:41 ah ok 19:04:42 the real retro image is huge 19:04:46 yea it is 19:05:07 so if i set this right, i just need to pass it the image path 19:05:07 in fact it's especially huge because i forgot to truncate all those zeros when i made it :) 19:05:22 * tangentstorm crosses fingers 19:06:12 i guess i need to run it like this then 'node retro.js --image /path/to/image --dump right? 19:06:27 should take all the arguments and my passed in images and dump it 19:06:31 haha you wrote it! :) 19:06:32 let me find where the test images are 19:06:32 but yeah 19:06:35 lol 19:06:39 i know, why am I asking you? 19:06:40 lol 19:07:08 you have to actually run ngarotests.py in that test directory 19:07:15 and it'll generate them 19:07:19 ok 19:07:23 then you can just run git status to see where they are 19:07:36 or bzr status or whatever you checked out 19:09:17 i went into the test/ngaro directory and ran 'python ngarotest.py' but just got a bunch of errorsls 19:09:24 oh wait 19:09:26 here they are 19:09:50 ok so I'm going to run the add.img. any idea what values I should see? 19:10:57 holy fuck it worked 19:10:59 no but you can open it in ahex editor 19:11:03 :) 19:13:12 so now make a copy of that output, turn on the processimage thing and do it again 19:13:16 well 19:13:28 it probably won't change the ram 19:13:38 you need to dump the stacks too to see if it works 19:14:06 so just copy and paste that line twice for data and addr 19:14:21 you probably have to export them first 19:14:32 yea 19:15:14 so i got the output with the processImage already on 19:15:35 well dump the stacks afterward 19:15:37 well with or without 19:15:56 the stacks will be in ngaro? 19:16:00 yes 19:16:05 one is called data, the other addr 19:16:09 ok 19:16:45 they're Stack objects, not just arrays though 19:16:52 so you want to dump data.data and addr.data 19:17:13 https://github.com/intothev01d/ngaro-js/blob/master/src/ngaro.js#L31 19:19:02 yea, says stack has no method join 19:19:09 so it should be address.data 19:19:14 instead of just address 19:19:30 yeah 19:19:59 so now it says has no method join 19:20:50 I guess that means the binary data there has no join method? 19:20:55 or something 19:22:19 good night all 19:22:30 --- quit: erider (Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121129162756]) 19:23:01 try new Array(address.data) 19:23:11 or address.data.toArary() 19:23:23 i think the first works... otherwise look up Int32Array :) 19:23:44 that's a typed array, which is speedy, but not quite as flexible as the normal js array 19:25:23 creating a new array from the address.data gives me the same error though 19:25:57 well then you have do dump the new array :) 19:26:06 to 19:27:00 right, in the dump function i create the new array like this var addressArray = new Array(ngaro.address.data); 19:27:16 then i try to print like this console.log(addressArray.join("|")); 19:27:19 same error 19:31:12 so i guess as soon as I can convert the typed array back to a standard array this should work just fine 19:31:26 if it is reading and working properly 19:31:30 yeah, i'm searching for a standard way to do that 19:31:35 me too 19:31:39 i don't see one which is probably just bad searching on my part 19:31:49 but it's easy enough to just make your own for now and add a //TODO :) 19:32:09 make my own? 19:32:18 oh i get it, just any way that works 19:32:20 lol 19:32:57 function dynamic(typed){ var res = []; for (var i = 0; i < typed.size; ++i) { res.push( typed[i]; ); return res } 19:33:00 something like that 19:33:42 ok 19:34:36 try [].concat(typed) 19:35:08 in that function? 19:35:16 as an alternative to that function 19:35:20 oh ok 19:38:45 well, no error, but nothing prints 19:38:57 for the stack? 19:39:19 yea 19:39:21 as a sanity test, try manually pushing a number 19:39:27 ok 19:39:47 but my guess is that when you set ngaro.image like that it isn't actually changing the exported image 19:39:52 or stack 19:40:08 i believe you're right 19:40:12 so 19:40:12 b/c the push works normally 19:40:28 the problem is that when you set ngaro.image = xxx 19:40:46 everything still references the old value 19:41:26 what if i drop in a setImage function like we talked about and just pass the image like that to ngaro, i know exported functions work 19:41:30 if there's a .clear() method to empy everything then you can just do image.clear() image.concat(newdata) 19:41:42 that should work too 19:41:58 where would I put the .clear()? 19:42:12 i don't even know if clear is real. hang on :) 19:42:21 would i do ngaro.image.clear(); then ngaro.image = imageFile; ? 19:42:26 you can just try this stuff out in the node command prompt 19:42:35 ngaro.image.clear() 19:42:42 ingaro.image.concat(datafromimagefile) 19:42:59 if you say ngaro.image = .... that's the problem you already have 19:43:08 gotcha 19:50:08 --- quit: kumul (Ping timeout: 255 seconds) 19:55:57 --- join: beretta (~beretta@cpe-107-8-120-84.columbus.res.rr.com) joined #retro 20:04:26 tangentstorm, I'm at a loss really at this point but for the most part it isn't going crazy, it just won't print anything 20:04:36 I'll push what I have so you can take a look 20:05:34 ok it's pushed 20:08:18 just make a new object called vm 20:08:50 in where, ngaro? 20:08:52 var vm = { data: data, address : address, image : image }; 20:09:04 yeah because i think now we're having the opposite problem 20:09:21 now we're changing the value in ngaro but exports still points to the old one 20:09:33 where does that go? does it have to be in a certain order in the code? 20:09:43 right before the exports? 20:09:51 or also put exports.image = image inside that setImage function 20:10:29 if you use the vm object , then you'll always be passing that around from both sides, and never changing the reference 20:10:51 once that's stable you can put stuff on it and communicate from either side 20:10:59 it doesn't matter where it goes as long as it's exported 20:11:23 but you have to replace every instance of "image" with "vm.image" and so on 20:11:36 so on for address and stacks 20:11:41 er data 20:12:08 or try just changing exports.image in setimage to avoid the search and replace 20:12:10 or 20:12:21 you can just use exports itself as that object 20:12:28 and use exports.image everywhere 20:12:47 moving it to the setImage doesn't really work either 20:12:50 any of those ways will fix it 20:12:54 I'll try the object, think that might be the best 20:12:58 ok 20:13:37 vm is already a new Opcodes 20:13:50 wouldn't bother me one bit if the ram were in the same place 20:15:46 --- quit: beretta (Ping timeout: 246 seconds) 20:17:50 so don't use var vm? 20:18:28 oh i see vm = new Opcodes 20:18:33 should i call it something else? 20:19:05 your call 20:19:54 maybe you could just make new object called ram or something 20:19:54 if i call it vm will i have to rename the other var vm = opcodes? 20:20:00 yea sounds good 20:20:01 how about op 20:20:07 rename vm to op 20:20:10 op.XOR 20:20:14 op.OUT 20:20:16 i like taht 20:20:17 that 20:21:47 well op is another var somewhere else. I'm just going to call this ram 20:22:43 haha ok 20:27:45 so i should change all image to ram.image correct? 20:27:51 and address to ram.address 20:28:06 here's the line i put in for the object var ram = { image : image, address : address, data : data }; 20:28:59 just start with image since the other two already work 20:29:26 ( they work because they're already objects and because we don't need to set them from the .img file ) 20:30:25 ok 20:30:54 and also in retro they're part of the vm but not part of ram, so i'm less inclined to bundle them now :) 20:33:46 i get a problem with var ram = { image : image }; it says the second image is undefined 20:34:06 image : null 20:34:13 it is undefined 20:34:21 it's only set when it loads 20:34:27 oh ok 20:34:32 on maybe it defaults to an array or something 20:34:34 so change the second 1 to null 20:34:37 yeah 20:34:42 or just to [] 20:34:45 whatever 20:35:13 it's set in rxPrepareImage and rxLoadImage (names are probably not exact) 20:35:31 but when you replace all the images with ram.image it'll work out 20:37:06 so it all worked out there but all the way at bottom now where i export it says exports.ram.image = ram.image; says cannot set the property 'image' of undefined 20:37:20 exports.ram = ram 20:37:27 oh duh 20:37:56 ok so no errors, but still nothing prints anymore 20:38:12 and you're looking at ngaro.ram now? 20:38:36 yea 20:38:36 oh you're not dumping ram, you're dumping the stacks 20:38:47 what is cycles set to? 20:38:58 cycles? 20:39:19 in that function you're calling to run the code 20:39:28 first, are you still running in 20:39:29 it? 20:39:53 i think? 20:39:57 I'm so lost now 20:39:59 lol 20:40:08 I think I'm calling it a day on this project 20:40:14 I'll push what I have for now 20:40:17 ok 20:40:41 i think you're almost there... it's gotta just be something minor at this point and it should all just work 20:41:54 yea I think just referencing the stuff between the two files is the only problem 20:42:02 hopefully after that it will work. seems to so far 20:42:26 so i went from 0 to almost complete over the weekend woot! 20:42:39 mini codeathon 20:42:42 for myself 20:42:43 lol 20:42:56 + var vmImage = convertArray(ngaro.ram); 20:43:06 shouldn't that be ngaro.ram.image? 20:43:11 yes you did 20:43:16 i tried with that first 20:43:43 but I think it should be yes 20:44:44 ok updated 20:47:43 well i'm going to get off for tonight. cya 20:47:48 ok 20:47:50 have a good night 20:47:54 we'll figure this out tomorrow :) 20:48:02 sounds good :D 20:48:07 --- quit: intothev01d_m (Quit: intothev01d_m) 20:48:07 thanks again! 20:48:57 --- join: beretta (~beretta@cpe-107-8-120-84.columbus.res.rr.com) joined #retro 21:02:26 --- quit: beretta (Ping timeout: 272 seconds) 22:41:26 http://imgur.com/7HBpi 22:47:22 --- nick: tangentstorm -> tangentsleep 23:56:38 --- quit: yiyus (Ping timeout: 244 seconds) 23:59:59 --- log: ended retro/12.12.16