+SpiceWare Posted March 19, 2017 Share Posted March 19, 2017 Great! Was busy working on Draconian today, just finished posting the latest build. All of my changes to Stella are in the pre5 source archive I downloaded from the releases page. I need to figure this out. I've not used git before, do you suggest using command line or a GUI client? If GUI, any Mac recommendations? Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted March 19, 2017 Share Posted March 19, 2017 I installed TortoiseGit just yesterday, and that was easy. And at first glance it seems to work quite identical to SVN. Quote Link to comment Share on other sites More sharing options...
DirtyHairy Posted March 19, 2017 Share Posted March 19, 2017 (edited) Git has a very rich CLI interface with excellent documentation for each subcommand accessible via "--help" that I prefer to graphical frontends, but that comes down to personal taste I guess If you're looking for an OSX gui, there's sourcetree (https://www.sourcetreeapp.com/) which seems to be pretty good (most mac people at my workplace use it), and gitkraken (https://www.gitkraken.com/) also looks promising. If you're going for the CLI and have some time to spare, the official tutorial (https://git-scm.com/docs/gittutorial) should be more than enough to get you started. Actually, beyond first looks, git and svn are very different. In particular, Git is decentral. Each clone is a full-fledged copy of the cloned repo, and you can work and commit offline without restrictions. Git has a true branches and tags (which are just lazy copies in SVN) Changes are either "pushed" to the remote repository in batches, or you put your branch - either master (that's what SVN's trunk is) or a feature branch - for a pull request. The latter is the workflow advocated by github, and it offers a web interface for exactly that: you fork a repository, make your changes, either on master or on a feature branch, and then use the web interface to make a pull request. This workflow is what's described in the stella docu. Edited March 19, 2017 by DirtyHairy Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 19, 2017 Share Posted March 19, 2017 Thanks! My folks are on their way for a visit, so I'll check into these options later tonight or early in the week. Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 20, 2017 Share Posted March 20, 2017 Installed SourceTree, didn't like that it wanted me to create yet another account so installed GitKracken. After reading step 2, I figured I needed to make a "Clone" and found the File->Clone Repo menu option. Plugged in a new local path (different from my other copies of Stella source) and the URL from Step 2. Source is now on my machine and I was able to compile as usual. Added my CDF files and right away spotted something in Xcode I'd not seen before: After clicking on the files the ? changed to A, the tooltip for which is "Added": In my other Stella projects files I've added looked just like the others: There's a Source Control menu that I'm used to seeing like this: it's now like this: Seleting History shows this: So Xcode appears to have native support for GitHub! Quote Link to comment Share on other sites More sharing options...
DirtyHairy Posted March 20, 2017 Share Posted March 20, 2017 (edited) Forgot about that one, yep, Xcode (as most IDEs and editors) has native git support (github is only a particular hosting platform). In order to contribute back your changes, you'll have to create a github accout and fork the Stella repository (using the button in the upper right corner of the interface). You can then checkout your own fork and commit and push your changes there. Once you are ready, you do a pull request against the main repo (using the web gui) that then can be merged back. Edited March 20, 2017 by DirtyHairy Quote Link to comment Share on other sites More sharing options...
+stephena Posted March 20, 2017 Author Share Posted March 20, 2017 Just wanted to add that this now the preferred method, rather than sending me patches. Now that I'm getting more used to how git and github work, I can never go back to SVN and having patches just floating around. 1 Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 20, 2017 Share Posted March 20, 2017 In order to contribute back your changes, you'll have to create a github accout and fork the Stella repository (using the button in the upper right corner of the interface). Oops - I did create a github account, but didn't get past step 3! I'll take care of that this evening. Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 21, 2017 Share Posted March 21, 2017 Made the TIMER 1 changes in Thumbulator and DPC+. Hopefully I did the pull request correctly. Made a quick test program, DPC+Timer, based on Collect 2 from my unfinished DPC+ ARM Development tutorial. It was handy because it already had the TV TYPE in the menu along with the color logic. I also overwrote the START menu option with the results of the timer. When run it'll default to NTSC due to 262 scanlines: TAB for in game menu GAME PROPERTIES DISPLAY change FORMAT to PAL60 OK EXIT MENU CONTROL-R to reload Repeat above but change FORMAT to SECAM60: DPC+Timer.zip dpc+timer.bin 1 Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 21, 2017 Share Posted March 21, 2017 I should note if you "start" the game it's non-playable. It does show information at the bottom of the arena based on the state of the difficulty switches:BB - score and time exampleAB - time remaining in vertical blank and overscanBA - test patternAA- joystick input state First digit - F if fire held on a joystick, or B if primary is held on gamepad Second digit - C if secondary held on gamepad Third digit - U, D, B* or blank for up/down state Fourth digit - L, R, B* or blank for left/right state * B means both directions were held, which could happen when using a Starplex controller. Quote Link to comment Share on other sites More sharing options...
+stephena Posted March 21, 2017 Author Share Posted March 21, 2017 Seems correct, as I just merged it I will address the one issue I found (only being able to call updateTimer() from just before run) soon. Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 21, 2017 Share Posted March 21, 2017 Awesome! Received the github email, so was just checking out the site. I see this: I suspect I should reconcile that before making additional changes, but don't know what to do. Would it make more sense to worry about that after you've addressed the issue? Quote Link to comment Share on other sites More sharing options...
DirtyHairy Posted March 21, 2017 Share Posted March 21, 2017 (edited) I am a shell dweller, so I do not know how to do this with Xcode, but here's what you have to do on the CLI: 1) Add a remote that points to the upstream stella repo (a git repository can track and merge from arbitrarily many remote repositories): git remote add upstream git@github.com:stella-emu/stella.git You only have to do this once. 2) Fetch upstream changes git fetch upstream At this point, the upstream changes are avaiable locally, but they're not integrated into your own code yet. 3) Make sure that you are on the branch you want to merge the remote changes into (master I guess) git checkout master 4) Merge remote branch (usually master) into your own branch git merge upstream/master 5) Push the changes back into your own repo git push Github themselves has a pretty good documentation of these steps at https://help.github.com/articles/syncing-a-fork/ Edited March 21, 2017 by DirtyHairy Quote Link to comment Share on other sites More sharing options...
+stephena Posted March 21, 2017 Author Share Posted March 21, 2017 I'll leave this to yourself and DirtyHairy to discuss, since I don't know git that well. I would have assumed that once I did the merge in stella master, you could simply re-sync to it and continue working on new code (at least that's the way SVN worked). I've never been on that end of a pull request, so I'm not sure what to do. As for the change I have to make, don't worry about that for now; it's just an optimization thing that can wait for a while. Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 21, 2017 Share Posted March 21, 2017 When I tried to upload the changes to github via Xcode it ended up creating a whole new project in another directory, which was not what I was expecting. I ended up deleting that new project, then muddled my way through GitKraken to upload the changes instead. I noticed the Compare option to the right of This branch is 1 commit behind stella-emu:master, so clicked it: not what I was expecting to see, so clicked switching the base: So it looks like the commit I'm behind on is my own?!?! Confusing. I suspect it's safe to let it be for now. Quote Link to comment Share on other sites More sharing options...
DirtyHairy Posted March 21, 2017 Share Posted March 21, 2017 So it looks like the commit I'm behind on is my own?!?! Confusing. I suspect it's safe to let it be for now. The commit you are behind is Stephen's merge request. Merging a branch into another will create a merge commit which has two ancestors and which updates all affected files to their merged versions. Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 21, 2017 Share Posted March 21, 2017 Thanks, I'm sure it'll eventually make sense I'll add in the BUS and CDF support next. At this time the in-cart audio doesn't work - 3 voice sounds wrong while digital sample support has yet to be written. Do y'all want me to do a pull request before I finish those routines so people can try out the Bus Stuffing demos and new builds of Draconian, or would you prefer I wait until I can finish the audio? 1 Quote Link to comment Share on other sites More sharing options...
+stephena Posted March 21, 2017 Author Share Posted March 21, 2017 I see no reason to wait; release early, release often ! 3 Quote Link to comment Share on other sites More sharing options...
+stephena Posted March 22, 2017 Author Share Posted March 22, 2017 I've now updated the code so that if a device (ie, a cart) wants to know about console timing changes, it simply has to implement the consoleChanged() method. Also, this fix is now applied to the DPC+ class. Spice, take note of how its done, since I assume you need the same thing in BUS and/or CDF. 1 Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 22, 2017 Share Posted March 22, 2017 Sounds like I've a fun night ahead of me. I'll need to figure out how to get your changes over to my repository, then figure out how to reconcile them with my pending changes. Adding support for BUS and CDF required a few changes to the Thumbulator and DPC+, for instance reset() differs based on size of the Harmony/Melody driver so the Thumbulator needs to know what to configure for. int Thumbulator::reset() { std::fill(reg_norm, reg_norm+12, 0); reg_norm[13] = 0x40001FB4; switch(configuration) { // future 2K Harmony/Melody drivers will most likely use these settings case ConfigureFor::BUS: case ConfigureFor::CDF: reg_norm[14] = 0x00000800; // Link Register reg_norm[15] = 0x0000080B; // Program Counter break; // future 3K Harmony/Melody drivers will most likely use these settings case ConfigureFor::DPCplus: reg_norm[14] = 0x00000C00; // Link Register reg_norm[15] = 0x00000C0B; // Program Counter break; } ... } Quote Link to comment Share on other sites More sharing options...
+stephena Posted March 22, 2017 Author Share Posted March 22, 2017 Git is usually pretty smart about changes made by different people, and it can merge pretty well (unless of course we both change the exact same lines in two different ways). EDIT: You could of course do a pull request that has conflicts, and leave it to me to resolve them before I do a merge I normally don't recommend to do that, but if you get to a point where you just can't get it working, I'll take whatever you have and fix it on my end. Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 23, 2017 Share Posted March 23, 2017 Not sure what I did, but GitKraken crashed while I was trying to get the changes for consoleChanged(). In the process my local changes disappeared. Thankfully it'll be easy to recover from as all those changes are in another directory in the project I'd downloaded before I signed up for github (could also have recovered them via Time Machine).So I started over from scratch and decided to try out Xcode's built in support for git. Connected Xcode to my repository and checked stella out from there. I then set up the stella-emu repository, did a Source Control->Pull from it, and obtained the consoleChanged() functionality.I then did Source Control->Push to my repository. It appears to have worked correctly as I'm now even with stella-emu. Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 24, 2017 Share Posted March 24, 2017 Oooh - I think I'm going to like this Xcode/GitHub integration!Finished importing the BUS and CDF changes - the M characters after some of the files denote a source-control status of modified. The - means there's source-control status files inside that folder:Click the symbol on the bottom left to show only those files with a Source-Control Status:Change the view to Comparison to see what changed:That's actually a dropdown:that lets you see who to Blame:or view the Log:Using the Source Control->Commit menu option to send the changes up to GitHub: Lastly I logged into GitHub and initiated the Pull Request Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 24, 2017 Share Posted March 24, 2017 stephena - if you need to ROMS for testing the BUS stuffing demos are here and the last 3 Draconian blog entries are CDF. Quote Link to comment Share on other sites More sharing options...
+stephena Posted March 24, 2017 Author Share Posted March 24, 2017 Spice, I've integrated your changes. Everything is basically fine, but I had to do another commit to fix a few compile warnings and whitespace/tab issues. In future commits, could you use a tab size of 2 spaces (so width=2, format=space). Otherwise, everything is working great. Thanks for the code EDIT: You will have to re-sync your code to main git codebase before you make any further changes on your end. 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.