I just switched over to using "stock" mame from advancemame since my new computer's graphics chipset isn't supported. 
I have done the same thing myself recently and it was really a step down in functionality (I'm still using advmenu). What I really miss is advmame's possiblity to change things at runtime and then save the settings to the rc file. In "stock" mame you need to use the keyboard all the time to edit the ini files.
I added a few things to my own mame build to make it easier:
- resolution ini files, e.g. "768x576H.ini" so I don't need an inifile for each game
- multiple configuration ".cfg" files
- "time_to_throttle" to skip game power on tests.
Anyway, a lot of games seem to start up with the wrong orientation. For example, all of the Willaims horizontal games startup up vertical. I created ini files for each game to keep them from doing that but I'm finding more and more that do it. Would it help to post my mame.ini here?
Ensure that none of the rotate options (norotate, ror, rol, autoror, autorol) are activated.
Yeah I miss advmame too. I still use advmenu though. I had spent a *lot* of time creating perfect modes but until I get a PCI video card that is supported for this new computer I have to use std mame.
Anyway, I checked an all the flags you mentioned are set to 0. The flag that seems to make the orientation change is the hwstretch option. I want it to stretch but still keep the original orientation. The keepaspect flag had no effect.
Here's my mame.ini:
### mamepp.ini ###
### Frontend Related ###
clones 1
### Windows path and directory options ###
rompath c:\mame_cab\mameroms
samplepath c:\mame_cab\mamesnd\samples
# inipath <NULL> (not set)
cfg_directory cfg
nvram_directory nvram
memcard_directory memcard
input_directory inp
hiscore_directory hi
state_directory sta
artwork_directory c:\mame_cab\mameimg\artwork
snapshot_directory c:\mame_cab\mameimg\snap
diff_directory diff
ctrlr_directory ctrlr
cheat_file cheat.dat
history_file history.dat
mameinfo_file mameinfo.dat
### Windows video options ###
autoframeskip 0
frameskip 0
waitvsync 0
triplebuffer 0
window 0
ddraw 1
direct3d 0
hwstretch 1
cleanstretch 0
resolution auto
refresh 0
scanlines 1
switchres 1
switchbpp 1
maximize 1
keepaspect 0
matchrefresh 0
syncrefresh 0
throttle 1
full_screen_brightness 0.000000
frames_to_run 0
effect sharp
screen_aspect 4:3
### Windows Direct3D 2D video options ###
zoom 2
d3dtexmanage 1
d3dfilter 0
d3dfeedback 0
d3dscan 100
d3deffectrotate 1
d3dprescale auto
d3deffect none
# d3dcustom <NULL> (not set)
# d3dexpert <NULL> (not set)
### Windows misc options ###
sleep 1
rdtsc 0
high_priority 0
### Windows sound options ###
audio_latency 1
# wavwrite <NULL> (not set)
### Input device options ###
mouse 1
joystick 0
lightgun 0
dual_lightgun 0
offscreen_reload 0
steadykey 0
keyboard_leds 1
led_mode ps/2
a2d_deadzone 0.300000
# ctrlr <NULL> (not set)
paddle_device keyboard
adstick_device keyboard
pedal_device keyboard
dial_device keyboard
trackball_device keyboard
lightgun_device keyboard
digital none
### Mame CORE video options ###
norotate 0
ror 0
rol 0
autoror 0
autorol 0
flipx 0
flipy 0
debug_resolution auto
gamma 0.750000
brightness 0.940000
pause_brightness 0.650000
### Mame CORE vector game options ###
antialias 1
translucency 1
beam 1.000000
flicker 20.000000
intensity 3.000000
### Mame CORE sound options ###
samplerate 44100
samples 1
resamplefilter 1
sound 1
volume 0
### Mame CORE misc options ###
artwork 1
use_backdrops 1
use_overlays 1
use_bezels 1
artwork_crop 0
artwork_resolution 0
cheat 0
debug 0
# playback <NULL> (not set)
# record <NULL> (not set)
log 0
maxlogsize 10000
oslog 0
skip_disclaimer 1
skip_gameinfo 1
skip_validitychecks 0
crconly 0
bios default
# state <NULL> (not set)
### Configuration options ###
readconfig 1
verbose 0