Updates from January, 2016 Toggle Comment Threads | Keyboard Shortcuts

  • Jay Versluis 2:05 pm on January 16, 2016 Permalink | Reply
    Tags: Dolphin, Gamecube, Xbox Controller   

    Categories: macOS ( 37 )   

    How to connect your Xbox 360 Controller to Dolphin for Mac 

    DolphinI’ve been experimenting with the marvellous Dolphin Emulator recently. It’s an open source project that allows us to play Nintendo Gamecube and Wii games on modern hardware. Dolphin is available for Windows, OS X and Linux.

    I have a wireless Xbox 360 controller for Windows at my disposal, but the only Windows hardware I have is the first generation Surface Pro. While the controller connects without issues, the Surface¬†sadly just isn’t¬†fast enough to run Dolphin.

    My more powerful hardware is Mac based, and Dolphin runs great on my Mac Mini. But I had no idea how to connect my Xbox controller to it.

    Turns out it’s actually a breeze to setup: let me show you how it worked for me on OS X El Capitan.

    (More …)





     
  • Jay Versluis 5:16 pm on January 13, 2016 Permalink | Reply
    Tags: , ,   

    Categories: Commodore ( 41 )   

    How to use direct block access commands in Commodore DOS 

    Commodore-Logo-PaddedWe can access each sector’s raw data on Commodore disk drives with direct block access commands. Supported drives include the 1541, 1571, the VICE emulator as well as the SD2IEC card reader (for the most part).

    Each single sided floppy contains 35 sectors, while a double sided 1571 formatted disk contains 70 sectors. Each track contains between 17 and 21 sectors depending on how far inside or outside they are. Each sector contains 255 bytes we can read or write.

    Sectors are the same as blocks: only the directory refers to them as “blocks” and shows us how many we have available.

    We’ll need to open two channels to our disk drives: a command channel and a data channel. Here’s how to do it:
    (More …)





     
  • Jay Versluis 9:17 am on January 2, 2016 Permalink | Reply
    Tags:   

    Categories: Commodore ( 41 )   

    How to save data to your C128 RAM Expansion Unit (REU) 

    Commodore-Logo-PaddedWith a RAM Expansion Unit (REU), the Commodore 128 could address up to 512k of data. That was huge in the late eighties! All you needed was one of those REUs, plug it into your cartridge port, and so much more super fast memory was at your fingertips.

    But even with such a cartridge at hand, how do we actually make use of it from CBM BASIC 7.0? With three funky commands called STASH, FETCH and SWAP. Here’s how we can use them.

    The REUs cannot be addressed directly, like other memory in your computer. Instead, data has to be either copied from the C128 to the REU, or vice versa, or swapped out. All three commands take the same four parameters:

    • number of bytes to transfer
    • location in the C128 memory to start
    • REU bank (0-7, depending on the size of the REU)
    • location in the REU bank memory

    This sounds more cryptic than it actually is: the largest REU split 512k over 8 banks of 64k, so that the 8bit operating system could address it.

    So to store 200 bytes of C128 memory, starting at location 5000, saving it inside the REU’s bank 0, location 0, we can use the STASH command like so:

    STASH 200,3000,0,0
    

    To retrieve our data later and bring it back to the same C128 location as before, we can use FETCH with the same parameters:

    FETCH 200,3000,0,0
    

    Rather than copying, we can also exchange data in two places by literally swapping it over. Again the parameters are the same:

    SWAP 200,3000,0,0
    

    Enabling REUs in VICE

    Although I have a physical C128, I do not have a real REU. Maybe one day I’ll find one on eBay, but until then there’s an easy way to emulate an REU using VICE.

    To enable one, head over to Settings – Resource Inspector – Cartridges – REU. Pick the size you like, and even a hard disk location to make the contents of your REU survive restarts.

    Screen Shot 2016-01-02 at 09.08.35

    Screen Shot 2016-01-02 at 09.09.19

    Demo Listing

    Here’s a quick test that allows us to store an arbitrary message in memory, then stash or retrieve it from an attached REU.

    100 print "1 store message in internal memory"
    110 print "2 print message"
    120 print "3 stash message in reu"
    130 print "4 retrieve message from reu"
    140 print "5 clear internal memory"
    141 print "6 quit"
    150 input "your choice";m
    160 on m gosub 1010,1090,1210,1410,1310,2000
    170 run
    1000 :
    1010 rem input and save
    1020 input "what shall we store";a$
    1030 for i=1 to len(a$)
    1040 c$=mid$(a$,i,1)
    1050 poke 3000+i,asc(c$)
    1060 next
    1070 return
    1080 :
    1090 rem retrieve message
    1100 print:print "retrieving..."
    1110 for i=1 to 100
    1120 c=peek(3000+i)
    1130 b$=b$+chr$(c)
    1140 next
    1150 print b$
    1160 return
    1200 :
    1210 rem stash to reu
    1220 stash 200,3000,0,0
    1230 return
    1300 :
    1310 rem clear internal memory
    1320 for i=1 to 200
    1330 poke 3000+i,0
    1340 next
    1350 return
    1400 :
    1410 rem retrieve from reu
    1420 fetch 200,3000,0,0
    1430 return
    2000 :
    2010 rem the end
    2020 end
    

    We don’t see many BASIC listings these days anymore. Enjoy!





     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel