Skip to content

Instantly share code, notes, and snippets.

View rhargreaves's full-sized avatar

Robert Hargreaves rhargreaves

View GitHub Profile
@rhargreaves
rhargreaves / md-flash-address-space.md
Last active September 6, 2024 13:59
Mega Drive & Flash Carts Memory Map

A comprehensive view of the SEGA Mega Drive's address space of itself and popular add-ons, for purposes of identifying clashes.

Component Function Address Start Address End Comment
Console ROM Bank 0 0x000000 0x07FFFF
ROM Bank 1 0x080000 0x0FFFFF
ROM Bank 2 0x100000 0x17FFFF
ROM Bank 3 0x180000 0x1FFFFF
ROM Bank 4 0x200000 0x27FFFF
ROM Bank 5 0x280000 0x2FFFFF
@rhargreaves
rhargreaves / Mega_ED_PRO_USB_example.md
Last active February 26, 2025 15:28
Sending data to the Mega Drive over USB using the Mega EverDrive PRO

Mega EverDrive PRO Overview

The Mega EverDrive PRO has a USB port (much like the EverDrive X7) which allows you to send arbitary data to the Mega Drive over USB. With the X7 you could simply send data to the USB serial device and pick it up at a specific memory mapped location on the Mega Drive. With the PRO, however, you need to wrap the data in a "command" and send it over the USB serial device, so that it will be available to the Mega Drive.

The following information was obtained by reading the source contained in the MEGA-PRO repo.

Command Message Format

| Field | Bytes | Value (hex) | Description |

@rhargreaves
rhargreaves / org.samba.plist
Created June 17, 2018 20:00
MacOS plist file for launching samba with launchd
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd>
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.samba</string>
<key>ProgramArguments</key>
<array>
<string>/opt/samba/sbin/smbd</string>
<string>-s</string>

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@rhargreaves
rhargreaves / suite_spec_acctest_1.rb
Created June 28, 2016 11:00
SPA 2016: Acceptance Test 1: Site Loads
it 'loads the page' do
visit @site_url
expect(page).to have_content 'clouds'
end
@rhargreaves
rhargreaves / suite_spec_acctest_3.rb
Created June 28, 2016 10:48
SPA 2016: Acceptance Test: Has Up To Date Counter
# 1) Place following in 'context' block
# START ---
it 'has up-to-date counter' do
api_counter_value = get_counter_value_from_api
page_counter_value = get_counter_value_from_page
puts "API counter is #{api_counter_value}, Page is #{page_counter_value}"
expect(page_counter_value).to be >= api_counter_value
end
@rhargreaves
rhargreaves / suite_spec_acctest_2.rb
Last active June 28, 2016 10:44
SPA 2016: Acceptance Test - Site Loads Under 2 Seconds
it 'loads the page fully in under 2 seconds' do
stopwatch = Stopwatch.new
visit @site_url
expect(stopwatch.elapsed_time).to be < 2
end